#include <pyWidget.h>
Inheritance diagram for VIEW::PyWidget:
ModularWidget related methods | |
virtual void | initializeWidget (MainControl &main_control) throw () |
Setup the menu entries. | |
virtual void | finalizeWidget (MainControl &main_control) throw () |
Remove menu entries. | |
void | initializePreferencesTab (Preferences &preferences) throw () |
Initialize a preferences tab for the widget (if needed). | |
void | finalizePreferencesTab (Preferences &preferences) throw () |
Remove the preferences tab. | |
virtual void | applyPreferences () throw () |
Apply the preferences of the specific tab. | |
virtual void | scriptDialog (bool run=false) |
Open a dialog to select a script. | |
bool | toAbortScript () throw () |
void | map (String modifier, String key, String command, String comment="") |
Map a key to a command Modifier can be: "", Ctrl, Shift Key should be F2 - F12. | |
void | unmap (String modifier, String key) |
see above | |
void | insertHotkey (const Hotkey &hotkey) throw () |
void | removeHotkey (const Hotkey &hotkey) throw () |
void | reactTo (const QKeyEvent &e) throw () |
virtual bool | canHandle (const String &fileformat) const |
Test if this ModularWidget can handle a given file format. | |
virtual bool | openFile (const String &filename) |
Tell this ModularWidget to open a given file. | |
bool | openFile (const String &filename, bool run, bool is_current=false) throw () |
Run a Python script from a given file. | |
bool | runString (String command) |
String | getCurrentLine () const |
void | dump (std::ostream &s, Size depth) const throw () |
Internal state dump. | |
void | showClassDocu (String classname, String member) |
virtual void | fetchPreferences (INIFile &inifile) throw () |
Load settings from an INIFile. | |
virtual void | writePreferences (INIFile &inifile) throw () |
Write settings to an INIFile. | |
void | checkMenu (MainControl &main_control) throw () |
Menu checking method. | |
QString | getCurrentScript () |
bool | isInDirectMode () const |
void | showEditContextMenu (const QPoint &point) |
void | showContextMenu (const QPoint &point) |
void | showCompletion () |
void | clear () throw () |
Explicit default initialization. | |
void | exportHistory () |
void | abortScript () |
void | showDocumentation () |
bool | runCurrentScript () |
void | loadScript () |
void | execScript () |
void | saveScript () |
void | clearScript () |
virtual void | hotkeyItem () |
virtual void | modifyHotkeys () |
void | appendText (const String &text, bool output=false, bool state_message=false) |
bool | getMembers (const String &classname, QStringList &sl, const String &prefix) |
bool | getClassAndMember_ (String toc) |
void | setError_ (bool state) |
virtual void | startInterpreter () |
Start the interpreter. | |
virtual void | paste () |
bool | parseLine_ (String line) |
Parse a and execute a given string. If silent_ is set to true, no prompts are being printed. | |
void | appendToHistory_ (const String &line) |
void | newPrompt_ () |
Print prompt. | |
bool | testMultilineStart_ (const String &line) |
const char * | getPrompt_ () const |
bool | storeScript_ () |
String | runCommand_ (const String &command, bool &state) |
void | appendText_ (QTextEdit *te, String text) |
void | retrieveHistoryLine_ (Position index) |
Replace the line the cursor is in with a line from the history. | |
virtual void | contentsDragEnterEvent (QDragEnterEvent *e) |
virtual void | contentsDropEvent (QDropEvent *e) |
bool | keyPressed (QKeyEvent *e) |
void | createMenuHelpEntry_ (QMenu *menu, QTextEdit *text_edit, const QPoint &point) |
void | findError_ (String result) |
String | getCurrentWord_ (QTextCursor &text_cursor) |
QComboBox * | getCompletionBox_ () |
List< Hotkey >::Iterator | findKey_ (Hotkey &hotkey) |
QTextEdit * | text_edit_ |
QTextEdit * | script_output_ |
MyTextEdit * | script_edit_ |
QTabWidget * | tab_widget_ |
PythonHighlighter | highlighter_1_ |
PythonHighlighter | highlighter_2_ |
MyLineEdit * | line_edit_ |
QComboBox * | combo_box_ |
QComboBox * | editor_combo_box_ |
List< Hotkey > | hotkeys_ |
String | working_dir_ |
bool | valid_ |
bool | started_startup_script_ |
Preferences * | preferences_ |
Position | current_line_ |
bool | multi_line_mode_ |
Size | multi_lines_ |
String | multi_line_text_ |
vector< String > | history_ |
vector< bool > | results_ |
Position | history_position_ |
String | startup_script_ |
PythonSettings * | python_settings_ |
RunPythonThread * | thread_ |
bool | stop_script_ |
Size | complete_prefix_ |
String | class_ |
String | member_ |
Position | intend_ |
bool | running_ |
bool | silent_ |
bool | full_silent_ |
bool | script_mode_ |
String | current_script_ |
virtual bool | returnPressed () |
virtual bool | completionSelected_ () |
virtual void | showHelp_ () |
virtual void | printCursorPosition_ () |
virtual void | createScript_ () |
virtual void | clearHistory_ () |
Public Member Functions | |
Constructors and Destructors | |
PyWidget (QWidget *parent=0, const char *name=0) throw () | |
Standard constructor. | |
PyWidget (const PyWidget &p) throw () | |
only needed for Pyhon Interface | |
bool | isValid () const throw () |
Is full Python support available? | |
Friends | |
class | MyLineEdit |
So it is possible to access all data in the running application in realtime with the script language. PyWidget also has the capablities to run a Python script from a file at startup, or on demand from the user.
|
Standard constructor.
If the widget is part of a BALL MainControl widget, it inserts a menu entry
|
|
Apply the preferences of the specific tab. In this method the widget can extract any changed values from its preferences tab (if required). This method is called automatically by the applyPreferencesTab from the MainControl object if the apply button in the Preferences dialog is pressed.
Reimplemented from VIEW::ModularWidget. |
|
Test if this ModularWidget can handle a given file format. (Overloaded from ModularWidget)
Reimplemented from VIEW::ModularWidget. |
|
Menu checking method. This method is called MainControl::checkMenus before a popup menu is shown. It should be used to update the state of menu entries (e.g. disable or enable entries).
Reimplemented from VIEW::ModularWidget. |
|
Explicit default initialization. Currently does nothing. Reimplemented from VIEW::ModularWidget. |
|
Internal state dump. Dump the current internal state of this mainControl to the output ostream s with dumping depth depth. Calls ConnectionObject::dump.
Reimplemented from VIEW::ModularWidget. |
|
Load settings from an INIFile.
Reimplemented from VIEW::DockWidget. |
|
Remove the preferences tab. This method can remove a preferences widget (if created in initializePreferencesTab) from the Preferences dialog of the MainControl. This method is called automatically by MainControl::aboutToExit() at the end of the application.
Reimplemented from VIEW::ModularWidget. |
|
Remove menu entries.
Reimplemented from VIEW::ModularWidget. |
|
Initialize a preferences tab for the widget (if needed). This method can be used to create preferences widgets that can be inserted into the Preferences dialog with the method insertTab. This method is called automatically by MainControl::show at the start of the application.
Reimplemented from VIEW::ModularWidget. |
|
Setup the menu entries.
Reimplemented from VIEW::DockWidget. |
|
Print prompt.
Determine the correct type of prompt and append it to the current text. The cursor is placed after the prompt and |
|
Run a Python script from a given file.
|
|
Tell this ModularWidget to open a given file. (Overloaded from ModularWidget)
Reimplemented from VIEW::ModularWidget. |
|
Replace the line the cursor is in with a line from the history.
Used to display text from the history (cursor down/up). The previous content of the line is stored in |
|
Start the interpreter.
This method initializes the interpreter if it is not yet running. An already running interpreter is reinitialized. This method calls |
|
Write settings to an INIFile.
Reimplemented from VIEW::DockWidget. |