Console Widget. More...
#include <qrconsole.h>
Inheritance diagram for QRConsole:
Collaboration diagram for QRConsole:
Signals | |
void | EnterCmd (QString cmd) |
Public Member Functions | |
virtual void | keyPressEvent (QKeyEvent *e) |
QRConsole (QWidget *parent) | |
virtual void | WriteError (const RString &str) |
virtual void | WriteStr (const RString &str) |
~QRConsole (void) | |
Public Member Functions inherited from RPrgOutput | |
RPrgOutput (void) | |
virtual | ~RPrgOutput (void) |
Private Attributes | |
QList< QString > | Cmds |
QTextCursor | Cursor |
int | Pos |
Detailed Description
Console Widget.
The RQConsole class provides a Qt widget that simulates a console. It maintains a list of the last 100 different commands entered. The up and down keys are used to navigate through the history.
In particular, this widget can be used in interaction with a RInterpreter instance.
Constructor & Destructor Documentation
QRConsole | ( | QWidget * | parent | ) |
Construct the console.
- Parameters
-
parent Parent widget.
~QRConsole | ( | void | ) |
Member Function Documentation
|
virtual |
Catch the key event to simulate a real console.
- Parameters
-
e Event.
|
virtual |
|
virtual |
Write some error messages. The message is displayed in red.
- Parameters
-
str Message to print.
|
signal |
Signal emits when a command was entered.
Member Data Documentation
|
private |
Current cursor.
|
private |
Previous commands.
|
private |
Position in the list.