46 #include <private/qobject_p.h> 48 #include <QtCore/qsettings.h> 49 #include <QtGui/qapplication.h> 50 #include <QtGui/qdockwidget.h> 51 #include <QtGui/qmainwindow.h> 52 #include <QtGui/qmenubar.h> 53 #include <QtGui/qboxlayout.h> 260 void _q_showStandardWindow();
262 void createDebugger();
266 #ifndef QT_NO_MAINWINDOW 276 class WidgetClosedNotifier :
public QObject 311 #ifndef QT_NO_MAINWINDOW 321 #ifndef QT_NO_MAINWINDOW 322 if (standardWindow) {
324 QByteArray geometry = standardWindow->saveGeometry();
326 QByteArray state = standardWindow->saveState();
328 if (standardWindow->parent() == 0)
329 delete standardWindow;
334 #ifndef QT_NO_MAINWINDOW 338 (void)q->standardWindow();
339 standardWindow->show();
350 q,
SIGNAL(evaluationResumed()));
352 q,
SIGNAL(evaluationSuspended()));
355 q,
SLOT(_q_showStandardWindow()));
401 d->frontend->attachTo(engine);
402 d->debugger->setFrontend(
d->frontend);
414 d->frontend->detach();
416 d->debugger->setFrontend(0);
460 return d->debugger->widget(static_cast<QScriptDebugger::DebuggerWidget>(static_cast<int>(widget)));
483 that->d_func()->createDebugger();
484 return d->debugger->action(static_cast<QScriptDebugger::DebuggerAction>(static_cast<int>(action)), that);
507 if (autoShow ==
d->autoShow)
511 this,
SLOT(_q_showStandardWindow()));
514 this,
SLOT(_q_showStandardWindow()));
516 d->autoShow = autoShow;
525 #ifndef QT_NO_MAINWINDOW 529 if (
d->standardWindow)
530 return d->standardWindow;
583 #ifndef QT_NO_MENUBAR 622 WidgetClosedNotifier *closedNotifier =
new WidgetClosedNotifier(win, that);
629 #endif // QT_NO_MAINWINDOW 641 return d->debugger->createStandardMenu(parent,
this);
650 #ifndef QT_NO_TOOLBAR 655 return d->debugger->createStandardToolBar(parent,
this);
686 #include "qscriptenginedebugger.moc" 688 #include "moc_qscriptenginedebugger.cpp" The QVariant class acts like a union for the most common Qt data types.
QToolBar * createStandardToolBar(QWidget *parent=0)
Creates a standard debugger toolbar with the given parent.
void setValue(const QString &key, const QVariant &value)
Sets the value of setting key to value.
QScriptEngineDebuggerFrontend * frontend
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns the value for setting key.
QScriptEngineDebugger(QObject *parent=0)
Constructs a new QScriptEngineDebugger object with the given parent.
DebuggerWidget
This enum decides the widget that the widget() function should retrieve.
void setCentralWidget(QWidget *widget)
Sets the given widget to be the main window's central widget.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
DebuggerAction
This enum specifies the action that the action() function should retrieve.
static void initScriptEngineDebuggerResources()
QWidget * widget(DebuggerWidget widget) const
Returns a pointer to the instance of the specified standard widget.
The QSettings class provides persistent platform-independent application settings.
bool autoShowStandardWindow() const
Returns whether the standard debugger window is automatically shown when evaluation is suspended...
The QByteArray class provides an array of bytes.
void setAutoShowStandardWindow(bool autoShow)
Sets whether the standard debugger window is automatically shown when evaluation is suspended...
QMainWindow * standardWindow
The QScriptEngineDebugger class provides a QScriptEngine debugger.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
DebuggerState
This enum specifies the current state of the debugger.
The QObject class is the base class of all Qt objects.
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=0)
Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment...
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
void setObjectName(const QString &name)
~QScriptEngineDebugger()
Destroys this QScriptEngineDebugger.
The QScriptEngine class provides an environment for evaluating Qt Script code.
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_INIT_RESOURCE(name)
bool restoreState(const QByteArray &state, int version=0)
Restores the state of this mainwindow's toolbars and dockwidgets.
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...
~QScriptEngineDebuggerPrivate()
QtScriptDebuggerResourceInitializer()
void tabifyDockWidget(QDockWidget *first, QDockWidget *second)
Moves second dock widget on top of first dock widget, creating a tabbed docked area in the main windo...
The QScriptEngineDebuggerFrontend class provides an in-process debugger frontend. ...
QMenuBar * menuBar() const
Returns the menu bar for the main window.
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.
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget)
Adds the given dockwidget to the specified area.
#define Q_DECLARE_PUBLIC(Class)
void addToolBar(Qt::ToolBarArea area, QToolBar *toolbar)
Adds the toolbar into the specified area in this main window.
static QCoreApplication * instance()
Returns a pointer to the application's QCoreApplication (or QApplication) instance.
QAction * action(DebuggerAction action) const
Returns a pointer to the specified action.
QObject * parent() const
Returns a pointer to the parent object.
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
The QMainWindow class provides a main application window.
QMainWindow * standardWindow() const
Returns a main window with a standard configuration of the debugger's components. ...
The QScriptDebugger class provides a Qt Script debugger.
void _q_showStandardWindow()
static QtScriptDebuggerResourceInitializer resourceInitializer
The QVBoxLayout class lines up widgets vertically.
QScriptEngineDebuggerPrivate()
void detach()
Detaches from the current script engine, if any.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
void setUnifiedTitleAndToolBarOnMac(bool set)
void attachTo(QScriptEngine *engine)
Attaches to the given engine.
QMenu * createStandardMenu(QWidget *parent=0)
Creates a standard debugger menu with the given parent.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
The QAction class provides an abstract user interface action that can be inserted into widgets...
void evaluationSuspended()
This signal is emitted when the debugger has suspended script evaluation for whatever reason (e...
QScriptDebugger * debugger
DebuggerState state() const
Returns the current state of the debugger.