2020-09-16 00:35:12 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2009-2010 Volker Lanz <vl@fidra.de>
|
|
|
|
SPDX-FileCopyrightText: 2014-2017 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
|
|
|
|
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:
|
2019-12-09 16:33:04 +00:00
|
|
|
explicit 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
|
|
|
|
|