TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Attributes
Tinkercell::ConsoleWindow Class Reference

Used to create an output window that can display outputs. More...

#include <ConsoleWindow.h>

Inheritance diagram for Tinkercell::ConsoleWindow:
Inheritance graph
[legend]
Collaboration diagram for Tinkercell::ConsoleWindow:
Collaboration graph
[legend]

List of all members.

Public Slots

virtual void eval (const QString &)
 send a command to the console window to be evaluated
virtual void message (const QString &)
 print a message in the output window
virtual void error (const QString &)
 print an error message in the output window
virtual void printTable (const DataTable< qreal > &dataTable)
 print a data table (tab-delimited) in the output window
virtual void printTable (const DataTable< QString > &dataTable)
 print a data table (tab-delimited) in the output window
virtual void clear ()
 clear the output window
virtual void freeze ()
 freeze the output window. Frozen window will not be responsive to commands
virtual void unfreeze ()
 unfreeze the output window. Frozen window will not be responsive to commands

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

 ConsoleWindow (MainWindow *main=0)
 constructor -- initialize main window
virtual CommandTextEditeditor ()
 the command window's editor
virtual void setInterpreter (InterpreterThread *)
 set the interpreter for the console window, e.g. new PythonInterpreterThread
InterpreterThread * interpreter () const
 get the interpreter for the console window
virtual QString lastError () const
 last error message
virtual QString lastMessage () const
 last message

Static Public Attributes

static QString Prompt
 the string used at the prompt
static QColor BackgroundColor = QColor("#000000")
 the background color for console
static QColor PlainTextColor = QColor("#FEFFEC")
 the font color for plain text
static QColor ErrorTextColor = QColor("#FF6F0F")
 the font color for error messages
static QColor OutputTextColor = QColor("#33FF00")
 the font color for outputs
static QColor TableTextColor = QColor("#FFFF00")
 the font color for table headers

Protected Attributes

CommandTextEdit commandTextEdit
 the command window
InterpreterThread * _interpreter
 the optional interpreter for processing commands

Detailed Description

Used to create an output window that can display outputs.

Definition at line 146 of file ConsoleWindow.h.


Constructor & Destructor Documentation

Tinkercell::ConsoleWindow::ConsoleWindow ( MainWindow main = 0)

constructor -- initialize main window

Definition at line 603 of file ConsoleWindow.cpp.

Here is the call graph for this function:


Member Function Documentation

void Tinkercell::ConsoleWindow::clear ( ) [virtual, slot]

clear the output window

Definition at line 740 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::commandExecuted ( const QString &  command) [signal]

the user requested to execute the given command

Here is the caller graph for this function:

void Tinkercell::ConsoleWindow::commandInterrupted ( ) [signal]

the user requested to interrupt the current process

Here is the caller graph for this function:

CommandTextEdit * Tinkercell::ConsoleWindow::editor ( ) [virtual]

the command window's editor

Definition at line 745 of file ConsoleWindow.cpp.

Here is the caller graph for this function:

void Tinkercell::ConsoleWindow::error ( const QString &  s) [virtual, slot]

print an error message in the output window

Definition at line 638 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::eval ( const QString &  s) [virtual, slot]

send a command to the console window to be evaluated

Definition at line 651 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::freeze ( ) [virtual, slot]

freeze the output window. Frozen window will not be responsive to commands

Definition at line 730 of file ConsoleWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

InterpreterThread * Tinkercell::ConsoleWindow::interpreter ( ) const

get the interpreter for the console window

Definition at line 898 of file ConsoleWindow.cpp.

QString Tinkercell::ConsoleWindow::lastError ( ) const [virtual]

last error message

Definition at line 936 of file ConsoleWindow.cpp.

QString Tinkercell::ConsoleWindow::lastMessage ( ) const [virtual]

last message

Definition at line 941 of file ConsoleWindow.cpp.

void Tinkercell::ConsoleWindow::message ( const QString &  s) [virtual, slot]

print a message in the output window

show a message text in the output window

Definition at line 625 of file ConsoleWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::ConsoleWindow::printTable ( const DataTable< QString > &  dataTable) [virtual, slot]

print a data table (tab-delimited) in the output window

Definition at line 697 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::printTable ( const DataTable< qreal > &  dataTable) [virtual, slot]

print a data table (tab-delimited) in the output window

Definition at line 664 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::setInterpreter ( InterpreterThread *  newInterpreter) [virtual]

set the interpreter for the console window, e.g. new PythonInterpreterThread

Definition at line 903 of file ConsoleWindow.cpp.

Here is the call graph for this function:

void Tinkercell::ConsoleWindow::unfreeze ( ) [virtual, slot]

unfreeze the output window. Frozen window will not be responsive to commands

Definition at line 735 of file ConsoleWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

InterpreterThread* Tinkercell::ConsoleWindow::_interpreter [protected]

the optional interpreter for processing commands

Definition at line 216 of file ConsoleWindow.h.

QColor Tinkercell::ConsoleWindow::BackgroundColor = QColor("#000000") [static]

the background color for console

Definition at line 156 of file ConsoleWindow.h.

the command window

Definition at line 214 of file ConsoleWindow.h.

QColor Tinkercell::ConsoleWindow::ErrorTextColor = QColor("#FF6F0F") [static]

the font color for error messages

Definition at line 162 of file ConsoleWindow.h.

QColor Tinkercell::ConsoleWindow::OutputTextColor = QColor("#33FF00") [static]

the font color for outputs

Definition at line 165 of file ConsoleWindow.h.

QColor Tinkercell::ConsoleWindow::PlainTextColor = QColor("#FEFFEC") [static]

the font color for plain text

Definition at line 159 of file ConsoleWindow.h.

the string used at the prompt

Definition at line 153 of file ConsoleWindow.h.

QColor Tinkercell::ConsoleWindow::TableTextColor = QColor("#FFFF00") [static]

the font color for table headers

Definition at line 168 of file ConsoleWindow.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines