QScriptEngineDebugger Class Reference |
Constant | Value | Description |
---|---|---|
QScriptEngineDebugger::InterruptAction | 0 | Suspends script execution as soon as the next script statement is reached. |
QScriptEngineDebugger::ContinueAction | 1 | Gives the execution control back to the script engine. |
QScriptEngineDebugger::StepIntoAction | 2 | Performs a step action. |
QScriptEngineDebugger::StepOverAction | 3 | Performs a next action. |
QScriptEngineDebugger::StepOutAction | 4 | Executes the script until the current function returns. |
QScriptEngineDebugger::RunToCursorAction | 5 | Continues execution to the selected line (which contains the cursor) in the CodeWidget. |
QScriptEngineDebugger::RunToNewScriptAction | 6 | Returns control to the script engine until a new script is executed. |
QScriptEngineDebugger::ToggleBreakpointAction | 7 | Toggles a breakpoint at the selected line in the CodeWidget. |
QScriptEngineDebugger::ClearDebugOutputAction | 8 | Clears the contents of the DebugOutputWidget. |
QScriptEngineDebugger::ClearErrorLogAction | 9 | Clears the contents of the ErrorLogWidget. |
QScriptEngineDebugger::ClearConsoleAction | 10 | Clears the contents of the ConsoleWidget. |
QScriptEngineDebugger::FindInScriptAction | 11 | Displays the CodeFinderWidget. |
QScriptEngineDebugger::FindNextInScriptAction | 12 | Finds next occurrence in the CodeWidget. |
QScriptEngineDebugger::FindPreviousInScriptAction | 13 | Finds previous occurrence in the CodeWidget. |
QScriptEngineDebugger::GoToLineAction | 14 | Shows the "Go to Line" dialog. |
This enum decides the widget that the widget() function should retrieve. We treat these widgets in more detail in the Qt Script Debugger Manual.
Constant | Value | Description |
---|---|---|
QScriptEngineDebugger::ConsoleWidget | 0 | Provides a command-line interface to the debugger. |
QScriptEngineDebugger::StackWidget | 1 | Shows a backtrace of the script's execution state. |
QScriptEngineDebugger::ScriptsWidget | 2 | Displays a list of currently loaded scripts. |
QScriptEngineDebugger::LocalsWidget | 3 | Shows the local variables of the current stack frame. |
QScriptEngineDebugger::CodeWidget | 4 | Displays the code of the current script. |
QScriptEngineDebugger::CodeFinderWidget | 5 | Provides a widget that can search for text in the script shown in the CodeWidget. |
QScriptEngineDebugger::BreakpointsWidget | 6 | Shows breakpoints that have been set. |
QScriptEngineDebugger::DebugOutputWidget | 7 | Contains output from the print() script function. |
QScriptEngineDebugger::ErrorLogWidget | 8 | Shows error messages that have been generated. |
Constructs a new QScriptEngineDebugger object with the given parent.
To attach a QScriptEngine to the debugger, use attachTo() function.
Destroys this QScriptEngineDebugger.
Returns a pointer to the specified action. The actions available are given by the DebuggerAction enum.
With this function, you can add the actions to your own widgets, toolbars, and menus. It is also convenient if you, for example, wish to spice things up with your own groovy icons. The code example below shows how to add actions to a QToolBar.
QAction *continueAction = debugger->action(QScriptEngineDebugger::ContinueAction); QAction *stepOverAction = debugger->action(QScriptEngineDebugger::StepOverAction); QAction *stepIntoAction = debugger->action(QScriptEngineDebugger::StepIntoAction); QToolBar *toolBar = new QToolBar; toolBar->addAction(continueAction);
Note that QScriptEngineDebugger has already added the actions to its standard widgets and standard window.
See also widget(), createStandardMenu(), createStandardToolBar(), and standardWindow().
Attaches to the given engine.
The debugger will install a custom agent (using QScriptEngine::setAgent()) to monitor the engine. While the debugger is attached, you should not change the agent; however, if you do have to perform additional monitoring, you must set a proxy agent that forwards all events to the debugger's agent.
See also detach().
Returns whether the standard debugger window is automatically shown when evaluation is suspended.
The default is true.
See also setAutoShowStandardWindow().
Creates a standard debugger menu with the given parent. Returns the new menu object.
See also createStandardToolBar().
Creates a standard debugger toolbar with the given parent. Returns the new toolbar object.
See also createStandardMenu().
Detaches from the current script engine, if any.
See also attachTo().
This signal is emitted when the debugger has resumed script evaluation (e.g. the user gave the "continue" command).
See also evaluationSuspended().
This signal is emitted when the debugger has suspended script evaluation for whatever reason (e.g. due to an uncaught script exception, or due to a breakpoint being triggered).
See also evaluationResumed().
Sets whether the standard debugger window is automatically shown when evaluation is suspended. If autoShow is true, the window will be automatically shown, otherwise it will not.
See also autoShowStandardWindow().
Returns a main window with a standard configuration of the debugger's components.
See also createStandardMenu() and createStandardToolBar().
Returns a pointer to the instance of the specified standard widget. The widgets available are defined by the DebuggerWidget enum.
A main window containing all widgets is returned by standardWindow(). If you do not want to use this window, you can fetch the individual widgets with this function. For instance, the code example below shows how to set up a layout containing a code window and a stack widget.
QWidget *codeWindow = debugger->widget(QScriptEngineDebugger::CodeWidget); QWidget *stackWidget = debugger->widget(QScriptEngineDebugger::StackWidget); QLayout *layout = new QHBoxLayout; layout->addWidget(codeWindow); layout->addWidget(stackWidget);
Note that you need to set setAutoShowStandardWindow() to false; if not, the standard window will be shown regardless.
See also action(), standardWindow(), and setAutoShowStandardWindow().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.5 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com