2015-02-07 00:32:25 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* Copyright (C) 2008, 2009 by Volker Lanz <vl@fidra.de> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 3 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
|
|
|
*************************************************************************/
|
2009-04-21 17:36:43 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#if !defined(LISTOPERATIONS_H)
|
2009-04-21 17:36:43 +01:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#define LISTOPERATIONS_H
|
2009-04-21 17:36:43 +01:00
|
|
|
|
2016-01-12 00:12:49 +00:00
|
|
|
#include <core/operationstack.h>
|
2010-02-12 11:49:35 +00:00
|
|
|
|
2009-04-21 17:36:43 +01:00
|
|
|
#include "ui_listoperationsbase.h"
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class Operation;
|
|
|
|
class QPoint;
|
|
|
|
class KActionCollection;
|
|
|
|
|
2010-05-18 23:27:30 +01:00
|
|
|
/** A list of pending operations.
|
2009-04-21 17:36:43 +01:00
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
@author Volker Lanz <vl@fidra.de>
|
2009-04-21 17:36:43 +01:00
|
|
|
*/
|
2016-01-06 13:56:32 +00:00
|
|
|
class ListOperations : public QWidget, public Ui::ListOperationsBase
|
2009-04-21 17:36:43 +01:00
|
|
|
{
|
2015-07-13 15:17:41 +01:00
|
|
|
Q_DISABLE_COPY(ListOperations)
|
|
|
|
|
|
|
|
public:
|
2016-04-14 19:18:36 +01:00
|
|
|
ListOperations(QWidget* parent = nullptr);
|
2015-07-13 15:17:41 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
void setActionCollection(KActionCollection* coll) {
|
|
|
|
m_ActionCollection = coll;
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateOperations(const OperationStack::Operations& ops);
|
|
|
|
|
2016-07-02 12:12:56 +01:00
|
|
|
QListWidget& listOperations() {
|
|
|
|
Q_ASSERT(m_ListOperations);
|
|
|
|
return *m_ListOperations;
|
|
|
|
}
|
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
protected:
|
|
|
|
KActionCollection* actionCollection() {
|
|
|
|
return m_ActionCollection;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QListWidget& listOperations() const {
|
|
|
|
Q_ASSERT(m_ListOperations);
|
|
|
|
return *m_ListOperations;
|
|
|
|
}
|
|
|
|
|
2016-07-02 12:12:56 +01:00
|
|
|
void customContextMenuRequested(const QPoint& pos);
|
2015-07-13 15:17:41 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
KActionCollection* m_ActionCollection;
|
2009-04-21 17:36:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|