summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/creatorplugin/runcontrol.h
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-27 05:45:53 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-27 05:45:53 (GMT)
commit07bdaf208962b1c8605736f30920f4e6dfb0418e (patch)
treee38f4cf7d29310df9d9b80e216cd3a7ee037c08c /tools/qmldebugger/creatorplugin/runcontrol.h
parentcc4bca61687f6441984ccc58ad177d24b6d3e92f (diff)
downloadQt-07bdaf208962b1c8605736f30920f4e6dfb0418e.zip
Qt-07bdaf208962b1c8605736f30920f4e6dfb0418e.tar.gz
Qt-07bdaf208962b1c8605736f30920f4e6dfb0418e.tar.bz2
Add qmldebugger/creatorplugin
Diffstat (limited to 'tools/qmldebugger/creatorplugin/runcontrol.h')
-rw-r--r--tools/qmldebugger/creatorplugin/runcontrol.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/tools/qmldebugger/creatorplugin/runcontrol.h b/tools/qmldebugger/creatorplugin/runcontrol.h
new file mode 100644
index 0000000..b2976f6
--- /dev/null
+++ b/tools/qmldebugger/creatorplugin/runcontrol.h
@@ -0,0 +1,65 @@
+#ifndef QMLINSPECTORRUNCONTROL_H
+#define QMLINSPECTORRUNCONTROL_H
+
+#include <QtCore/qobject.h>
+
+#include <projectexplorer/runconfiguration.h>
+
+#include "qmlinspector.h"
+
+namespace ProjectExplorer {
+ class ApplicationLauncher;
+}
+
+class QmlInspectorRunControlFactory : public ProjectExplorer::IRunControlFactory
+{
+ Q_OBJECT
+
+public:
+ explicit QmlInspectorRunControlFactory(QObject *parent);
+
+ virtual bool canRun(
+ const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration,
+ const QString &mode) const;
+
+ virtual ProjectExplorer::RunControl *create(
+ const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration,
+ const QString &mode);
+
+ ProjectExplorer::RunControl *create(
+ const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration,
+ const QString &mode,
+ const QmlInspector::StartParameters &sp);
+
+ virtual QString displayName() const;
+
+ virtual QWidget *configurationWidget(const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration);
+};
+
+class QmlInspectorRunControl : public ProjectExplorer::RunControl
+{
+ Q_OBJECT
+
+public:
+ explicit QmlInspectorRunControl(const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration,
+ const QmlInspector::StartParameters &sp = QmlInspector::StartParameters());
+ ~QmlInspectorRunControl();
+
+ virtual void start();
+ virtual void stop();
+ virtual bool isRunning() const;
+
+private slots:
+ void appendOutput(const QString &s);
+ void appStarted();
+ void delayedStart();
+ void viewerExited();
+ void applicationError(const QString &error);
+
+private:
+ bool m_running;
+ ProjectExplorer::ApplicationLauncher *m_viewerLauncher;
+ QmlInspector::StartParameters m_startParams;
+};
+
+#endif