Qt 4.8
qscriptdebugger_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtSCriptTools module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QSCRIPTDEBUGGER_P_H
43 #define QSCRIPTDEBUGGER_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
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.
52 //
53 // We mean it.
54 //
55 
56 #include <QtCore/qobject.h>
57 
59 
71 class QAction;
72 class QEvent;
73 class QMenu;
74 #ifndef QT_NO_TOOLBAR
75 class QToolBar;
76 #endif
77 
80 {
81  Q_OBJECT
82 public:
83  // mirrors QScriptEngineDebugger::DebuggerWidget
93  ErrorLogWidget
94  };
95  // mirrors QScriptEngineDebugger::DebuggerAction
111  GoToLineAction
112  };
113 
114  QScriptDebugger(QObject *parent = 0);
115  ~QScriptDebugger();
116 
117  QScriptDebuggerFrontend *frontend() const;
118  void setFrontend(QScriptDebuggerFrontend *frontend);
119 
121  QAction *action(DebuggerAction action, QObject *parent);
122 
123  QScriptDebuggerConsoleWidgetInterface *consoleWidget() const;
124  void setConsoleWidget(QScriptDebuggerConsoleWidgetInterface *consoleWidget);
125 
126  QScriptDebuggerScriptsWidgetInterface *scriptsWidget() const;
127  void setScriptsWidget(QScriptDebuggerScriptsWidgetInterface *scriptsWidget);
128 
129  QScriptDebuggerCodeWidgetInterface *codeWidget() const;
130  void setCodeWidget(QScriptDebuggerCodeWidgetInterface *codeWidget);
131 
132  QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget() const;
133  void setCodeFinderWidget(QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget);
134 
135  QScriptDebuggerStackWidgetInterface *stackWidget() const;
136  void setStackWidget(QScriptDebuggerStackWidgetInterface *stackWidget);
137 
138  QScriptDebuggerLocalsWidgetInterface *localsWidget() const;
139  void setLocalsWidget(QScriptDebuggerLocalsWidgetInterface *localsWidget);
140 
141  QScriptBreakpointsWidgetInterface *breakpointsWidget() const;
142  void setBreakpointsWidget(QScriptBreakpointsWidgetInterface *breakpointsWidget);
143 
144  QScriptDebugOutputWidgetInterface *debugOutputWidget() const;
145  void setDebugOutputWidget(QScriptDebugOutputWidgetInterface *debugOutputWidget);
146 
147  QScriptErrorLogWidgetInterface *errorLogWidget() const;
148  void setErrorLogWidget(QScriptErrorLogWidgetInterface *errorLogWidget);
149 
150  QScriptDebuggerWidgetFactoryInterface *widgetFactory() const;
151  void setWidgetFactory(QScriptDebuggerWidgetFactoryInterface *factory);
152 
153  QAction *interruptAction(QObject *parent) const;
154  QAction *continueAction(QObject *parent) const;
155  QAction *stepIntoAction(QObject *parent) const;
156  QAction *stepOverAction(QObject *parent) const;
157  QAction *stepOutAction(QObject *parent) const;
158  QAction *runToCursorAction(QObject *parent) const;
159  QAction *runToNewScriptAction(QObject *parent) const;
160 
161  QAction *toggleBreakpointAction(QObject *parent) const;
162 
163  QAction *findInScriptAction(QObject *parent) const;
164  QAction *findNextInScriptAction(QObject *parent) const;
165  QAction *findPreviousInScriptAction(QObject *parent) const;
166  QAction *goToLineAction(QObject *parent) const;
167 
168  QAction *clearDebugOutputAction(QObject *parent) const;
169  QAction *clearConsoleAction(QObject *parent) const;
170  QAction *clearErrorLogAction(QObject *parent) const;
171 
172  QMenu *createStandardMenu(QWidget *widgetParent, QObject *actionParent);
173 #ifndef QT_NO_TOOLBAR
174  QToolBar *createStandardToolBar(QWidget *widgetParent, QObject *actionParent);
175 #endif
176  bool eventFilter(QObject *, QEvent *e);
177 
178  bool isInteractive() const;
179 
180 Q_SIGNALS:
181  void stopped() const;
182  void started() const;
183 
184 protected:
185  void timerEvent(QTimerEvent *e);
186 
187 protected:
189 
190 private:
193 
194  Q_PRIVATE_SLOT(d_func(), void _q_onLineEntered(const QString &))
195  Q_PRIVATE_SLOT(d_func(), void _q_onCurrentFrameChanged(int))
196  Q_PRIVATE_SLOT(d_func(), void _q_onCurrentScriptChanged(qint64))
197  Q_PRIVATE_SLOT(d_func(), void _q_onScriptLocationSelected(int))
198 
199  Q_PRIVATE_SLOT(d_func(), void _q_interrupt())
200  Q_PRIVATE_SLOT(d_func(), void _q_continue())
201  Q_PRIVATE_SLOT(d_func(), void _q_stepInto())
202  Q_PRIVATE_SLOT(d_func(), void _q_stepOver())
203  Q_PRIVATE_SLOT(d_func(), void _q_stepOut())
204  Q_PRIVATE_SLOT(d_func(), void _q_runToCursor())
205  Q_PRIVATE_SLOT(d_func(), void _q_runToNewScript())
206 
207  Q_PRIVATE_SLOT(d_func(), void _q_toggleBreakpoint())
208 
209  Q_PRIVATE_SLOT(d_func(), void _q_clearDebugOutput())
210  Q_PRIVATE_SLOT(d_func(), void _q_clearErrorLog())
211  Q_PRIVATE_SLOT(d_func(), void _q_clearConsole())
212 
213  Q_PRIVATE_SLOT(d_func(), void _q_findInScript())
214  Q_PRIVATE_SLOT(d_func(), void _q_findNextInScript())
215  Q_PRIVATE_SLOT(d_func(), void _q_findPreviousInScript())
216  Q_PRIVATE_SLOT(d_func(), void _q_onFindCodeRequest(const QString &, int))
217  Q_PRIVATE_SLOT(d_func(), void _q_goToLine())
218 };
219 
221 
222 #endif
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
The QScriptDebuggerFrontend class is the base class of debugger front-ends.
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
Definition: qobject.cpp:1294
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Definition: qglobal.h:2523
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
#define Q_SIGNALS
Definition: qobjectdefs.h:72
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QToolBar class provides a movable panel that contains a set of controls.
Definition: qtoolbar.h:62
__int64 qint64
Definition: qglobal.h:942
#define Q_OBJECT
Definition: qobjectdefs.h:157
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
Definition: qobject.cpp:1375
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus...
Definition: qmenu.h:72
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:341
#define Q_AUTOTEST_EXPORT
Definition: qglobal.h:1510
The QScriptDebugger class provides a Qt Script debugger.
#define Q_DECLARE_PRIVATE(Class)
Definition: qglobal.h:2467
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64