![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
A command-line type text box that other tools can use for scripting interface. More...
#include <ConsoleWindow.h>
Public Slots | |
virtual void | eval (const QString &) |
evaluate a command (just emits a commandExecuted signal) | |
virtual void | error (const QString &) |
post an error message to this console text box | |
virtual void | message (const QString &) |
post a message to this console text box | |
virtual void | clearText () |
clear all text | |
virtual void | freeze () |
equivalent to setFreeze(true) | |
virtual void | unfreeze () |
equivalent to setFreeze(false) | |
virtual void | setFreeze (bool frozen=true) |
Set frozen state. The text box will not respond to user inputs while it is frozen. | |
virtual void | setBackgroundColor (const QColor &) |
set background color | |
virtual void | setPlainTextColor (const QColor &) |
set plain text color | |
virtual void | setOutputTextColor (const QColor &) |
set output message color | |
virtual void | setErrorTextColor (const QColor &) |
set error message color | |
virtual void | setTableTextColor (const QColor &) |
set table headers color | |
Signals | |
void | commandExecuted (const QString &command) |
the user requested to execute the given command | |
void | commandInterrupted () |
the user requested to interrupt the current process | |
Public Member Functions | |
CommandTextEdit (MainWindow *parent=0) | |
default constructor | |
virtual bool | isFrozen () |
Whether or not this console in the frozen state. The text box will not add or remove text while it is frozen. | |
void | setCompleter (QCompleter *c) |
set code completion | |
QCompleter * | completer () const |
code completion | |
virtual QString | lastError () const |
last error message | |
virtual QString | lastMessage () const |
last message | |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *event) |
manages the console-type interface, where the user is not allowed to type outside the >> | |
virtual void | wheelEvent (QWheelEvent *wheelEvent) |
zoom in or out using mouse wheel | |
virtual void | focusInEvent (QFocusEvent *e) |
focus returned from code completer | |
Protected Attributes | |
QStringList | historyStack |
list of previously executed commands | |
QStringList | messagesStack |
list of messages pending | |
QStringList | errorsStack |
list of errors pending | |
QString | _lastError |
last error message | |
QString | _lastOutput |
last output message | |
int | currentHistoryIndex |
current position in the history of commands | |
int | currentPosition |
current position of the cursor in the text box | |
bool | frozen |
frozen state = 0 or 1 | |
QTextCharFormat | errorFormat |
font format for error messages | |
QTextCharFormat | messageFormat |
font format for regular messages | |
QTextCharFormat | tableHeaderFormat |
font format for table headers | |
QTextCharFormat | normalFormat |
font format for user inputs | |
Friends | |
class | ConsoleWindow |
A command-line type text box that other tools can use for scripting interface.
Definition at line 37 of file ConsoleWindow.h.
Tinkercell::CommandTextEdit::CommandTextEdit | ( | MainWindow * | parent = 0 | ) |
default constructor
Definition at line 106 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::clearText | ( | ) | [virtual, slot] |
clear all text
Definition at line 235 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::commandExecuted | ( | const QString & | command | ) | [signal] |
the user requested to execute the given command
void Tinkercell::CommandTextEdit::commandInterrupted | ( | ) | [signal] |
the user requested to interrupt the current process
QCompleter * Tinkercell::CommandTextEdit::completer | ( | ) | const |
code completion
Definition at line 74 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::error | ( | const QString & | s | ) | [virtual, slot] |
post an error message to this console text box
Definition at line 176 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::eval | ( | const QString & | command | ) | [virtual, slot] |
evaluate a command (just emits a commandExecuted signal)
Definition at line 315 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::focusInEvent | ( | QFocusEvent * | e | ) | [protected, virtual] |
focus returned from code completer
Definition at line 98 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::freeze | ( | ) | [virtual, slot] |
equivalent to setFreeze(true)
Definition at line 251 of file ConsoleWindow.cpp.
bool Tinkercell::CommandTextEdit::isFrozen | ( | ) | [virtual] |
Whether or not this console in the frozen state. The text box will not add or remove text while it is frozen.
Definition at line 171 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::keyPressEvent | ( | QKeyEvent * | event | ) | [protected, virtual] |
manages the console-type interface, where the user is not allowed to type outside the >>
Definition at line 357 of file ConsoleWindow.cpp.
QString Tinkercell::CommandTextEdit::lastError | ( | ) | const [virtual] |
last error message
Definition at line 926 of file ConsoleWindow.cpp.
QString Tinkercell::CommandTextEdit::lastMessage | ( | ) | const [virtual] |
last message
Definition at line 931 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::message | ( | const QString & | s | ) | [virtual, slot] |
post a message to this console text box
Definition at line 203 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setBackgroundColor | ( | const QColor & | c | ) | [virtual, slot] |
set background color
Definition at line 25 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setCompleter | ( | QCompleter * | c | ) |
set code completion
Definition at line 57 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setErrorTextColor | ( | const QColor & | c | ) | [virtual, slot] |
set error message color
Definition at line 45 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setFreeze | ( | bool | frozen = true | ) | [virtual, slot] |
Set frozen state. The text box will not respond to user inputs while it is frozen.
Definition at line 261 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setOutputTextColor | ( | const QColor & | c | ) | [virtual, slot] |
set output message color
Definition at line 39 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setPlainTextColor | ( | const QColor & | c | ) | [virtual, slot] |
set plain text color
Definition at line 32 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::setTableTextColor | ( | const QColor & | c | ) | [virtual, slot] |
set table headers color
Definition at line 51 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::unfreeze | ( | ) | [virtual, slot] |
equivalent to setFreeze(false)
Definition at line 256 of file ConsoleWindow.cpp.
void Tinkercell::CommandTextEdit::wheelEvent | ( | QWheelEvent * | wheelEvent | ) | [protected, virtual] |
zoom in or out using mouse wheel
Definition at line 154 of file ConsoleWindow.cpp.
friend class ConsoleWindow [friend] |
Definition at line 140 of file ConsoleWindow.h.
QString Tinkercell::CommandTextEdit::_lastError [protected] |
last error message
Definition at line 98 of file ConsoleWindow.h.
QString Tinkercell::CommandTextEdit::_lastOutput [protected] |
last output message
Definition at line 100 of file ConsoleWindow.h.
int Tinkercell::CommandTextEdit::currentHistoryIndex [protected] |
current position in the history of commands
Definition at line 102 of file ConsoleWindow.h.
int Tinkercell::CommandTextEdit::currentPosition [protected] |
current position of the cursor in the text box
Definition at line 104 of file ConsoleWindow.h.
QTextCharFormat Tinkercell::CommandTextEdit::errorFormat [protected] |
font format for error messages
Definition at line 108 of file ConsoleWindow.h.
QStringList Tinkercell::CommandTextEdit::errorsStack [protected] |
list of errors pending
Definition at line 96 of file ConsoleWindow.h.
bool Tinkercell::CommandTextEdit::frozen [protected] |
frozen state = 0 or 1
Definition at line 106 of file ConsoleWindow.h.
QStringList Tinkercell::CommandTextEdit::historyStack [protected] |
list of previously executed commands
Definition at line 92 of file ConsoleWindow.h.
QTextCharFormat Tinkercell::CommandTextEdit::messageFormat [protected] |
font format for regular messages
Definition at line 110 of file ConsoleWindow.h.
QStringList Tinkercell::CommandTextEdit::messagesStack [protected] |
list of messages pending
Definition at line 94 of file ConsoleWindow.h.
QTextCharFormat Tinkercell::CommandTextEdit::normalFormat [protected] |
font format for user inputs
Definition at line 114 of file ConsoleWindow.h.
QTextCharFormat Tinkercell::CommandTextEdit::tableHeaderFormat [protected] |
font format for table headers
Definition at line 112 of file ConsoleWindow.h.