1 /****************************************************************************
3 ** Copyright (C) 2009 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 QtSCriptTools module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
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 ** GNU General Public License Usage
29 ** Alternatively, this file may be used under the terms of the GNU
30 ** General Public License version 3.0 as published by the Free Software
31 ** Foundation and appearing in the file LICENSE.GPL included in the
32 ** packaging of this file. Please review the following information to
33 ** ensure the GNU General Public License version 3.0 requirements will be
34 ** met: http://www.gnu.org/copyleft/gpl.html.
36 ** If you have questions regarding the use of this file, please contact
37 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
42 #ifndef QSCRIPTDEBUGGER_P_H
43 #define QSCRIPTDEBUGGER_P_H
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
56 #include <QtCore/qobject.h>
60 class QScriptDebuggerFrontend
;
61 class QScriptDebuggerConsoleWidgetInterface
;
62 class QScriptDebuggerScriptsWidgetInterface
;
63 class QScriptDebuggerCodeWidgetInterface
;
64 class QScriptDebuggerCodeFinderWidgetInterface
;
65 class QScriptBreakpointsWidgetInterface
;
66 class QScriptDebuggerStackWidgetInterface
;
67 class QScriptDebuggerLocalsWidgetInterface
;
68 class QScriptDebugOutputWidgetInterface
;
69 class QScriptErrorLogWidgetInterface
;
70 class QScriptDebuggerWidgetFactoryInterface
;
74 class QScriptDebuggerPrivate
;
75 class Q_AUTOTEST_EXPORT QScriptDebugger
: public QObject
79 QScriptDebugger(QObject
*parent
= 0);
82 QScriptDebuggerFrontend
*frontend() const;
83 void setFrontend(QScriptDebuggerFrontend
*frontend
);
85 QScriptDebuggerConsoleWidgetInterface
*consoleWidget() const;
86 void setConsoleWidget(QScriptDebuggerConsoleWidgetInterface
*consoleWidget
);
88 QScriptDebuggerScriptsWidgetInterface
*scriptsWidget() const;
89 void setScriptsWidget(QScriptDebuggerScriptsWidgetInterface
*scriptsWidget
);
91 QScriptDebuggerCodeWidgetInterface
*codeWidget() const;
92 void setCodeWidget(QScriptDebuggerCodeWidgetInterface
*codeWidget
);
94 QScriptDebuggerCodeFinderWidgetInterface
*codeFinderWidget() const;
95 void setCodeFinderWidget(QScriptDebuggerCodeFinderWidgetInterface
*codeFinderWidget
);
97 QScriptDebuggerStackWidgetInterface
*stackWidget() const;
98 void setStackWidget(QScriptDebuggerStackWidgetInterface
*stackWidget
);
100 QScriptDebuggerLocalsWidgetInterface
*localsWidget() const;
101 void setLocalsWidget(QScriptDebuggerLocalsWidgetInterface
*localsWidget
);
103 QScriptBreakpointsWidgetInterface
*breakpointsWidget() const;
104 void setBreakpointsWidget(QScriptBreakpointsWidgetInterface
*breakpointsWidget
);
106 QScriptDebugOutputWidgetInterface
*debugOutputWidget() const;
107 void setDebugOutputWidget(QScriptDebugOutputWidgetInterface
*debugOutputWidget
);
109 QScriptErrorLogWidgetInterface
*errorLogWidget() const;
110 void setErrorLogWidget(QScriptErrorLogWidgetInterface
*errorLogWidget
);
112 QScriptDebuggerWidgetFactoryInterface
*widgetFactory() const;
113 void setWidgetFactory(QScriptDebuggerWidgetFactoryInterface
*factory
);
115 QAction
*interruptAction(QObject
*parent
) const;
116 QAction
*continueAction(QObject
*parent
) const;
117 QAction
*stepIntoAction(QObject
*parent
) const;
118 QAction
*stepOverAction(QObject
*parent
) const;
119 QAction
*stepOutAction(QObject
*parent
) const;
120 QAction
*runToCursorAction(QObject
*parent
) const;
121 QAction
*runToNewScriptAction(QObject
*parent
) const;
123 QAction
*toggleBreakpointAction(QObject
*parent
) const;
125 QAction
*findInScriptAction(QObject
*parent
) const;
126 QAction
*findNextInScriptAction(QObject
*parent
) const;
127 QAction
*findPreviousInScriptAction(QObject
*parent
) const;
128 QAction
*goToLineAction(QObject
*parent
) const;
130 QAction
*clearDebugOutputAction(QObject
*parent
) const;
131 QAction
*clearConsoleAction(QObject
*parent
) const;
132 QAction
*clearErrorLogAction(QObject
*parent
) const;
134 bool eventFilter(QObject
*, QEvent
*e
);
137 void stopped() const;
138 void started() const;
141 void timerEvent(QTimerEvent
*e
);
144 QScriptDebugger(QScriptDebuggerPrivate
&dd
, QObject
*parent
);
147 Q_DECLARE_PRIVATE(QScriptDebugger
)
148 Q_DISABLE_COPY(QScriptDebugger
)
150 Q_PRIVATE_SLOT(d_func(), void _q_onLineEntered(const QString
&))
151 Q_PRIVATE_SLOT(d_func(), void _q_onCurrentFrameChanged(int))
152 Q_PRIVATE_SLOT(d_func(), void _q_onCurrentScriptChanged(qint64
))
153 Q_PRIVATE_SLOT(d_func(), void _q_onScriptLocationSelected(int))
155 Q_PRIVATE_SLOT(d_func(), void _q_interrupt())
156 Q_PRIVATE_SLOT(d_func(), void _q_continue())
157 Q_PRIVATE_SLOT(d_func(), void _q_stepInto())
158 Q_PRIVATE_SLOT(d_func(), void _q_stepOver())
159 Q_PRIVATE_SLOT(d_func(), void _q_stepOut())
160 Q_PRIVATE_SLOT(d_func(), void _q_runToCursor())
161 Q_PRIVATE_SLOT(d_func(), void _q_runToNewScript())
163 Q_PRIVATE_SLOT(d_func(), void _q_toggleBreakpoint())
165 Q_PRIVATE_SLOT(d_func(), void _q_clearDebugOutput())
166 Q_PRIVATE_SLOT(d_func(), void _q_clearErrorLog())
167 Q_PRIVATE_SLOT(d_func(), void _q_clearConsole())
169 Q_PRIVATE_SLOT(d_func(), void _q_findInScript())
170 Q_PRIVATE_SLOT(d_func(), void _q_findNextInScript())
171 Q_PRIVATE_SLOT(d_func(), void _q_findPreviousInScript())
172 Q_PRIVATE_SLOT(d_func(), void _q_onFindCodeRequest(const QString
&, int))
173 Q_PRIVATE_SLOT(d_func(), void _q_goToLine())