Qt 4.8
Public Types | Signals | Public Functions | Protected Functions | List of all members
QScriptDebugger Class Reference

The QScriptDebugger class provides a Qt Script debugger. More...

#include <qscriptdebugger_p.h>

Inheritance diagram for QScriptDebugger:
QObject

Public Types

enum  DebuggerAction {
  InterruptAction, ContinueAction, StepIntoAction, StepOverAction,
  StepOutAction, RunToCursorAction, RunToNewScriptAction, ToggleBreakpointAction,
  ClearDebugOutputAction, ClearErrorLogAction, ClearConsoleAction, FindInScriptAction,
  FindNextInScriptAction, FindPreviousInScriptAction, GoToLineAction
}
 
enum  DebuggerWidget {
  ConsoleWidget, StackWidget, ScriptsWidget, LocalsWidget,
  CodeWidget, CodeFinderWidget, BreakpointsWidget, DebugOutputWidget,
  ErrorLogWidget
}
 

Signals

void started () const
 
void stopped () const
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 

Public Functions

QActionaction (DebuggerAction action, QObject *parent)
 
QScriptBreakpointsWidgetInterfacebreakpointsWidget () const
 
QActionclearConsoleAction (QObject *parent) const
 
QActionclearDebugOutputAction (QObject *parent) const
 
QActionclearErrorLogAction (QObject *parent) const
 
QScriptDebuggerCodeFinderWidgetInterfacecodeFinderWidget () const
 
QScriptDebuggerCodeWidgetInterfacecodeWidget () const
 
QScriptDebuggerConsoleWidgetInterfaceconsoleWidget () const
 
QActioncontinueAction (QObject *parent) const
 
QMenucreateStandardMenu (QWidget *widgetParent, QObject *actionParent)
 
QToolBarcreateStandardToolBar (QWidget *widgetParent, QObject *actionParent)
 
QScriptDebugOutputWidgetInterfacedebugOutputWidget () const
 
QScriptErrorLogWidgetInterfaceerrorLogWidget () const
 
bool eventFilter (QObject *, QEvent *e)
 Reimplemented Function More...
 
QActionfindInScriptAction (QObject *parent) const
 
QActionfindNextInScriptAction (QObject *parent) const
 
QActionfindPreviousInScriptAction (QObject *parent) const
 
QScriptDebuggerFrontendfrontend () const
 
QActiongoToLineAction (QObject *parent) const
 
QActioninterruptAction (QObject *parent) const
 
bool isInteractive () const
 
QScriptDebuggerLocalsWidgetInterfacelocalsWidget () const
 
 QScriptDebugger (QObject *parent=0)
 Constructs a new QScriptDebugger object. More...
 
QActionrunToCursorAction (QObject *parent) const
 
QActionrunToNewScriptAction (QObject *parent) const
 
QScriptDebuggerScriptsWidgetInterfacescriptsWidget () const
 
void setBreakpointsWidget (QScriptBreakpointsWidgetInterface *breakpointsWidget)
 
void setCodeFinderWidget (QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget)
 
void setCodeWidget (QScriptDebuggerCodeWidgetInterface *codeWidget)
 
void setConsoleWidget (QScriptDebuggerConsoleWidgetInterface *consoleWidget)
 
void setDebugOutputWidget (QScriptDebugOutputWidgetInterface *debugOutputWidget)
 
void setErrorLogWidget (QScriptErrorLogWidgetInterface *errorLogWidget)
 
void setFrontend (QScriptDebuggerFrontend *frontend)
 
void setLocalsWidget (QScriptDebuggerLocalsWidgetInterface *localsWidget)
 
void setScriptsWidget (QScriptDebuggerScriptsWidgetInterface *scriptsWidget)
 
void setStackWidget (QScriptDebuggerStackWidgetInterface *stackWidget)
 
void setWidgetFactory (QScriptDebuggerWidgetFactoryInterface *factory)
 
QScriptDebuggerStackWidgetInterfacestackWidget () const
 
QActionstepIntoAction (QObject *parent) const
 
QActionstepOutAction (QObject *parent) const
 
QActionstepOverAction (QObject *parent) const
 
QActiontoggleBreakpointAction (QObject *parent) const
 
QWidgetwidget (DebuggerWidget widget)
 
QScriptDebuggerWidgetFactoryInterfacewidgetFactory () const
 
 ~QScriptDebugger ()
 Destroys this QScriptDebugger. More...
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Protected Functions

 QScriptDebugger (QScriptDebuggerPrivate &dd, QObject *parent)
 
void timerEvent (QTimerEvent *e)
 Reimplemented Function More...
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

The QScriptDebugger class provides a Qt Script debugger.

Since
4.5
Warning
This function is not part of the public interface.

Definition at line 79 of file qscriptdebugger_p.h.

Enumerations

◆ DebuggerAction

Enumerator
InterruptAction 
ContinueAction 
StepIntoAction 
StepOverAction 
StepOutAction 
RunToCursorAction 
RunToNewScriptAction 
ToggleBreakpointAction 
ClearDebugOutputAction 
ClearErrorLogAction 
ClearConsoleAction 
FindInScriptAction 
FindNextInScriptAction 
FindPreviousInScriptAction 
GoToLineAction 

Definition at line 96 of file qscriptdebugger_p.h.

◆ DebuggerWidget

Constructors and Destructors

◆ QScriptDebugger() [1/2]

QScriptDebugger::QScriptDebugger ( QObject parent = 0)

Constructs a new QScriptDebugger object.

Definition at line 1298 of file qscriptdebugger.cpp.

1299  : QObject(*new QScriptDebuggerPrivate, parent)
1300 {
1301  ++scriptDebuggerCount;
1302 }
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
Definition: qobject.cpp:753

◆ ~QScriptDebugger()

QScriptDebugger::~QScriptDebugger ( )

Destroys this QScriptDebugger.

Definition at line 1307 of file qscriptdebugger.cpp.

1308 {
1309  --scriptDebuggerCount;
1310  if ((scriptDebuggerCount == 0) && eventCallbackRegistered) {
1311  eventCallbackRegistered = false;
1313  scriptDebuggerEventCallback);
1314  }
1315 }
static bool unregisterCallback(Callback, qInternalCallback)
Definition: qglobal.cpp:3644

◆ QScriptDebugger() [2/2]

QScriptDebugger::QScriptDebugger ( QScriptDebuggerPrivate dd,
QObject parent 
)
protected
Warning
This function is not part of the public interface.

Definition at line 1320 of file qscriptdebugger.cpp.

1321  : QObject(dd, parent)
1322 {
1323 }
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
Definition: qobject.cpp:753

Functions

◆ action()

QAction * QScriptDebugger::action ( DebuggerAction  action,
QObject parent 
)

Definition at line 1347 of file qscriptdebugger.cpp.

Referenced by createStandardMenu(), and createStandardToolBar().

1348 {
1349  switch (action) {
1350  case InterruptAction:
1351  return interruptAction(parent);
1352  case ContinueAction:
1353  return continueAction(parent);
1354  case StepIntoAction:
1355  return stepIntoAction(parent);
1356  case StepOverAction:
1357  return stepOverAction(parent);
1358  case StepOutAction:
1359  return stepOutAction(parent);
1360  case RunToCursorAction:
1361  return runToCursorAction(parent);
1362  case RunToNewScriptAction:
1363  return runToNewScriptAction(parent);
1365  return toggleBreakpointAction(parent);
1367  return clearDebugOutputAction(parent);
1368  case ClearErrorLogAction:
1369  return clearErrorLogAction(parent);
1370  case ClearConsoleAction:
1371  return clearConsoleAction(parent);
1372  case FindInScriptAction:
1373  return findInScriptAction(parent);
1375  return findNextInScriptAction(parent);
1377  return findPreviousInScriptAction(parent);
1378  case GoToLineAction:
1379  return goToLineAction(parent);
1380  }
1381  return 0;
1382 }
QAction * clearConsoleAction(QObject *parent) const
QAction * action(DebuggerAction action, QObject *parent)
QAction * continueAction(QObject *parent) const
QAction * interruptAction(QObject *parent) const
QAction * stepOverAction(QObject *parent) const
QAction * runToCursorAction(QObject *parent) const
QAction * clearDebugOutputAction(QObject *parent) const
QAction * goToLineAction(QObject *parent) const
QAction * findPreviousInScriptAction(QObject *parent) const
QAction * findInScriptAction(QObject *parent) const
QAction * runToNewScriptAction(QObject *parent) const
QAction * toggleBreakpointAction(QObject *parent) const
QAction * stepIntoAction(QObject *parent) const
QAction * clearErrorLogAction(QObject *parent) const
QAction * stepOutAction(QObject *parent) const
QAction * findNextInScriptAction(QObject *parent) const

◆ breakpointsWidget()

QScriptBreakpointsWidgetInterface * QScriptDebugger::breakpointsWidget ( ) const

Definition at line 1629 of file qscriptdebugger.cpp.

Referenced by setBreakpointsWidget(), and widget().

1630 {
1631  Q_D(const QScriptDebugger);
1632  return d->breakpointsWidget;
1633 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ clearConsoleAction()

QAction * QScriptDebugger::clearConsoleAction ( QObject parent) const

Definition at line 1838 of file qscriptdebugger.cpp.

Referenced by action(), and clearConsoleAction().

1839 {
1840  Q_D(const QScriptDebugger);
1841  if (!d->clearConsoleAction) {
1842  QIcon clearConsoleIcon;
1843  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1844  that->d_func()->clearConsoleAction = new QAction(clearConsoleIcon, QScriptDebugger::tr("Clear Console"), parent);
1845  QObject::connect(d->clearConsoleAction, SIGNAL(triggered()),
1846  that, SLOT(_q_clearConsole()));
1847  }
1848  return d->clearConsoleAction;
1849 }
double d
Definition: qnumeric_p.h:62
QAction * clearConsoleAction(QObject *parent) const
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ clearDebugOutputAction()

QAction * QScriptDebugger::clearDebugOutputAction ( QObject parent) const

Definition at line 1812 of file qscriptdebugger.cpp.

Referenced by action(), and clearDebugOutputAction().

1813 {
1814  Q_D(const QScriptDebugger);
1815  if (!d->clearDebugOutputAction) {
1816  QIcon clearDebugOutputIcon;
1817  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1818  that->d_func()->clearDebugOutputAction = new QAction(clearDebugOutputIcon, QScriptDebugger::tr("Clear Debug Output"), parent);
1819  QObject::connect(d->clearDebugOutputAction, SIGNAL(triggered()),
1820  that, SLOT(_q_clearDebugOutput()));
1821  }
1822  return d->clearDebugOutputAction;
1823 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
QAction * clearDebugOutputAction(QObject *parent) const
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ clearErrorLogAction()

QAction * QScriptDebugger::clearErrorLogAction ( QObject parent) const

Definition at line 1825 of file qscriptdebugger.cpp.

Referenced by action(), and clearErrorLogAction().

1826 {
1827  Q_D(const QScriptDebugger);
1828  if (!d->clearErrorLogAction) {
1829  QIcon clearErrorLogIcon;
1830  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1831  that->d_func()->clearErrorLogAction = new QAction(clearErrorLogIcon, QScriptDebugger::tr("Clear Error Log"), parent);
1832  QObject::connect(d->clearErrorLogAction, SIGNAL(triggered()),
1833  that, SLOT(_q_clearErrorLog()));
1834  }
1835  return d->clearErrorLogAction;
1836 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
QAction * clearErrorLogAction(QObject *parent) const
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ codeFinderWidget()

QScriptDebuggerCodeFinderWidgetInterface * QScriptDebugger::codeFinderWidget ( ) const

Definition at line 1592 of file qscriptdebugger.cpp.

Referenced by setCodeFinderWidget(), and widget().

1593 {
1594  Q_D(const QScriptDebugger);
1595  return d->codeFinderWidget;
1596 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ codeWidget()

QScriptDebuggerCodeWidgetInterface * QScriptDebugger::codeWidget ( ) const

Definition at line 1554 of file qscriptdebugger.cpp.

Referenced by setCodeWidget(), and widget().

1555 {
1556  Q_D(const QScriptDebugger);
1557  return d->codeWidget;
1558 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ consoleWidget()

QScriptDebuggerConsoleWidgetInterface * QScriptDebugger::consoleWidget ( ) const

Definition at line 1463 of file qscriptdebugger.cpp.

Referenced by setConsoleWidget(), and widget().

1464 {
1465  Q_D(const QScriptDebugger);
1466  return d->consoleWidget;
1467 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ continueAction()

QAction * QScriptDebugger::continueAction ( QObject parent) const

Definition at line 1694 of file qscriptdebugger.cpp.

Referenced by action(), and continueAction().

1695 {
1696  Q_D(const QScriptDebugger);
1697  if (!d->continueAction) {
1698  QIcon continueIcon;
1699  continueIcon.addPixmap(d->pixmap(QString::fromLatin1("play.png")), QIcon::Normal);
1700  continueIcon.addPixmap(d->pixmap(QString::fromLatin1("d_play.png")), QIcon::Disabled);
1701  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1702  that->d_func()->continueAction = new QAction(continueIcon, QScriptDebugger::tr("Continue"), parent);
1703  d->continueAction->setEnabled(d->interactive);
1704  d->continueAction->setShortcut(QScriptDebugger::tr("F5"));
1705  QObject::connect(d->continueAction, SIGNAL(triggered()),
1706  that, SLOT(_q_continue()));
1707  }
1708  return d->continueAction;
1709 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
QAction * continueAction(QObject *parent) const
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ createStandardMenu()

QMenu * QScriptDebugger::createStandardMenu ( QWidget widgetParent,
QObject actionParent 
)

Definition at line 1915 of file qscriptdebugger.cpp.

1916 {
1917  QMenu *menu = new QMenu(widgetParent);
1918  menu->setTitle(QScriptDebugger::tr("Debug"));
1919  menu->addAction(action(ContinueAction, actionParent));
1920  menu->addAction(action(InterruptAction, actionParent));
1921  menu->addAction(action(StepIntoAction, actionParent));
1922  menu->addAction(action(StepOverAction, actionParent));
1923  menu->addAction(action(StepOutAction, actionParent));
1924  menu->addAction(action(RunToCursorAction, actionParent));
1925  menu->addAction(action(RunToNewScriptAction, actionParent));
1926 
1927  menu->addSeparator();
1928  menu->addAction(action(ToggleBreakpointAction, actionParent));
1929 
1930  menu->addSeparator();
1931  menu->addAction(action(ClearDebugOutputAction, actionParent));
1932  menu->addAction(action(ClearErrorLogAction, actionParent));
1933  menu->addAction(action(ClearConsoleAction, actionParent));
1934 
1935  return menu;
1936 }
QAction * action(DebuggerAction action, QObject *parent)
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QAction * addAction(const QString &text)
This convenience function creates a new action with text.
Definition: qmenu.cpp:1453
void setTitle(const QString &title)
Definition: qmenu.cpp:732
QAction * addSeparator()
This convenience function creates a new separator action, i.e.
Definition: qmenu.cpp:1583
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus...
Definition: qmenu.h:72

◆ createStandardToolBar()

QToolBar * QScriptDebugger::createStandardToolBar ( QWidget widgetParent,
QObject actionParent 
)

Definition at line 1939 of file qscriptdebugger.cpp.

1940 {
1941  QToolBar *tb = new QToolBar(widgetParent);
1942  tb->setObjectName(QLatin1String("qtscriptdebugger_standardToolBar"));
1943  tb->addAction(action(ContinueAction, actionParent));
1944  tb->addAction(action(InterruptAction, actionParent));
1945  tb->addAction(action(StepIntoAction, actionParent));
1946  tb->addAction(action(StepOverAction, actionParent));
1947  tb->addAction(action(StepOutAction, actionParent));
1948  tb->addAction(action(RunToCursorAction, actionParent));
1949  tb->addAction(action(RunToNewScriptAction, actionParent));
1950  tb->addSeparator();
1951  tb->addAction(action(FindInScriptAction, actionParent));
1952  return tb;
1953 }
QAction * action(DebuggerAction action, QObject *parent)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
The QToolBar class provides a movable panel that contains a set of controls.
Definition: qtoolbar.h:62
QAction * addSeparator()
Adds a separator to the end of the toolbar.
Definition: qtoolbar.cpp:936
QAction * addAction(const QString &text)
Creates a new action with the given text.
Definition: qtoolbar.cpp:868

◆ debugOutputWidget()

QScriptDebugOutputWidgetInterface * QScriptDebugger::debugOutputWidget ( ) const

Definition at line 1617 of file qscriptdebugger.cpp.

Referenced by setDebugOutputWidget(), and widget().

1618 {
1619  Q_D(const QScriptDebugger);
1620  return d->debugOutputWidget;
1621 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ errorLogWidget()

QScriptErrorLogWidgetInterface * QScriptDebugger::errorLogWidget ( ) const

Definition at line 1653 of file qscriptdebugger.cpp.

Referenced by setErrorLogWidget(), and widget().

1654 {
1655  Q_D(const QScriptDebugger);
1656  return d->errorLogWidget;
1657 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ eventFilter()

bool QScriptDebugger::eventFilter ( QObject watched,
QEvent e 
)
virtual

Reimplemented Function

Reimplemented from QObject.

Definition at line 1965 of file qscriptdebugger.cpp.

1966 {
1968  if (watched == d->codeWidget) {
1969  if (e->type() == QEvent::KeyPress) {
1970  d->_q_findInScript();
1971  d->codeFinderWidget->setText(static_cast<QKeyEvent*>(e)->text());
1972  return true;
1973  }
1974  }
1975  return false;
1976 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.
Type type() const
Returns the event type.
Definition: qcoreevent.h:303
#define text
Definition: qobjectdefs.h:80

◆ findInScriptAction()

QAction * QScriptDebugger::findInScriptAction ( QObject parent) const

Definition at line 1851 of file qscriptdebugger.cpp.

Referenced by action(), and findInScriptAction().

1852 {
1853  Q_D(const QScriptDebugger);
1854  if (!d->findInScriptAction) {
1855  QIcon findInScriptIcon;
1856  findInScriptIcon.addPixmap(d->pixmap(QString::fromLatin1("find.png")), QIcon::Normal);
1857  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1858  that->d_func()->findInScriptAction = new QAction(findInScriptIcon, QScriptDebugger::tr("&Find in Script..."), parent);
1859  d->findInScriptAction->setShortcut(QScriptDebugger::tr("Ctrl+F"));
1860  d->findInScriptAction->setEnabled(
1861  (d->codeFinderWidget != 0)
1862  && (d->codeWidget != 0)
1863  && (d->codeWidget->currentView() != 0));
1864  QObject::connect(d->findInScriptAction, SIGNAL(triggered()),
1865  that, SLOT(_q_findInScript()));
1866  }
1867  return d->findInScriptAction;
1868 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QAction * findInScriptAction(QObject *parent) const
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ findNextInScriptAction()

QAction * QScriptDebugger::findNextInScriptAction ( QObject parent) const

Definition at line 1870 of file qscriptdebugger.cpp.

Referenced by action(), and findNextInScriptAction().

1871 {
1872  Q_D(const QScriptDebugger);
1873  if (!d->findNextInScriptAction) {
1874  QIcon findNextInScriptIcon;
1875  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1876  that->d_func()->findNextInScriptAction = new QAction(findNextInScriptIcon, QScriptDebugger::tr("Find &Next"), parent);
1877  d->findNextInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty());
1878  d->findNextInScriptAction->setShortcut(QScriptDebugger::tr("F3"));
1879  QObject::connect(d->findNextInScriptAction, SIGNAL(triggered()),
1880  that, SLOT(_q_findNextInScript()));
1881  }
1882  return d->findNextInScriptAction;
1883 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
QAction * findNextInScriptAction(QObject *parent) const
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ findPreviousInScriptAction()

QAction * QScriptDebugger::findPreviousInScriptAction ( QObject parent) const

Definition at line 1885 of file qscriptdebugger.cpp.

Referenced by action(), and findPreviousInScriptAction().

1886 {
1887  Q_D(const QScriptDebugger);
1888  if (!d->findPreviousInScriptAction) {
1889  QIcon findPreviousInScriptIcon;
1890  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1891  that->d_func()->findPreviousInScriptAction = new QAction(findPreviousInScriptIcon, QScriptDebugger::tr("Find &Previous"), parent);
1892  d->findPreviousInScriptAction->setEnabled(d->codeFinderWidget && !d->codeFinderWidget->text().isEmpty());
1893  d->findPreviousInScriptAction->setShortcut(QScriptDebugger::tr("Shift+F3"));
1894  QObject::connect(d->findPreviousInScriptAction, SIGNAL(triggered()),
1895  that, SLOT(_q_findPreviousInScript()));
1896  }
1897  return d->findPreviousInScriptAction;
1898 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QAction * findPreviousInScriptAction(QObject *parent) const
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ frontend()

QScriptDebuggerFrontend * QScriptDebugger::frontend ( ) const

Definition at line 1325 of file qscriptdebugger.cpp.

Referenced by setFrontend().

1326 {
1327  Q_D(const QScriptDebugger);
1328  return d->frontend;
1329 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ goToLineAction()

QAction * QScriptDebugger::goToLineAction ( QObject parent) const

Definition at line 1900 of file qscriptdebugger.cpp.

Referenced by action(), and goToLineAction().

1901 {
1902  Q_D(const QScriptDebugger);
1903  if (!d->goToLineAction) {
1904  QIcon goToLineIcon;
1905  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1906  that->d_func()->goToLineAction = new QAction(goToLineIcon, QScriptDebugger::tr("Go to Line"), parent);
1907  d->goToLineAction->setShortcut(QScriptDebugger::tr("Ctrl+G"));
1908  d->goToLineAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0));
1909  QObject::connect(d->goToLineAction, SIGNAL(triggered()),
1910  that, SLOT(_q_goToLine()));
1911  }
1912  return d->goToLineAction;
1913 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
QAction * goToLineAction(QObject *parent) const
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ interruptAction()

QAction * QScriptDebugger::interruptAction ( QObject parent) const

Definition at line 1677 of file qscriptdebugger.cpp.

Referenced by action(), and interruptAction().

1678 {
1679  Q_D(const QScriptDebugger);
1680  if (!d->interruptAction) {
1681  QIcon interruptIcon;
1682  interruptIcon.addPixmap(d->pixmap(QString::fromLatin1("interrupt.png")), QIcon::Normal);
1683  interruptIcon.addPixmap(d->pixmap(QString::fromLatin1("d_interrupt.png")), QIcon::Disabled);
1684  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1685  that->d_func()->interruptAction = new QAction(interruptIcon, QScriptDebugger::tr("Interrupt"), parent);
1686  d->interruptAction->setEnabled(!d->interactive);
1687  d->interruptAction->setShortcut(QScriptDebugger::tr("Shift+F5"));
1688  QObject::connect(d->interruptAction, SIGNAL(triggered()),
1689  that, SLOT(_q_interrupt()));
1690  }
1691  return d->interruptAction;
1692 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
QAction * interruptAction(QObject *parent) const
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ isInteractive()

bool QScriptDebugger::isInteractive ( ) const

Definition at line 1956 of file qscriptdebugger.cpp.

1957 {
1958  Q_D(const QScriptDebugger);
1959  return d->interactive;
1960 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ localsWidget()

QScriptDebuggerLocalsWidgetInterface * QScriptDebugger::localsWidget ( ) const

Definition at line 1538 of file qscriptdebugger.cpp.

Referenced by setLocalsWidget(), and widget().

1539 {
1540  Q_D(const QScriptDebugger);
1541  return d->localsWidget;
1542 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ runToCursorAction()

QAction * QScriptDebugger::runToCursorAction ( QObject parent) const

Definition at line 1762 of file qscriptdebugger.cpp.

Referenced by action(), and runToCursorAction().

1763 {
1764  Q_D(const QScriptDebugger);
1765  if (!d->runToCursorAction) {
1766  QIcon runToCursorIcon;
1767  runToCursorIcon.addPixmap(d->pixmap(QString::fromLatin1("runtocursor.png")), QIcon::Normal);
1768  runToCursorIcon.addPixmap(d->pixmap(QString::fromLatin1("d_runtocursor.png")), QIcon::Disabled);
1769  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1770  that->d_func()->runToCursorAction = new QAction(runToCursorIcon, QScriptDebugger::tr("Run to Cursor"), parent);
1771  d->runToCursorAction->setEnabled(d->interactive);
1772  d->runToCursorAction->setShortcut(QScriptDebugger::tr("Ctrl+F10"));
1773  QObject::connect(d->runToCursorAction, SIGNAL(triggered()),
1774  that, SLOT(_q_runToCursor()));
1775  }
1776  return d->runToCursorAction;
1777 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QAction * runToCursorAction(QObject *parent) const
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ runToNewScriptAction()

QAction * QScriptDebugger::runToNewScriptAction ( QObject parent) const

Definition at line 1779 of file qscriptdebugger.cpp.

Referenced by action(), and runToNewScriptAction().

1780 {
1781  Q_D(const QScriptDebugger);
1782  if (!d->runToNewScriptAction) {
1783  QIcon runToNewScriptIcon;
1784  runToNewScriptIcon.addPixmap(d->pixmap(QString::fromLatin1("runtonewscript.png")), QIcon::Normal);
1785  runToNewScriptIcon.addPixmap(d->pixmap(QString::fromLatin1("d_breakonscriptload.png")), QIcon::Disabled);
1786  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1787  that->d_func()->runToNewScriptAction = new QAction(runToNewScriptIcon,
1788  QScriptDebugger::tr("Run to New Script"), parent);
1789  d->runToNewScriptAction->setEnabled(d->interactive);
1790  QObject::connect(d->runToNewScriptAction, SIGNAL(triggered()),
1791  that, SLOT(_q_runToNewScript()));
1792  }
1793  return d->runToNewScriptAction;
1794 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
QAction * runToNewScriptAction(QObject *parent) const
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ scriptsWidget()

QScriptDebuggerScriptsWidgetInterface * QScriptDebugger::scriptsWidget ( ) const

Definition at line 1511 of file qscriptdebugger.cpp.

Referenced by setScriptsWidget(), and widget().

1512 {
1513  Q_D(const QScriptDebugger);
1514  return d->scriptsWidget;
1515 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ setBreakpointsWidget()

void QScriptDebugger::setBreakpointsWidget ( QScriptBreakpointsWidgetInterface breakpointsWidget)

Definition at line 1635 of file qscriptdebugger.cpp.

Referenced by widget().

1636 {
1638  if (d->breakpointsWidget) {
1639  // ### invalidate
1640  }
1641  d->breakpointsWidget = breakpointsWidget;
1642  if (breakpointsWidget) {
1643  if (!d->breakpointsModel) {
1644  d->breakpointsModel = new QScriptBreakpointsModel(d, d, this);
1645  if (d->interactive)
1646  d->scheduleJob(new SyncBreakpointsJob(d));
1647  }
1648  d->breakpointsWidget->setBreakpointsModel(d->breakpointsModel);
1649  d->breakpointsWidget->setScriptsModel(d->scriptsModel);
1650  }
1651 }
double d
Definition: qnumeric_p.h:62
QScriptBreakpointsWidgetInterface * breakpointsWidget() const
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ setCodeFinderWidget()

void QScriptDebugger::setCodeFinderWidget ( QScriptDebuggerCodeFinderWidgetInterface codeFinderWidget)

Definition at line 1598 of file qscriptdebugger.cpp.

Referenced by widget().

1599 {
1601  if (d->codeFinderWidget) {
1602  QObject::disconnect(d->codeFinderWidget, 0, this, 0);
1603  }
1604  d->codeFinderWidget = codeFinderWidget;
1605  if (codeFinderWidget) {
1606  QObject::connect(codeFinderWidget, SIGNAL(findRequest(QString,int)),
1607  this, SLOT(_q_onFindCodeRequest(QString,int)));
1608  }
1609  if (d->findInScriptAction) {
1610  d->findInScriptAction->setEnabled(
1611  (codeFinderWidget != 0)
1612  && (d->codeWidget != 0)
1613  && (d->codeWidget->currentView() != 0));
1614  }
1615 }
QScriptDebuggerCodeFinderWidgetInterface * codeFinderWidget() const
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
The QScriptDebugger class provides a Qt Script debugger.

◆ setCodeWidget()

void QScriptDebugger::setCodeWidget ( QScriptDebuggerCodeWidgetInterface codeWidget)

Definition at line 1560 of file qscriptdebugger.cpp.

Referenced by widget().

1561 {
1563  if (d->codeWidget) {
1564  d->codeWidget->removeEventFilter(this);
1565  }
1566  d->codeWidget = codeWidget;
1567  if (codeWidget) {
1568  if (!d->scriptsModel) {
1569  d->scriptsModel = new QScriptDebuggerScriptsModel(this);
1570  if (d->interactive)
1571  d->scheduleJob(new SyncScriptsJob(d));
1572  }
1573  codeWidget->setScriptsModel(d->scriptsModel);
1574  if (!d->breakpointsModel) {
1575  d->breakpointsModel = new QScriptBreakpointsModel(d, d, this);
1576  if (d->interactive)
1577  d->scheduleJob(new SyncBreakpointsJob(d));
1578  }
1579  codeWidget->setBreakpointsModel(d->breakpointsModel);
1580  codeWidget->setToolTipProvider(d);
1581  codeWidget->installEventFilter(this);
1582  }
1583  bool hasScript = (codeWidget != 0) && (codeWidget->currentView() != 0);
1584  if (d->findInScriptAction)
1585  d->findInScriptAction->setEnabled(hasScript && (d->codeFinderWidget != 0));
1586  if (d->goToLineAction)
1587  d->goToLineAction->setEnabled(hasScript);
1588  if (d->toggleBreakpointAction)
1589  d->toggleBreakpointAction->setEnabled(hasScript);
1590 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
virtual void setScriptsModel(QScriptDebuggerScriptsModel *model)=0
QScriptDebuggerCodeWidgetInterface * codeWidget() const
virtual void setToolTipProvider(QScriptToolTipProviderInterface *toolTipProvider)=0
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
Definition: qobject.cpp:2070
virtual void setBreakpointsModel(QScriptBreakpointsModel *model)=0
The QScriptDebugger class provides a Qt Script debugger.
virtual QScriptDebuggerCodeViewInterface * currentView() const =0

◆ setConsoleWidget()

void QScriptDebugger::setConsoleWidget ( QScriptDebuggerConsoleWidgetInterface consoleWidget)

Definition at line 1469 of file qscriptdebugger.cpp.

Referenced by widget().

1470 {
1472  if (d->consoleWidget) {
1473  QObject::disconnect(d->consoleWidget, 0, this, 0);
1474  }
1475  d->consoleWidget = consoleWidget;
1476  if (consoleWidget) {
1477  consoleWidget->setCommandHistorian(d->console);
1478  consoleWidget->setCompletionProvider(d);
1479  QObject::connect(consoleWidget, SIGNAL(lineEntered(QString)),
1480  this, SLOT(_q_onLineEntered(QString)));
1481 
1482  d->console->showDebuggerInfoMessage(consoleWidget);
1483  }
1484 }
double d
Definition: qnumeric_p.h:62
void setCommandHistorian(QScriptDebuggerConsoleHistorianInterface *historian)
#define SLOT(a)
Definition: qobjectdefs.h:226
The QString class provides a Unicode character string.
Definition: qstring.h:83
void setCompletionProvider(QScriptCompletionProviderInterface *completionProvider)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
The QScriptDebugger class provides a Qt Script debugger.
QScriptDebuggerConsoleWidgetInterface * consoleWidget() const

◆ setDebugOutputWidget()

void QScriptDebugger::setDebugOutputWidget ( QScriptDebugOutputWidgetInterface debugOutputWidget)

Definition at line 1623 of file qscriptdebugger.cpp.

Referenced by widget().

1624 {
1626  d->debugOutputWidget = debugOutputWidget;
1627 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
QScriptDebugOutputWidgetInterface * debugOutputWidget() const
The QScriptDebugger class provides a Qt Script debugger.

◆ setErrorLogWidget()

void QScriptDebugger::setErrorLogWidget ( QScriptErrorLogWidgetInterface errorLogWidget)

Definition at line 1659 of file qscriptdebugger.cpp.

Referenced by widget().

1660 {
1662  d->errorLogWidget = errorLogWidget;
1663 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
QScriptErrorLogWidgetInterface * errorLogWidget() const
The QScriptDebugger class provides a Qt Script debugger.

◆ setFrontend()

void QScriptDebugger::setFrontend ( QScriptDebuggerFrontend frontend)

Definition at line 1331 of file qscriptdebugger.cpp.

1332 {
1334  if (d->frontend)
1335  d->frontend->setEventHandler(0);
1336  d->frontend = frontend;
1337  if (frontend) {
1338  frontend->setEventHandler(d);
1339  if (!eventCallbackRegistered) {
1340  eventCallbackRegistered = true;
1342  scriptDebuggerEventCallback);
1343  }
1344  }
1345 }
double d
Definition: qnumeric_p.h:62
QScriptDebuggerFrontend * frontend() const
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.
void setEventHandler(QScriptDebuggerEventHandlerInterface *eventHandler)
static bool registerCallback(Callback, qInternalCallback)
Definition: qglobal.cpp:3633

◆ setLocalsWidget()

void QScriptDebugger::setLocalsWidget ( QScriptDebuggerLocalsWidgetInterface localsWidget)

Definition at line 1544 of file qscriptdebugger.cpp.

Referenced by widget().

1545 {
1547  if (d->localsWidget) {
1548  // ### d->localsWidget->setLocalsModel(0);
1549  }
1550  localsWidget->setCompletionProvider(d);
1551  d->localsWidget = localsWidget;
1552 }
double d
Definition: qnumeric_p.h:62
QScriptDebuggerLocalsWidgetInterface * localsWidget() const
#define Q_D(Class)
Definition: qglobal.h:2482
void setCompletionProvider(QScriptCompletionProviderInterface *completionProvider)
The QScriptDebugger class provides a Qt Script debugger.

◆ setScriptsWidget()

void QScriptDebugger::setScriptsWidget ( QScriptDebuggerScriptsWidgetInterface scriptsWidget)

Definition at line 1517 of file qscriptdebugger.cpp.

Referenced by widget().

1518 {
1520  if (d->scriptsWidget) {
1521  QObject::disconnect(d->scriptsWidget, 0, this, 0);
1522  }
1523  d->scriptsWidget = scriptsWidget;
1524  if (scriptsWidget) {
1525  if (!d->scriptsModel) {
1526  d->scriptsModel = new QScriptDebuggerScriptsModel(this);
1527  if (d->interactive)
1528  d->scheduleJob(new SyncScriptsJob(d));
1529  }
1530  scriptsWidget->setScriptsModel(d->scriptsModel);
1531  QObject::connect(scriptsWidget, SIGNAL(currentScriptChanged(qint64)),
1532  this, SLOT(_q_onCurrentScriptChanged(qint64)));
1533  QObject::connect(d->scriptsWidget, SIGNAL(scriptLocationSelected(int)),
1534  this, SLOT(_q_onScriptLocationSelected(int)));
1535  }
1536 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QScriptDebuggerScriptsWidgetInterface * scriptsWidget() const
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
virtual void setScriptsModel(QScriptDebuggerScriptsModel *model)=0
__int64 qint64
Definition: qglobal.h:942
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
The QScriptDebugger class provides a Qt Script debugger.

◆ setStackWidget()

void QScriptDebugger::setStackWidget ( QScriptDebuggerStackWidgetInterface stackWidget)

Definition at line 1492 of file qscriptdebugger.cpp.

Referenced by widget().

1493 {
1495  if (d->stackWidget) {
1496  QObject::disconnect(d->stackWidget, 0, this, 0);
1497  }
1498  d->stackWidget = stackWidget;
1499  if (stackWidget) {
1500  if (!d->stackModel) {
1501  d->stackModel = new QScriptDebuggerStackModel(this);
1502  if (d->interactive)
1503  d->scheduleJob(new SyncStackJob(d));
1504  }
1505  stackWidget->setStackModel(d->stackModel);
1506  QObject::connect(stackWidget, SIGNAL(currentFrameChanged(int)),
1507  this, SLOT(_q_onCurrentFrameChanged(int)));
1508  }
1509 }
double d
Definition: qnumeric_p.h:62
virtual void setStackModel(QAbstractItemModel *model)=0
#define SLOT(a)
Definition: qobjectdefs.h:226
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
The QScriptDebugger class provides a Qt Script debugger.
QScriptDebuggerStackWidgetInterface * stackWidget() const

◆ setWidgetFactory()

void QScriptDebugger::setWidgetFactory ( QScriptDebuggerWidgetFactoryInterface factory)

Definition at line 1671 of file qscriptdebugger.cpp.

1672 {
1674  d->widgetFactory = factory;
1675 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ stackWidget()

QScriptDebuggerStackWidgetInterface * QScriptDebugger::stackWidget ( ) const

Definition at line 1486 of file qscriptdebugger.cpp.

Referenced by setStackWidget(), and widget().

1487 {
1488  Q_D(const QScriptDebugger);
1489  return d->stackWidget;
1490 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

◆ started

void QScriptDebugger::started ( ) const
signal

◆ stepIntoAction()

QAction * QScriptDebugger::stepIntoAction ( QObject parent) const

Definition at line 1711 of file qscriptdebugger.cpp.

Referenced by action(), and stepIntoAction().

1712 {
1713  Q_D(const QScriptDebugger);
1714  if (!d->stepIntoAction) {
1715  QIcon stepIntoIcon;
1716  stepIntoIcon.addPixmap(d->pixmap(QString::fromLatin1("stepinto.png")), QIcon::Normal);
1717  stepIntoIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepinto.png")), QIcon::Disabled);
1718  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1719  that->d_func()->stepIntoAction = new QAction(stepIntoIcon, QScriptDebugger::tr("Step Into"), parent);
1720  d->stepIntoAction->setEnabled(d->interactive);
1721  d->stepIntoAction->setShortcut(QScriptDebugger::tr("F11"));
1722  QObject::connect(d->stepIntoAction, SIGNAL(triggered()),
1723  that, SLOT(_q_stepInto()));
1724  }
1725  return d->stepIntoAction;
1726 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
QAction * stepIntoAction(QObject *parent) const
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ stepOutAction()

QAction * QScriptDebugger::stepOutAction ( QObject parent) const

Definition at line 1745 of file qscriptdebugger.cpp.

Referenced by action(), and stepOutAction().

1746 {
1747  Q_D(const QScriptDebugger);
1748  if (!d->stepOutAction) {
1749  QIcon stepOutIcon;
1750  stepOutIcon.addPixmap(d->pixmap(QString::fromLatin1("stepout.png")), QIcon::Normal);
1751  stepOutIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepout.png")), QIcon::Disabled);
1752  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1753  that->d_func()->stepOutAction = new QAction(stepOutIcon, QScriptDebugger::tr("Step Out"), parent);
1754  d->stepOutAction->setEnabled(d->interactive);
1755  d->stepOutAction->setShortcut(QScriptDebugger::tr("Shift+F11"));
1756  QObject::connect(d->stepOutAction, SIGNAL(triggered()),
1757  that, SLOT(_q_stepOut()));
1758  }
1759  return d->stepOutAction;
1760 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
QAction * stepOutAction(QObject *parent) const
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ stepOverAction()

QAction * QScriptDebugger::stepOverAction ( QObject parent) const

Definition at line 1728 of file qscriptdebugger.cpp.

Referenced by action(), and stepOverAction().

1729 {
1730  Q_D(const QScriptDebugger);
1731  if (!d->stepOverAction) {
1732  QIcon stepOverIcon;
1733  stepOverIcon.addPixmap(d->pixmap(QString::fromLatin1("stepover.png")), QIcon::Normal);
1734  stepOverIcon.addPixmap(d->pixmap(QString::fromLatin1("d_stepover.png")), QIcon::Disabled);
1735  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1736  that->d_func()->stepOverAction = new QAction(stepOverIcon, QScriptDebugger::tr("Step Over"), parent);
1737  d->stepOverAction->setEnabled(d->interactive);
1738  d->stepOverAction->setShortcut(QScriptDebugger::tr("F10"));
1739  QObject::connect(d->stepOverAction, SIGNAL(triggered()),
1740  that, SLOT(_q_stepOver()));
1741  }
1742  return d->stepOverAction;
1743 }
double d
Definition: qnumeric_p.h:62
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
QAction * stepOverAction(QObject *parent) const
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ stopped

void QScriptDebugger::stopped ( ) const
signal

◆ timerEvent()

void QScriptDebugger::timerEvent ( QTimerEvent e)
protectedvirtual

Reimplemented Function

Reimplemented from QObject.

Definition at line 1981 of file qscriptdebugger.cpp.

1982 {
1984  if (e->timerId() == d->updatesEnabledTimerId) {
1985  killTimer(d->updatesEnabledTimerId);
1986  d->updatesEnabledTimerId = -1;
1987  if (d->stackWidget)
1988  d->stackWidget->setUpdatesEnabled(true);
1989  if (d->localsWidget)
1990  d->localsWidget->setUpdatesEnabled(true);
1991  } else {
1993  }
1994 }
double d
Definition: qnumeric_p.h:62
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
Definition: qobject.cpp:1294
#define Q_D(Class)
Definition: qglobal.h:2482
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
Definition: qcoreevent.h:346
The QScriptDebugger class provides a Qt Script debugger.
void killTimer(int id)
Kills the timer with timer identifier, id.
Definition: qobject.cpp:1650

◆ toggleBreakpointAction()

QAction * QScriptDebugger::toggleBreakpointAction ( QObject parent) const

Definition at line 1796 of file qscriptdebugger.cpp.

Referenced by action(), and toggleBreakpointAction().

1797 {
1798  Q_D(const QScriptDebugger);
1799  if (!d->toggleBreakpointAction) {
1800  QIcon toggleBreakpointIcon;
1801  QScriptDebugger *that = const_cast<QScriptDebugger*>(this);
1802  that->d_func()->toggleBreakpointAction = new QAction(toggleBreakpointIcon,
1803  QScriptDebugger::tr("Toggle Breakpoint"), parent);
1804  d->toggleBreakpointAction->setShortcut(QScriptDebugger::tr("F9"));
1805  d->toggleBreakpointAction->setEnabled((d->codeWidget != 0) && (d->codeWidget->currentView() != 0));
1806  QObject::connect(d->toggleBreakpointAction, SIGNAL(triggered()),
1807  that, SLOT(_q_toggleBreakpoint()));
1808  }
1809  return d->toggleBreakpointAction;
1810 }
double d
Definition: qnumeric_p.h:62
#define SLOT(a)
Definition: qobjectdefs.h:226
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
#define Q_D(Class)
Definition: qglobal.h:2482
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
QAction * toggleBreakpointAction(QObject *parent) const
The QScriptDebugger class provides a Qt Script debugger.
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ widget()

QWidget * QScriptDebugger::widget ( DebuggerWidget  widget)

Definition at line 1384 of file qscriptdebugger.cpp.

1385 {
1386  switch (widget) {
1387  case ConsoleWidget: {
1389  if (!w && widgetFactory()) {
1391  setConsoleWidget(w);
1392  }
1393  return w;
1394  }
1395  case StackWidget: {
1397  if (!w && widgetFactory()) {
1399  setStackWidget(w);
1400  }
1401  return w;
1402  }
1403  case ScriptsWidget: {
1405  if (!w && widgetFactory()) {
1407  setScriptsWidget(w);
1408  }
1409  return w;
1410  }
1411  case LocalsWidget: {
1413  if (!w && widgetFactory()) {
1415  setLocalsWidget(w);
1416  }
1417  return w;
1418  }
1419  case CodeWidget: {
1421  if (!w && widgetFactory()) {
1423  setCodeWidget(w);
1424  }
1425  return w;
1426  }
1427  case CodeFinderWidget: {
1429  if (!w && widgetFactory()) {
1432  }
1433  return w;
1434  }
1435  case BreakpointsWidget: {
1437  if (!w && widgetFactory()) {
1440  }
1441  return w;
1442  }
1443  case DebugOutputWidget: {
1445  if (!w && widgetFactory()) {
1448  }
1449  return w;
1450  }
1451  case ErrorLogWidget: {
1453  if (!w && widgetFactory()) {
1455  setErrorLogWidget(w);
1456  }
1457  return w;
1458  }
1459  }
1460  return 0;
1461 }
QScriptDebuggerCodeFinderWidgetInterface * codeFinderWidget() const
QScriptDebuggerWidgetFactoryInterface * widgetFactory() const
virtual QScriptErrorLogWidgetInterface * createErrorLogWidget()=0
QScriptDebuggerLocalsWidgetInterface * localsWidget() const
void setScriptsWidget(QScriptDebuggerScriptsWidgetInterface *scriptsWidget)
QScriptBreakpointsWidgetInterface * breakpointsWidget() const
void setCodeFinderWidget(QScriptDebuggerCodeFinderWidgetInterface *codeFinderWidget)
void setErrorLogWidget(QScriptErrorLogWidgetInterface *errorLogWidget)
QWidget * widget(DebuggerWidget widget)
virtual QScriptDebuggerCodeFinderWidgetInterface * createCodeFinderWidget()=0
QScriptErrorLogWidgetInterface * errorLogWidget() const
virtual QScriptDebuggerScriptsWidgetInterface * createScriptsWidget()=0
QScriptDebugOutputWidgetInterface * debugOutputWidget() const
QScriptDebuggerScriptsWidgetInterface * scriptsWidget() const
void setStackWidget(QScriptDebuggerStackWidgetInterface *stackWidget)
QScriptDebuggerCodeWidgetInterface * codeWidget() const
void setConsoleWidget(QScriptDebuggerConsoleWidgetInterface *consoleWidget)
void setLocalsWidget(QScriptDebuggerLocalsWidgetInterface *localsWidget)
void setCodeWidget(QScriptDebuggerCodeWidgetInterface *codeWidget)
virtual QScriptDebugOutputWidgetInterface * createDebugOutputWidget()=0
virtual QScriptDebuggerCodeWidgetInterface * createCodeWidget()=0
virtual QScriptDebuggerStackWidgetInterface * createStackWidget()=0
virtual QScriptDebuggerLocalsWidgetInterface * createLocalsWidget()=0
void setDebugOutputWidget(QScriptDebugOutputWidgetInterface *debugOutputWidget)
virtual QScriptDebuggerConsoleWidgetInterface * createConsoleWidget()=0
QScriptDebuggerStackWidgetInterface * stackWidget() const
virtual QScriptBreakpointsWidgetInterface * createBreakpointsWidget()=0
QScriptDebuggerConsoleWidgetInterface * consoleWidget() const
void setBreakpointsWidget(QScriptBreakpointsWidgetInterface *breakpointsWidget)

◆ widgetFactory()

QScriptDebuggerWidgetFactoryInterface * QScriptDebugger::widgetFactory ( ) const

Definition at line 1665 of file qscriptdebugger.cpp.

Referenced by widget().

1666 {
1667  Q_D(const QScriptDebugger);
1668  return d->widgetFactory;
1669 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptDebugger class provides a Qt Script debugger.

The documentation for this class was generated from the following files: