1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
42 #ifndef QDECLARATIVEDESIGNDEBUGSERVER_H
43 #define QDECLARATIVEDESIGNDEBUGSERVER_H
45 #include "qt_private/qdeclarativedebugservice_p.h"
46 #include "qmlobserverconstants.h"
47 #include "qmljsdebugger_global.h"
49 #include <QtCore/QHash>
51 QT_FORWARD_DECLARE_CLASS(QColor)
52 QT_FORWARD_DECLARE_CLASS(QDeclarativeEngine)
53 QT_FORWARD_DECLARE_CLASS(QDeclarativeContext)
54 QT_FORWARD_DECLARE_CLASS(QDeclarativeWatcher)
55 QT_FORWARD_DECLARE_CLASS(QDataStream)
57 namespace QmlJSDebugger {
59 class QMLJSDEBUGGER_EXPORT QDeclarativeObserverService : public QDeclarativeDebugService
63 QDeclarativeObserverService();
64 static QDeclarativeObserverService *instance();
66 void setDesignModeBehavior(bool inDesignMode);
67 void setCurrentObjects(QList<QObject*> items);
68 void setAnimationSpeed(qreal slowDownFactor);
69 void setAnimationPaused(bool paused);
70 void setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId);
72 void setShowAppOnTop(bool showAppOnTop);
74 QString idStringForObject(QObject *obj) const;
76 void sendMessage(const QByteArray &message);
79 void selectedColorChanged(const QColor &color);
80 void contextPathUpdated(const QStringList &contextPath);
83 void debuggingClientChanged(bool hasDebuggingClient);
85 void currentObjectsChanged(const QList<QObject*> &objects);
86 void designModeBehaviorChanged(bool inDesignMode);
87 void showAppOnTopChanged(bool showAppOnTop);
88 void reloadRequested();
89 void selectToolRequested();
90 void selectMarqueeToolRequested();
91 void zoomToolRequested();
92 void colorPickerToolRequested();
94 void objectCreationRequested(const QString &qml, QObject *parent,
95 const QStringList &imports, const QString &filename = QString());
96 void objectReparentRequested(QObject *object, QObject *newParent);
99 // 1 < x < 16 = slowdown by some factor
100 void animationSpeedChangeRequested(qreal speedFactor);
101 void executionPauseChangeRequested(bool paused);
103 void contextPathIndexChanged(int contextPathIndex);
104 void clearComponentCacheRequested();
107 virtual void statusChanged(Status status);
108 virtual void messageReceived(const QByteArray &);
111 QHash<int, QString> m_stringIdForObjectId;
114 } // namespace QmlJSDebugger
116 #endif // QDECLARATIVEDESIGNDEBUGSERVER_H