[gegl-qt] NodeViewImplementation: DrawTransform -> DrawMode
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt] NodeViewImplementation: DrawTransform -> DrawMode
- Date: Sat, 24 Sep 2011 20:19:18 +0000 (UTC)
commit f925f377dce9e8ed888b9c37bed8ef6349da9713
Author: Jon Nordby <jononor gmail com>
Date: Sat Sep 24 21:25:06 2011 +0200
NodeViewImplementation: DrawTransform -> DrawMode
gegl-qt/internal/nodeviewimplementation.cpp | 14 +++++++-------
gegl-qt/internal/nodeviewimplementation.h | 10 +++++-----
gegl-qt/nodeviewdeclarativeitem.cpp | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gegl-qt/internal/nodeviewimplementation.cpp b/gegl-qt/internal/nodeviewimplementation.cpp
index 23d4e7d..e0364ec 100644
--- a/gegl-qt/internal/nodeviewimplementation.cpp
+++ b/gegl-qt/internal/nodeviewimplementation.cpp
@@ -84,21 +84,21 @@ computed_event(GeglNode *node, GeglRectangle *rect, NodeViewImplementation *impl
* - emitting 'invalidated' on the input node, observing that the 'computed' signal is emitted correctly
* - emitting 'computed' on the input node, observing that the 'viewAreaChanged' signal is emitted correctly
*/
-NodeViewImplementation::NodeViewImplementation(DrawTransform drawTransform, QObject *parent)
+NodeViewImplementation::NodeViewImplementation(DrawMode drawTransform, QObject *parent)
: QObject(parent)
, mInputNode(0)
, processor(0)
, timer(new QTimer())
, mOptions(0)
, mViewportSize(-1.0, -1.0)
- , mDrawTransform(drawTransform)
- , mChildItem(mDrawTransform == DrawTransformExternal ? new NodeViewChildItem(this, 0) : 0)
+ , mDrawMode(drawTransform)
+ , mChildItem(mDrawMode == DrawModeChildGraphicsItem ? new NodeViewChildItem(this, 0) : 0)
{
setOptions(0); // default
connect(timer, SIGNAL(timeout()), this, SLOT(processNode()));
- if (mDrawTransform == DrawTransformExternal) {
+ if (mDrawMode == DrawModeChildGraphicsItem) {
connect(this, SIGNAL(viewAreaChanged(QRectF)),
this, SLOT(handleViewAreaChanged(QRectF)));
}
@@ -117,13 +117,13 @@ NodeViewImplementation::~NodeViewImplementation()
QTransform
NodeViewImplementation::drawTransformation()
{
- return mDrawTransform == DrawTransformInternal ? options()->transformation() : QTransform();
+ return mDrawMode == DrawModeExplicitPaint ? options()->transformation() : QTransform();
}
float
NodeViewImplementation::drawScale()
{
- return mDrawTransform == DrawTransformInternal ? options()->scale() : 1.0;
+ return mDrawMode == DrawModeExplicitPaint ? options()->scale() : 1.0;
}
void
@@ -180,7 +180,7 @@ NodeViewImplementation::setOptions(NodeViewOptions *newOptions)
connect(options(), SIGNAL(autoScalePolicyChanged()),
this, SLOT(updateAutoCenterScale()));
- if (mDrawTransform == DrawTransformExternal) {
+ if (mDrawMode == DrawModeChildGraphicsItem) {
connect(options(), SIGNAL(scaleChanged()),
this, SLOT(handleScaleChanged()));
diff --git a/gegl-qt/internal/nodeviewimplementation.h b/gegl-qt/internal/nodeviewimplementation.h
index ba982ba..02eaac9 100644
--- a/gegl-qt/internal/nodeviewimplementation.h
+++ b/gegl-qt/internal/nodeviewimplementation.h
@@ -33,13 +33,13 @@ class NodeViewImplementation : public QObject
Q_OBJECT
public:
- enum DrawTransform {
- DrawTransformInternal,
- DrawTransformExternal
+ enum DrawMode {
+ DrawModeExplicitPaint,
+ DrawModeChildGraphicsItem
};
public:
- explicit NodeViewImplementation(DrawTransform drawTransform = DrawTransformInternal, QObject *parent = 0);
+ explicit NodeViewImplementation(DrawMode drawTransform = DrawModeExplicitPaint, QObject *parent = 0);
~NodeViewImplementation();
void setInputNode(GeglNode *node);
@@ -81,7 +81,7 @@ private:
QTimer *timer; // Used to defer operations to the mainloop.
GeglQt::NodeViewOptions *mOptions;
QSizeF mViewportSize;
- DrawTransform mDrawTransform;
+ DrawMode mDrawMode;
NodeViewChildItem *mChildItem;
};
diff --git a/gegl-qt/nodeviewdeclarativeitem.cpp b/gegl-qt/nodeviewdeclarativeitem.cpp
index 353e030..d60683c 100644
--- a/gegl-qt/nodeviewdeclarativeitem.cpp
+++ b/gegl-qt/nodeviewdeclarativeitem.cpp
@@ -23,7 +23,7 @@ using namespace GeglQt;
NodeViewDeclarativeItem::NodeViewDeclarativeItem(QDeclarativeItem *parent)
: QDeclarativeItem(parent)
- , priv(new NodeViewImplementation(NodeViewImplementation::DrawTransformExternal))
+ , priv(new NodeViewImplementation(NodeViewImplementation::DrawModeChildGraphicsItem))
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]