File indexing completed on 2025-01-26 04:10:09
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef _GRID_DOCK_H_ 0008 #define _GRID_DOCK_H_ 0009 0010 #include <QDockWidget> 0011 #include <KoCanvasObserverBase.h> 0012 #include "kis_signal_auto_connection.h" 0013 0014 class QVBoxLayout; 0015 class KisCanvas2; 0016 class GridConfigWidget; 0017 class KisSignalAutoConnection; 0018 class KisGridConfig; 0019 class KisGuidesConfig; 0020 0021 class GridDockerDock : public QDockWidget, public KoCanvasObserverBase { 0022 Q_OBJECT 0023 public: 0024 GridDockerDock(); 0025 ~GridDockerDock() override; 0026 QString observerName() override { return "GridDockerDock"; } 0027 void setCanvas(KoCanvasBase *canvas) override; 0028 void unsetCanvas() override; 0029 0030 public Q_SLOTS: 0031 void slotGuiGridConfigChanged(); 0032 void slotGridConfigUpdateRequested(const KisGridConfig &config); 0033 0034 void slotGuiGuidesConfigChanged(); 0035 void slotGuidesConfigUpdateRequested(const KisGuidesConfig &config); 0036 0037 private: 0038 GridConfigWidget *m_configWidget; 0039 QPointer<KisCanvas2> m_canvas; 0040 KisSignalAutoConnectionsStore m_canvasConnections; 0041 }; 0042 0043 0044 #endif