![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Scripting/Python/Widgets/ctkPythonConsole.h>


Public Types | |
| typedef ctkConsole | Superclass |
Public Types inherited from ctkConsole | |
| enum | EditorHint { NoHints = 0x00 , AutomaticIndentation = 0x01 , RemoveTrailingSpaces = 0x02 , SplitCopiedTextByLine = 0x4 } |
| enum | RunFileOption { NoRunFileUserInterface = 0x00 , RunFileButton = 0x01 , RunFileShortcut = 0x02 } |
| typedef QWidget | Superclass |
Public Slots | |
| virtual void | reset () |
| Reset ps1 and ps2, clear the console and print the welcome message. More... | |
Public Slots inherited from ctkConsole | |
| virtual void | clear () |
| Clears the contents of the console. More... | |
| virtual void | exec (const QString &) |
| virtual void | printHelp () |
| Print the console help with shortcuts. More... | |
| virtual void | reset () |
| Clears the contents of the console and display welcome message. More... | |
| virtual void | runFile () |
| virtual void | runFile (const QString &filePath) |
Public Member Functions | |
| ctkPythonConsole (QWidget *parentObject=0) | |
| void | initialize (ctkAbstractPythonManager *newPythonManager) |
| Initialize. More... | |
| virtual QString | ps1 () const |
| Returns the string used as primary prompt. More... | |
| virtual QString | ps2 () const |
| Returns the string used as secondary prompt. More... | |
| virtual void | setPs1 (const QString &newPs1) |
| Set the string used as primary prompt. More... | |
| virtual void | setPs2 (const QString &newPs2) |
| Set the string used as secondary prompt. More... | |
| virtual | ~ctkPythonConsole () |
Public Member Functions inherited from ctkConsole | |
| void | addCompleterShortcut (const QKeySequence &key) |
| QColor | backgroundColor () const |
| QColor | commandTextColor () const |
| ctkConsoleCompleter * | completer () const |
| Return the completer of this console. More... | |
| QList< QKeySequence > | completerShortcuts () const |
| ctkConsole (QWidget *parentObject=0) | |
| int | cursorColumn () const |
| int | cursorLine () const |
| int | cursorPosition () const |
| EditorHints | editorHints () const |
| QColor | errorTextColor () const |
| QTextCharFormat | getFormat () const |
| Returns the current formatting that will be used by printMessage() More... | |
| QColor | outputTextColor () const |
| void | printMessage (const QString &message, const QColor &color) |
| Prints text on the console. More... | |
| QColor | promptColor () const |
| RunFileOptions | runFileOptions () const |
| Qt::ScrollBarPolicy | scrollBarPolicy () const |
| void | setBackgroundColor (const QColor &newColor) |
| void | setCommandTextColor (const QColor &newColor) |
| void | setCompleter (ctkConsoleCompleter *completer) |
| Set a completer for this console. More... | |
| void | setCompleterShortcuts (const QList< QKeySequence > &keys) |
| void | setEditorHints (const EditorHints &newEditorHints) |
| void | setErrorTextColor (const QColor &newColor) |
| void | setFormat (const QTextCharFormat &Format) |
| Sets formatting that will be used by printMessage() More... | |
| void | setOutputTextColor (const QColor &newColor) |
| void | setPromptColor (const QColor &newColor) |
| void | setRunFileOptions (const RunFileOptions &newOptions) |
| void | setScrollBarPolicy (const Qt::ScrollBarPolicy &newScrollBarPolicy) |
| void | setShellFont (const QFont &font) |
| Sets font of python shell. More... | |
| void | setStdinTextColor (const QColor &newColor) |
| void | setWelcomeTextColor (const QColor &newColor) |
| QFont | shellFont () const |
| Returns current font of python shell. More... | |
| QColor | stdinTextColor () const |
| QColor | welcomeTextColor () const |
| virtual | ~ctkConsole () |
Protected Member Functions | |
| virtual void | executeCommand (const QString &command) |
| Called whenever the user enters a command. More... | |
Protected Member Functions inherited from ctkConsole | |
| ctkConsole (ctkConsolePrivate *pimpl, QWidget *parentObject) | |
| QString | readInputLine () |
| Prompt the user for input. More... | |
Additional Inherited Members | |
Signals inherited from ctkConsole | |
| void | aboutToExecute (const QString &) |
| This signal emitted before and after a command is executed. More... | |
| void | cursorPositionChanged () |
| void | executed (const QString &) |
Static Public Member Functions inherited from ctkConsole | |
| static QString | stdInRedirectCallBack (void *callData) |
Protected Attributes inherited from ctkConsole | |
| QScopedPointer< ctkConsolePrivate > | d_ptr |
Properties inherited from ctkConsole | |
| QColor | backgroundColor |
| QColor | commandTextColor |
| QList< QKeySequence > | completerShortcuts |
| int | cursorColumn |
| int | cursorLine |
| int | cursorPosition |
| EditorHints | editorHints |
| QColor | errorTextColor |
| QColor | outputTextColor |
| QColor | promptColor |
| QString | ps1 |
| QString | ps2 |
| RunFileOptions | runFileOptions |
| Qt::ScrollBarPolicy | scrollBarPolicy |
| QColor | stdinTextColor |
| QColor | welcomeTextColor |
Definition at line 69 of file ctkPythonConsole.h.
Definition at line 74 of file ctkPythonConsole.h.
| ctkPythonConsole::ctkPythonConsole | ( | QWidget * | parentObject = 0 | ) |
|
virtual |
|
protectedvirtual |
Called whenever the user enters a command.
Reimplemented from ctkConsole.
| void ctkPythonConsole::initialize | ( | ctkAbstractPythonManager * | newPythonManager | ) |
Initialize.
|
virtual |
Returns the string used as primary prompt.
Reimplemented from ctkConsole.
|
virtual |
Returns the string used as secondary prompt.
Reimplemented from ctkConsole.
|
virtualslot |
Reset ps1 and ps2, clear the console and print the welcome message.
|
virtual |
Set the string used as primary prompt.
Reimplemented from ctkConsole.
|
virtual |
Set the string used as secondary prompt.
Reimplemented from ctkConsole.