summaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-06-08 17:37:25 (GMT)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-06-23 14:38:42 (GMT)
commiteef8e3febcbeb5a008024b67c9528cecc67f7d26 (patch)
treefa58c02101e522c46ac799d6dbd95631f80f0a20 /src/plugins/qmltooling
parent4995fedcfbfc4c82412bdc126dfd37b81841354c (diff)
downloadQt-eef8e3febcbeb5a008024b67c9528cecc67f7d26.zip
Qt-eef8e3febcbeb5a008024b67c9528cecc67f7d26.tar.gz
Qt-eef8e3febcbeb5a008024b67c9528cecc67f7d26.tar.bz2
QmlInspector: Removed private header postfix and Qt namespace
Renamed the headers back to normal since they are not included in a Qt library. Also took the classes out of the Qt namespace and back into the QmlJSDebugger namespace. This is mainly to make it easier again to port changes back into the version of the inspector shipped with Qt Creator. (cherry picked from commit febfd367f8483ef6cae31b89b04422e0058e5ae7 in Qt 5 / QtDeclarative, to make synchronizing future changes easier) Change-Id: I74acdbe7e5493c8b5d34b34ad9070c424128754e Reviewed-by: Kai Koehne
Diffstat (limited to 'src/plugins/qmltooling')
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h9
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp9
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp11
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp11
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h)18
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h)10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.h (renamed from src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h)14
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp7
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h4
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h10
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp16
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.h109
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h108
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h127
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro30
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants.h (renamed from src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h)12
37 files changed, 302 insertions, 401 deletions
diff --git a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp
index fdec0e7..a698819 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp
@@ -41,7 +41,7 @@
#include "abstractviewinspector.h"
-#include "editor/qmltoolbar_p.h"
+#include "editor/qmltoolbar.h"
#include "qdeclarativeinspectorprotocol.h"
#include <QtDeclarative/QDeclarativeEngine>
@@ -54,7 +54,7 @@
static inline void initEditorResource() { Q_INIT_RESOURCE(editor); }
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
const char * const KEY_TOOLBOX_GEOMETRY = "toolBox/geometry";
@@ -485,6 +485,6 @@ QString AbstractViewInspector::idStringForObject(QObject *obj) const
return m_stringIdForObjectId.value(id);
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
#include "abstractviewinspector.moc"
diff --git a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h
index b89a6eb..0a56ead 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h
@@ -48,12 +48,15 @@
#include <QtGui/QColor>
#include "qdeclarativeinspectorprotocol.h"
-#include "qmlinspectorconstants_p.h"
+#include "qmlinspectorconstants.h"
QT_BEGIN_NAMESPACE
-
class QDeclarativeEngine;
class QDeclarativeInspectorService;
+QT_END_NAMESPACE
+
+namespace QmlJSDebugger {
+
class ToolBox;
/*
@@ -150,6 +153,6 @@ private:
QDeclarativeInspectorService *m_debugService;
};
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
#endif // ABSTRACTVIEWINSPECTOR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp
index 36e6ba0..4353e97 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "abstractliveedittool_p.h"
-#include "../qdeclarativeviewinspector_p_p.h"
+#include "abstractliveedittool.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QDeclarativeEngine>
@@ -48,7 +48,7 @@
#include <QGraphicsItem>
#include <QDeclarativeItem>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
AbstractLiveEditTool::AbstractLiveEditTool(QDeclarativeViewInspector *editorView)
: QObject(editorView), m_inspector(editorView)
@@ -192,4 +192,5 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
return constructedName;
}
-QT_END_NAMESPACE
+
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.h
index 17eb6ea..accec79 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.h
@@ -56,11 +56,7 @@ class QWheelEvent;
class QDeclarativeView;
QT_END_NAMESPACE
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
@@ -112,8 +108,6 @@ private:
QList<QGraphicsItem*> m_itemList;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+}
#endif // ABSTRACTLIVEEDITTOOL_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp
index 3f95005..da9f442 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#include "boundingrecthighlighter_p.h"
+#include "boundingrecthighlighter.h"
-#include "../qdeclarativeviewinspector_p.h"
-#include "../qmlinspectorconstants_p.h"
+#include "../qdeclarativeviewinspector.h"
+#include "../qmlinspectorconstants.h"
#include <QtGui/QGraphicsPolygonItem>
@@ -50,7 +50,7 @@
#include <QtCore/QObject>
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
BoundingBox::BoundingBox(QGraphicsObject *itemToHighlight, QGraphicsItem *parentItem,
QObject *parent)
@@ -236,4 +236,5 @@ void BoundingRectHighlighter::refresh()
highlightAll();
}
-QT_END_NAMESPACE
+
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.h
index e2928f7..81883ee 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.h
@@ -42,7 +42,7 @@
#ifndef BOUNDINGRECTHIGHLIGHTER_H
#define BOUNDINGRECTHIGHLIGHTER_H
-#include "livelayeritem_p.h"
+#include "livelayeritem.h"
#include <QtCore/QObject>
#include <QtCore/QWeakPointer>
@@ -53,11 +53,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget)
QT_FORWARD_DECLARE_CLASS(QStyleOptionGraphicsItem)
QT_FORWARD_DECLARE_CLASS(QTimer)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
class BoundingBox;
@@ -114,8 +110,6 @@ public:
int type() const;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // BOUNDINGRECTHIGHLIGHTER_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp
index bdae3d8..9cef6b5 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp
@@ -39,9 +39,9 @@
**
****************************************************************************/
-#include "colorpickertool_p.h"
+#include "colorpickertool.h"
-#include "../qdeclarativeviewinspector_p.h"
+#include "../qdeclarativeviewinspector.h"
#include <QtGui/QMouseEvent>
#include <QtGui/QKeyEvent>
@@ -51,7 +51,7 @@
#include <QtGui/QApplication>
#include <QtGui/QPalette>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
ColorPickerTool::ColorPickerTool(QDeclarativeViewInspector *view) :
AbstractLiveEditTool(view)
@@ -128,4 +128,4 @@ void ColorPickerTool::pickColor(const QPoint &pos)
emit selectedColorChanged(m_selectedColor);
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.h
index 580c175..8c8152b 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.h
@@ -42,17 +42,13 @@
#ifndef COLORPICKERTOOL_H
#define COLORPICKERTOOL_H
-#include "abstractliveedittool_p.h"
+#include "abstractliveedittool.h"
#include <QtGui/QColor>
QT_FORWARD_DECLARE_CLASS(QPoint)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class ColorPickerTool : public AbstractLiveEditTool
{
@@ -92,8 +88,6 @@ private:
QColor m_selectedColor;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // COLORPICKERTOOL_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp
index c28893e..fb7118f 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp
@@ -39,13 +39,13 @@
**
****************************************************************************/
-#include "livelayeritem_p.h"
+#include "livelayeritem.h"
-#include "../qmlinspectorconstants_p.h"
+#include "../qmlinspectorconstants.h"
#include <QGraphicsScene>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
LiveLayerItem::LiveLayerItem(QGraphicsScene* scene)
: QGraphicsObject()
@@ -89,4 +89,4 @@ QList<QGraphicsItem*> LiveLayerItem::findAllChildItems(const QGraphicsItem *item
return itemList;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.h
index da622e1..4dccc0b 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.h
@@ -44,11 +44,7 @@
#include <QtGui/QGraphicsObject>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class LiveLayerItem : public QGraphicsObject
{
@@ -66,8 +62,6 @@ protected:
QList<QGraphicsItem*> findAllChildItems(const QGraphicsItem *item) const;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+}
#endif // LIVELAYERITEM_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp
index d32847d..b08682a 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#include "liverubberbandselectionmanipulator_p.h"
+#include "liverubberbandselectionmanipulator.h"
-#include "../qdeclarativeviewinspector_p_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtGui/QGraphicsItem>
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
LiveRubberBandSelectionManipulator::LiveRubberBandSelectionManipulator(QGraphicsObject *layerItem,
QDeclarativeViewInspector *editorView)
@@ -162,4 +162,4 @@ bool LiveRubberBandSelectionManipulator::isActive() const
return m_isActive;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.h
index 9abcb2b..aa15a34 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.h
@@ -42,17 +42,13 @@
#ifndef RUBBERBANDSELECTIONMANIPULATOR_H
#define RUBBERBANDSELECTIONMANIPULATOR_H
-#include "liveselectionrectangle_p.h"
+#include "liveselectionrectangle.h"
#include <QtCore/QPointF>
QT_FORWARD_DECLARE_CLASS(QGraphicsItem)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
@@ -95,8 +91,6 @@ private:
bool m_isActive;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+}
#endif // RUBBERBANDSELECTIONMANIPULATOR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp
index 4450fc5..c57bc0e 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp
@@ -39,17 +39,17 @@
**
****************************************************************************/
-#include "liveselectionindicator_p.h"
+#include "liveselectionindicator.h"
-#include "../qdeclarativeviewinspector_p_p.h"
-#include "../qmlinspectorconstants_p.h"
+#include "../qdeclarativeviewinspector_p.h"
+#include "../qmlinspectorconstants.h"
#include <QtGui/QGraphicsRectItem>
#include <QtGui/QGraphicsObject>
#include <QtGui/QGraphicsScene>
#include <QtGui/QPen>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
LiveSelectionIndicator::LiveSelectionIndicator(QDeclarativeViewInspector *viewInspector,
QGraphicsObject *layerItem)
@@ -114,4 +114,5 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
}
}
-QT_END_NAMESPACE
+} //namespace QmlJSDebugger
+
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.h
index fa6eb30..7b8cc12 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.h
@@ -52,11 +52,7 @@ class QGraphicsItem;
class QPolygonF;
QT_END_NAMESPACE
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
@@ -79,8 +75,6 @@ private:
QDeclarativeViewInspector *m_view;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+}
#endif // LIVESELECTIONINDICATOR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp
index 267079a..4e14458 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp
@@ -39,9 +39,9 @@
**
****************************************************************************/
-#include "liveselectionrectangle_p.h"
+#include "liveselectionrectangle.h"
-#include "../qmlinspectorconstants_p.h"
+#include "../qmlinspectorconstants.h"
#include <QtGui/QPen>
#include <QtGui/QGraphicsRectItem>
@@ -52,7 +52,7 @@
#include <cmath>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
class SelectionRectShape : public QGraphicsRectItem
{
@@ -110,4 +110,4 @@ void LiveSelectionRectangle::setRect(const QPointF &firstPoint,
m_controlShape->setRect(rect);
}
-QT_END_NAMESPACE
+}
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.h
index 5da9fb8..730cca5 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.h
@@ -49,11 +49,7 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsRectItem)
QT_FORWARD_DECLARE_CLASS(QPointF)
QT_FORWARD_DECLARE_CLASS(QRectF)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class LiveSelectionRectangle
{
@@ -76,8 +72,6 @@ private:
QWeakPointer<QGraphicsObject> m_layerItem;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // LIVESELECTIONRECTANGLE_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp
index c55cba3..91dd43b 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#include "liveselectiontool_p.h"
-#include "livelayeritem_p.h"
+#include "liveselectiontool.h"
+#include "livelayeritem.h"
-#include "../qdeclarativeviewinspector_p_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtGui/QApplication>
#include <QtGui/QWheelEvent>
@@ -57,7 +57,7 @@
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
LiveSelectionTool::LiveSelectionTool(QDeclarativeViewInspector *editorView) :
AbstractLiveEditTool(editorView),
@@ -435,4 +435,4 @@ void LiveSelectionTool::selectUnderPoint(QMouseEvent *event)
m_singleSelectionManipulator.end(event->pos());
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.h
index 7562f3e..a3dcd0a 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.h
@@ -42,10 +42,10 @@
#ifndef LIVESELECTIONTOOL_H
#define LIVESELECTIONTOOL_H
-#include "abstractliveedittool_p.h"
-#include "liverubberbandselectionmanipulator_p.h"
-#include "livesingleselectionmanipulator_p.h"
-#include "liveselectionindicator_p.h"
+#include "abstractliveedittool.h"
+#include "liverubberbandselectionmanipulator.h"
+#include "livesingleselectionmanipulator.h"
+#include "liveselectionindicator.h"
#include <QtCore/QList>
#include <QtCore/QTime>
@@ -55,11 +55,7 @@ QT_FORWARD_DECLARE_CLASS(QMouseEvent)
QT_FORWARD_DECLARE_CLASS(QKeyEvent)
QT_FORWARD_DECLARE_CLASS(QAction)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class LiveSelectionTool : public AbstractLiveEditTool
{
@@ -119,8 +115,6 @@ private:
QList<QGraphicsItem*> m_contextMenuItemList;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // LIVESELECTIONTOOL_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp
index ee9843b..34c1469 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp
@@ -39,13 +39,13 @@
**
****************************************************************************/
-#include "livesingleselectionmanipulator_p.h"
+#include "livesingleselectionmanipulator.h"
-#include "../qdeclarativeviewinspector_p_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
LiveSingleSelectionManipulator::LiveSingleSelectionManipulator(QDeclarativeViewInspector *editorView)
: m_editorView(editorView),
@@ -148,4 +148,4 @@ QPointF LiveSingleSelectionManipulator::beginPoint() const
return m_beginPoint;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.h
index 40b5fc0..ac65711 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.h
@@ -47,11 +47,7 @@
QT_FORWARD_DECLARE_CLASS(QGraphicsItem)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
@@ -88,8 +84,6 @@ private:
bool m_isActive;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // LIVESINGLESELECTIONMANIPULATOR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp
index 0a72674..4e0e375 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qmltoolbar_p.h"
-#include "toolbarcolorbox_p.h"
+#include "qmltoolbar.h"
+#include "toolbarcolorbox.h"
#include <QtGui/QLabel>
#include <QtGui/QIcon>
@@ -49,7 +49,7 @@
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
QmlToolBar::QmlToolBar(QWidget *parent)
: QToolBar(parent)
@@ -325,4 +325,4 @@ void QmlToolBar::activateToQml()
emit applyChangesToQmlFileSelected();
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.h
index 0401804..2abf166 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.h
@@ -45,15 +45,11 @@
#include <QtGui/QToolBar>
#include <QtGui/QIcon>
-#include "../qmlinspectorconstants_p.h"
+#include "../qmlinspectorconstants.h"
QT_FORWARD_DECLARE_CLASS(QActionGroup)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class ToolBarColorBox;
@@ -131,8 +127,6 @@ private:
Ui *ui;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+}
#endif // QMLTOOLBAR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp
index 2ed3179..5d99886 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp
@@ -39,14 +39,14 @@
**
****************************************************************************/
-#include "subcomponentmasklayeritem_p.h"
+#include "subcomponentmasklayeritem.h"
-#include "../qmlinspectorconstants_p.h"
-#include "../qdeclarativeviewinspector_p.h"
+#include "../qmlinspectorconstants.h"
+#include "../qdeclarativeviewinspector.h"
#include <QtGui/QPolygonF>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
SubcomponentMaskLayerItem::SubcomponentMaskLayerItem(QDeclarativeViewInspector *inspector,
QGraphicsItem *parentItem) :
@@ -127,4 +127,4 @@ QGraphicsItem *SubcomponentMaskLayerItem::currentItem() const
return m_currentItem;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.h
index 07ce881..e41d70a 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.h
@@ -44,11 +44,7 @@
#include <QtGui/QGraphicsPolygonItem>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class QDeclarativeViewInspector;
@@ -70,8 +66,6 @@ private:
QRectF m_itemPolyRect;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // SUBCOMPONENTMASKLAYERITEM_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp
index 154ddf2..0914662 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp
@@ -39,9 +39,9 @@
**
****************************************************************************/
-#include "toolbarcolorbox_p.h"
+#include "toolbarcolorbox.h"
-#include "../qmlinspectorconstants_p.h"
+#include "../qmlinspectorconstants.h"
#include <QtGui/QPixmap>
#include <QtGui/QPainter>
@@ -56,7 +56,7 @@
#include <QtCore/QMimeData>
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
ToolBarColorBox::ToolBarColorBox(QWidget *parent) :
QLabel(parent)
@@ -131,4 +131,4 @@ void ToolBarColorBox::copyColorToClipboard()
clipboard->setText(m_color.name());
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.h
index c3e064c..8ef75a4 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.h
@@ -49,11 +49,7 @@
QT_FORWARD_DECLARE_CLASS(QContextMenuEvent)
QT_FORWARD_DECLARE_CLASS(QAction)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class ToolBarColorBox : public QLabel
{
@@ -80,8 +76,6 @@ private:
QColor m_color;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // TOOLBARCOLORBOX_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp
index 969c9d5..3a4b6bf 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp
@@ -39,9 +39,9 @@
**
****************************************************************************/
-#include "zoomtool_p.h"
+#include "zoomtool.h"
-#include "../qdeclarativeviewinspector_p_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtGui/QMouseEvent>
#include <QtGui/QWheelEvent>
@@ -52,7 +52,7 @@
#include <QtCore/QRectF>
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
ZoomTool::ZoomTool(QDeclarativeViewInspector *view) :
AbstractLiveEditTool(view),
@@ -333,4 +333,4 @@ qreal ZoomTool::nextZoomScale(ZoomDirection direction) const
return 1.0f;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.h
index 14fa4d5..94735cf 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.h
@@ -42,16 +42,12 @@
#ifndef ZOOMTOOL_H
#define ZOOMTOOL_H
-#include "abstractliveedittool_p.h"
-#include "liverubberbandselectionmanipulator_p.h"
+#include "abstractliveedittool.h"
+#include "liverubberbandselectionmanipulator.h"
QT_FORWARD_DECLARE_CLASS(QAction)
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class ZoomTool : public AbstractLiveEditTool
{
@@ -106,8 +102,6 @@ private:
qreal m_currentScale;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // ZOOMTOOL_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp
index a266eb9..932f911 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp
@@ -46,7 +46,7 @@
#include <QtCore/qplugin.h>
#include <QtDeclarative/private/qdeclarativeinspectorservice_p.h>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
QDeclarativeInspectorPlugin::QDeclarativeInspectorPlugin() :
m_inspector(0)
@@ -75,7 +75,6 @@ void QDeclarativeInspectorPlugin::deactivate()
delete m_inspector;
}
-Q_EXPORT_PLUGIN2(declarativeinspector, QDeclarativeInspectorPlugin)
-
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
+Q_EXPORT_PLUGIN2(declarativeinspector, QmlJSDebugger::QDeclarativeInspectorPlugin)
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h
index e271c07..5429253 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h
@@ -45,7 +45,7 @@
#include <QtCore/QPointer>
#include <QtDeclarative/private/qdeclarativeinspectorinterface_p.h>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
class AbstractViewInspector;
@@ -66,6 +66,6 @@ private:
QPointer<AbstractViewInspector> m_inspector;
};
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
#endif // QDECLARATIVEINSPECTORPLUGIN_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h
index 2878bc1..082abeb 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h
@@ -47,11 +47,7 @@
#include <QtCore/QMetaEnum>
#include <QtCore/QObject>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
+namespace QmlJSDebugger {
class InspectorProtocol : public QObject
{
@@ -136,8 +132,6 @@ inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool)
return dbg;
}
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // QDECLARATIVEINSPECTORPROTOCOL_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp
index be0422d..462fd19 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp
@@ -39,14 +39,14 @@
**
****************************************************************************/
+#include "qdeclarativeviewinspector.h"
#include "qdeclarativeviewinspector_p.h"
-#include "qdeclarativeviewinspector_p_p.h"
-#include "editor/liveselectiontool_p.h"
-#include "editor/zoomtool_p.h"
-#include "editor/colorpickertool_p.h"
-#include "editor/livelayeritem_p.h"
-#include "editor/boundingrecthighlighter_p.h"
+#include "editor/liveselectiontool.h"
+#include "editor/zoomtool.h"
+#include "editor/colorpickertool.h"
+#include "editor/livelayeritem.h"
+#include "editor/boundingrecthighlighter.h"
#include <QtDeclarative/QDeclarativeItem>
#include <QtDeclarative/QDeclarativeEngine>
@@ -57,7 +57,7 @@
#include <QtGui/QGraphicsObject>
#include <QtGui/QApplication>
-QT_BEGIN_NAMESPACE
+namespace QmlJSDebugger {
QDeclarativeViewInspectorPrivate::QDeclarativeViewInspectorPrivate(QDeclarativeViewInspector *q) :
q(q)
@@ -570,4 +570,4 @@ QRectF QDeclarativeViewInspector::adjustToScreenBoundaries(const QRectF &boundin
return boundingRect;
}
-QT_END_NAMESPACE
+} // namespace QmlJSDebugger
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.h
new file mode 100644
index 0000000..c08ef54
--- /dev/null
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIEWINSPECTOR_H
+#define QDECLARATIVEVIEWINSPECTOR_H
+
+#include <private/qdeclarativeglobal_p.h>
+
+#include "qmlinspectorconstants.h"
+#include "abstractviewinspector.h"
+
+#include <QtCore/QScopedPointer>
+#include <QtDeclarative/QDeclarativeView>
+
+QT_FORWARD_DECLARE_CLASS(QDeclarativeItem)
+QT_FORWARD_DECLARE_CLASS(QMouseEvent)
+QT_FORWARD_DECLARE_CLASS(QToolBar)
+
+namespace QmlJSDebugger {
+
+class QDeclarativeViewInspectorPrivate;
+
+class QDeclarativeViewInspector : public AbstractViewInspector
+{
+ Q_OBJECT
+
+public:
+ explicit QDeclarativeViewInspector(QDeclarativeView *view, QObject *parent = 0);
+ ~QDeclarativeViewInspector();
+
+ // AbstractViewInspector
+ void changeCurrentObjects(const QList<QObject*> &objects);
+ void reloadView();
+ void reparentQmlObject(QObject *object, QObject *newParent);
+ void changeTool(InspectorProtocol::Tool tool);
+ QWidget *viewWidget() const { return declarativeView(); }
+ QDeclarativeEngine *declarativeEngine() const;
+
+ void setSelectedItems(QList<QGraphicsItem *> items);
+ QList<QGraphicsItem *> selectedItems() const;
+
+ QDeclarativeView *declarativeView() const;
+
+ QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace);
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *event);
+
+ bool leaveEvent(QEvent *);
+ bool mousePressEvent(QMouseEvent *event);
+ bool mouseMoveEvent(QMouseEvent *event);
+ bool mouseReleaseEvent(QMouseEvent *event);
+ bool keyPressEvent(QKeyEvent *event);
+ bool keyReleaseEvent(QKeyEvent *keyEvent);
+ bool mouseDoubleClickEvent(QMouseEvent *event);
+ bool wheelEvent(QWheelEvent *event);
+
+ void setSelectedItemsForTools(QList<QGraphicsItem *> items);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeViewInspector)
+
+ inline QDeclarativeViewInspectorPrivate *d_func() { return data.data(); }
+ QScopedPointer<QDeclarativeViewInspectorPrivate> data;
+ friend class QDeclarativeViewInspectorPrivate;
+ friend class AbstractLiveEditTool;
+};
+
+} // namespace QmlJSDebugger
+
+#endif // QDECLARATIVEVIEWINSPECTOR_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h
index c89a259..cd8d749 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h
@@ -42,74 +42,80 @@
#ifndef QDECLARATIVEVIEWINSPECTOR_P_H
#define QDECLARATIVEVIEWINSPECTOR_P_H
-#include <private/qdeclarativeglobal_p.h>
+#include "qdeclarativeviewinspector.h"
-#include "qmlinspectorconstants_p.h"
-#include "abstractviewinspector.h"
+#include <QtCore/QWeakPointer>
+#include <QtCore/QPointF>
-#include <QtCore/QScopedPointer>
-#include <QtDeclarative/QDeclarativeView>
+#include "QtDeclarative/private/qdeclarativeinspectorservice_p.h"
-QT_FORWARD_DECLARE_CLASS(QDeclarativeItem)
-QT_FORWARD_DECLARE_CLASS(QMouseEvent)
-QT_FORWARD_DECLARE_CLASS(QToolBar)
+namespace QmlJSDebugger {
-QT_BEGIN_HEADER
+class QDeclarativeViewInspector;
+class LiveSelectionTool;
+class ZoomTool;
+class ColorPickerTool;
+class LiveLayerItem;
+class BoundingRectHighlighter;
+class AbstractLiveEditTool;
-QT_BEGIN_NAMESPACE
+class QDeclarativeViewInspectorPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeViewInspectorPrivate(QDeclarativeViewInspector *);
+ ~QDeclarativeViewInspectorPrivate();
-QT_MODULE(Declarative)
+ QDeclarativeView *view;
+ QDeclarativeViewInspector *q;
+ QWeakPointer<QWidget> viewport;
-class QDeclarativeViewInspectorPrivate;
+ QPointF cursorPos;
+ QList<QWeakPointer<QGraphicsObject> > currentSelection;
-class QDeclarativeViewInspector : public AbstractViewInspector
-{
- Q_OBJECT
+ Constants::DesignTool currentToolMode;
+ AbstractLiveEditTool *currentTool;
-public:
- explicit QDeclarativeViewInspector(QDeclarativeView *view, QObject *parent = 0);
- ~QDeclarativeViewInspector();
-
- // AbstractViewInspector
- void changeCurrentObjects(const QList<QObject*> &objects);
- void reloadView();
- void reparentQmlObject(QObject *object, QObject *newParent);
- void changeTool(InspectorProtocol::Tool tool);
- QWidget *viewWidget() const { return declarativeView(); }
- QDeclarativeEngine *declarativeEngine() const;
-
- void setSelectedItems(QList<QGraphicsItem *> items);
- QList<QGraphicsItem *> selectedItems() const;
+ LiveSelectionTool *selectionTool;
+ ZoomTool *zoomTool;
+ ColorPickerTool *colorPickerTool;
+ LiveLayerItem *manipulatorLayer;
- QDeclarativeView *declarativeView() const;
+ BoundingRectHighlighter *boundingRectHighlighter;
- QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace);
+ void setViewport(QWidget *widget);
-protected:
- bool eventFilter(QObject *obj, QEvent *event);
+ void clearEditorItems();
+ void changeToSelectTool();
+ QList<QGraphicsItem*> filterForSelection(QList<QGraphicsItem*> &itemlist) const;
- bool leaveEvent(QEvent *);
- bool mousePressEvent(QMouseEvent *event);
- bool mouseMoveEvent(QMouseEvent *event);
- bool mouseReleaseEvent(QMouseEvent *event);
- bool keyPressEvent(QKeyEvent *event);
- bool keyReleaseEvent(QKeyEvent *keyEvent);
- bool mouseDoubleClickEvent(QMouseEvent *event);
- bool wheelEvent(QWheelEvent *event);
+ QList<QGraphicsItem*> selectableItems(const QPoint &pos) const;
+ QList<QGraphicsItem*> selectableItems(const QPointF &scenePos) const;
+ QList<QGraphicsItem*> selectableItems(const QRectF &sceneRect, Qt::ItemSelectionMode selectionMode) const;
- void setSelectedItemsForTools(QList<QGraphicsItem *> items);
+ void setSelectedItemsForTools(const QList<QGraphicsItem *> &items);
+ void setSelectedItems(const QList<QGraphicsItem *> &items);
+ QList<QGraphicsItem *> selectedItems() const;
-private:
- Q_DISABLE_COPY(QDeclarativeViewInspector)
+ void clearHighlight();
+ void highlight(const QList<QGraphicsObject *> &item);
+ inline void highlight(QGraphicsObject *item)
+ { highlight(QList<QGraphicsObject*>() << item); }
- inline QDeclarativeViewInspectorPrivate *d_func() { return data.data(); }
- QScopedPointer<QDeclarativeViewInspectorPrivate> data;
- friend class QDeclarativeViewInspectorPrivate;
- friend class AbstractLiveEditTool;
-};
+ void changeToSingleSelectTool();
+ void changeToMarqueeSelectTool();
+ void changeToZoomTool();
+ void changeToColorPickerTool();
+
+public slots:
+ void _q_onStatusChanged(QDeclarativeView::Status status);
-QT_END_NAMESPACE
+ void _q_removeFromSelection(QObject *);
+
+public:
+ static QDeclarativeViewInspectorPrivate *get(QDeclarativeViewInspector *v) { return v->d_func(); }
+};
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // QDECLARATIVEVIEWINSPECTOR_P_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h
deleted file mode 100644
index a412df3..0000000
--- a/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVEVIEWINSPECTOR_P_P_H
-#define QDECLARATIVEVIEWINSPECTOR_P_P_H
-
-#include "qdeclarativeviewinspector_p.h"
-
-#include <QtCore/QWeakPointer>
-#include <QtCore/QPointF>
-
-#include "QtDeclarative/private/qdeclarativeinspectorservice_p.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QDeclarativeViewInspector;
-class LiveSelectionTool;
-class ZoomTool;
-class ColorPickerTool;
-class LiveLayerItem;
-class BoundingRectHighlighter;
-class AbstractLiveEditTool;
-
-class QDeclarativeViewInspectorPrivate : public QObject
-{
- Q_OBJECT
-public:
- QDeclarativeViewInspectorPrivate(QDeclarativeViewInspector *);
- ~QDeclarativeViewInspectorPrivate();
-
- QDeclarativeView *view;
- QDeclarativeViewInspector *q;
- QWeakPointer<QWidget> viewport;
-
- QPointF cursorPos;
- QList<QWeakPointer<QGraphicsObject> > currentSelection;
-
- Constants::DesignTool currentToolMode;
- AbstractLiveEditTool *currentTool;
-
- LiveSelectionTool *selectionTool;
- ZoomTool *zoomTool;
- ColorPickerTool *colorPickerTool;
- LiveLayerItem *manipulatorLayer;
-
- BoundingRectHighlighter *boundingRectHighlighter;
-
- void setViewport(QWidget *widget);
-
- void clearEditorItems();
- void changeToSelectTool();
- QList<QGraphicsItem*> filterForSelection(QList<QGraphicsItem*> &itemlist) const;
-
- QList<QGraphicsItem*> selectableItems(const QPoint &pos) const;
- QList<QGraphicsItem*> selectableItems(const QPointF &scenePos) const;
- QList<QGraphicsItem*> selectableItems(const QRectF &sceneRect, Qt::ItemSelectionMode selectionMode) const;
-
- void setSelectedItemsForTools(const QList<QGraphicsItem *> &items);
- void setSelectedItems(const QList<QGraphicsItem *> &items);
- QList<QGraphicsItem *> selectedItems() const;
-
- void clearHighlight();
- void highlight(const QList<QGraphicsObject *> &item);
- inline void highlight(QGraphicsObject *item)
- { highlight(QList<QGraphicsObject*>() << item); }
-
- void changeToSingleSelectTool();
- void changeToMarqueeSelectTool();
- void changeToZoomTool();
- void changeToColorPickerTool();
-
-public slots:
- void _q_onStatusChanged(QDeclarativeView::Status status);
-
- void _q_removeFromSelection(QObject *);
-
-public:
- static QDeclarativeViewInspectorPrivate *get(QDeclarativeViewInspector *v) { return v->d_func(); }
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QDECLARATIVEVIEWINSPECTOR_P_P_H
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
index fd2a744..6c56e62 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
+++ b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
@@ -28,22 +28,22 @@ HEADERS += \
abstractviewinspector.h \
qdeclarativeinspectorplugin.h \
qdeclarativeinspectorprotocol.h \
+ qdeclarativeviewinspector.h \
qdeclarativeviewinspector_p.h \
- qdeclarativeviewinspector_p_p.h \
- qmlinspectorconstants_p.h \
- editor/abstractliveedittool_p.h \
- editor/liveselectiontool_p.h \
- editor/livelayeritem_p.h \
- editor/livesingleselectionmanipulator_p.h \
- editor/liverubberbandselectionmanipulator_p.h \
- editor/liveselectionrectangle_p.h \
- editor/liveselectionindicator_p.h \
- editor/boundingrecthighlighter_p.h \
- editor/subcomponentmasklayeritem_p.h \
- editor/zoomtool_p.h \
- editor/colorpickertool_p.h \
- editor/qmltoolbar_p.h \
- editor/toolbarcolorbox_p.h
+ qmlinspectorconstants.h \
+ editor/abstractliveedittool.h \
+ editor/liveselectiontool.h \
+ editor/livelayeritem.h \
+ editor/livesingleselectionmanipulator.h \
+ editor/liverubberbandselectionmanipulator.h \
+ editor/liveselectionrectangle.h \
+ editor/liveselectionindicator.h \
+ editor/boundingrecthighlighter.h \
+ editor/subcomponentmasklayeritem.h \
+ editor/zoomtool.h \
+ editor/colorpickertool.h \
+ editor/qmltoolbar.h \
+ editor/toolbarcolorbox.h
RESOURCES += editor/editor.qrc
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h b/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants.h
index 9f6b116..5335222 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants.h
@@ -44,12 +44,7 @@
#include <QtDeclarative/private/qdeclarativeglobal_p.h>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
+namespace QmlJSDebugger {
namespace Constants {
enum DesignTool {
@@ -77,9 +72,6 @@ enum GraphicsItemTypes {
} // namespace Constants
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
+} // namespace QmlJSDebugger
#endif // QMLINSPECTORCONSTANTS_H