[gegl-qt] Renaming: GeglQt{GraphicsWidgetView, DeclarativeView} -> GeglQt::NodeView{GraphicsWidget, DeclarativeI



commit f5eb3312d7d00b8c59c188192a3b37b2e65a8c08
Author: Jon Nordby <jononor gmail com>
Date:   Mon Aug 22 19:46:03 2011 +0200

    Renaming: GeglQt{GraphicsWidgetView,DeclarativeView} -> GeglQt::NodeView{GraphicsWidget,DeclarativeItem}

 examples/qgv-basic/qgv-basic.cpp     |    2 +-
 examples/qml-basic/qml-basic.cpp     |    2 +-
 examples/qml-paint/qml-paint.cpp     |    2 +-
 gegl-qt/geglqtdeclarativeview.cpp    |   18 +++++++++---------
 gegl-qt/geglqtdeclarativeview.h      |   10 +++++++---
 gegl-qt/geglqtgraphicswidgetview.cpp |   18 +++++++++---------
 gegl-qt/geglqtgraphicswidgetview.h   |   10 +++++++---
 7 files changed, 35 insertions(+), 27 deletions(-)
---
diff --git a/examples/qgv-basic/qgv-basic.cpp b/examples/qgv-basic/qgv-basic.cpp
index 4d1c8db..057d4eb 100644
--- a/examples/qgv-basic/qgv-basic.cpp
+++ b/examples/qgv-basic/qgv-basic.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
     QGraphicsView view;
     view.setScene(scene);
 
-    GeglQtGraphicsWidgetView w;
+    NodeViewGraphicsWidget w;
     w.setInputNode(node);
     w.setPreferredSize(1000, 1000);
     scene->addItem(&w);
diff --git a/examples/qml-basic/qml-basic.cpp b/examples/qml-basic/qml-basic.cpp
index 8225925..07a28c4 100644
--- a/examples/qml-basic/qml-basic.cpp
+++ b/examples/qml-basic/qml-basic.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
     QVariant nodeVariant = qVariantFromValue(static_cast<void*>(node));
 
     // TODO: Create an QDeclarativeExtensionPlugin which does this?
-    qmlRegisterType<GeglQtDeclarativeView>("GeglQt", 0, 1, "NodeView");
+    qmlRegisterType<NodeViewDeclarativeItem>("GeglQt", 0, 1, "NodeView");
 
     QDeclarativeView view;
     // Expose the gegl node to QML, so it can be used there
diff --git a/examples/qml-paint/qml-paint.cpp b/examples/qml-paint/qml-paint.cpp
index fc0fbaa..76abd44 100644
--- a/examples/qml-paint/qml-paint.cpp
+++ b/examples/qml-paint/qml-paint.cpp
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
     PaintEngine paintEngine;
 
     // TODO: Create an QDeclarativeExtensionPlugin which does this?
-    qmlRegisterType<GeglQtDeclarativeView>("GeglQt", 0, 1, "NodeView");
+    qmlRegisterType<NodeViewDeclarativeItem>("GeglQt", 0, 1, "NodeView");
 
     QDeclarativeView view;
     // Expose the paint engine to QML, so it can be used there
diff --git a/gegl-qt/geglqtdeclarativeview.cpp b/gegl-qt/geglqtdeclarativeview.cpp
index f27b968..0a6131a 100644
--- a/gegl-qt/geglqtdeclarativeview.cpp
+++ b/gegl-qt/geglqtdeclarativeview.cpp
@@ -3,7 +3,7 @@
 
 using namespace GeglQt;
 
-GeglQtDeclarativeView::GeglQtDeclarativeView(QDeclarativeItem *parent)
+NodeViewDeclarativeItem::NodeViewDeclarativeItem(QDeclarativeItem *parent)
     : QDeclarativeItem(parent)
     , priv(new GeglQtViewImplementation())
 {
@@ -15,13 +15,13 @@ GeglQtDeclarativeView::GeglQtDeclarativeView(QDeclarativeItem *parent)
             this, SLOT(viewportSizeChangeRequested(QSizeF)));
 }
 
-GeglQtDeclarativeView::~GeglQtDeclarativeView()
+NodeViewDeclarativeItem::~NodeViewDeclarativeItem()
 {
     delete priv;
 }
 
 void
-GeglQtDeclarativeView::setInputNode(QVariant node)
+NodeViewDeclarativeItem::setInputNode(QVariant node)
 {
     if (node.isValid()) {
         GeglNode *gegl_node = static_cast<GeglNode*>(node.value<void*>());
@@ -31,19 +31,19 @@ GeglQtDeclarativeView::setInputNode(QVariant node)
 }
 
 QVariant
-GeglQtDeclarativeView::inputNode()
+NodeViewDeclarativeItem::inputNode()
 {
     return qVariantFromValue(static_cast<void*>(priv->inputNode()));
 }
 
 NodeViewOptions *
-GeglQtDeclarativeView::options() const
+NodeViewDeclarativeItem::options() const
 {
     return priv->options();
 }
 
 void
-GeglQtDeclarativeView::invalidate(QRectF rect)
+NodeViewDeclarativeItem::invalidate(QRectF rect)
 {
     if (rect.isValid()) {
         update(rect);
@@ -53,7 +53,7 @@ GeglQtDeclarativeView::invalidate(QRectF rect)
 }
 
 void
-GeglQtDeclarativeView::viewportSizeChangeRequested(QSizeF requestedSize)
+NodeViewDeclarativeItem::viewportSizeChangeRequested(QSizeF requestedSize)
 {
     // XXX: Is this the correct way to do it?
     setImplicitHeight(requestedSize.height());
@@ -61,7 +61,7 @@ GeglQtDeclarativeView::viewportSizeChangeRequested(QSizeF requestedSize)
 }
 
 void
-GeglQtDeclarativeView::paint(QPainter *painter,
+NodeViewDeclarativeItem::paint(QPainter *painter,
                              const QStyleOptionGraphicsItem *option,
                              QWidget *widget)
 {
@@ -70,7 +70,7 @@ GeglQtDeclarativeView::paint(QPainter *painter,
 }
 
 void
-GeglQtDeclarativeView::geometryChanged(const QRectF & newGeometry,
+NodeViewDeclarativeItem::geometryChanged(const QRectF & newGeometry,
                                        const QRectF & oldGeometry)
 {
     QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
diff --git a/gegl-qt/geglqtdeclarativeview.h b/gegl-qt/geglqtdeclarativeview.h
index e8c9b0c..dce8980 100644
--- a/gegl-qt/geglqtdeclarativeview.h
+++ b/gegl-qt/geglqtdeclarativeview.h
@@ -8,12 +8,14 @@
 
 class GeglQtViewImplementation;
 
-class GeglQtDeclarativeView : public QDeclarativeItem
+namespace GeglQt {
+
+class NodeViewDeclarativeItem : public QDeclarativeItem
 {
     Q_OBJECT
 public:
-    explicit GeglQtDeclarativeView(QDeclarativeItem *parent = 0);
-    ~GeglQtDeclarativeView();
+    explicit NodeViewDeclarativeItem(QDeclarativeItem *parent = 0);
+    ~NodeViewDeclarativeItem();
 
     // QVariant is used so that GeglNode* can be passed through QML
     void setInputNode(QVariant node);
@@ -35,7 +37,9 @@ private Q_SLOTS:
     void viewportSizeChangeRequested(QSizeF);
 
 private:
+    Q_DISABLE_COPY(NodeViewDeclarativeItem)
     GeglQtViewImplementation *priv;
 };
 
+}
 #endif // GEGLQTDECLARATIVEVIEW_H
diff --git a/gegl-qt/geglqtgraphicswidgetview.cpp b/gegl-qt/geglqtgraphicswidgetview.cpp
index dd524a6..50a4708 100644
--- a/gegl-qt/geglqtgraphicswidgetview.cpp
+++ b/gegl-qt/geglqtgraphicswidgetview.cpp
@@ -21,7 +21,7 @@
 
 using namespace GeglQt;
 
-GeglQtGraphicsWidgetView::GeglQtGraphicsWidgetView(QGraphicsItem * parent)
+NodeViewGraphicsWidget::NodeViewGraphicsWidget(QGraphicsItem * parent)
     : QGraphicsWidget(parent)
     , priv(new GeglQtViewImplementation())
 {
@@ -35,31 +35,31 @@ GeglQtGraphicsWidgetView::GeglQtGraphicsWidgetView(QGraphicsItem * parent)
 }
 
 
-GeglQtGraphicsWidgetView::~GeglQtGraphicsWidgetView()
+NodeViewGraphicsWidget::~NodeViewGraphicsWidget()
 {
     delete priv;
 }
 
 void
-GeglQtGraphicsWidgetView::setInputNode(GeglNode *node)
+NodeViewGraphicsWidget::setInputNode(GeglNode *node)
 {
     priv->setInputNode(node);
 }
 
 GeglNode *
-GeglQtGraphicsWidgetView::inputNode()
+NodeViewGraphicsWidget::inputNode()
 {
     return priv->inputNode();
 }
 
 NodeViewOptions *
-GeglQtGraphicsWidgetView::options() const
+NodeViewGraphicsWidget::options() const
 {
     return priv->options();
 }
 
 void
-GeglQtGraphicsWidgetView::invalidate(QRectF rect)
+NodeViewGraphicsWidget::invalidate(QRectF rect)
 {
     if (rect.isValid()) {
         update(rect);
@@ -69,13 +69,13 @@ GeglQtGraphicsWidgetView::invalidate(QRectF rect)
 }
 
 void
-GeglQtGraphicsWidgetView::viewportSizeChangeRequested(QSizeF requestedSize)
+NodeViewGraphicsWidget::viewportSizeChangeRequested(QSizeF requestedSize)
 {
     resize(requestedSize);
 }
 
 void
-GeglQtGraphicsWidgetView::paint(QPainter *painter,
+NodeViewGraphicsWidget::paint(QPainter *painter,
                                 const QStyleOptionGraphicsItem *option,
                                 QWidget *widget)
 {
@@ -84,7 +84,7 @@ GeglQtGraphicsWidgetView::paint(QPainter *painter,
 }
 
 void
-GeglQtGraphicsWidgetView::handleGeometryChange()
+NodeViewGraphicsWidget::handleGeometryChange()
 {
     priv->viewportSizeChanged(geometry().size());
 }
diff --git a/gegl-qt/geglqtgraphicswidgetview.h b/gegl-qt/geglqtgraphicswidgetview.h
index efce143..27850c9 100644
--- a/gegl-qt/geglqtgraphicswidgetview.h
+++ b/gegl-qt/geglqtgraphicswidgetview.h
@@ -25,12 +25,14 @@
 
 class GeglQtViewImplementation;
 
-class GeglQtGraphicsWidgetView : public QGraphicsWidget
+namespace GeglQt {
+
+class NodeViewGraphicsWidget : public QGraphicsWidget
 {
     Q_OBJECT
 public:
-    explicit GeglQtGraphicsWidgetView(QGraphicsItem *parent = 0);
-    ~GeglQtGraphicsWidgetView();
+    explicit NodeViewGraphicsWidget(QGraphicsItem *parent = 0);
+    ~NodeViewGraphicsWidget();
 
     void setInputNode(GeglNode *node);
     GeglNode *inputNode();
@@ -48,7 +50,9 @@ private Q_SLOTS:
     void handleGeometryChange();
 
 private:
+    Q_DISABLE_COPY(NodeViewGraphicsWidget)
     GeglQtViewImplementation *priv;
 };
 
+}
 #endif // GEGLQTGRAPHICSWIDGETVIEW_H



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]