From kde-commits Fri Dec 31 23:27:34 2010 From: Geoffry Song Date: Fri, 31 Dec 2010 23:27:34 +0000 To: kde-commits Subject: [Calligra] e68caa8: add list of KisAbstractPerspectiveGrid* to KisCanv Message-Id: <20101231232734.E5BC6A60AE () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129383812216718 commit e68caa8bda26005d4cc6789e6f6f3028c0a5fb4d branch master Author: Geoffry Song Date: Fri Dec 31 12:22:26 2010 -0500 add list of KisAbstractPerspectiveGrid* to KisCanvasResourceProvider diff --git a/krita/ui/kis_canvas_resource_provider.cpp b/krita/ui/kis_canvas_resource_provider.cpp index e6975ea..a738052 100644 --- a/krita/ui/kis_canvas_resource_provider.cpp +++ b/krita/ui/kis_canvas_resource_provider.cpp @@ -378,4 +378,19 @@ void KisCanvasResourceProvider::slotResetEnableFGChange(bool b) m_enablefGChange = b; } +QList KisCanvasResourceProvider::perspectiveGrids() const +{ + return m_perspectiveGrids; +} + +void KisCanvasResourceProvider::addPerspectiveGrid(KisAbstractPerspectiveGrid* grid) +{ + m_perspectiveGrids.append(grid); +} + +void KisCanvasResourceProvider::removePerspectiveGrid(KisAbstractPerspectiveGrid* grid) +{ + m_perspectiveGrids.removeOne(grid); +} + #include "kis_canvas_resource_provider.moc" diff --git a/krita/ui/kis_canvas_resource_provider.h b/krita/ui/kis_canvas_resource_provider.h index 36f4b31..abe5852 100644 --- a/krita/ui/kis_canvas_resource_provider.h +++ b/krita/ui/kis_canvas_resource_provider.h @@ -36,6 +36,7 @@ class KoCanvasBase; class KisView2; class KisPattern; class KisFilterConfiguration; +class KisAbstractPerspectiveGrid; /** * KisCanvasResourceProvider contains the per-view current settings that @@ -97,6 +98,10 @@ public: void setCurrentCompositeOp(const QString& compositeOp); QString currentCompositeOp() const; + QList perspectiveGrids() const; + void addPerspectiveGrid(KisAbstractPerspectiveGrid*); + void removePerspectiveGrid(KisAbstractPerspectiveGrid*); + public slots: @@ -146,6 +151,7 @@ private: KoResourceManager * m_resourceManager; const KoColorProfile * m_displayProfile; bool m_fGChanged; + QList m_perspectiveGrids; // This is a flag to handle a bug: // If pop up palette is visible and a new colour is selected, the new colour