summaryrefslogtreecommitdiffstats
path: root/src/qscriptremotetargetdebugger.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qscriptremotetargetdebugger.h')
-rw-r--r--src/qscriptremotetargetdebugger.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/qscriptremotetargetdebugger.h b/src/qscriptremotetargetdebugger.h
new file mode 100644
index 0000000..7c2e473
--- /dev/null
+++ b/src/qscriptremotetargetdebugger.h
@@ -0,0 +1,96 @@
+#ifndef QSCRIPTREMOTETARGETDEBUGGER_H
+#define QSCRIPTREMOTETARGETDEBUGGER_H
+
+#include <QtCore/qobject.h>
+
+#include <private/qscriptdebuggerwidgetfactoryinterface_p.h>
+
+class QHostAddress;
+class QScriptDebugger;
+class QScriptRemoteTargetDebuggerFrontend;
+class QAction;
+class QWidget;
+class QMainWindow;
+class QMenu;
+class QToolBar;
+
+class QScriptRemoteTargetDebugger
+ : public QObject, private QScriptDebuggerWidgetFactoryInterface
+{
+ Q_OBJECT
+public:
+ enum DebuggerWidget {
+ ConsoleWidget,
+ StackWidget,
+ ScriptsWidget,
+ LocalsWidget,
+ CodeWidget,
+ CodeFinderWidget,
+ BreakpointsWidget,
+ DebugOutputWidget,
+ ErrorLogWidget
+ };
+
+ enum DebuggerAction {
+ InterruptAction,
+ ContinueAction,
+ StepIntoAction,
+ StepOverAction,
+ StepOutAction,
+ RunToCursorAction,
+ RunToNewScriptAction,
+ ToggleBreakpointAction,
+ ClearDebugOutputAction,
+ ClearErrorLogAction,
+ ClearConsoleAction,
+ FindInScriptAction,
+ FindNextInScriptAction,
+ FindPreviousInScriptAction,
+ GoToLineAction
+ };
+
+ QScriptRemoteTargetDebugger(QObject *parent = 0);
+ ~QScriptRemoteTargetDebugger();
+
+ void attachTo(const QHostAddress &address, quint16 port);
+ void detach();
+
+ bool autoShowStandardWindow() const;
+ void setAutoShowStandardWindow(bool autoShow);
+
+ QMainWindow *standardWindow() const;
+ QToolBar *createStandardToolBar(QWidget *parent = 0);
+ QMenu *createStandardMenu(QWidget *parent = 0);
+
+ QWidget *widget(DebuggerWidget widget) const;
+ QAction *action(DebuggerAction action) const;
+
+Q_SIGNALS:
+ void attached();
+ void detached();
+// void error(Error error);
+
+ void evaluationSuspended();
+ void evaluationResumed();
+
+private Q_SLOTS:
+ void showStandardWindow();
+
+private:
+ QScriptDebugOutputWidgetInterface *createDebugOutputWidget();
+ QScriptDebuggerConsoleWidgetInterface *createConsoleWidget();
+ QScriptErrorLogWidgetInterface *createErrorLogWidget();
+ QScriptDebuggerCodeFinderWidgetInterface *createCodeFinderWidget();
+
+ void createDebugger();
+
+private:
+ QScriptRemoteTargetDebuggerFrontend *m_frontend;
+ QScriptDebugger *m_debugger;
+ bool m_autoShow;
+ QMainWindow *m_standardWindow;
+
+ Q_DISABLE_COPY(QScriptRemoteTargetDebugger)
+};
+
+#endif