/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QDECLARATIVEOBSERVERSERVICE_H
-#define QDECLARATIVEOBSERVERSERVICE_H
-
-#include "private/qdeclarativedebugservice_p.h"
+#ifndef QDECLARATIVEINSPECTORSERVICE_H
+#define QDECLARATIVEINSPECTORSERVICE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativedebugservice_p.h"
#include <private/qdeclarativeglobal_p.h>
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
-class QDeclarativeView;
class QDeclarativeInspectorInterface;
class Q_DECLARATIVE_EXPORT QDeclarativeInspectorService : public QDeclarativeDebugService
QDeclarativeInspectorService();
static QDeclarativeInspectorService *instance();
- void addView(QDeclarativeView *);
- void removeView(QDeclarativeView *);
- QList<QDeclarativeView*> views() const { return m_views; }
+ void addView(QObject *);
+ void removeView(QObject *);
void sendMessage(const QByteArray &message);
-Q_SIGNALS:
- void gotMessage(const QByteArray &message);
-
protected:
virtual void statusChanged(Status status);
virtual void messageReceived(const QByteArray &);
+private slots:
+ void processMessage(const QByteArray &message);
+ void updateStatus();
+
private:
- static QDeclarativeInspectorInterface *loadInspectorPlugin();
+ void loadInspectorPlugins();
- QList<QDeclarativeView*> m_views;
- QDeclarativeInspectorInterface *m_inspectorPlugin;
+ QList<QObject*> m_views;
+ QDeclarativeInspectorInterface *m_currentInspectorPlugin;
+ QList<QDeclarativeInspectorInterface*> m_inspectorPlugins;
};
QT_END_NAMESPACE
QT_END_HEADER
-#endif // QDECLARATIVEOBSERVERSERVICE_H
+#endif // QDECLARATIVEINSPECTORSERVICE_H