File indexing completed on 2024-12-22 04:15:01
0001 /* 0002 * SPDX-FileCopyrightText: 2011 Sven Langkamp <sven.langkamp@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef TASKSETDOCKER_DOCK_H 0008 #define TASKSETDOCKER_DOCK_H 0009 0010 #include <QDockWidget> 0011 #include <QModelIndex> 0012 #include <QPointer> 0013 0014 #include <KoCanvasObserverBase.h> 0015 #include <KoResourceServer.h> 0016 0017 #include <kis_canvas2.h> 0018 0019 #include "taskset_resource.h" 0020 #include "ui_wdgtasksetdocker.h" 0021 0022 class TasksetModel; 0023 0024 class TasksetDockerDock : public QDockWidget, public KoCanvasObserverBase, public Ui_WdgTasksetDocker { 0025 Q_OBJECT 0026 public: 0027 TasksetDockerDock(); 0028 ~TasksetDockerDock() override; 0029 QString observerName() override { return "TasksetDockerDock"; } 0030 void setCanvas(KoCanvasBase *canvas) override; 0031 void unsetCanvas() override; 0032 0033 private Q_SLOTS: 0034 void actionTriggered(QAction* action); 0035 void activated (const QModelIndex& index); 0036 void recordClicked(); 0037 void saveClicked(); 0038 void clearClicked(); 0039 void resourceSelected( KoResourceSP resource ); 0040 0041 private: 0042 QPointer<KisCanvas2> m_canvas; 0043 TasksetModel *m_model; 0044 bool m_blocked; 0045 KoResourceServer<TasksetResource> *m_rserver {0}; 0046 }; 0047 0048 0049 #endif 0050