[gegl-qt] Renaming: GeglQtView -> GeglQt::NodeViewWidget
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt] Renaming: GeglQtView -> GeglQt::NodeViewWidget
- Date: Mon, 22 Aug 2011 20:49:16 +0000 (UTC)
commit 0e0bbb4433de0ea6fed8acf9c67d1624b7dc2523
Author: Jon Nordby <jononor gmail com>
Date: Mon Aug 22 19:41:00 2011 +0200
Renaming: GeglQtView -> GeglQt::NodeViewWidget
examples/qml-basic/qml-basic.cpp | 2 +-
examples/qml-basic/qml-basic.qml | 4 ++--
examples/qml-paint/qml-paint.cpp | 2 +-
examples/qml-paint/qml-paint.qml | 4 ++--
.../qwidget-autotransform.cpp | 2 +-
examples/qwidget-basic/qwidget-basic.cpp | 2 +-
.../qwidget-transformations.cpp | 2 +-
gegl-qt/geglqtview.cpp | 18 +++++++++---------
gegl-qt/geglqtview.h | 11 +++++++----
operations/geglqtdisplay.cpp | 4 ++--
10 files changed, 27 insertions(+), 24 deletions(-)
---
diff --git a/examples/qml-basic/qml-basic.cpp b/examples/qml-basic/qml-basic.cpp
index eee9cd3..8225925 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, "GeglQtView");
+ qmlRegisterType<GeglQtDeclarativeView>("GeglQt", 0, 1, "NodeView");
QDeclarativeView view;
// Expose the gegl node to QML, so it can be used there
diff --git a/examples/qml-basic/qml-basic.qml b/examples/qml-basic/qml-basic.qml
index 20f6203..1e094c5 100644
--- a/examples/qml-basic/qml-basic.qml
+++ b/examples/qml-basic/qml-basic.qml
@@ -1,7 +1,7 @@
import QtQuick 1.0
-import GeglQt 0.1
+import GeglQt 0.1 as GeglQt
-GeglQtView {
+GeglQt.NodeView {
inputNode: globalNode
x: 0
y: 0
diff --git a/examples/qml-paint/qml-paint.cpp b/examples/qml-paint/qml-paint.cpp
index 3331bba..fc0fbaa 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, "GeglQtView");
+ qmlRegisterType<GeglQtDeclarativeView>("GeglQt", 0, 1, "NodeView");
QDeclarativeView view;
// Expose the paint engine to QML, so it can be used there
diff --git a/examples/qml-paint/qml-paint.qml b/examples/qml-paint/qml-paint.qml
index 945e7e6..67d4b70 100644
--- a/examples/qml-paint/qml-paint.qml
+++ b/examples/qml-paint/qml-paint.qml
@@ -1,11 +1,11 @@
import QtQuick 1.0
-import GeglQt 0.1
+import GeglQt 0.1 as GeglQt
Rectangle {
width: 512
height: 512
- GeglQtView {
+ GeglQt.NodeView {
id: view
anchors.fill: parent
inputNode: paintEngine.outputNode()
diff --git a/examples/qwidget-autotransform/qwidget-autotransform.cpp b/examples/qwidget-autotransform/qwidget-autotransform.cpp
index 0946bd4..7cf20bd 100644
--- a/examples/qwidget-autotransform/qwidget-autotransform.cpp
+++ b/examples/qwidget-autotransform/qwidget-autotransform.cpp
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom);
toplevelWidget.setLayout(layout);
- GeglQtView *view = new GeglQtView();
+ NodeViewWidget *view = new NodeViewWidget();
view->setInputNode(node);
layout->addWidget(view, 1);
diff --git a/examples/qwidget-basic/qwidget-basic.cpp b/examples/qwidget-basic/qwidget-basic.cpp
index 15d02fe..084da27 100644
--- a/examples/qwidget-basic/qwidget-basic.cpp
+++ b/examples/qwidget-basic/qwidget-basic.cpp
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
"path", argv[argc-1], NULL);
gegl_node_process(node);
- GeglQtView w;
+ NodeViewWidget w;
w.setInputNode(node);
w.show();
diff --git a/examples/qwidget-transformations/qwidget-transformations.cpp b/examples/qwidget-transformations/qwidget-transformations.cpp
index 63d22b2..06796ff 100644
--- a/examples/qwidget-transformations/qwidget-transformations.cpp
+++ b/examples/qwidget-transformations/qwidget-transformations.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom);
toplevelWidget.setLayout(layout);
- GeglQtView *view = new GeglQtView();
+ NodeViewWidget *view = new NodeViewWidget();
view->setInputNode(node);
layout->addWidget(view, 1);
diff --git a/gegl-qt/geglqtview.cpp b/gegl-qt/geglqtview.cpp
index 74c8c92..f2d2e1e 100644
--- a/gegl-qt/geglqtview.cpp
+++ b/gegl-qt/geglqtview.cpp
@@ -35,7 +35,7 @@ using namespace GeglQt;
*
* Can be tested by
* Note that this would also test the implementation class, which is not ideal. */
-GeglQtView::GeglQtView(QWidget *parent)
+NodeViewWidget::NodeViewWidget(QWidget *parent)
: QWidget(parent),
priv(new GeglQtViewImplementation())
{
@@ -45,31 +45,31 @@ GeglQtView::GeglQtView(QWidget *parent)
this, SLOT(viewportSizeChangeRequested(QSizeF)));
}
-GeglQtView::~GeglQtView()
+NodeViewWidget::~NodeViewWidget()
{
delete priv;
}
GeglNode *
-GeglQtView::inputNode() const
+NodeViewWidget::inputNode() const
{
return priv->inputNode();
}
void
-GeglQtView::setInputNode(GeglNode *newNode)
+NodeViewWidget::setInputNode(GeglNode *newNode)
{
priv->setInputNode(newNode);
}
NodeViewOptions *
-GeglQtView::options() const
+NodeViewWidget::options() const
{
return priv->options();
}
void
-GeglQtView::invalidate(QRectF rect)
+NodeViewWidget::invalidate(QRectF rect)
{
if (rect.isValid()) {
update(rect.toRect());
@@ -79,20 +79,20 @@ GeglQtView::invalidate(QRectF rect)
}
void
-GeglQtView::viewportSizeChangeRequested(QSizeF requestedSize)
+NodeViewWidget::viewportSizeChangeRequested(QSizeF requestedSize)
{
resize(requestedSize.toSize());
}
//! \brief Draw the view of GeglNode onto the widget
void
-GeglQtView::paintEvent(QPaintEvent *event)
+NodeViewWidget::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
priv->paint(&painter, QRectF(event->rect()));
}
-void GeglQtView::resizeEvent(QResizeEvent *event)
+void NodeViewWidget::resizeEvent(QResizeEvent *event)
{
priv->viewportSizeChanged(event->size());
}
diff --git a/gegl-qt/geglqtview.h b/gegl-qt/geglqtview.h
index 20b0f78..52dd7f6 100644
--- a/gegl-qt/geglqtview.h
+++ b/gegl-qt/geglqtview.h
@@ -27,13 +27,15 @@
class GeglQtViewImplementation;
-class GeglQtView : public QWidget
+namespace GeglQt {
+
+class NodeViewWidget : public QWidget
{
Q_OBJECT
public:
- GeglQtView(QWidget *parent = 0);
- ~GeglQtView();
+ NodeViewWidget(QWidget *parent = 0);
+ ~NodeViewWidget();
GeglNode *inputNode() const;
void setInputNode(GeglNode *node);
@@ -50,8 +52,9 @@ private Q_SLOTS:
void viewportSizeChangeRequested(QSizeF);
private:
- Q_DISABLE_COPY(GeglQtView)
+ Q_DISABLE_COPY(NodeViewWidget)
GeglQtViewImplementation *priv;
};
+}
#endif // GEGLQTVIEW_H
diff --git a/operations/geglqtdisplay.cpp b/operations/geglqtdisplay.cpp
index b28184f..af8270b 100644
--- a/operations/geglqtdisplay.cpp
+++ b/operations/geglqtdisplay.cpp
@@ -35,7 +35,7 @@ using namespace GeglQt;
typedef struct
{
- GeglQtView *viewWidget;
+ NodeViewWidget *viewWidget;
GeglNode *node;
} Priv;
@@ -50,7 +50,7 @@ init_priv (GeglOperation *operation)
Priv *priv = g_new0 (Priv, 1);
o->chant_data = (void*) priv;
- priv->viewWidget = new GeglQtView();
+ priv->viewWidget = new NodeViewWidget();
priv->viewWidget->options()->setAutoScalePolicy(NodeViewOptions::AutoScaleViewport);
priv->viewWidget->show();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]