SMILX
1.01
|
A simple console for python scripting with some syntax highlighting. More...
#include <milxQtPythonConsole.h>
Public Slots | |
void | executeLine (bool storeOnly) |
execute current line | |
void | keyPressEvent (QKeyEvent *e) |
derived key press event | |
void | consoleMessage (const QString &message) |
output from console | |
QStringList | history () |
get history | |
void | setHistory (const QStringList &h) |
set history | |
void | clear () |
clear the console | |
virtual void | cut () |
overridden to control which characters a user may delete | |
void | stdOut (const QString &s) |
output redirection | |
void | stdErr (const QString &s) |
output redirection | |
void | insertCompletion (const QString &) |
void | appendCommandPrompt (bool storeOnly=false) |
Appends a newline and command prompt at the end of the document. | |
Public Member Functions | |
milxQtPythonConsole (QWidget *parent, const PythonQtObjectPtr &context, Qt::WindowFlags i=0) | |
bool | hadError () |
returns true if python cerr had an error | |
void | clearError () |
returns true if python cerr had an error | |
Protected Member Functions | |
void | handleTabCompletion () |
handle the pressing of tab | |
int | commandPromptPosition () |
Returns the position of the command prompt. | |
bool | verifySelectionBeforeDeletion () |
void | setCurrentFont (const QColor &color=QColor(0, 0, 0), bool bold=false) |
Sets the current font. | |
void | changeHistory () |
change the history according to _historyPos | |
void | flushStdOut () |
flush output that was not yet printed | |
void | readSettings () |
Read settings (mainly history) More... | |
void | writeSettings () |
Write settings (mainly history) More... | |
void | createActions () |
Create all the actions for the console. | |
void | createConnections () |
Create connections for the console. | |
void | contextMenuEvent (QContextMenuEvent *currentEvent) |
context menu More... | |
Protected Attributes | |
QAction * | copyAct |
Copy action for text. | |
QAction * | cutAct |
Cut action for text. | |
QAction * | pasteAct |
Paste action for text. | |
QAction * | clearAct |
clear action for text | |
A simple console for python scripting with some syntax highlighting.
Some useful commands:
To run a script (that takes arguments) in the interactive prompt use:
Definition at line 73 of file milxQtPythonConsole.h.
|
protected |
context menu
< Only exists for the duration of the context selection
Definition at line 720 of file milxQtPythonConsole.cpp.
|
protected |
Read settings (mainly history)
Restore history
Definition at line 645 of file milxQtPythonConsole.cpp.
|
protected |
Returns if deletion is allowed at the current cursor (with and without selected text)
Definition at line 556 of file milxQtPythonConsole.cpp.
|
protected |
Write settings (mainly history)
Remember history upto 100 commands
Trim list greater than 100
Definition at line 656 of file milxQtPythonConsole.cpp.