[gegl-qt] Renaming: Rename files to match new class names.



commit dbe46bd2066241f2153176604c532c9cc84e4ada
Author: Jon Nordby <jononor gmail com>
Date:   Mon Aug 22 20:19:33 2011 +0200

    Renaming: Rename files to match new class names.
    
    Internal classes have been moved to a subdirectory to
    make it more obvious that they are internal (the subdirectory
    is not added to the include path).
    
    Also fix "" style includes in public headers.

 examples/examples-common.pri                       |    2 +-
 .../qwidget-autotransform/autotransform-controls.h |    2 +-
 .../transformation-controls.h                      |    2 +-
 gegl-qt/gegl-qt.h                                  |   11 +++----
 gegl-qt/gegl-qt.pro                                |   27 +++++++++++---------
 .../nodeviewimplementation.cpp}                    |    2 +-
 .../nodeviewimplementation.h}                      |    9 +++---
 ...arativeview.cpp => nodeviewdeclarativeitem.cpp} |    5 ++-
 ...declarativeview.h => nodeviewdeclarativeitem.h} |    9 +++---
 ...cswidgetview.cpp => nodeviewgraphicswidget.cpp} |    4 +-
 ...aphicswidgetview.h => nodeviewgraphicswidget.h} |    9 +++---
 .../{geglqtviewoptions.cpp => nodeviewoptions.cpp} |    5 ++-
 gegl-qt/{geglqtviewoptions.h => nodeviewoptions.h} |    6 ++--
 gegl-qt/{geglqtview.cpp => nodeviewwidget.cpp}     |    4 +-
 gegl-qt/{geglqtview.h => nodeviewwidget.h}         |    9 +++---
 operations/operations.pro                          |    2 +-
 tests/test-nodeviewimplementation/.gitignore       |    1 +
 .../test-nodeviewimplementation.cpp                |   22 ++++++++++++++++
 .../test-nodeviewimplementation.h                  |   19 ++++++++++++++
 .../test-nodeviewimplementation.pro                |    7 +++++
 tests/test-view-internal/test-view-internal.cpp    |   22 ----------------
 tests/test-view-internal/test-view-internal.h      |   19 --------------
 tests/test-view-internal/test-view-internal.pro    |    7 -----
 tests/tests-common.pri                             |    2 +-
 tests/tests.pro                                    |    2 +-
 25 files changed, 108 insertions(+), 101 deletions(-)
---
diff --git a/examples/examples-common.pri b/examples/examples-common.pri
index f9178ee..0438628 100644
--- a/examples/examples-common.pri
+++ b/examples/examples-common.pri
@@ -7,7 +7,7 @@ CONFIG += qt
 OBJECTS_DIR = .obj
 MOC_DIR = .moc
 
-INCLUDEPATH += ../../gegl-qt
+INCLUDEPATH += ../../gegl-qt ../.. # ../.. because public includes have gegl-qt/ prefix
 LIBS += -L../../gegl-qt -l$$GEGLQT_LIBNAME
 
 CONFIG += link_pkgconfig
diff --git a/examples/qwidget-autotransform/autotransform-controls.h b/examples/qwidget-autotransform/autotransform-controls.h
index c9c52d3..f2f69d2 100644
--- a/examples/qwidget-autotransform/autotransform-controls.h
+++ b/examples/qwidget-autotransform/autotransform-controls.h
@@ -2,7 +2,7 @@
 #define AUTOTRANSFORMCONTROLS_H
 
 #include <QtGui>
-#include "geglqtviewoptions.h"
+#include <gegl-qt/nodeviewoptions.h>
 
 using namespace GeglQt;
 
diff --git a/examples/qwidget-transformations/transformation-controls.h b/examples/qwidget-transformations/transformation-controls.h
index 2cb2e2f..7dfe553 100644
--- a/examples/qwidget-transformations/transformation-controls.h
+++ b/examples/qwidget-transformations/transformation-controls.h
@@ -3,7 +3,7 @@
 
 #include <QtGui>
 
-#include "geglqtviewoptions.h"
+#include <gegl-qt/nodeviewoptions.h>
 
 using namespace GeglQt;
 
diff --git a/gegl-qt/gegl-qt.h b/gegl-qt/gegl-qt.h
index d0f56f0..5160dff 100644
--- a/gegl-qt/gegl-qt.h
+++ b/gegl-qt/gegl-qt.h
@@ -1,12 +1,11 @@
 #ifndef GEGLQT_H
 #define GEGLQT_H
 
-// Widgets
+// Node Views
+#include <gegl-qt/nodeviewoptions.h>
 
-#include "geglqtview.h"
-#include "geglqtgraphicswidgetview.h"
-#include "geglqtdeclarativeview.h"
-
-#include "geglqtviewoptions.h"
+#include <gegl-qt/nodeviewwidget.h>
+#include <gegl-qt/nodeviewgraphicswidget.h>
+#include <gegl-qt/nodeviewdeclarativeitem.h>
 
 #endif // GEGLQT_H
diff --git a/gegl-qt/gegl-qt.pro b/gegl-qt/gegl-qt.pro
index 05724c5..32a0323 100644
--- a/gegl-qt/gegl-qt.pro
+++ b/gegl-qt/gegl-qt.pro
@@ -16,21 +16,25 @@ PKGCONFIG += gegl
 OBJECTS_DIR = .obj
 MOC_DIR = .moc
 
-SOURCES += \
-    geglqtview.cpp \
-    geglqtviewimplementation.cpp \
-    geglqtgraphicswidgetview.cpp \
-    geglqtdeclarativeview.cpp \
-    geglqtviewoptions.cpp
+PUBLIC_SOURCES += \
+    nodeviewwidget.cpp \
+    nodeviewgraphicswidget.cpp \
+    nodeviewdeclarativeitem.cpp \
+    nodeviewoptions.cpp \
 
 PUBLIC_HEADERS = gegl-qt.h \
-    geglqtview.h \
-    geglqtgraphicswidgetview.h \
-    geglqtdeclarativeview.h \
-    geglqtviewoptions.h
+    nodeviewwidget.h \
+    nodeviewgraphicswidget.h \
+    nodeviewdeclarativeitem.h \
+    nodeviewoptions.h
+
+SOURCES += $$PUBLIC_SOURCES \
+    internal/nodeviewimplementation.cpp \
 
 HEADERS += $$PUBLIC_HEADERS \
-    geglqtviewimplementation.h \
+    internal/nodeviewimplementation.h \
+
+INCLUDEPATH += .. # Public includes have gegl-qt/ prefix
 
 headers.path = $$GEGLQT_INSTALL_HEADERS/$$GEGLQT_LIBNAME
 headers.files = $$PUBLIC_HEADERS
@@ -41,4 +45,3 @@ pkgconfig.path = $$GEGLQT_INSTALL_LIBS/pkgconfig
 pkgconfig.files = gegl-qt4-0.1.pc
 
 INSTALLS += target headers pkgconfig
-
diff --git a/gegl-qt/geglqtviewimplementation.cpp b/gegl-qt/internal/nodeviewimplementation.cpp
similarity index 99%
rename from gegl-qt/geglqtviewimplementation.cpp
rename to gegl-qt/internal/nodeviewimplementation.cpp
index 4c2798e..408d23e 100644
--- a/gegl-qt/geglqtviewimplementation.cpp
+++ b/gegl-qt/internal/nodeviewimplementation.cpp
@@ -16,7 +16,7 @@
  * Copyright (C) 2011 <jononor gmail com>
  */
 
-#include "geglqtviewimplementation.h"
+#include "nodeviewimplementation.h"
 
 #include <QtCore>
 #include <QTransform>
diff --git a/gegl-qt/geglqtviewimplementation.h b/gegl-qt/internal/nodeviewimplementation.h
similarity index 92%
rename from gegl-qt/geglqtviewimplementation.h
rename to gegl-qt/internal/nodeviewimplementation.h
index f4a5306..a23065b 100644
--- a/gegl-qt/geglqtviewimplementation.h
+++ b/gegl-qt/internal/nodeviewimplementation.h
@@ -1,5 +1,5 @@
-#ifndef GEGLQTVIEWIMPLEMENTATION_H
-#define GEGLQTVIEWIMPLEMENTATION_H
+#ifndef GEGLQT_NODEVIEWIMPLEMENTATION_H
+#define GEGLQT_NODEVIEWIMPLEMENTATION_H
 
 /* This file is part of GEGL-QT
  *
@@ -21,7 +21,8 @@
 
 #include <Qt/QtGui>
 #include <gegl.h>
-#include "geglqtviewoptions.h"
+
+#include <gegl-qt/nodeviewoptions.h>
 
 namespace GeglQt {
 
@@ -69,4 +70,4 @@ private:
 
 }
 
-#endif // GEGLQTVIEWIMPLEMENTATION_H
+#endif // GEGLQT_NODEVIEWIMPLEMENTATION_H
diff --git a/gegl-qt/geglqtdeclarativeview.cpp b/gegl-qt/nodeviewdeclarativeitem.cpp
similarity index 95%
rename from gegl-qt/geglqtdeclarativeview.cpp
rename to gegl-qt/nodeviewdeclarativeitem.cpp
index 7f66362..bdb7fb9 100644
--- a/gegl-qt/geglqtdeclarativeview.cpp
+++ b/gegl-qt/nodeviewdeclarativeitem.cpp
@@ -1,5 +1,6 @@
-#include "geglqtdeclarativeview.h"
-#include "geglqtviewimplementation.h"
+
+#include "nodeviewdeclarativeitem.h"
+#include "internal/nodeviewimplementation.h"
 
 using namespace GeglQt;
 
diff --git a/gegl-qt/geglqtdeclarativeview.h b/gegl-qt/nodeviewdeclarativeitem.h
similarity index 86%
rename from gegl-qt/geglqtdeclarativeview.h
rename to gegl-qt/nodeviewdeclarativeitem.h
index 6360d0c..4c608b0 100644
--- a/gegl-qt/geglqtdeclarativeview.h
+++ b/gegl-qt/nodeviewdeclarativeitem.h
@@ -1,10 +1,11 @@
-#ifndef GEGLQTDECLARATIVEVIEW_H
-#define GEGLQTDECLARATIVEVIEW_H
+#ifndef GEGLQT_NODEVIEWDECLARATIVEITEM_H
+#define GEGLQT_NODEVIEWDECLARATIVEITEM_H
 
 #include <QtDeclarative>
 #include <QtCore>
 #include <gegl.h>
-#include "geglqtviewoptions.h"
+
+#include <gegl-qt/nodeviewoptions.h>
 
 namespace GeglQt {
 
@@ -42,4 +43,4 @@ private:
 };
 
 }
-#endif // GEGLQTDECLARATIVEVIEW_H
+#endif // GEGLQT_NODEVIEWDECLARATIVEITEM_H
diff --git a/gegl-qt/geglqtgraphicswidgetview.cpp b/gegl-qt/nodeviewgraphicswidget.cpp
similarity index 96%
rename from gegl-qt/geglqtgraphicswidgetview.cpp
rename to gegl-qt/nodeviewgraphicswidget.cpp
index 57e8387..b3727f8 100644
--- a/gegl-qt/geglqtgraphicswidgetview.cpp
+++ b/gegl-qt/nodeviewgraphicswidget.cpp
@@ -16,8 +16,8 @@
  * Copyright (C) 2011 <jononor gmail com>
  */
 
-#include "geglqtgraphicswidgetview.h"
-#include "geglqtviewimplementation.h"
+#include "nodeviewgraphicswidget.h"
+#include "internal/nodeviewimplementation.h"
 
 using namespace GeglQt;
 
diff --git a/gegl-qt/geglqtgraphicswidgetview.h b/gegl-qt/nodeviewgraphicswidget.h
similarity index 90%
rename from gegl-qt/geglqtgraphicswidgetview.h
rename to gegl-qt/nodeviewgraphicswidget.h
index df632f3..074834f 100644
--- a/gegl-qt/geglqtgraphicswidgetview.h
+++ b/gegl-qt/nodeviewgraphicswidget.h
@@ -1,5 +1,5 @@
-#ifndef GEGLQTGRAPHICSWIDGETVIEW_H
-#define GEGLQTGRAPHICSWIDGETVIEW_H
+#ifndef GEGLQT_NODEVIEWGRAPHICSWIDGET_H
+#define GEGLQT_NODEVIEWGRAPHICSWIDGET_H
 
 /* This file is part of GEGL-QT
  *
@@ -21,7 +21,8 @@
 
 #include <QGraphicsWidget>
 #include <gegl.h>
-#include "geglqtviewoptions.h"
+
+#include <gegl-qt/nodeviewoptions.h>
 
 namespace GeglQt {
 
@@ -55,4 +56,4 @@ private:
 };
 
 }
-#endif // GEGLQTGRAPHICSWIDGETVIEW_H
+#endif // GEGLQT_NODEVIEWGRAPHICSWIDGET_H
diff --git a/gegl-qt/geglqtviewoptions.cpp b/gegl-qt/nodeviewoptions.cpp
similarity index 98%
rename from gegl-qt/geglqtviewoptions.cpp
rename to gegl-qt/nodeviewoptions.cpp
index f02b8fd..4620b43 100644
--- a/gegl-qt/geglqtviewoptions.cpp
+++ b/gegl-qt/nodeviewoptions.cpp
@@ -1,5 +1,3 @@
-#include "geglqtviewoptions.h"
-
 /* This file is part of GEGL-QT
  *
  * GEGL-QT is free software; you can redistribute it and/or
@@ -18,6 +16,9 @@
  * Copyright (C) 2011 Jon Nordby <jononor gmail com>
  */
 
+#include "nodeviewoptions.h"
+#include "internal/nodeviewimplementation.h"
+
 #include <QtGui>
 
 using namespace GeglQt;
diff --git a/gegl-qt/geglqtviewoptions.h b/gegl-qt/nodeviewoptions.h
similarity index 96%
rename from gegl-qt/geglqtviewoptions.h
rename to gegl-qt/nodeviewoptions.h
index 8e7db23..a6a847f 100644
--- a/gegl-qt/geglqtviewoptions.h
+++ b/gegl-qt/nodeviewoptions.h
@@ -1,5 +1,5 @@
-#ifndef GEGLVIEWOPTIONS_H
-#define GEGLVIEWOPTIONS_H
+#ifndef GEGLQT_NODEVIEWOPTIONS_H
+#define GEGLQT_NODEVIEWOPTIONS_H
 
 /* This file is part of GEGL-QT
  *
@@ -93,4 +93,4 @@ private:
 Q_DECLARE_METATYPE(GeglQt::NodeViewOptions::AutoCenter)
 Q_DECLARE_METATYPE(GeglQt::NodeViewOptions::AutoScale)
 
-#endif // GEGLVIEWOPTIONS_H
+#endif // GEGLQT_NODEVIEWOPTIONS_H
diff --git a/gegl-qt/geglqtview.cpp b/gegl-qt/nodeviewwidget.cpp
similarity index 97%
rename from gegl-qt/geglqtview.cpp
rename to gegl-qt/nodeviewwidget.cpp
index b8cadb4..fd58d05 100644
--- a/gegl-qt/geglqtview.cpp
+++ b/gegl-qt/nodeviewwidget.cpp
@@ -16,8 +16,8 @@
  * Copyright (C) 2011 <jononor gmail com>
  */
 
-#include "geglqtview.h"
-#include "geglqtviewimplementation.h"
+#include "nodeviewwidget.h"
+#include "internal/nodeviewimplementation.h"
 
 #include <Qt/QtGui>
 #include <QtDebug>
diff --git a/gegl-qt/geglqtview.h b/gegl-qt/nodeviewwidget.h
similarity index 91%
rename from gegl-qt/geglqtview.h
rename to gegl-qt/nodeviewwidget.h
index e1f04da..c13dac9 100644
--- a/gegl-qt/geglqtview.h
+++ b/gegl-qt/nodeviewwidget.h
@@ -1,5 +1,5 @@
-#ifndef GEGLQTVIEW_H
-#define GEGLQTVIEW_H
+#ifndef GEGLQT_NODEVIEWWIDGET_H
+#define GEGLQT_NODEVIEWWIDGET_H
 
 /* This file is part of GEGL-QT
  *
@@ -20,10 +20,9 @@
  */
 
 #include <QtGui/QWidget>
-
 #include <gegl.h>
 
-#include "geglqtviewoptions.h"
+#include <gegl-qt/nodeviewoptions.h>
 
 namespace GeglQt {
 
@@ -57,4 +56,4 @@ private:
 };
 
 }
-#endif // GEGLQTVIEW_H
+#endif // GEGLQT_NODEVIEWWIDGET_H
diff --git a/operations/operations.pro b/operations/operations.pro
index a30f429..5ea7528 100644
--- a/operations/operations.pro
+++ b/operations/operations.pro
@@ -13,7 +13,7 @@ QT += core gui declarative
 CONFIG += link_pkgconfig
 PKGCONFIG += gegl
 
-INCLUDEPATH += ../gegl-qt
+INCLUDEPATH += ../gegl-qt .. # .. because public include have gegl-qt/ prefix
 LIBS += -L../gegl-qt -l$$GEGLQT_LIBNAME
 
 SOURCES += \
diff --git a/tests/test-nodeviewimplementation/.gitignore b/tests/test-nodeviewimplementation/.gitignore
new file mode 100644
index 0000000..f204f9f
--- /dev/null
+++ b/tests/test-nodeviewimplementation/.gitignore
@@ -0,0 +1 @@
+test-nodeviewimplementation
diff --git a/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp b/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp
new file mode 100644
index 0000000..1ef10be
--- /dev/null
+++ b/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp
@@ -0,0 +1,22 @@
+#include "test-nodeviewimplementation.h"
+
+#include <gegl-qt/internal/nodeviewimplementation.h>
+
+#include <QtTest>
+
+using namespace GeglQt;
+
+/* Tests GeglQtViewImplementation, not the widgets
+ * themselves. */
+TestNodeViewImplementation::TestNodeViewImplementation(QObject *parent) :
+    QObject(parent)
+{}
+
+void TestNodeViewImplementation::testNothing()
+{
+    NodeViewImplementation viewImplementation;
+}
+
+
+QTEST_MAIN(TestNodeViewImplementation)
+
diff --git a/tests/test-nodeviewimplementation/test-nodeviewimplementation.h b/tests/test-nodeviewimplementation/test-nodeviewimplementation.h
new file mode 100644
index 0000000..05d6eab
--- /dev/null
+++ b/tests/test-nodeviewimplementation/test-nodeviewimplementation.h
@@ -0,0 +1,19 @@
+#ifndef TESTNODEVIEWIMPLEMENTATION_H
+#define TESTNODEVIEWIMPLEMENTATION_H
+
+#include <QObject>
+
+class TestNodeViewImplementation : public QObject
+{
+    Q_OBJECT
+public:
+    explicit TestNodeViewImplementation(QObject *parent = 0);
+
+private Q_SLOTS:
+    void testNothing();
+
+private:
+
+};
+
+#endif // TESTNODEVIEWIMPLEMENTATION_H
diff --git a/tests/test-nodeviewimplementation/test-nodeviewimplementation.pro b/tests/test-nodeviewimplementation/test-nodeviewimplementation.pro
new file mode 100644
index 0000000..cea557e
--- /dev/null
+++ b/tests/test-nodeviewimplementation/test-nodeviewimplementation.pro
@@ -0,0 +1,7 @@
+include(../tests-common.pri)
+
+SOURCES += test-nodeviewimplementation.cpp
+HEADERS += test-nodeviewimplementation.h
+
+
+
diff --git a/tests/tests-common.pri b/tests/tests-common.pri
index 8332a0a..2856563 100644
--- a/tests/tests-common.pri
+++ b/tests/tests-common.pri
@@ -6,7 +6,7 @@ CONFIG += debug
 CONFIG += link_pkgconfig
 PKGCONFIG += gegl
 
-INCLUDEPATH += ../../gegl-qt
+INCLUDEPATH += ../../gegl-qt ../.. # ../.. because public includes have gegl-qt/ prefix
 LIBS += -l$$GEGLQT_LIBNAME -L$$OUT_PWD/../../gegl-qt
 
 TEST_ENVIRONMENT = LD_LIBRARY_PATH=$$OUT_PWD/../../gegl-qt:$(LD_LIBRARY_PATH)
diff --git a/tests/tests.pro b/tests/tests.pro
index e0c375f..35603be 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,3 +1,3 @@
 TEMPLATE = subdirs
 SUBDIRS += \
-    test-view-internal
+    test-nodeviewimplementation



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