|
SynchroTime
|
#include <console.h>


Signals | |
| void | getData (const QByteArray &data) |
Public Member Functions | |
| Console (QWidget *parent=0) | |
| Console::Console. More... | |
| ~Console () | |
| Console::~Console. More... | |
| void | putData (const QString &data) |
| Console::putData. More... | |
| void | setLocalEchoEnabled (bool set) |
| Console::setLocalEchoEnabled. More... | |
Protected Member Functions | |
| virtual void | keyPressEvent (QKeyEvent *e) |
| Console::keyPressEvent. More... | |
| virtual void | mousePressEvent (QMouseEvent *e) |
| Console::mousePressEvent. More... | |
| virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
| Console::mouseDoubleClickEvent. More... | |
| virtual void | contextMenuEvent (QContextMenuEvent *e) |
| Console::contextMenuEvent. More... | |
Private Member Functions | |
| const QString | formatHtml (const QString &qText, const QColor &qColor=QColor(Qt::green)) const |
| Console::formatHtml. More... | |
Private Attributes | |
| bool | localEchoEnabled |
| QByteArray * | buffer |
The Console class.
Provides the user with methods for the console interface.
|
explicit |
Standard constructor
| parent | of the type *QWidget - main application window (*MainWindow) |
References buffer.
| Console::~Console | ( | ) |
|
protectedvirtual |
| e |
|
private |
This helper function solves the formatting problem. The problem is that plain text can contain special characters that have meta-values in HTML, literally: <> & "'. This is solved by a simple formatter that converts them to their corresponding HTML entities. For example, the function converts the end of the line "\ n" to "<br/>".
| qText | of the type const QString. Block of text to convert to HTML. |
| qColor | of the type const QColor. The color for the block of text. |
Referenced by putData().

|
signal |
|
protectedvirtual |
|
protectedvirtual |
Console::mouseDoubleClickEvent.
| e |
|
protectedvirtual |
| e |
| void Console::putData | ( | const QString & | data | ) |
The function displays text in the console window, while converting escape sequences '\x1B' to colored HTML text.
| data | of the type const QString. Incoming paint-text. |
References ESC_END, ESC_START, and formatHtml().
Referenced by MainWindow::connectRTC().


| void Console::setLocalEchoEnabled | ( | bool | set | ) |
|
private |
Referenced by Console(), keyPressEvent(), and ~Console().
|
private |
Referenced by keyPressEvent(), and setLocalEchoEnabled().
1.8.11