summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-06-14 08:36:31 (GMT)
committeraavit <qt-info@nokia.com>2011-06-14 08:36:31 (GMT)
commit489d7316a62f9ea7d63ae52cf551cf8b5dc4fbe1 (patch)
treed0d4bb57c2a821c403d133e646b4572e7e0f075b /src
parentb9993f684c7ef8c04aa6a0e87af596609957f906 (diff)
parentea0963bde7fb9f1486dd157f43955a11024d3e7d (diff)
downloadQt-489d7316a62f9ea7d63ae52cf551cf8b5dc4fbe1.zip
Qt-489d7316a62f9ea7d63ae52cf551cf8b5dc4fbe1.tar.gz
Qt-489d7316a62f9ea7d63ae52cf551cf8b5dc4fbe1.tar.bz2
Merge remote branch 'qt-mainline/4.8'
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h1
-rw-r--r--src/declarative/debugger/debugger.pri6
-rw-r--r--src/declarative/debugger/qdeclarativedebug.cpp5
-rw-r--r--src/declarative/debugger/qdeclarativedebug_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorinterface_p.h (renamed from src/declarative/debugger/qdeclarativeobserverinterface_p.h)8
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice.cpp (renamed from src/declarative/debugger/qdeclarativeobserverservice.cpp)46
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice_p.h (renamed from src/declarative/debugger/qdeclarativeobserverservice_p.h)12
-rw-r--r--src/declarative/debugger/qjsdebuggeragent.cpp13
-rw-r--r--src/declarative/debugger/qjsdebuggeragent_p.h2
-rw-r--r--src/declarative/debugger/qjsdebugservice.cpp10
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp78
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp26
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp14
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp10
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp30
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager.cpp6
-rw-r--r--src/declarative/util/qdeclarativeview.cpp6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool.cpp)18
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool_p.h)8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter.cpp)67
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter_p.h)13
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/colorpickertool.cpp)4
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/colorpickertool_p.h)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc (renamed from src/plugins/qmltooling/declarativeobserver/editor/editor.qrc)4
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-24.png)bin3440 -> 3440 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-hicontrast.png)bin3192 -> 3192 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/color-picker.png)bin3173 -> 3173 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/from-qml-24.png)bin3395 -> 3395 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/from-qml.png)bin3205 -> 3205 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/observermode-24.png)bin1283 -> 1283 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/observermode.png)bin3539 -> 3539 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/pause-24.png)bin3307 -> 3307 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/pause.png)bin3097 -> 3097 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/play-24.png)bin3655 -> 3655 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/play.png)bin3363 -> 3363 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/reload.png)bin3418 -> 3418 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/resize_handle.png)bin160 -> 160 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/select-24.png)bin3510 -> 3510 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee-24.png)bin2891 -> 2891 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee.png)bin2871 -> 2871 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/select.png)bin3308 -> 3308 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/to-qml-24.png)bin3407 -> 3407 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/to-qml.png)bin3227 -> 3227 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/zoom-24.png)bin3566 -> 3566 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png (renamed from src/plugins/qmltooling/declarativeobserver/editor/images/zoom.png)bin3347 -> 3347 bytes
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/livelayeritem.cpp)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/livelayeritem_p.h)0
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator.cpp)16
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator_p.h)6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator.cpp)8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator_p.h)6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle.cpp)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle_p.h)0
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool.cpp)44
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool_p.h)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator.cpp)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator_p.h)6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar.cpp)4
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar_p.h)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem.cpp)12
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem_p.h)6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox.cpp)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox_p.h)0
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp (renamed from src/plugins/qmltooling/declarativeobserver/editor/zoomtool.cpp)6
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h (renamed from src/plugins/qmltooling/declarativeobserver/editor/zoomtool_p.h)2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.cpp)26
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.h)22
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverprotocol.h)28
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver.cpp)198
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p.h)24
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h (renamed from src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p_p.h)24
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro (renamed from src/plugins/qmltooling/declarativeobserver/declarativeobserver.pro)16
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h (renamed from src/plugins/qmltooling/declarativeobserver/qmlobserverconstants_p.h)6
-rw-r--r--src/plugins/qmltooling/qmltooling.pro2
78 files changed, 470 insertions, 421 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1454cb3..32b3e6b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1423,6 +1423,7 @@ class QDataStream;
# define Q_DECLARATIVE_EXPORT
# define Q_OPENGL_EXPORT
# define Q_MULTIMEDIA_EXPORT
+# define Q_OPENVG_EXPORT
# define Q_XML_EXPORT
# define Q_XMLPATTERNS_EXPORT
# define Q_SCRIPT_EXPORT
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri
index 044db3c..3134c79 100644
--- a/src/declarative/debugger/debugger.pri
+++ b/src/declarative/debugger/debugger.pri
@@ -9,7 +9,7 @@ SOURCES += \
$$PWD/qdeclarativedebugtrace.cpp \
$$PWD/qdeclarativedebughelper.cpp \
$$PWD/qdeclarativedebugserver.cpp \
- $$PWD/qdeclarativeobserverservice.cpp \
+ $$PWD/qdeclarativeinspectorservice.cpp \
$$PWD/qjsdebuggeragent.cpp \
$$PWD/qjsdebugservice.cpp
@@ -24,7 +24,7 @@ HEADERS += \
$$PWD/qdeclarativedebughelper_p.h \
$$PWD/qdeclarativedebugserver_p.h \
$$PWD/qdeclarativedebugserverconnection_p.h \
- $$PWD/qdeclarativeobserverservice_p.h \
- $$PWD/qdeclarativeobserverinterface_p.h \
+ $$PWD/qdeclarativeinspectorservice_p.h \
+ $$PWD/qdeclarativeinspectorinterface_p.h \
$$PWD/qjsdebuggeragent_p.h \
$$PWD/qjsdebugservice_p.h
diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp
index 32c2b47..620ee1d 100644
--- a/src/declarative/debugger/qdeclarativedebug.cpp
+++ b/src/declarative/debugger/qdeclarativedebug.cpp
@@ -638,14 +638,15 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult
bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName,
const QVariant &bindingExpression,
- bool isLiteralValue)
+ bool isLiteralValue,
+ QString source, int line)
{
Q_D(QDeclarativeEngineDebug);
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue;
+ ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
d->client->sendMessage(message);
return true;
} else {
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h
index ae92d6a..f822637 100644
--- a/src/declarative/debugger/qdeclarativedebug_p.h
+++ b/src/declarative/debugger/qdeclarativedebug_p.h
@@ -101,7 +101,8 @@ public:
const QString &expr,
QObject *parent = 0);
bool setBindingForObject(int objectDebugId, const QString &propertyName,
- const QVariant &bindingExpression, bool isLiteralValue);
+ const QVariant &bindingExpression, bool isLiteralValue,
+ QString source = QString(), int line = -1);
bool resetBindingForObject(int objectDebugId, const QString &propertyName);
bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody);
diff --git a/src/declarative/debugger/qdeclarativeobserverinterface_p.h b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
index efb47fa..aa29d68 100644
--- a/src/declarative/debugger/qdeclarativeobserverinterface_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
@@ -50,17 +50,17 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QDeclarativeObserverInterface
+class Q_DECLARATIVE_EXPORT QDeclarativeInspectorInterface
{
public:
- QDeclarativeObserverInterface() {}
- virtual ~QDeclarativeObserverInterface() {}
+ QDeclarativeInspectorInterface() {}
+ virtual ~QDeclarativeInspectorInterface() {}
virtual void activate() = 0;
virtual void deactivate() = 0;
};
-Q_DECLARE_INTERFACE(QDeclarativeObserverInterface, "com.trolltech.Qt.QDeclarativeObserverInterface/1.0")
+Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, "com.trolltech.Qt.QDeclarativeInspectorInterface/1.0")
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativeobserverservice.cpp b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
index 43d9281..9fec006 100644
--- a/src/declarative/debugger/qdeclarativeobserverservice.cpp
+++ b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "private/qdeclarativeobserverservice_p.h"
-#include "private/qdeclarativeobserverinterface_p.h"
+#include "private/qdeclarativeinspectorservice_p.h"
+#include "private/qdeclarativeinspectorinterface_p.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
@@ -51,30 +51,30 @@
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QDeclarativeObserverService, serviceInstance)
+Q_GLOBAL_STATIC(QDeclarativeInspectorService, serviceInstance)
-QDeclarativeObserverService::QDeclarativeObserverService()
+QDeclarativeInspectorService::QDeclarativeInspectorService()
: QDeclarativeDebugService(QLatin1String("QDeclarativeObserverMode"))
- , m_observer(0)
+ , m_inspectorPlugin(0)
{
}
-QDeclarativeObserverService *QDeclarativeObserverService::instance()
+QDeclarativeInspectorService *QDeclarativeInspectorService::instance()
{
return serviceInstance();
}
-void QDeclarativeObserverService::addView(QDeclarativeView *view)
+void QDeclarativeInspectorService::addView(QDeclarativeView *view)
{
m_views.append(view);
}
-void QDeclarativeObserverService::removeView(QDeclarativeView *view)
+void QDeclarativeInspectorService::removeView(QDeclarativeView *view)
{
m_views.removeAll(view);
}
-void QDeclarativeObserverService::sendMessage(const QByteArray &message)
+void QDeclarativeInspectorService::sendMessage(const QByteArray &message)
{
if (status() != Enabled)
return;
@@ -82,33 +82,33 @@ void QDeclarativeObserverService::sendMessage(const QByteArray &message)
QDeclarativeDebugService::sendMessage(message);
}
-void QDeclarativeObserverService::statusChanged(Status status)
+void QDeclarativeInspectorService::statusChanged(Status status)
{
if (m_views.isEmpty())
return;
if (status == Enabled) {
- if (!m_observer)
- m_observer = loadObserverPlugin();
+ if (!m_inspectorPlugin)
+ m_inspectorPlugin = loadInspectorPlugin();
- if (!m_observer) {
- qWarning() << "Error while loading observer plugin";
+ if (!m_inspectorPlugin) {
+ qWarning() << "Error while loading inspector plugin";
return;
}
- m_observer->activate();
+ m_inspectorPlugin->activate();
} else {
- if (m_observer)
- m_observer->deactivate();
+ if (m_inspectorPlugin)
+ m_inspectorPlugin->deactivate();
}
}
-void QDeclarativeObserverService::messageReceived(const QByteArray &message)
+void QDeclarativeInspectorService::messageReceived(const QByteArray &message)
{
emit gotMessage(message);
}
-QDeclarativeObserverInterface *QDeclarativeObserverService::loadObserverPlugin()
+QDeclarativeInspectorInterface *QDeclarativeInspectorService::loadInspectorPlugin()
{
QStringList pluginCandidates;
const QStringList paths = QCoreApplication::libraryPaths();
@@ -124,11 +124,11 @@ QDeclarativeObserverInterface *QDeclarativeObserverService::loadObserverPlugin()
if (!loader.load())
continue;
- QDeclarativeObserverInterface *observer =
- qobject_cast<QDeclarativeObserverInterface*>(loader.instance());
+ QDeclarativeInspectorInterface *inspector =
+ qobject_cast<QDeclarativeInspectorInterface*>(loader.instance());
- if (observer)
- return observer;
+ if (inspector)
+ return inspector;
loader.unload();
}
return 0;
diff --git a/src/declarative/debugger/qdeclarativeobserverservice_p.h b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
index c883d4b..9fe0d601f 100644
--- a/src/declarative/debugger/qdeclarativeobserverservice_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
@@ -54,15 +54,15 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeView;
-class QDeclarativeObserverInterface;
+class QDeclarativeInspectorInterface;
-class Q_DECLARATIVE_EXPORT QDeclarativeObserverService : public QDeclarativeDebugService
+class Q_DECLARATIVE_EXPORT QDeclarativeInspectorService : public QDeclarativeDebugService
{
Q_OBJECT
public:
- QDeclarativeObserverService();
- static QDeclarativeObserverService *instance();
+ QDeclarativeInspectorService();
+ static QDeclarativeInspectorService *instance();
void addView(QDeclarativeView *);
void removeView(QDeclarativeView *);
@@ -78,10 +78,10 @@ protected:
virtual void messageReceived(const QByteArray &);
private:
- static QDeclarativeObserverInterface *loadObserverPlugin();
+ static QDeclarativeInspectorInterface *loadInspectorPlugin();
QList<QDeclarativeView*> m_views;
- QDeclarativeObserverInterface *m_observer;
+ QDeclarativeInspectorInterface *m_inspectorPlugin;
};
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qjsdebuggeragent.cpp b/src/declarative/debugger/qjsdebuggeragent.cpp
index 9b76592..dff637b 100644
--- a/src/declarative/debugger/qjsdebuggeragent.cpp
+++ b/src/declarative/debugger/qjsdebuggeragent.cpp
@@ -56,7 +56,7 @@ class QJSDebuggerAgentPrivate
{
public:
QJSDebuggerAgentPrivate(QJSDebuggerAgent *q)
- : q(q), state(NoState)
+ : q(q), state(NoState), isInitialized(false)
{}
void continueExec();
@@ -79,6 +79,7 @@ public:
QHash<QString, JSAgentBreakpointData> fileNameToBreakpoints;
QStringList watchExpressions;
QSet<qint64> knownObjectIds;
+ bool isInitialized;
};
namespace {
@@ -252,6 +253,14 @@ QJSDebuggerAgent::~QJSDebuggerAgent()
delete d;
}
+/*!
+ Indicates whether the agent got the list of breakpoints.
+ */
+bool QJSDebuggerAgent::isInitialized() const
+{
+ return d->isInitialized;
+}
+
void QJSDebuggerAgent::setBreakpoints(const JSAgentBreakpoints &breakpoints)
{
d->breakpoints = breakpoints;
@@ -259,6 +268,8 @@ void QJSDebuggerAgent::setBreakpoints(const JSAgentBreakpoints &breakpoints)
d->fileNameToBreakpoints.clear();
foreach (const JSAgentBreakpointData &bp, breakpoints)
d->fileNameToBreakpoints.insertMulti(fileName(QString::fromUtf8(bp.fileUrl)), bp);
+
+ d->isInitialized = true;
}
void QJSDebuggerAgent::setWatchExpressions(const QStringList &watchExpressions)
diff --git a/src/declarative/debugger/qjsdebuggeragent_p.h b/src/declarative/debugger/qjsdebuggeragent_p.h
index 5aa3c9c..309588e 100644
--- a/src/declarative/debugger/qjsdebuggeragent_p.h
+++ b/src/declarative/debugger/qjsdebuggeragent_p.h
@@ -145,6 +145,8 @@ public:
QJSDebuggerAgent(QDeclarativeEngine *engine, QObject *parent = 0);
~QJSDebuggerAgent();
+ bool isInitialized() const;
+
void setBreakpoints(const JSAgentBreakpoints &);
void setWatchExpressions(const QStringList &);
diff --git a/src/declarative/debugger/qjsdebugservice.cpp b/src/declarative/debugger/qjsdebugservice.cpp
index 4ce2c90..ad84f65 100644
--- a/src/declarative/debugger/qjsdebugservice.cpp
+++ b/src/declarative/debugger/qjsdebugservice.cpp
@@ -71,6 +71,16 @@ void QJSDebugService::addEngine(QDeclarativeEngine *engine)
Q_ASSERT(!m_engines.contains(engine));
m_engines.append(engine);
+
+ if (status() == Enabled && !m_engines.isEmpty() && !m_agent) {
+ m_agent = new QJSDebuggerAgent(engine, engine);
+ connect(m_agent, SIGNAL(stopped(bool,QString)),
+ this, SLOT(executionStopped(bool,QString)));
+
+ while (!m_agent->isInitialized()) {
+ waitForMessage();
+ }
+ }
}
void QJSDebugService::removeEngine(QDeclarativeEngine *engine)
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index c24df61..9caaa79 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -164,47 +164,45 @@ public Q_SLOTS:
void readyToRead()
{
- if(-1 == inProgressSize) {
- // We need a size header of sizeof(qint32)
- if(sizeof(qint32) > (uint)dev->bytesAvailable())
- return;
-
- // Read size header
- int read = dev->read((char *)&inProgressSize, sizeof(qint32));
- Q_ASSERT(read == sizeof(qint32));
- Q_UNUSED(read);
-
- // Check sizing constraints
- if(inProgressSize > maxPacketSize) {
- QObject::disconnect(dev, SIGNAL(readyRead()),
- this, SLOT(readyToRead()));
- QObject::disconnect(dev, SIGNAL(aboutToClose()),
- this, SLOT(aboutToClose()));
- QObject::disconnect(dev, SIGNAL(bytesWritten(qint64)),
- this, SLOT(bytesWritten(qint64)));
- dev = 0;
- emit invalidPacket();
- return;
- }
-
- inProgressSize -= sizeof(qint32);
-
+ while (true) {
// Need to get trailing data
- readyToRead();
- } else {
- inProgress.append(dev->read(inProgressSize - inProgress.size()));
-
- if(inProgressSize == inProgress.size()) {
- // Packet has arrived!
- packets.append(inProgress);
- inProgressSize = -1;
- inProgress.clear();
-
- emit readyRead();
- waitingForPacket = false;
-
- // Need to get trailing data
- readyToRead();
+ if (-1 == inProgressSize) {
+ // We need a size header of sizeof(qint32)
+ if (sizeof(qint32) > (uint)dev->bytesAvailable())
+ return;
+
+ // Read size header
+ int read = dev->read((char *)&inProgressSize, sizeof(qint32));
+ Q_ASSERT(read == sizeof(qint32));
+ Q_UNUSED(read);
+
+ // Check sizing constraints
+ if (inProgressSize > maxPacketSize) {
+ QObject::disconnect(dev, SIGNAL(readyRead()),
+ this, SLOT(readyToRead()));
+ QObject::disconnect(dev, SIGNAL(aboutToClose()),
+ this, SLOT(aboutToClose()));
+ QObject::disconnect(dev, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(bytesWritten(qint64)));
+ dev = 0;
+ emit invalidPacket();
+ return;
+ }
+
+ inProgressSize -= sizeof(qint32);
+ } else {
+ inProgress.append(dev->read(inProgressSize - inProgress.size()));
+
+ if (inProgressSize == inProgress.size()) {
+ // Packet has arrived!
+ packets.append(inProgress);
+ inProgressSize = -1;
+ inProgress.clear();
+
+ waitingForPacket = false;
+ emit readyRead();
+ } else
+ return;
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index b7fcbb5..8787a5e 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -87,6 +87,32 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \qmlproperty url AnimatedImage::source
+
+ This property holds the URL that refers to the source image.
+
+ AnimatedImage can handle any image format supported by Qt, loaded from any
+ URL scheme supported by Qt.
+
+ \sa QDeclarativeImageProvider
+*/
+
+/*!
+ \qmlproperty bool AnimatedImage::asynchronous
+
+ Specifies that images on the local filesystem should be loaded
+ asynchronously in a separate thread. The default value is
+ false, causing the user interface thread to block while the
+ image is loaded. Setting \a asynchronous to true is useful where
+ maintaining a responsive user interface is more desirable
+ than having images immediately visible.
+
+ Note that this property is only valid for images read from the
+ local filesystem. Images loaded via a network resource (e.g. HTTP)
+ are always loaded asynchonously.
+*/
+
+/*!
\qmlproperty bool AnimatedImage::cache
\since Quick 1.1
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index bd99a32..fc5cd8b 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -817,7 +817,9 @@ void QDeclarativeGridViewPrivate::createHighlight()
if (highlight) {
if (trackedItem == highlight)
trackedItem = 0;
- delete highlight->item;
+ if (highlight->item->scene())
+ highlight->item->scene()->removeItem(highlight->item);
+ highlight->item->deleteLater();
delete highlight;
highlight = 0;
delete highlightXAnimator;
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index c3a75e6..7a5e433 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -942,7 +942,9 @@ void QDeclarativeListViewPrivate::createHighlight()
if (highlight) {
if (trackedItem == highlight)
trackedItem = 0;
- delete highlight->item;
+ if (highlight->item->scene())
+ highlight->item->scene()->removeItem(highlight->item);
+ highlight->item->deleteLater();
delete highlight;
highlight = 0;
delete highlightPosAnimator;
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 79e52cd..94f128d 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -203,7 +203,9 @@ void QDeclarativePathViewPrivate::createHighlight()
bool changed = false;
if (highlightItem) {
- delete highlightItem;
+ if (highlightItem->scene())
+ highlightItem->scene()->removeItem(highlightItem);
+ highlightItem->deleteLater();
highlightItem = 0;
changed = true;
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index e5e89d4..8679445 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -771,9 +771,6 @@ QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const
All required image providers should be added to the engine before any
QML sources files are loaded.
- Note that images loaded from a QDeclarativeImageProvider are cached
- by QPixmapCache, similar to any image loaded by QML.
-
\sa removeImageProvider()
*/
void QDeclarativeEngine::addImageProvider(const QString &providerId, QDeclarativeImageProvider *provider)
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index 559adf4..fa88c00 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -136,7 +136,8 @@ public:
Image providers that support QImage loading automatically include support
for asychronous loading of images. To enable asynchronous loading for an
- \l Image source, set \l Image::asynchronous to \c true. When this is enabled,
+ image source, set the \c asynchronous property to \c true for the relevant
+ \l Image, \l BorderImage or \l AnimatedImage object. When this is enabled,
the image request to the provider is run in a low priority thread,
allowing image loading to be executed in the background, and reducing the
performance impact on the user interface.
@@ -147,6 +148,17 @@ public:
\c true, the value is ignored and the image is loaded
synchronously.
+
+ \section2 Image caching
+
+ Images returned by a QDeclarativeImageProvider are automatically cached,
+ similar to any image loaded by the QML engine. When an image with a
+ "image://" prefix is loaded from cache, requestImage() and requestPixmap()
+ will not be called for the relevant image provider. If an image should always
+ be fetched from the image provider, and should not be cached at all, set the
+ \c cache property to \c false for the relevant \l Image, \l BorderImage or
+ \l AnimatedImage object.
+
\sa QDeclarativeEngine::addImageProvider()
*/
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index efaa7f0..ce21bcd 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1522,6 +1522,7 @@ void QDeclarativeAnimationGroupPrivate::append_animation(QDeclarativeListPropert
QDeclarativeAnimationGroup *q = qobject_cast<QDeclarativeAnimationGroup *>(list->object);
if (q) {
a->setGroup(q);
+ // This is an optimization for the parenting that already occurs via addAnimation
QDeclarative_setParent_noEvent(a->qtAnimation(), q->d_func()->ag);
q->d_func()->ag->addAnimation(a->qtAnimation());
}
@@ -1531,9 +1532,12 @@ void QDeclarativeAnimationGroupPrivate::clear_animation(QDeclarativeListProperty
{
QDeclarativeAnimationGroup *q = qobject_cast<QDeclarativeAnimationGroup *>(list->object);
if (q) {
- for (int i = 0; i < q->d_func()->animations.count(); ++i)
- q->d_func()->animations.at(i)->setGroup(0);
- q->d_func()->animations.clear();
+ while (q->d_func()->animations.count()) {
+ QDeclarativeAbstractAnimation *firstAnim = q->d_func()->animations.at(0);
+ QDeclarative_setParent_noEvent(firstAnim->qtAnimation(), 0);
+ q->d_func()->ag->removeAnimation(firstAnim->qtAnimation());
+ firstAnim->setGroup(0);
+ }
}
}
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 273060b..b63407c 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -130,6 +130,9 @@ public:
endState->complete();
}
static void append_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, QDeclarativeAbstractAnimation *a);
+ static int animation_count(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list);
+ static QDeclarativeAbstractAnimation* animation_at(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, int pos);
+ static void clear_animations(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list);
QList<QDeclarativeAbstractAnimation *> animations;
};
@@ -141,6 +144,28 @@ void QDeclarativeTransitionPrivate::append_animation(QDeclarativeListProperty<QD
a->setDisableUserControl();
}
+int QDeclarativeTransitionPrivate::animation_count(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list)
+{
+ QDeclarativeTransition *q = static_cast<QDeclarativeTransition *>(list->object);
+ return q->d_func()->animations.count();
+}
+
+QDeclarativeAbstractAnimation* QDeclarativeTransitionPrivate::animation_at(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, int pos)
+{
+ QDeclarativeTransition *q = static_cast<QDeclarativeTransition *>(list->object);
+ return q->d_func()->animations.at(pos);
+}
+
+void QDeclarativeTransitionPrivate::clear_animations(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list)
+{
+ QDeclarativeTransition *q = static_cast<QDeclarativeTransition *>(list->object);
+ while (q->d_func()->animations.count()) {
+ QDeclarativeAbstractAnimation *firstAnim = q->d_func()->animations.at(0);
+ q->d_func()->group.removeAnimation(firstAnim->qtAnimation());
+ q->d_func()->animations.removeAll(firstAnim);
+ }
+}
+
void ParallelAnimationWrapper::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
{
QParallelAnimationGroup::updateState(newState, oldState);
@@ -309,7 +334,10 @@ void QDeclarativeTransition::setToState(const QString &t)
QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
{
Q_D(QDeclarativeTransition);
- return QDeclarativeListProperty<QDeclarativeAbstractAnimation>(this, &d->animations, QDeclarativeTransitionPrivate::append_animation);
+ return QDeclarativeListProperty<QDeclarativeAbstractAnimation>(this, &d->animations, QDeclarativeTransitionPrivate::append_animation,
+ QDeclarativeTransitionPrivate::animation_count,
+ QDeclarativeTransitionPrivate::animation_at,
+ QDeclarativeTransitionPrivate::clear_animations);
}
QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp
index 944b37f..6e96ac9 100644
--- a/src/declarative/util/qdeclarativetransitionmanager.cpp
+++ b/src/declarative/util/qdeclarativetransitionmanager.cpp
@@ -56,12 +56,12 @@ class QDeclarativeTransitionManagerPrivate
{
public:
QDeclarativeTransitionManagerPrivate()
- : state(0), transition(0) {}
+ : state(0) {}
void applyBindings();
typedef QList<QDeclarativeSimpleAction> SimpleActionList;
QDeclarativeState *state;
- QDeclarativeTransition *transition;
+ QDeclarativeGuard<QDeclarativeTransition> transition;
QDeclarativeStateOperation::ActionList bindingsList;
SimpleActionList completeList;
};
@@ -253,7 +253,7 @@ void QDeclarativeTransitionManager::cancel()
{
if (d->transition) {
// ### this could potentially trigger a complete in rare circumstances
- d->transition->stop();
+ d->transition->stop();
d->transition = 0;
}
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index f6be2d7..bab991b 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -49,7 +49,7 @@
#include <qdeclarativeguard_p.h>
#include <private/qdeclarativedebugtrace_p.h>
-#include <private/qdeclarativeobserverservice_p.h>
+#include <private/qdeclarativeinspectorservice_p.h>
#include <qscriptvalueiterator.h>
#include <qdebug.h>
@@ -301,7 +301,7 @@ void QDeclarativeViewPrivate::init()
q->viewport()->setAttribute(Qt::WA_NoSystemBackground);
#endif
- QDeclarativeObserverService::instance()->addView(q);
+ QDeclarativeInspectorService::instance()->addView(q);
}
/*!
@@ -309,7 +309,7 @@ void QDeclarativeViewPrivate::init()
*/
QDeclarativeView::~QDeclarativeView()
{
- QDeclarativeObserverService::instance()->removeView(this);
+ QDeclarativeInspectorService::instance()->removeView(this);
}
/*! \property QDeclarativeView::source
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp
index a97a537..36e6ba0 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "abstractliveedittool_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
#include <QDeclarativeEngine>
@@ -50,8 +50,8 @@
QT_BEGIN_NAMESPACE
-AbstractLiveEditTool::AbstractLiveEditTool(QDeclarativeViewObserver *editorView)
- : QObject(editorView), m_observer(editorView)
+AbstractLiveEditTool::AbstractLiveEditTool(QDeclarativeViewInspector *editorView)
+ : QObject(editorView), m_inspector(editorView)
{
}
@@ -60,14 +60,14 @@ AbstractLiveEditTool::~AbstractLiveEditTool()
{
}
-QDeclarativeViewObserver *AbstractLiveEditTool::observer() const
+QDeclarativeViewInspector *AbstractLiveEditTool::inspector() const
{
- return m_observer;
+ return m_inspector;
}
QDeclarativeView *AbstractLiveEditTool::view() const
{
- return m_observer->declarativeView();
+ return m_inspector->declarativeView();
}
QGraphicsScene* AbstractLiveEditTool::scene() const
@@ -82,7 +82,7 @@ void AbstractLiveEditTool::updateSelectedItems()
QList<QGraphicsItem*> AbstractLiveEditTool::items() const
{
- return observer()->selectedItems();
+ return inspector()->selectedItems();
}
bool AbstractLiveEditTool::topItemIsMovable(const QList<QGraphicsItem*> & itemList)
@@ -99,7 +99,7 @@ bool AbstractLiveEditTool::topItemIsMovable(const QList<QGraphicsItem*> & itemLi
bool AbstractLiveEditTool::topSelectedItemIsMovable(const QList<QGraphicsItem*> &itemList)
{
- QList<QGraphicsItem*> selectedItems = observer()->selectedItems();
+ QList<QGraphicsItem*> selectedItems = inspector()->selectedItems();
foreach (QGraphicsItem *item, itemList) {
QDeclarativeItem *declarativeItem = toQDeclarativeItem(item);
@@ -175,7 +175,7 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem*>(gfxObject);
if (declarativeItem) {
- objectStringId = m_observer->idStringForObject(declarativeItem);
+ objectStringId = m_inspector->idStringForObject(declarativeItem);
}
if (!objectStringId.isEmpty()) {
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h
index 97aac35..17eb6ea 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/abstractliveedittool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/abstractliveedittool_p.h
@@ -62,13 +62,13 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class AbstractLiveEditTool : public QObject
{
Q_OBJECT
public:
- AbstractLiveEditTool(QDeclarativeViewObserver *observer);
+ AbstractLiveEditTool(QDeclarativeViewInspector *inspector);
virtual ~AbstractLiveEditTool();
@@ -103,12 +103,12 @@ public:
protected:
virtual void selectedItemsChanged(const QList<QGraphicsItem*> &objectList) = 0;
- QDeclarativeViewObserver *observer() const;
+ QDeclarativeViewInspector *inspector() const;
QDeclarativeView *view() const;
QGraphicsScene *scene() const;
private:
- QDeclarativeViewObserver *m_observer;
+ QDeclarativeViewInspector *m_inspector;
QList<QGraphicsItem*> m_itemList;
};
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp
index e9594d5..3f95005 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter.cpp
@@ -41,8 +41,8 @@
#include "boundingrecthighlighter_p.h"
-#include "../qdeclarativeviewobserver_p.h"
-#include "../qmlobserverconstants_p.h"
+#include "../qdeclarativeviewinspector_p.h"
+#include "../qmlinspectorconstants_p.h"
#include <QtGui/QGraphicsPolygonItem>
@@ -52,10 +52,6 @@
QT_BEGIN_NAMESPACE
-const qreal AnimDelta = 0.025f;
-const int AnimInterval = 30;
-const int AnimFrames = 10;
-
BoundingBox::BoundingBox(QGraphicsObject *itemToHighlight, QGraphicsItem *parentItem,
QObject *parent)
: QObject(parent),
@@ -91,14 +87,10 @@ int BoundingBoxPolygonItem::type() const
return Constants::EditorItemType;
}
-BoundingRectHighlighter::BoundingRectHighlighter(QDeclarativeViewObserver *view) :
+BoundingRectHighlighter::BoundingRectHighlighter(QDeclarativeViewInspector *view) :
LiveLayerItem(view->declarativeView()->scene()),
- m_view(view),
- m_animFrame(0)
+ m_view(view)
{
- m_animTimer = new QTimer(this);
- m_animTimer->setInterval(AnimInterval);
- connect(m_animTimer, SIGNAL(timeout()), SLOT(animTimeout()));
}
BoundingRectHighlighter::~BoundingRectHighlighter()
@@ -106,37 +98,17 @@ BoundingRectHighlighter::~BoundingRectHighlighter()
}
-void BoundingRectHighlighter::animTimeout()
-{
- ++m_animFrame;
- if (m_animFrame == AnimFrames) {
- m_animTimer->stop();
- }
-
- qreal alpha = m_animFrame / float(AnimFrames);
-
- foreach (BoundingBox *box, m_boxes) {
- box->highlightPolygonEdge->setOpacity(alpha);
- }
-}
-
void BoundingRectHighlighter::clear()
{
- if (m_boxes.length()) {
- m_animTimer->stop();
-
- foreach (BoundingBox *box, m_boxes) {
- freeBoundingBox(box);
- }
- }
+ foreach (BoundingBox *box, m_boxes)
+ freeBoundingBox(box);
}
BoundingBox *BoundingRectHighlighter::boxFor(QGraphicsObject *item) const
{
foreach (BoundingBox *box, m_boxes) {
- if (box->highlightedObject.data() == item) {
+ if (box->highlightedObject.data() == item)
return box;
- }
}
return 0;
}
@@ -146,15 +118,11 @@ void BoundingRectHighlighter::highlight(QList<QGraphicsObject*> items)
if (items.isEmpty())
return;
- bool animate = false;
-
QList<BoundingBox *> newBoxes;
foreach (QGraphicsObject *itemToHighlight, items) {
BoundingBox *box = boxFor(itemToHighlight);
- if (!box) {
+ if (!box)
box = createBoundingBox(itemToHighlight);
- animate = true;
- }
newBoxes << box;
}
@@ -165,7 +133,7 @@ void BoundingRectHighlighter::highlight(QList<QGraphicsObject*> items)
m_boxes << newBoxes;
}
- highlightAll(animate);
+ highlightAll();
}
void BoundingRectHighlighter::highlight(QGraphicsObject* itemToHighlight)
@@ -173,17 +141,14 @@ void BoundingRectHighlighter::highlight(QGraphicsObject* itemToHighlight)
if (!itemToHighlight)
return;
- bool animate = false;
-
BoundingBox *box = boxFor(itemToHighlight);
if (!box) {
box = createBoundingBox(itemToHighlight);
m_boxes << box;
- animate = true;
qSort(m_boxes);
}
- highlightAll(animate);
+ highlightAll();
}
BoundingBox *BoundingRectHighlighter::createBoundingBox(QGraphicsObject *itemToHighlight)
@@ -244,7 +209,7 @@ void BoundingRectHighlighter::itemDestroyed(QObject *obj)
}
}
-void BoundingRectHighlighter::highlightAll(bool animate)
+void BoundingRectHighlighter::highlightAll()
{
foreach (BoundingBox *box, m_boxes) {
if (box && box->highlightedObject.isNull()) {
@@ -262,21 +227,13 @@ void BoundingRectHighlighter::highlightAll(bool animate)
box->highlightPolygon->setPolygon(QPolygonF(bboxRect));
box->highlightPolygonEdge->setPolygon(QPolygonF(edgeRect));
-
- if (animate)
- box->highlightPolygonEdge->setOpacity(0);
- }
-
- if (animate) {
- m_animFrame = 0;
- m_animTimer->start();
}
}
void BoundingRectHighlighter::refresh()
{
if (!m_boxes.isEmpty())
- highlightAll(true);
+ highlightAll();
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h
index ab7e595..e2928f7 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/boundingrecthighlighter_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/boundingrecthighlighter_p.h
@@ -59,14 +59,14 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class BoundingBox;
class BoundingRectHighlighter : public LiveLayerItem
{
Q_OBJECT
public:
- explicit BoundingRectHighlighter(QDeclarativeViewObserver *view);
+ explicit BoundingRectHighlighter(QDeclarativeViewInspector *view);
~BoundingRectHighlighter();
void clear();
void highlight(QList<QGraphicsObject*> items);
@@ -74,12 +74,11 @@ public:
private slots:
void refresh();
- void animTimeout();
void itemDestroyed(QObject *);
private:
BoundingBox *boxFor(QGraphicsObject *item) const;
- void highlightAll(bool animate);
+ void highlightAll();
BoundingBox *createBoundingBox(QGraphicsObject *itemToHighlight);
void removeBoundingBox(BoundingBox *box);
void freeBoundingBox(BoundingBox *box);
@@ -87,13 +86,9 @@ private:
private:
Q_DISABLE_COPY(BoundingRectHighlighter)
- QDeclarativeViewObserver *m_view;
+ QDeclarativeViewInspector *m_view;
QList<BoundingBox* > m_boxes;
QList<BoundingBox* > m_freeBoxes;
- QTimer *m_animTimer;
- qreal m_animScale;
- int m_animFrame;
-
};
class BoundingBox : public QObject
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/colorpickertool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp
index 50d724e..bdae3d8 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/colorpickertool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp
@@ -41,7 +41,7 @@
#include "colorpickertool_p.h"
-#include "../qdeclarativeviewobserver_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtGui/QMouseEvent>
#include <QtGui/QKeyEvent>
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-ColorPickerTool::ColorPickerTool(QDeclarativeViewObserver *view) :
+ColorPickerTool::ColorPickerTool(QDeclarativeViewInspector *view) :
AbstractLiveEditTool(view)
{
m_selectedColor.setRgb(0,0,0);
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/colorpickertool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h
index b955eee..580c175 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/colorpickertool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool_p.h
@@ -58,7 +58,7 @@ class ColorPickerTool : public AbstractLiveEditTool
{
Q_OBJECT
public:
- explicit ColorPickerTool(QDeclarativeViewObserver *view);
+ explicit ColorPickerTool(QDeclarativeViewInspector *view);
virtual ~ColorPickerTool();
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/editor.qrc b/src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc
index 77744d5..fb2393c 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/editor.qrc
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc
@@ -18,7 +18,7 @@
<file>images/zoom-24.png</file>
<file>images/select-24.png</file>
<file>images/select-marquee-24.png</file>
- <file>images/observermode.png</file>
- <file>images/observermode-24.png</file>
+ <file>images/inspectormode.png</file>
+ <file>images/inspectormode-24.png</file>
</qresource>
</RCC>
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png
index cff4721..cff4721 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-hicontrast.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png
index b953d08..b953d08 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker-hicontrast.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png
index 026c31b..026c31b 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/color-picker.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/from-qml-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png
index 0ad21f3..0ad21f3 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/from-qml-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/from-qml.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png
index 666382c..666382c 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/from-qml.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/observermode-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png
index 5e74d86..5e74d86 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/observermode-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/observermode.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png
index daed21c..daed21c 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/observermode.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/pause-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png
index d9a2f6f..d9a2f6f 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/pause-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/pause.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png
index 114d89b..114d89b 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/pause.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/play-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png
index e2b9fbc..e2b9fbc 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/play-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/play.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png
index 011598a..011598a 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/play.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/reload.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png
index 7042bec..7042bec 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/reload.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/resize_handle.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png
index 2934f25..2934f25 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/resize_handle.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/select-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png
index 5388a9d..5388a9d 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/select-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png
index 0111dda..0111dda 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png
index 92fe40d..92fe40d 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/select-marquee.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/select.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png
index 6722855..6722855 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/select.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/to-qml-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png
index b72450d..b72450d 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/to-qml-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/to-qml.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png
index 2ab951f..2ab951f 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/to-qml.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/zoom-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png
index 0346200..0346200 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/zoom-24.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/images/zoom.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png
index 17f0da6..17f0da6 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/images/zoom.png
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png
Binary files differ
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/livelayeritem.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp
index 73cc5a0..c28893e 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/livelayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem.cpp
@@ -41,7 +41,7 @@
#include "livelayeritem_p.h"
-#include "../qmlobserverconstants_p.h"
+#include "../qmlinspectorconstants_p.h"
#include <QGraphicsScene>
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/livelayeritem_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h
index da622e1..da622e1 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/livelayeritem_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livelayeritem_p.h
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp
index 18341de..d32847d 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator.cpp
@@ -41,7 +41,7 @@
#include "liverubberbandselectionmanipulator_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
#include <QtGui/QGraphicsItem>
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
LiveRubberBandSelectionManipulator::LiveRubberBandSelectionManipulator(QGraphicsObject *layerItem,
- QDeclarativeViewObserver *editorView)
+ QDeclarativeViewInspector *editorView)
: m_selectionRectangleElement(layerItem),
m_editorView(editorView),
m_beginFormEditorItem(0),
@@ -83,9 +83,9 @@ void LiveRubberBandSelectionManipulator::begin(const QPointF &beginPoint)
m_selectionRectangleElement.setRect(m_beginPoint, m_beginPoint);
m_selectionRectangleElement.show();
m_isActive = true;
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(m_editorView);
- m_beginFormEditorItem = topFormEditorItem(observerPrivate->selectableItems(beginPoint));
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(m_editorView);
+ m_beginFormEditorItem = topFormEditorItem(inspectorPrivate->selectableItems(beginPoint));
m_oldSelectionList = m_editorView->selectedItems();
}
@@ -103,10 +103,10 @@ void LiveRubberBandSelectionManipulator::end()
void LiveRubberBandSelectionManipulator::select(SelectionType selectionType)
{
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(m_editorView);
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(m_editorView);
QList<QGraphicsItem*> itemList
- = observerPrivate->selectableItems(m_selectionRectangleElement.rect(),
+ = inspectorPrivate->selectableItems(m_selectionRectangleElement.rect(),
Qt::IntersectsItemShape);
QList<QGraphicsItem*> newSelectionList;
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h
index a71caa2..9abcb2b 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liverubberbandselectionmanipulator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liverubberbandselectionmanipulator_p.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class LiveRubberBandSelectionManipulator
{
@@ -66,7 +66,7 @@ public:
};
LiveRubberBandSelectionManipulator(QGraphicsObject *layerItem,
- QDeclarativeViewObserver *editorView);
+ QDeclarativeViewInspector *editorView);
void setItems(const QList<QGraphicsItem*> &itemList);
@@ -90,7 +90,7 @@ private:
QList<QGraphicsItem*> m_oldSelectionList;
LiveSelectionRectangle m_selectionRectangleElement;
QPointF m_beginPoint;
- QDeclarativeViewObserver *m_editorView;
+ QDeclarativeViewInspector *m_editorView;
QGraphicsItem *m_beginFormEditorItem;
bool m_isActive;
};
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp
index 2752957..4450fc5 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator.cpp
@@ -41,8 +41,8 @@
#include "liveselectionindicator_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
-#include "../qmlobserverconstants_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
+#include "../qmlinspectorconstants_p.h"
#include <QtGui/QGraphicsRectItem>
#include <QtGui/QGraphicsObject>
@@ -51,10 +51,10 @@
QT_BEGIN_NAMESPACE
-LiveSelectionIndicator::LiveSelectionIndicator(QDeclarativeViewObserver *viewObserver,
+LiveSelectionIndicator::LiveSelectionIndicator(QDeclarativeViewInspector *viewInspector,
QGraphicsObject *layerItem)
: m_layerItem(layerItem)
- , m_view(viewObserver)
+ , m_view(viewInspector)
{
}
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h
index efd2c5f..fa6eb30 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionindicator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionindicator_p.h
@@ -58,12 +58,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class LiveSelectionIndicator
{
public:
- LiveSelectionIndicator(QDeclarativeViewObserver *viewObserver, QGraphicsObject *layerItem);
+ LiveSelectionIndicator(QDeclarativeViewInspector *viewInspector, QGraphicsObject *layerItem);
~LiveSelectionIndicator();
void show();
@@ -76,7 +76,7 @@ public:
private:
QHash<QGraphicsItem*, QGraphicsRectItem *> m_indicatorShapeHash;
QWeakPointer<QGraphicsObject> m_layerItem;
- QDeclarativeViewObserver *m_view;
+ QDeclarativeViewInspector *m_view;
};
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp
index 6da1d6f..267079a 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle.cpp
@@ -41,7 +41,7 @@
#include "liveselectionrectangle_p.h"
-#include "../qmlobserverconstants_p.h"
+#include "../qmlinspectorconstants_p.h"
#include <QtGui/QPen>
#include <QtGui/QGraphicsRectItem>
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h
index 5da9fb8..5da9fb8 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectionrectangle_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectionrectangle_p.h
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp
index 872832c..c55cba3 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp
@@ -42,7 +42,7 @@
#include "liveselectiontool_p.h"
#include "livelayeritem_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
#include <QtGui/QApplication>
#include <QtGui/QWheelEvent>
@@ -59,14 +59,14 @@
QT_BEGIN_NAMESPACE
-LiveSelectionTool::LiveSelectionTool(QDeclarativeViewObserver *editorView) :
+LiveSelectionTool::LiveSelectionTool(QDeclarativeViewInspector *editorView) :
AbstractLiveEditTool(editorView),
m_rubberbandSelectionMode(false),
m_rubberbandSelectionManipulator(
- QDeclarativeViewObserverPrivate::get(editorView)->manipulatorLayer, editorView),
+ QDeclarativeViewInspectorPrivate::get(editorView)->manipulatorLayer, editorView),
m_singleSelectionManipulator(editorView),
m_selectionIndicator(editorView,
- QDeclarativeViewObserverPrivate::get(editorView)->manipulatorLayer),
+ QDeclarativeViewInspectorPrivate::get(editorView)->manipulatorLayer),
//m_resizeIndicator(editorView->manipulatorLayer()),
m_selectOnlyContentItems(true)
{
@@ -97,9 +97,9 @@ LiveSingleSelectionManipulator::SelectionType LiveSelectionTool::getSelectionTyp
bool LiveSelectionTool::alreadySelected(const QList<QGraphicsItem*> &itemList) const
{
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(observer());
- const QList<QGraphicsItem*> selectedItems = observerPrivate->selectedItems();
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(inspector());
+ const QList<QGraphicsItem*> selectedItems = inspectorPrivate->selectedItems();
if (selectedItems.isEmpty())
return false;
@@ -113,9 +113,9 @@ bool LiveSelectionTool::alreadySelected(const QList<QGraphicsItem*> &itemList) c
void LiveSelectionTool::mousePressEvent(QMouseEvent *event)
{
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(observer());
- QList<QGraphicsItem*> itemList = observerPrivate->selectableItems(event->pos());
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(inspector());
+ QList<QGraphicsItem*> itemList = inspectorPrivate->selectableItems(event->pos());
LiveSingleSelectionManipulator::SelectionType selectionType = getSelectionType(event->modifiers());
if (event->buttons() & Qt::LeftButton) {
@@ -151,7 +151,7 @@ void LiveSelectionTool::createContextMenu(QList<QGraphicsItem*> itemList, QPoint
QAction *elementAction = contextMenu.addAction(itemTitle, this,
SLOT(contextMenuElementSelected()));
- if (observer()->selectedItems().contains(item)) {
+ if (inspector()->selectedItems().contains(item)) {
QFont boldFont = elementAction->font();
boldFont.setBold(true);
elementAction->setFont(boldFont);
@@ -197,7 +197,7 @@ void LiveSelectionTool::contextMenuElementHovered(QAction *action)
int itemListIndex = action->data().toInt();
if (itemListIndex >= 0 && itemListIndex < m_contextMenuItemList.length()) {
QGraphicsObject *item = m_contextMenuItemList.at(itemListIndex)->toGraphicsObject();
- QDeclarativeViewObserverPrivate::get(observer())->highlight(item);
+ QDeclarativeViewInspectorPrivate::get(inspector())->highlight(item);
}
}
@@ -250,19 +250,19 @@ void LiveSelectionTool::hoverMoveEvent(QMouseEvent * event)
// if (topSelectedItemIsMovable(itemList))
// view()->changeTool(Constants::MoveToolMode);
// }
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(observer());
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(inspector());
- QList<QGraphicsItem*> selectableItemList = observerPrivate->selectableItems(event->pos());
+ QList<QGraphicsItem*> selectableItemList = inspectorPrivate->selectableItems(event->pos());
if (!selectableItemList.isEmpty()) {
QGraphicsObject *item = selectableItemList.first()->toGraphicsObject();
if (item)
- QDeclarativeViewObserverPrivate::get(observer())->highlight(item);
+ QDeclarativeViewInspectorPrivate::get(inspector())->highlight(item);
return;
}
- QDeclarativeViewObserverPrivate::get(observer())->clearHighlight();
+ QDeclarativeViewInspectorPrivate::get(inspector())->clearHighlight();
}
void LiveSelectionTool::mouseReleaseEvent(QMouseEvent *event)
@@ -333,16 +333,16 @@ void LiveSelectionTool::wheelEvent(QWheelEvent *event)
if (event->orientation() == Qt::Horizontal || m_rubberbandSelectionMode)
return;
- QDeclarativeViewObserverPrivate *observerPrivate
- = QDeclarativeViewObserverPrivate::get(observer());
- QList<QGraphicsItem*> itemList = observerPrivate->selectableItems(event->pos());
+ QDeclarativeViewInspectorPrivate *inspectorPrivate
+ = QDeclarativeViewInspectorPrivate::get(inspector());
+ QList<QGraphicsItem*> itemList = inspectorPrivate->selectableItems(event->pos());
if (itemList.isEmpty())
return;
int selectedIdx = 0;
- if (!observer()->selectedItems().isEmpty()) {
- selectedIdx = itemList.indexOf(observer()->selectedItems().first());
+ if (!inspector()->selectedItems().isEmpty()) {
+ selectedIdx = itemList.indexOf(inspector()->selectedItems().first());
if (selectedIdx >= 0) {
if (event->delta() > 0) {
selectedIdx++;
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h
index 4ecf9f6..7562f3e 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/liveselectiontool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool_p.h
@@ -66,7 +66,7 @@ class LiveSelectionTool : public AbstractLiveEditTool
Q_OBJECT
public:
- LiveSelectionTool(QDeclarativeViewObserver* editorView);
+ LiveSelectionTool(QDeclarativeViewInspector* editorView);
~LiveSelectionTool();
void mousePressEvent(QMouseEvent *event);
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp
index 1ffd7a9..ee9843b 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator.cpp
@@ -41,13 +41,13 @@
#include "livesingleselectionmanipulator_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
#include <QtDebug>
QT_BEGIN_NAMESPACE
-LiveSingleSelectionManipulator::LiveSingleSelectionManipulator(QDeclarativeViewObserver *editorView)
+LiveSingleSelectionManipulator::LiveSingleSelectionManipulator(QDeclarativeViewInspector *editorView)
: m_editorView(editorView),
m_isActive(false)
{
@@ -58,7 +58,7 @@ void LiveSingleSelectionManipulator::begin(const QPointF &beginPoint)
{
m_beginPoint = beginPoint;
m_isActive = true;
- m_oldSelectionList = QDeclarativeViewObserverPrivate::get(m_editorView)->selectedItems();
+ m_oldSelectionList = QDeclarativeViewInspectorPrivate::get(m_editorView)->selectedItems();
}
void LiveSingleSelectionManipulator::update(const QPointF &/*updatePoint*/)
@@ -131,9 +131,9 @@ void LiveSingleSelectionManipulator::select(SelectionType selectionType,
void LiveSingleSelectionManipulator::select(SelectionType selectionType, bool selectOnlyContentItems)
{
- QDeclarativeViewObserverPrivate *observerPrivate =
- QDeclarativeViewObserverPrivate::get(m_editorView);
- QList<QGraphicsItem*> itemList = observerPrivate->selectableItems(m_beginPoint);
+ QDeclarativeViewInspectorPrivate *inspectorPrivate =
+ QDeclarativeViewInspectorPrivate::get(m_editorView);
+ QList<QGraphicsItem*> itemList = inspectorPrivate->selectableItems(m_beginPoint);
select(selectionType, itemList, selectOnlyContentItems);
}
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h
index ea0406b..40b5fc0 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/livesingleselectionmanipulator_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/livesingleselectionmanipulator_p.h
@@ -53,12 +53,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class LiveSingleSelectionManipulator
{
public:
- LiveSingleSelectionManipulator(QDeclarativeViewObserver *editorView);
+ LiveSingleSelectionManipulator(QDeclarativeViewInspector *editorView);
enum SelectionType {
ReplaceSelection,
@@ -84,7 +84,7 @@ public:
private:
QList<QGraphicsItem*> m_oldSelectionList;
QPointF m_beginPoint;
- QDeclarativeViewObserver *m_editorView;
+ QDeclarativeViewInspector *m_editorView;
bool m_isActive;
};
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp
index 9ad5b24..0a72674 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar.cpp
@@ -61,8 +61,8 @@ QmlToolBar::QmlToolBar(QWidget *parent)
ui->playIcon = QIcon(QLatin1String(":/qml/images/play-24.png"));
ui->pauseIcon = QIcon(QLatin1String(":/qml/images/pause-24.png"));
- ui->designmode = new QAction(QIcon(QLatin1String(":/qml/images/observermode-24.png")),
- tr("Observer Mode"), this);
+ ui->designmode = new QAction(QIcon(QLatin1String(":/qml/images/inspectormode-24.png")),
+ tr("Inspector Mode"), this);
ui->play = new QAction(ui->pauseIcon, tr("Play/Pause Animations"), this);
ui->select = new QAction(QIcon(QLatin1String(":/qml/images/select-24.png")), tr("Select"), this);
ui->selectMarquee = new QAction(QIcon(QLatin1String(":/qml/images/select-marquee-24.png")),
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h
index a3da1f7..0401804 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/qmltoolbar_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/qmltoolbar_p.h
@@ -45,7 +45,7 @@
#include <QtGui/QToolBar>
#include <QtGui/QIcon>
-#include "../qmlobserverconstants_p.h"
+#include "../qmlinspectorconstants_p.h"
QT_FORWARD_DECLARE_CLASS(QActionGroup)
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp
index 27e2079..2ed3179 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem.cpp
@@ -41,17 +41,17 @@
#include "subcomponentmasklayeritem_p.h"
-#include "../qmlobserverconstants_p.h"
-#include "../qdeclarativeviewobserver_p.h"
+#include "../qmlinspectorconstants_p.h"
+#include "../qdeclarativeviewinspector_p.h"
#include <QtGui/QPolygonF>
QT_BEGIN_NAMESPACE
-SubcomponentMaskLayerItem::SubcomponentMaskLayerItem(QDeclarativeViewObserver *observer,
+SubcomponentMaskLayerItem::SubcomponentMaskLayerItem(QDeclarativeViewInspector *inspector,
QGraphicsItem *parentItem) :
QGraphicsPolygonItem(parentItem),
- m_observer(observer),
+ m_inspector(inspector),
m_currentItem(0),
m_borderRect(new QGraphicsRectItem(this))
{
@@ -102,8 +102,8 @@ void SubcomponentMaskLayerItem::setCurrentItem(QGraphicsItem *item)
if (!m_currentItem)
return;
- QRect viewRect = m_observer->declarativeView()->rect();
- viewRect = m_observer->declarativeView()->mapToScene(viewRect).boundingRect().toRect();
+ QRect viewRect = m_inspector->declarativeView()->rect();
+ viewRect = m_inspector->declarativeView()->mapToScene(viewRect).boundingRect().toRect();
QRectF itemRect = item->boundingRect() | item->childrenBoundingRect();
itemRect = item->mapRectToScene(itemRect);
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h
index 7a77253..07ce881 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/subcomponentmasklayeritem_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/subcomponentmasklayeritem_p.h
@@ -50,12 +50,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class SubcomponentMaskLayerItem : public QGraphicsPolygonItem
{
public:
- explicit SubcomponentMaskLayerItem(QDeclarativeViewObserver *observer,
+ explicit SubcomponentMaskLayerItem(QDeclarativeViewInspector *inspector,
QGraphicsItem *parentItem = 0);
int type() const;
void setCurrentItem(QGraphicsItem *item);
@@ -64,7 +64,7 @@ public:
QRectF itemRect() const;
private:
- QDeclarativeViewObserver *m_observer;
+ QDeclarativeViewInspector *m_inspector;
QGraphicsItem *m_currentItem;
QGraphicsRectItem *m_borderRect;
QRectF m_itemPolyRect;
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp
index d3a5a37..154ddf2 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox.cpp
@@ -41,7 +41,7 @@
#include "toolbarcolorbox_p.h"
-#include "../qmlobserverconstants_p.h"
+#include "../qmlinspectorconstants_p.h"
#include <QtGui/QPixmap>
#include <QtGui/QPainter>
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h
index c3e064c..c3e064c 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/toolbarcolorbox_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/toolbarcolorbox_p.h
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/zoomtool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp
index 68d67cc..969c9d5 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/zoomtool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp
@@ -41,7 +41,7 @@
#include "zoomtool_p.h"
-#include "../qdeclarativeviewobserver_p_p.h"
+#include "../qdeclarativeviewinspector_p_p.h"
#include <QtGui/QMouseEvent>
#include <QtGui/QWheelEvent>
@@ -54,7 +54,7 @@
QT_BEGIN_NAMESPACE
-ZoomTool::ZoomTool(QDeclarativeViewObserver *view) :
+ZoomTool::ZoomTool(QDeclarativeViewInspector *view) :
AbstractLiveEditTool(view),
m_rubberbandManipulator(),
m_smoothZoomMultiplier(0.05f),
@@ -67,7 +67,7 @@ ZoomTool::ZoomTool(QDeclarativeViewObserver *view) :
m_zoomOutAction->setShortcut(QKeySequence(Qt::Key_Minus));
- LiveLayerItem *layerItem = QDeclarativeViewObserverPrivate::get(view)->manipulatorLayer;
+ LiveLayerItem *layerItem = QDeclarativeViewInspectorPrivate::get(view)->manipulatorLayer;
QGraphicsObject *layerObject = reinterpret_cast<QGraphicsObject *>(layerItem);
m_rubberbandManipulator = new LiveRubberBandSelectionManipulator(layerObject, view);
diff --git a/src/plugins/qmltooling/declarativeobserver/editor/zoomtool_p.h b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h
index ef5c2e6..14fa4d5 100644
--- a/src/plugins/qmltooling/declarativeobserver/editor/zoomtool_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool_p.h
@@ -63,7 +63,7 @@ public:
ZoomOut
};
- explicit ZoomTool(QDeclarativeViewObserver *view);
+ explicit ZoomTool(QDeclarativeViewInspector *view);
virtual ~ZoomTool();
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.cpp b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp
index a00bc6f..a266eb9 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp
@@ -39,43 +39,43 @@
**
****************************************************************************/
-#include "qdeclarativeobserverplugin.h"
+#include "qdeclarativeinspectorplugin.h"
-#include "qdeclarativeviewobserver_p.h"
+#include "qdeclarativeviewinspector_p.h"
#include <QtCore/qplugin.h>
-#include <QtDeclarative/private/qdeclarativeobserverservice_p.h>
+#include <QtDeclarative/private/qdeclarativeinspectorservice_p.h>
QT_BEGIN_NAMESPACE
-QDeclarativeObserverPlugin::QDeclarativeObserverPlugin() :
- m_observer(0)
+QDeclarativeInspectorPlugin::QDeclarativeInspectorPlugin() :
+ m_inspector(0)
{
}
-QDeclarativeObserverPlugin::~QDeclarativeObserverPlugin()
+QDeclarativeInspectorPlugin::~QDeclarativeInspectorPlugin()
{
- delete m_observer;
+ delete m_inspector;
}
-void QDeclarativeObserverPlugin::activate()
+void QDeclarativeInspectorPlugin::activate()
{
- QDeclarativeObserverService *service = QDeclarativeObserverService::instance();
+ QDeclarativeInspectorService *service = QDeclarativeInspectorService::instance();
QList<QDeclarativeView*> views = service->views();
if (views.isEmpty())
return;
// TODO: Support multiple views
QDeclarativeView *view = service->views().at(0);
- m_observer = new QDeclarativeViewObserver(view, view);
+ m_inspector = new QDeclarativeViewInspector(view, view);
}
-void QDeclarativeObserverPlugin::deactivate()
+void QDeclarativeInspectorPlugin::deactivate()
{
- delete m_observer;
+ delete m_inspector;
}
-Q_EXPORT_PLUGIN2(declarativeobserver, QDeclarativeObserverPlugin)
+Q_EXPORT_PLUGIN2(declarativeinspector, QDeclarativeInspectorPlugin)
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h
index 7bc7626..3e28643 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverplugin.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.h
@@ -39,33 +39,33 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEOBSERVERPLUGIN_H
-#define QDECLARATIVEOBSERVERPLUGIN_H
+#ifndef QDECLARATIVEINSPECTORPLUGIN_H
+#define QDECLARATIVEINSPECTORPLUGIN_H
#include <QtCore/QPointer>
-#include <QtDeclarative/private/qdeclarativeobserverinterface_p.h>
+#include <QtDeclarative/private/qdeclarativeinspectorinterface_p.h>
QT_BEGIN_NAMESPACE
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
-class QDeclarativeObserverPlugin : public QObject, public QDeclarativeObserverInterface
+class QDeclarativeInspectorPlugin : public QObject, public QDeclarativeInspectorInterface
{
Q_OBJECT
- Q_DISABLE_COPY(QDeclarativeObserverPlugin)
- Q_INTERFACES(QDeclarativeObserverInterface)
+ Q_DISABLE_COPY(QDeclarativeInspectorPlugin)
+ Q_INTERFACES(QDeclarativeInspectorInterface)
public:
- QDeclarativeObserverPlugin();
- ~QDeclarativeObserverPlugin();
+ QDeclarativeInspectorPlugin();
+ ~QDeclarativeInspectorPlugin();
void activate();
void deactivate();
private:
- QPointer<QDeclarativeViewObserver> m_observer;
+ QPointer<QDeclarativeViewInspector> m_inspector;
};
QT_END_NAMESPACE
-#endif // QDECLARATIVEOBSERVERPLUGIN_H
+#endif // QDECLARATIVEINSPECTORPLUGIN_H
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverprotocol.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h
index 62722acc..2878bc1 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeobserverprotocol.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorprotocol.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEOBSERVERPROTOCOL_H
-#define QDECLARATIVEOBSERVERPROTOCOL_H
+#ifndef QDECLARATIVEINSPECTORPROTOCOL_H
+#define QDECLARATIVEINSPECTORPROTOCOL_H
#include <QtCore/QDebug>
#include <QtCore/QMetaType>
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class ObserverProtocol : public QObject
+class InspectorProtocol : public QObject
{
Q_OBJECT
Q_ENUMS(Message Tool)
@@ -98,41 +98,41 @@ public:
}
};
-inline QDataStream & operator<< (QDataStream &stream, ObserverProtocol::Message message)
+inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Message message)
{
return stream << static_cast<quint32>(message);
}
-inline QDataStream & operator>> (QDataStream &stream, ObserverProtocol::Message &message)
+inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Message &message)
{
quint32 i;
stream >> i;
- message = static_cast<ObserverProtocol::Message>(i);
+ message = static_cast<InspectorProtocol::Message>(i);
return stream;
}
-inline QDebug operator<< (QDebug dbg, ObserverProtocol::Message message)
+inline QDebug operator<< (QDebug dbg, InspectorProtocol::Message message)
{
- dbg << ObserverProtocol::toString(message);
+ dbg << InspectorProtocol::toString(message);
return dbg;
}
-inline QDataStream & operator<< (QDataStream &stream, ObserverProtocol::Tool tool)
+inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Tool tool)
{
return stream << static_cast<quint32>(tool);
}
-inline QDataStream & operator>> (QDataStream &stream, ObserverProtocol::Tool &tool)
+inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Tool &tool)
{
quint32 i;
stream >> i;
- tool = static_cast<ObserverProtocol::Tool>(i);
+ tool = static_cast<InspectorProtocol::Tool>(i);
return stream;
}
-inline QDebug operator<< (QDebug dbg, ObserverProtocol::Tool tool)
+inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool)
{
- dbg << ObserverProtocol::toString(tool);
+ dbg << InspectorProtocol::toString(tool);
return dbg;
}
@@ -140,4 +140,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QDECLARATIVEOBSERVERPROTOCOL_H
+#endif // QDECLARATIVEINSPECTORPROTOCOL_H
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver.cpp b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp
index a49a758..19bfdaa 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector.cpp
@@ -39,12 +39,12 @@
**
****************************************************************************/
-#include "QtDeclarative/private/qdeclarativeobserverservice_p.h"
+#include "QtDeclarative/private/qdeclarativeinspectorservice_p.h"
#include "QtDeclarative/private/qdeclarativedebughelper_p.h"
-#include "qdeclarativeviewobserver_p.h"
-#include "qdeclarativeviewobserver_p_p.h"
-#include "qdeclarativeobserverprotocol.h"
+#include "qdeclarativeviewinspector_p.h"
+#include "qdeclarativeviewinspector_p_p.h"
+#include "qdeclarativeinspectorprotocol.h"
#include "editor/liveselectiontool_p.h"
#include "editor/zoomtool_p.h"
@@ -90,7 +90,7 @@ private:
ToolBox::ToolBox(QWidget *parent)
: QWidget(parent, Qt::Tool)
- , m_settings(QLatin1String("Nokia"), QLatin1String("QmlObserver"), this)
+ , m_settings(QLatin1String("Nokia"), QLatin1String("QmlInspector"), this)
, m_toolBar(new QmlToolBar)
{
setWindowFlags((windowFlags() & ~Qt::WindowCloseButtonHint) | Qt::CustomizeWindowHint);
@@ -110,7 +110,7 @@ ToolBox::~ToolBox()
}
-QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeViewObserver *q) :
+QDeclarativeViewInspectorPrivate::QDeclarativeViewInspectorPrivate(QDeclarativeViewInspector *q) :
q(q),
designModeBehavior(false),
showAppOnTop(false),
@@ -120,14 +120,14 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
{
}
-QDeclarativeViewObserverPrivate::~QDeclarativeViewObserverPrivate()
+QDeclarativeViewInspectorPrivate::~QDeclarativeViewInspectorPrivate()
{
}
-QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view,
+QDeclarativeViewInspector::QDeclarativeViewInspector(QDeclarativeView *view,
QObject *parent) :
QObject(parent),
- data(new QDeclarativeViewObserverPrivate(this))
+ data(new QDeclarativeViewInspectorPrivate(this))
{
initEditorResource();
@@ -144,7 +144,7 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view,
data->setViewport(data->view->viewport());
- data->debugService = QDeclarativeObserverService::instance();
+ data->debugService = QDeclarativeInspectorService::instance();
connect(data->debugService, SIGNAL(gotMessage(QByteArray)),
this, SLOT(handleMessage(QByteArray)));
@@ -159,11 +159,11 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view,
data->_q_changeToSingleSelectTool();
}
-QDeclarativeViewObserver::~QDeclarativeViewObserver()
+QDeclarativeViewInspector::~QDeclarativeViewInspector()
{
}
-void QDeclarativeViewObserverPrivate::_q_setToolBoxVisible(bool visible)
+void QDeclarativeViewInspectorPrivate::_q_setToolBoxVisible(bool visible)
{
#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
if (!toolBox && visible)
@@ -175,13 +175,13 @@ void QDeclarativeViewObserverPrivate::_q_setToolBoxVisible(bool visible)
#endif
}
-void QDeclarativeViewObserverPrivate::_q_reloadView()
+void QDeclarativeViewInspectorPrivate::_q_reloadView()
{
clearHighlight();
emit q->reloadRequested();
}
-void QDeclarativeViewObserverPrivate::setViewport(QWidget *widget)
+void QDeclarativeViewInspectorPrivate::setViewport(QWidget *widget)
{
if (viewport.data() == widget)
return;
@@ -197,13 +197,13 @@ void QDeclarativeViewObserverPrivate::setViewport(QWidget *widget)
}
}
-void QDeclarativeViewObserverPrivate::clearEditorItems()
+void QDeclarativeViewInspectorPrivate::clearEditorItems()
{
clearHighlight();
setSelectedItems(QList<QGraphicsItem*>());
}
-bool QDeclarativeViewObserver::eventFilter(QObject *obj, QEvent *event)
+bool QDeclarativeViewInspector::eventFilter(QObject *obj, QEvent *event)
{
if (obj == data->view) {
// Event from view
@@ -266,7 +266,7 @@ bool QDeclarativeViewObserver::eventFilter(QObject *obj, QEvent *event)
return QObject::eventFilter(obj, event);
}
-bool QDeclarativeViewObserver::leaveEvent(QEvent * /*event*/)
+bool QDeclarativeViewInspector::leaveEvent(QEvent * /*event*/)
{
if (!data->designModeBehavior)
return false;
@@ -274,7 +274,7 @@ bool QDeclarativeViewObserver::leaveEvent(QEvent * /*event*/)
return true;
}
-bool QDeclarativeViewObserver::mousePressEvent(QMouseEvent *event)
+bool QDeclarativeViewInspector::mousePressEvent(QMouseEvent *event)
{
if (!data->designModeBehavior)
return false;
@@ -283,7 +283,7 @@ bool QDeclarativeViewObserver::mousePressEvent(QMouseEvent *event)
return true;
}
-bool QDeclarativeViewObserver::mouseMoveEvent(QMouseEvent *event)
+bool QDeclarativeViewInspector::mouseMoveEvent(QMouseEvent *event)
{
if (!data->designModeBehavior) {
data->clearEditorItems();
@@ -305,7 +305,7 @@ bool QDeclarativeViewObserver::mouseMoveEvent(QMouseEvent *event)
return true;
}
-bool QDeclarativeViewObserver::mouseReleaseEvent(QMouseEvent *event)
+bool QDeclarativeViewInspector::mouseReleaseEvent(QMouseEvent *event)
{
if (!data->designModeBehavior)
return false;
@@ -315,7 +315,7 @@ bool QDeclarativeViewObserver::mouseReleaseEvent(QMouseEvent *event)
return true;
}
-bool QDeclarativeViewObserver::keyPressEvent(QKeyEvent *event)
+bool QDeclarativeViewInspector::keyPressEvent(QKeyEvent *event)
{
if (!data->designModeBehavior)
return false;
@@ -324,7 +324,7 @@ bool QDeclarativeViewObserver::keyPressEvent(QKeyEvent *event)
return true;
}
-bool QDeclarativeViewObserver::keyReleaseEvent(QKeyEvent *event)
+bool QDeclarativeViewInspector::keyReleaseEvent(QKeyEvent *event)
{
if (!data->designModeBehavior)
return false;
@@ -354,7 +354,7 @@ bool QDeclarativeViewObserver::keyReleaseEvent(QKeyEvent *event)
return true;
}
-void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QObject *parent,
+void QDeclarativeViewInspectorPrivate::_q_createQmlObject(const QString &qml, QObject *parent,
const QStringList &importList,
const QString &filename)
{
@@ -382,7 +382,7 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb
}
}
-void QDeclarativeViewObserverPrivate::_q_reparentQmlObject(QObject *object, QObject *newParent)
+void QDeclarativeViewInspectorPrivate::_q_reparentQmlObject(QObject *object, QObject *newParent)
{
if (!newParent)
return;
@@ -394,12 +394,12 @@ void QDeclarativeViewObserverPrivate::_q_reparentQmlObject(QObject *object, QObj
item->setParentItem(newParentItem);
}
-void QDeclarativeViewObserverPrivate::_q_clearComponentCache()
+void QDeclarativeViewInspectorPrivate::_q_clearComponentCache()
{
view->engine()->clearComponentCache();
}
-void QDeclarativeViewObserverPrivate::_q_removeFromSelection(QObject *obj)
+void QDeclarativeViewInspectorPrivate::_q_removeFromSelection(QObject *obj)
{
QList<QGraphicsItem*> items = selectedItems();
if (QGraphicsItem *item = qobject_cast<QGraphicsObject*>(obj))
@@ -407,7 +407,7 @@ void QDeclarativeViewObserverPrivate::_q_removeFromSelection(QObject *obj)
setSelectedItems(items);
}
-bool QDeclarativeViewObserver::mouseDoubleClickEvent(QMouseEvent * /*event*/)
+bool QDeclarativeViewInspector::mouseDoubleClickEvent(QMouseEvent * /*event*/)
{
if (!data->designModeBehavior)
return false;
@@ -415,7 +415,7 @@ bool QDeclarativeViewObserver::mouseDoubleClickEvent(QMouseEvent * /*event*/)
return true;
}
-bool QDeclarativeViewObserver::wheelEvent(QWheelEvent *event)
+bool QDeclarativeViewInspector::wheelEvent(QWheelEvent *event)
{
if (!data->designModeBehavior)
return false;
@@ -423,7 +423,7 @@ bool QDeclarativeViewObserver::wheelEvent(QWheelEvent *event)
return true;
}
-void QDeclarativeViewObserver::setDesignModeBehavior(bool value)
+void QDeclarativeViewInspector::setDesignModeBehavior(bool value)
{
emit designModeBehaviorChanged(value);
@@ -437,17 +437,17 @@ void QDeclarativeViewObserver::setDesignModeBehavior(bool value)
data->clearEditorItems();
}
-bool QDeclarativeViewObserver::designModeBehavior()
+bool QDeclarativeViewInspector::designModeBehavior()
{
return data->designModeBehavior;
}
-bool QDeclarativeViewObserver::showAppOnTop() const
+bool QDeclarativeViewInspector::showAppOnTop() const
{
return data->showAppOnTop;
}
-void QDeclarativeViewObserver::setShowAppOnTop(bool appOnTop)
+void QDeclarativeViewInspector::setShowAppOnTop(bool appOnTop)
{
if (data->view) {
QWidget *window = data->view->window();
@@ -467,7 +467,7 @@ void QDeclarativeViewObserver::setShowAppOnTop(bool appOnTop)
emit showAppOnTopChanged(appOnTop);
}
-void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
+void QDeclarativeViewInspectorPrivate::changeTool(Constants::DesignTool tool,
Constants::ToolFlags /*flags*/)
{
switch (tool) {
@@ -481,7 +481,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
}
}
-void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(const QList<QGraphicsItem *> &items)
+void QDeclarativeViewInspectorPrivate::setSelectedItemsForTools(const QList<QGraphicsItem *> &items)
{
foreach (const QWeakPointer<QGraphicsObject> &obj, currentSelection) {
if (QGraphicsItem *item = obj.data()) {
@@ -494,8 +494,8 @@ void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(const QList<QGrap
}
foreach (QGraphicsItem *item, items) {
- if (item) {
- if (QGraphicsObject *obj = item->toGraphicsObject()) {
+ if (QGraphicsObject *obj = item->toGraphicsObject()) {
+ if (!currentSelection.contains(obj)) {
QObject::connect(obj, SIGNAL(destroyed(QObject*)),
this, SLOT(_q_removeFromSelection(QObject*)));
currentSelection.append(obj);
@@ -506,7 +506,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(const QList<QGrap
currentTool->updateSelectedItems();
}
-void QDeclarativeViewObserverPrivate::setSelectedItems(const QList<QGraphicsItem *> &items)
+void QDeclarativeViewInspectorPrivate::setSelectedItems(const QList<QGraphicsItem *> &items)
{
QList<QWeakPointer<QGraphicsObject> > oldList = currentSelection;
setSelectedItemsForTools(items);
@@ -521,7 +521,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(const QList<QGraphicsItem
}
}
-QList<QGraphicsItem *> QDeclarativeViewObserverPrivate::selectedItems() const
+QList<QGraphicsItem *> QDeclarativeViewInspectorPrivate::selectedItems() const
{
QList<QGraphicsItem *> selection;
foreach (const QWeakPointer<QGraphicsObject> &selectedObject, currentSelection) {
@@ -532,27 +532,27 @@ QList<QGraphicsItem *> QDeclarativeViewObserverPrivate::selectedItems() const
return selection;
}
-void QDeclarativeViewObserver::setSelectedItems(QList<QGraphicsItem *> items)
+void QDeclarativeViewInspector::setSelectedItems(QList<QGraphicsItem *> items)
{
data->setSelectedItems(items);
}
-QList<QGraphicsItem *> QDeclarativeViewObserver::selectedItems() const
+QList<QGraphicsItem *> QDeclarativeViewInspector::selectedItems() const
{
return data->selectedItems();
}
-QDeclarativeView *QDeclarativeViewObserver::declarativeView()
+QDeclarativeView *QDeclarativeViewInspector::declarativeView()
{
return data->view;
}
-void QDeclarativeViewObserverPrivate::clearHighlight()
+void QDeclarativeViewInspectorPrivate::clearHighlight()
{
boundingRectHighlighter->clear();
}
-void QDeclarativeViewObserverPrivate::highlight(const QList<QGraphicsObject *> &items)
+void QDeclarativeViewInspectorPrivate::highlight(const QList<QGraphicsObject *> &items)
{
if (items.isEmpty())
return;
@@ -571,27 +571,27 @@ void QDeclarativeViewObserverPrivate::highlight(const QList<QGraphicsObject *> &
boundingRectHighlighter->highlight(objectList);
}
-QList<QGraphicsItem*> QDeclarativeViewObserverPrivate::selectableItems(
+QList<QGraphicsItem*> QDeclarativeViewInspectorPrivate::selectableItems(
const QPointF &scenePos) const
{
QList<QGraphicsItem*> itemlist = view->scene()->items(scenePos);
return filterForSelection(itemlist);
}
-QList<QGraphicsItem*> QDeclarativeViewObserverPrivate::selectableItems(const QPoint &pos) const
+QList<QGraphicsItem*> QDeclarativeViewInspectorPrivate::selectableItems(const QPoint &pos) const
{
QList<QGraphicsItem*> itemlist = view->items(pos);
return filterForSelection(itemlist);
}
-QList<QGraphicsItem*> QDeclarativeViewObserverPrivate::selectableItems(
+QList<QGraphicsItem*> QDeclarativeViewInspectorPrivate::selectableItems(
const QRectF &sceneRect, Qt::ItemSelectionMode selectionMode) const
{
QList<QGraphicsItem*> itemlist = view->scene()->items(sceneRect, selectionMode);
return filterForSelection(itemlist);
}
-void QDeclarativeViewObserverPrivate::_q_changeToSingleSelectTool()
+void QDeclarativeViewInspectorPrivate::_q_changeToSingleSelectTool()
{
currentToolMode = Constants::SelectionToolMode;
selectionTool->setRubberbandSelectionMode(false);
@@ -602,7 +602,7 @@ void QDeclarativeViewObserverPrivate::_q_changeToSingleSelectTool()
q->sendCurrentTool(Constants::SelectionToolMode);
}
-void QDeclarativeViewObserverPrivate::changeToSelectTool()
+void QDeclarativeViewInspectorPrivate::changeToSelectTool()
{
if (currentTool == selectionTool)
return;
@@ -613,7 +613,7 @@ void QDeclarativeViewObserverPrivate::changeToSelectTool()
currentTool->updateSelectedItems();
}
-void QDeclarativeViewObserverPrivate::_q_changeToMarqueeSelectTool()
+void QDeclarativeViewInspectorPrivate::_q_changeToMarqueeSelectTool()
{
changeToSelectTool();
currentToolMode = Constants::MarqueeSelectionToolMode;
@@ -623,7 +623,7 @@ void QDeclarativeViewObserverPrivate::_q_changeToMarqueeSelectTool()
q->sendCurrentTool(Constants::MarqueeSelectionToolMode);
}
-void QDeclarativeViewObserverPrivate::_q_changeToZoomTool()
+void QDeclarativeViewInspectorPrivate::_q_changeToZoomTool()
{
currentToolMode = Constants::ZoomMode;
currentTool->clear();
@@ -634,7 +634,7 @@ void QDeclarativeViewObserverPrivate::_q_changeToZoomTool()
q->sendCurrentTool(Constants::ZoomMode);
}
-void QDeclarativeViewObserverPrivate::_q_changeToColorPickerTool()
+void QDeclarativeViewInspectorPrivate::_q_changeToColorPickerTool()
{
if (currentTool == colorPickerTool)
return;
@@ -648,7 +648,7 @@ void QDeclarativeViewObserverPrivate::_q_changeToColorPickerTool()
q->sendCurrentTool(Constants::ColorPickerMode);
}
-void QDeclarativeViewObserver::setAnimationSpeed(qreal slowDownFactor)
+void QDeclarativeViewInspector::setAnimationSpeed(qreal slowDownFactor)
{
Q_ASSERT(slowDownFactor > 0);
if (data->slowDownFactor == slowDownFactor)
@@ -658,7 +658,7 @@ void QDeclarativeViewObserver::setAnimationSpeed(qreal slowDownFactor)
sendAnimationSpeed(slowDownFactor);
}
-void QDeclarativeViewObserver::setAnimationPaused(bool paused)
+void QDeclarativeViewInspector::setAnimationPaused(bool paused)
{
if (data->animationPaused == paused)
return;
@@ -667,7 +667,7 @@ void QDeclarativeViewObserver::setAnimationPaused(bool paused)
sendAnimationPaused(paused);
}
-void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
+void QDeclarativeViewInspector::animationSpeedChangeRequested(qreal factor)
{
if (data->slowDownFactor != factor) {
data->slowDownFactor = factor;
@@ -678,7 +678,7 @@ void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
QDeclarativeDebugHelper::setAnimationSlowDownFactor(effectiveFactor);
}
-void QDeclarativeViewObserver::animationPausedChangeRequested(bool paused)
+void QDeclarativeViewInspector::animationPausedChangeRequested(bool paused)
{
if (data->animationPaused != paused) {
data->animationPaused = paused;
@@ -690,12 +690,12 @@ void QDeclarativeViewObserver::animationPausedChangeRequested(bool paused)
}
-void QDeclarativeViewObserverPrivate::_q_applyChangesFromClient()
+void QDeclarativeViewInspectorPrivate::_q_applyChangesFromClient()
{
}
-QList<QGraphicsItem*> QDeclarativeViewObserverPrivate::filterForSelection(
+QList<QGraphicsItem*> QDeclarativeViewInspectorPrivate::filterForSelection(
QList<QGraphicsItem*> &itemlist) const
{
foreach (QGraphicsItem *item, itemlist) {
@@ -706,20 +706,20 @@ QList<QGraphicsItem*> QDeclarativeViewObserverPrivate::filterForSelection(
return itemlist;
}
-bool QDeclarativeViewObserverPrivate::isEditorItem(QGraphicsItem *item) const
+bool QDeclarativeViewInspectorPrivate::isEditorItem(QGraphicsItem *item) const
{
return (item->type() == Constants::EditorItemType
|| item->type() == Constants::ResizeHandleItemType
|| item->data(Constants::EditorItemDataKey).toBool());
}
-void QDeclarativeViewObserverPrivate::_q_onStatusChanged(QDeclarativeView::Status status)
+void QDeclarativeViewInspectorPrivate::_q_onStatusChanged(QDeclarativeView::Status status)
{
if (status == QDeclarativeView::Ready)
q->sendReloaded();
}
-void QDeclarativeViewObserverPrivate::_q_onCurrentObjectsChanged(QList<QObject*> objects)
+void QDeclarativeViewInspectorPrivate::_q_onCurrentObjectsChanged(QList<QObject*> objects)
{
QList<QGraphicsItem*> items;
QList<QGraphicsObject*> gfxObjects;
@@ -737,7 +737,7 @@ void QDeclarativeViewObserverPrivate::_q_onCurrentObjectsChanged(QList<QObject*>
}
// adjusts bounding boxes on edges of screen to be visible
-QRectF QDeclarativeViewObserver::adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace)
+QRectF QDeclarativeViewInspector::adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace)
{
int marginFromEdge = 1;
QRectF boundingRect(boundingRectInSceneSpace);
@@ -758,7 +758,7 @@ QRectF QDeclarativeViewObserver::adjustToScreenBoundaries(const QRectF &bounding
return boundingRect;
}
-void QDeclarativeViewObserverPrivate::createToolBox()
+void QDeclarativeViewInspectorPrivate::createToolBox()
{
toolBox = new ToolBox(q->declarativeView());
@@ -799,15 +799,15 @@ void QDeclarativeViewObserverPrivate::createToolBox()
toolBar, SLOT(activateMarqueeSelectTool()));
}
-void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
+void QDeclarativeViewInspector::handleMessage(const QByteArray &message)
{
QDataStream ds(message);
- ObserverProtocol::Message type;
+ InspectorProtocol::Message type;
ds >> type;
switch (type) {
- case ObserverProtocol::SetCurrentObjects: {
+ case InspectorProtocol::SetCurrentObjects: {
int itemCount = 0;
ds >> itemCount;
@@ -822,36 +822,36 @@ void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
data->_q_onCurrentObjectsChanged(selectedObjects);
break;
}
- case ObserverProtocol::Reload: {
+ case InspectorProtocol::Reload: {
data->_q_reloadView();
break;
}
- case ObserverProtocol::SetAnimationSpeed: {
+ case InspectorProtocol::SetAnimationSpeed: {
qreal speed;
ds >> speed;
animationSpeedChangeRequested(speed);
break;
}
- case ObserverProtocol::SetAnimationPaused: {
+ case InspectorProtocol::SetAnimationPaused: {
bool paused;
ds >> paused;
animationPausedChangeRequested(paused);
break;
}
- case ObserverProtocol::ChangeTool: {
- ObserverProtocol::Tool tool;
+ case InspectorProtocol::ChangeTool: {
+ InspectorProtocol::Tool tool;
ds >> tool;
switch (tool) {
- case ObserverProtocol::ColorPickerTool:
+ case InspectorProtocol::ColorPickerTool:
data->_q_changeToColorPickerTool();
break;
- case ObserverProtocol::SelectTool:
+ case InspectorProtocol::SelectTool:
data->_q_changeToSingleSelectTool();
break;
- case ObserverProtocol::SelectMarqueeTool:
+ case InspectorProtocol::SelectMarqueeTool:
data->_q_changeToMarqueeSelectTool();
break;
- case ObserverProtocol::ZoomTool:
+ case InspectorProtocol::ZoomTool:
data->_q_changeToZoomTool();
break;
default:
@@ -859,19 +859,19 @@ void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
}
break;
}
- case ObserverProtocol::SetDesignMode: {
+ case InspectorProtocol::SetDesignMode: {
bool inDesignMode;
ds >> inDesignMode;
setDesignModeBehavior(inDesignMode);
break;
}
- case ObserverProtocol::ShowAppOnTop: {
+ case InspectorProtocol::ShowAppOnTop: {
bool showOnTop;
ds >> showOnTop;
setShowAppOnTop(showOnTop);
break;
}
- case ObserverProtocol::CreateObject: {
+ case InspectorProtocol::CreateObject: {
QString qml;
int parentId;
QString filename;
@@ -881,21 +881,21 @@ void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
imports, filename);
break;
}
- case ObserverProtocol::DestroyObject: {
+ case InspectorProtocol::DestroyObject: {
int debugId;
ds >> debugId;
if (QObject* obj = QDeclarativeDebugService::objectForId(debugId))
obj->deleteLater();
break;
}
- case ObserverProtocol::MoveObject: {
+ case InspectorProtocol::MoveObject: {
int debugId, newParent;
ds >> debugId >> newParent;
data->_q_reparentQmlObject(QDeclarativeDebugService::objectForId(debugId),
QDeclarativeDebugService::objectForId(newParent));
break;
}
- case ObserverProtocol::ObjectIdList: {
+ case InspectorProtocol::ObjectIdList: {
int itemCount;
ds >> itemCount;
data->stringIdForObjectId.clear();
@@ -909,7 +909,7 @@ void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
}
break;
}
- case ObserverProtocol::ClearComponentCache: {
+ case InspectorProtocol::ClearComponentCache: {
data->_q_clearComponentCache();
break;
}
@@ -918,23 +918,23 @@ void QDeclarativeViewObserver::handleMessage(const QByteArray &message)
}
}
-void QDeclarativeViewObserver::sendDesignModeBehavior(bool inDesignMode)
+void QDeclarativeViewInspector::sendDesignModeBehavior(bool inDesignMode)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::SetDesignMode
+ ds << InspectorProtocol::SetDesignMode
<< inDesignMode;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendCurrentObjects(const QList<QObject*> &objects)
+void QDeclarativeViewInspector::sendCurrentObjects(const QList<QObject*> &objects)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::CurrentObjectsChanged
+ ds << InspectorProtocol::CurrentObjectsChanged
<< objects.length();
foreach (QObject *object, objects) {
@@ -945,71 +945,71 @@ void QDeclarativeViewObserver::sendCurrentObjects(const QList<QObject*> &objects
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendCurrentTool(Constants::DesignTool toolId)
+void QDeclarativeViewInspector::sendCurrentTool(Constants::DesignTool toolId)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::ToolChanged
+ ds << InspectorProtocol::ToolChanged
<< toolId;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendAnimationSpeed(qreal slowDownFactor)
+void QDeclarativeViewInspector::sendAnimationSpeed(qreal slowDownFactor)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::AnimationSpeedChanged
+ ds << InspectorProtocol::AnimationSpeedChanged
<< slowDownFactor;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendAnimationPaused(bool paused)
+void QDeclarativeViewInspector::sendAnimationPaused(bool paused)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::AnimationPausedChanged
+ ds << InspectorProtocol::AnimationPausedChanged
<< paused;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendReloaded()
+void QDeclarativeViewInspector::sendReloaded()
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::Reloaded;
+ ds << InspectorProtocol::Reloaded;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendShowAppOnTop(bool showAppOnTop)
+void QDeclarativeViewInspector::sendShowAppOnTop(bool showAppOnTop)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::ShowAppOnTop << showAppOnTop;
+ ds << InspectorProtocol::ShowAppOnTop << showAppOnTop;
data->debugService->sendMessage(message);
}
-void QDeclarativeViewObserver::sendColorChanged(const QColor &color)
+void QDeclarativeViewInspector::sendColorChanged(const QColor &color)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << ObserverProtocol::ColorChanged
+ ds << InspectorProtocol::ColorChanged
<< color;
data->debugService->sendMessage(message);
}
-QString QDeclarativeViewObserver::idStringForObject(QObject *obj) const
+QString QDeclarativeViewInspector::idStringForObject(QObject *obj) const
{
int id = QDeclarativeDebugService::idForObject(obj);
QString idString = data->stringIdForObjectId.value(id, QString());
@@ -1018,4 +1018,4 @@ QString QDeclarativeViewObserver::idStringForObject(QObject *obj) const
QT_END_NAMESPACE
-#include "qdeclarativeviewobserver.moc"
+#include "qdeclarativeviewinspector.moc"
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h
index 5c70c98..4efa093 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEVIEWOBSERVER_P_H
-#define QDECLARATIVEVIEWOBSERVER_P_H
+#ifndef QDECLARATIVEVIEWINSPECTOR_P_H
+#define QDECLARATIVEVIEWINSPECTOR_P_H
#include <private/qdeclarativeglobal_p.h>
-#include "qmlobserverconstants_p.h"
+#include "qmlinspectorconstants_p.h"
#include <QtCore/QScopedPointer>
#include <QtDeclarative/QDeclarativeView>
@@ -58,15 +58,15 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserverPrivate;
+class QDeclarativeViewInspectorPrivate;
-class QDeclarativeViewObserver : public QObject
+class QDeclarativeViewInspector : public QObject
{
Q_OBJECT
public:
- explicit QDeclarativeViewObserver(QDeclarativeView *view, QObject *parent = 0);
- ~QDeclarativeViewObserver();
+ explicit QDeclarativeViewInspector(QDeclarativeView *view, QObject *parent = 0);
+ ~QDeclarativeViewInspector();
void setSelectedItems(QList<QGraphicsItem *> items);
QList<QGraphicsItem *> selectedItems() const;
@@ -132,11 +132,11 @@ private slots:
void animationPausedChangeRequested(bool paused);
private:
- Q_DISABLE_COPY(QDeclarativeViewObserver)
+ Q_DISABLE_COPY(QDeclarativeViewInspector)
- inline QDeclarativeViewObserverPrivate *d_func() { return data.data(); }
- QScopedPointer<QDeclarativeViewObserverPrivate> data;
- friend class QDeclarativeViewObserverPrivate;
+ inline QDeclarativeViewInspectorPrivate *d_func() { return data.data(); }
+ QScopedPointer<QDeclarativeViewInspectorPrivate> data;
+ friend class QDeclarativeViewInspectorPrivate;
friend class AbstractLiveEditTool;
};
@@ -144,4 +144,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QDECLARATIVEVIEWOBSERVER_P_H
+#endif // QDECLARATIVEVIEWINSPECTOR_P_H
diff --git a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p_p.h b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h
index 19e4898..11cbe0f 100644
--- a/src/plugins/qmltooling/declarativeobserver/qdeclarativeviewobserver_p_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qdeclarativeviewinspector_p_p.h
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEVIEWOBSERVER_P_P_H
-#define QDECLARATIVEVIEWOBSERVER_P_P_H
+#ifndef QDECLARATIVEVIEWINSPECTOR_P_P_H
+#define QDECLARATIVEVIEWINSPECTOR_P_P_H
-#include "qdeclarativeviewobserver_p.h"
+#include "qdeclarativeviewinspector_p.h"
#include <QtCore/QWeakPointer>
#include <QtCore/QPointF>
-#include "QtDeclarative/private/qdeclarativeobserverservice_p.h"
+#include "QtDeclarative/private/qdeclarativeinspectorservice_p.h"
QT_BEGIN_HEADER
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QDeclarativeViewObserver;
+class QDeclarativeViewInspector;
class LiveSelectionTool;
class ZoomTool;
class ColorPickerTool;
@@ -64,16 +64,16 @@ class BoundingRectHighlighter;
class ToolBox;
class AbstractLiveEditTool;
-class QDeclarativeViewObserverPrivate : public QObject
+class QDeclarativeViewInspectorPrivate : public QObject
{
Q_OBJECT
public:
- QDeclarativeViewObserverPrivate(QDeclarativeViewObserver *);
- ~QDeclarativeViewObserverPrivate();
+ QDeclarativeViewInspectorPrivate(QDeclarativeViewInspector *);
+ ~QDeclarativeViewInspectorPrivate();
QDeclarativeView *view;
- QDeclarativeViewObserver *q;
- QDeclarativeObserverService *debugService;
+ QDeclarativeViewInspector *q;
+ QDeclarativeInspectorService *debugService;
QWeakPointer<QWidget> viewport;
QHash<int, QString> stringIdForObjectId;
@@ -142,11 +142,11 @@ public slots:
void _q_removeFromSelection(QObject *);
public:
- static QDeclarativeViewObserverPrivate *get(QDeclarativeViewObserver *v) { return v->d_func(); }
+ static QDeclarativeViewInspectorPrivate *get(QDeclarativeViewInspector *v) { return v->d_func(); }
};
QT_END_NAMESPACE
QT_END_HEADER
-#endif // QDECLARATIVEVIEWOBSERVER_P_P_H
+#endif // QDECLARATIVEVIEWINSPECTOR_P_P_H
diff --git a/src/plugins/qmltooling/declarativeobserver/declarativeobserver.pro b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
index e7a69f2..f8d7ee8 100644
--- a/src/plugins/qmltooling/declarativeobserver/declarativeobserver.pro
+++ b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro
@@ -1,4 +1,4 @@
-TARGET = declarativeobserver
+TARGET = qmldbg_inspector
QT += declarative
include(../../qpluginbase.pri)
@@ -7,8 +7,8 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling
QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)"
SOURCES += \
- qdeclarativeobserverplugin.cpp \
- qdeclarativeviewobserver.cpp \
+ qdeclarativeinspectorplugin.cpp \
+ qdeclarativeviewinspector.cpp \
editor/abstractliveedittool.cpp \
editor/liveselectiontool.cpp \
editor/livelayeritem.cpp \
@@ -24,11 +24,11 @@ SOURCES += \
editor/toolbarcolorbox.cpp
HEADERS += \
- qdeclarativeobserverplugin.h \
- qdeclarativeobserverprotocol.h \
- qdeclarativeviewobserver_p.h \
- qdeclarativeviewobserver_p_p.h \
- qmlobserverconstants_p.h \
+ qdeclarativeinspectorplugin.h \
+ qdeclarativeinspectorprotocol.h \
+ qdeclarativeviewinspector_p.h \
+ qdeclarativeviewinspector_p_p.h \
+ qmlinspectorconstants_p.h \
editor/abstractliveedittool_p.h \
editor/liveselectiontool_p.h \
editor/livelayeritem_p.h \
diff --git a/src/plugins/qmltooling/declarativeobserver/qmlobserverconstants_p.h b/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h
index 6d0a263..40ec325 100644
--- a/src/plugins/qmltooling/declarativeobserver/qmlobserverconstants_p.h
+++ b/src/plugins/qmltooling/qmldbg_inspector/qmlinspectorconstants_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QMLOBSERVERCONSTANTS_H
-#define QMLOBSERVERCONSTANTS_H
+#ifndef QMLINSPECTORCONSTANTS_H
+#define QMLINSPECTORCONSTANTS_H
#include <QtDeclarative/private/qdeclarativeglobal_p.h>
@@ -87,4 +87,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QMLOBSERVERCONSTANTS_H
+#endif // QMLINSPECTORCONSTANTS_H
diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro
index 0d60eb1..8220109 100644
--- a/src/plugins/qmltooling/qmltooling.pro
+++ b/src/plugins/qmltooling/qmltooling.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = qmldbg_tcp declarativeobserver
+SUBDIRS = qmldbg_tcp qmldbg_inspector
symbian:SUBDIRS += qmldbg_ost