#include <Libs/Widgets/ctkConsole.h>
|
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) |
|
|
QScopedPointer< ctkConsolePrivate > | d_ptr |
|
QWidget that provides an interactive console
Definition at line 67 of file ctkConsole.h.
◆ Superclass
◆ EditorHint
Enumerator |
---|
NoHints | |
AutomaticIndentation | Align cursor based an indentation of the previous command
|
RemoveTrailingSpaces | Remove trailing spaces of the entered command
|
SplitCopiedTextByLine | Copied text is split by lines and each one is executed (expected the last one)
|
Definition at line 92 of file ctkConsole.h.
◆ RunFileOption
Enumerator |
---|
NoRunFileUserInterface | |
RunFileButton | Show a button at the bottom of the console to run a file
|
RunFileShortcut | Add the shortcut CTRL+r to run a file
|
Definition at line 101 of file ctkConsole.h.
◆ ctkConsole() [1/2]
ctkConsole::ctkConsole |
( |
QWidget * |
parentObject = 0 | ) |
|
◆ ~ctkConsole()
virtual ctkConsole::~ctkConsole |
( |
| ) |
|
|
virtual |
◆ ctkConsole() [2/2]
ctkConsole::ctkConsole |
( |
ctkConsolePrivate * |
pimpl, |
|
|
QWidget * |
parentObject |
|
) |
| |
|
protected |
◆ aboutToExecute
void ctkConsole::aboutToExecute |
( |
const QString & |
| ) |
|
|
signal |
This signal emitted before and after a command is executed.
◆ addCompleterShortcut()
void ctkConsole::addCompleterShortcut |
( |
const QKeySequence & |
key | ) |
|
◆ backgroundColor()
QColor ctkConsole::backgroundColor |
( |
| ) |
const |
◆ clear
virtual void ctkConsole::clear |
( |
| ) |
|
|
virtualslot |
Clears the contents of the console.
◆ commandTextColor()
QColor ctkConsole::commandTextColor |
( |
| ) |
const |
◆ completer()
Return the completer of this console.
◆ completerShortcuts()
QList<QKeySequence> ctkConsole::completerShortcuts |
( |
| ) |
const |
◆ cursorColumn()
int ctkConsole::cursorColumn |
( |
| ) |
const |
Returns the column of the cursor within the console.
- See also
- cursorPositionChanged(int)
◆ cursorLine()
int ctkConsole::cursorLine |
( |
| ) |
const |
Returns the line of the cursor within the console.
- See also
- cursorPositionChanged(int)
◆ cursorPosition()
int ctkConsole::cursorPosition |
( |
| ) |
const |
Returns the absolute position of the cursor within the console.
- See also
- cursorPositionChanged(int)
◆ cursorPositionChanged
void ctkConsole::cursorPositionChanged |
( |
| ) |
|
|
signal |
This signal is emitted whenever the position of the cursor changed.
- See also
- cursorPosition()
◆ editorHints()
EditorHints ctkConsole::editorHints |
( |
| ) |
const |
◆ errorTextColor()
QColor ctkConsole::errorTextColor |
( |
| ) |
const |
◆ exec
virtual void ctkConsole::exec |
( |
const QString & |
| ) |
|
|
virtualslot |
Exec the contents of the last console line
- See also
- openFile(), runFile(QString)
◆ executeCommand()
virtual void ctkConsole::executeCommand |
( |
const QString & |
Command | ) |
|
|
protectedvirtual |
◆ executed
void ctkConsole::executed |
( |
const QString & |
| ) |
|
|
signal |
◆ getFormat()
QTextCharFormat ctkConsole::getFormat |
( |
| ) |
const |
◆ outputTextColor()
QColor ctkConsole::outputTextColor |
( |
| ) |
const |
◆ printHelp
virtual void ctkConsole::printHelp |
( |
| ) |
|
|
virtualslot |
Print the console help with shortcuts.
◆ printMessage()
void ctkConsole::printMessage |
( |
const QString & |
message, |
|
|
const QColor & |
color |
|
) |
| |
Prints text on the console.
◆ promptColor()
QColor ctkConsole::promptColor |
( |
| ) |
const |
◆ ps1()
virtual QString ctkConsole::ps1 |
( |
| ) |
const |
|
virtual |
◆ ps2()
virtual QString ctkConsole::ps2 |
( |
| ) |
const |
|
virtual |
◆ readInputLine()
QString ctkConsole::readInputLine |
( |
| ) |
|
|
protected |
Prompt the user for input.
◆ reset
virtual void ctkConsole::reset |
( |
| ) |
|
|
virtualslot |
Clears the contents of the console and display welcome message.
◆ runFile [1/2]
virtual void ctkConsole::runFile |
( |
| ) |
|
|
virtualslot |
Open a file dialog to select a file and run it. Shortcut: CTRL+O
- See also
- runFile(QString), exec()
◆ runFile [2/2]
virtual void ctkConsole::runFile |
( |
const QString & |
filePath | ) |
|
|
virtualslot |
Exec line by line the content of a file.
- See also
- openFile(), exec()
◆ runFileOptions()
RunFileOptions ctkConsole::runFileOptions |
( |
| ) |
const |
◆ scrollBarPolicy()
Qt::ScrollBarPolicy ctkConsole::scrollBarPolicy |
( |
| ) |
const |
◆ setBackgroundColor()
void ctkConsole::setBackgroundColor |
( |
const QColor & |
newColor | ) |
|
◆ setCommandTextColor()
void ctkConsole::setCommandTextColor |
( |
const QColor & |
newColor | ) |
|
◆ setCompleter()
Set a completer for this console.
◆ setCompleterShortcuts()
void ctkConsole::setCompleterShortcuts |
( |
const QList< QKeySequence > & |
keys | ) |
|
◆ setEditorHints()
void ctkConsole::setEditorHints |
( |
const EditorHints & |
newEditorHints | ) |
|
◆ setErrorTextColor()
void ctkConsole::setErrorTextColor |
( |
const QColor & |
newColor | ) |
|
◆ setFormat()
void ctkConsole::setFormat |
( |
const QTextCharFormat & |
Format | ) |
|
◆ setOutputTextColor()
void ctkConsole::setOutputTextColor |
( |
const QColor & |
newColor | ) |
|
◆ setPromptColor()
void ctkConsole::setPromptColor |
( |
const QColor & |
newColor | ) |
|
◆ setPs1()
virtual void ctkConsole::setPs1 |
( |
const QString & |
newPs1 | ) |
|
|
virtual |
◆ setPs2()
virtual void ctkConsole::setPs2 |
( |
const QString & |
newPs2 | ) |
|
|
virtual |
◆ setRunFileOptions()
void ctkConsole::setRunFileOptions |
( |
const RunFileOptions & |
newOptions | ) |
|
Set which options to run file are enabled. Default is RunFileShortcut.
- See also
- runFileOptions()
◆ setScrollBarPolicy()
void ctkConsole::setScrollBarPolicy |
( |
const Qt::ScrollBarPolicy & |
newScrollBarPolicy | ) |
|
◆ setShellFont()
void ctkConsole::setShellFont |
( |
const QFont & |
font | ) |
|
Sets font of python shell.
◆ setStdinTextColor()
void ctkConsole::setStdinTextColor |
( |
const QColor & |
newColor | ) |
|
◆ setWelcomeTextColor()
void ctkConsole::setWelcomeTextColor |
( |
const QColor & |
newColor | ) |
|
◆ shellFont()
QFont ctkConsole::shellFont |
( |
| ) |
const |
Returns current font of python shell.
◆ stdInRedirectCallBack()
static QString ctkConsole::stdInRedirectCallBack |
( |
void * |
callData | ) |
|
|
static |
◆ stdinTextColor()
QColor ctkConsole::stdinTextColor |
( |
| ) |
const |
◆ welcomeTextColor()
QColor ctkConsole::welcomeTextColor |
( |
| ) |
const |
◆ d_ptr
QScopedPointer<ctkConsolePrivate> ctkConsole::d_ptr |
|
protected |
◆ backgroundColor
QColor ctkConsole::backgroundColor |
|
readwrite |
◆ commandTextColor
QColor ctkConsole::commandTextColor |
|
readwrite |
◆ completerShortcuts
QList<QKeySequence> ctkConsole::completerShortcuts |
|
readwrite |
◆ cursorColumn
int ctkConsole::cursorColumn |
|
read |
◆ cursorLine
int ctkConsole::cursorLine |
|
read |
◆ cursorPosition
int ctkConsole::cursorPosition |
|
read |
◆ editorHints
EditorHints ctkConsole::editorHints |
|
readwrite |
◆ errorTextColor
QColor ctkConsole::errorTextColor |
|
readwrite |
◆ outputTextColor
QColor ctkConsole::outputTextColor |
|
readwrite |
◆ promptColor
QColor ctkConsole::promptColor |
|
readwrite |
◆ ps1
◆ ps2
◆ runFileOptions
RunFileOptions ctkConsole::runFileOptions |
|
readwrite |
◆ scrollBarPolicy
Qt::ScrollBarPolicy ctkConsole::scrollBarPolicy |
|
readwrite |
◆ stdinTextColor
QColor ctkConsole::stdinTextColor |
|
readwrite |
◆ welcomeTextColor
QColor ctkConsole::welcomeTextColor |
|
readwrite |
The documentation for this class was generated from the following file: