2010-07-08 11:34:51 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2010-07-08 11:34:51 +02:00
|
|
|
** All rights reserved.
|
|
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
|
|
|
**
|
|
|
|
|
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
|
|
|
|
**
|
|
|
|
|
** $QT_BEGIN_LICENSE:LGPL$
|
|
|
|
|
** No Commercial Usage
|
|
|
|
|
** This file contains pre-release code and may not be distributed.
|
|
|
|
|
** You may use this file in accordance with the terms and conditions
|
|
|
|
|
** contained in the Technology Preview License Agreement accompanying
|
|
|
|
|
** this package.
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
|
** Nokia at qt-info@nokia.com.
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** $QT_END_LICENSE$
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef QMLJSDESIGNDEBUGCLIENT_H
|
|
|
|
|
#define QMLJSDESIGNDEBUGCLIENT_H
|
|
|
|
|
|
2010-07-29 14:15:12 +02:00
|
|
|
#include "qmljsprivateapi.h"
|
2010-07-08 11:34:51 +02:00
|
|
|
|
|
|
|
|
namespace QmlJSInspector {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-09-16 13:16:47 +02:00
|
|
|
class QmlJSObserverClient : public QDeclarativeDebugClient
|
2010-07-08 11:34:51 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2010-09-16 13:16:47 +02:00
|
|
|
explicit QmlJSObserverClient(QDeclarativeDebugConnection *client,
|
2010-08-26 18:35:30 +02:00
|
|
|
QObject *parent = 0);
|
2010-07-08 11:34:51 +02:00
|
|
|
|
2010-10-25 08:56:25 +02:00
|
|
|
void setCurrentObjects(const QList<int> &debugIds);
|
2010-07-08 11:34:51 +02:00
|
|
|
void reloadViewer();
|
2010-07-12 12:02:35 +02:00
|
|
|
void setDesignModeBehavior(bool inDesignMode);
|
2010-07-08 11:34:51 +02:00
|
|
|
void setAnimationSpeed(qreal slowdownFactor);
|
|
|
|
|
void changeToColorPickerTool();
|
|
|
|
|
void changeToSelectTool();
|
|
|
|
|
void changeToSelectMarqueeTool();
|
|
|
|
|
void changeToZoomTool();
|
2010-11-23 10:07:09 +01:00
|
|
|
void showAppOnTop(bool showOnTop);
|
2010-07-08 11:34:51 +02:00
|
|
|
|
2010-07-21 14:26:25 +02:00
|
|
|
void createQmlObject(const QString &qmlText, int parentDebugId,
|
2010-07-16 09:41:56 +02:00
|
|
|
const QStringList &imports, const QString &filename);
|
2010-07-19 10:42:39 +02:00
|
|
|
void destroyQmlObject(int debugId);
|
2010-08-26 17:38:31 +02:00
|
|
|
void reparentQmlObject(int debugId, int newParent);
|
2010-07-16 09:41:56 +02:00
|
|
|
|
2010-07-08 11:34:51 +02:00
|
|
|
void applyChangesToQmlFile();
|
|
|
|
|
void applyChangesFromQmlFile();
|
|
|
|
|
|
2010-10-25 08:56:25 +02:00
|
|
|
QList<int> currentObjects() const;
|
2010-07-14 17:22:22 +02:00
|
|
|
|
2010-07-26 15:31:59 +02:00
|
|
|
// ### Qt 4.8: remove if we can have access to qdeclarativecontextdata or id's
|
|
|
|
|
void setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots);
|
|
|
|
|
|
2010-08-03 10:17:09 +02:00
|
|
|
void setContextPathIndex(int contextPathIndex);
|
2010-08-03 14:07:30 +02:00
|
|
|
void clearComponentCache();
|
2010-08-03 10:17:09 +02:00
|
|
|
|
2010-07-08 11:34:51 +02:00
|
|
|
signals:
|
2010-09-30 14:05:20 +02:00
|
|
|
void connectedStatusChanged(QDeclarativeDebugClient::Status status);
|
|
|
|
|
|
2010-07-14 14:21:10 +02:00
|
|
|
void currentObjectsChanged(const QList<int> &debugIds);
|
2010-07-26 12:47:55 +02:00
|
|
|
void selectedColorChanged(const QColor &color);
|
2010-07-08 11:34:51 +02:00
|
|
|
void colorPickerActivated();
|
|
|
|
|
void selectToolActivated();
|
|
|
|
|
void selectMarqueeToolActivated();
|
|
|
|
|
void zoomToolActivated();
|
|
|
|
|
void animationSpeedChanged(qreal slowdownFactor);
|
2010-07-12 12:02:35 +02:00
|
|
|
void designModeBehaviorChanged(bool inDesignMode);
|
2010-11-23 10:07:09 +01:00
|
|
|
void showAppOnTopChanged(bool showAppOnTop);
|
2010-12-16 17:26:25 +01:00
|
|
|
void reloaded(); // the server has reloadetd he document
|
2010-08-02 17:25:29 +02:00
|
|
|
void contextPathUpdated(const QStringList &path);
|
2010-07-08 11:34:51 +02:00
|
|
|
|
2010-12-16 17:26:25 +01:00
|
|
|
void logActivity(QString client, QString message);
|
|
|
|
|
|
2010-07-08 11:34:51 +02:00
|
|
|
protected:
|
2011-02-08 20:02:23 +01:00
|
|
|
void statusChanged(Status);
|
|
|
|
|
void messageReceived(const QByteArray &);
|
2010-07-08 11:34:51 +02:00
|
|
|
|
|
|
|
|
private:
|
2010-12-16 17:26:25 +01:00
|
|
|
enum LogDirection {
|
|
|
|
|
LogSend,
|
|
|
|
|
LogReceive
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void log(LogDirection direction, const QString &str);
|
|
|
|
|
|
2010-10-25 08:56:25 +02:00
|
|
|
QList<int> m_currentDebugIds;
|
2010-07-08 11:34:51 +02:00
|
|
|
QDeclarativeDebugConnection *m_connection;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmlJSInspector
|
|
|
|
|
|
|
|
|
|
#endif // QMLJSDESIGNDEBUGCLIENT_H
|