BALL
1.4.79
|
#include <BALL/VIEW/WIDGETS/pyWidget.h>
Public Member Functions | |
Constructors and Destructors | |
PyWidget (QWidget *parent=0, const char *name=0) | |
PyWidget (const PyWidget &p) | |
only needed for Pyhon Interface More... | |
~PyWidget () | |
bool | isValid () const |
Is full Python support available? More... | |
![]() | |
DockWidget (QWidget *parent, const char *title=0) | |
Use this constructor! More... | |
virtual | ~DockWidget () |
void | setGuest (QWidget &guest) |
virtual void | setWidgetVisible (bool state) |
For usage with Python: More... | |
virtual void | registerForHelpSystem (const QObject *widget, const String &url) |
QGridLayout * | getGuestLayout () |
![]() | |
void | setWorkingDirFromFilename_ (String filename) |
virtual void | showHelp (const String &url) |
ModularWidget (const char *name="<ModularWidget>") | |
ModularWidget (const ModularWidget &widget) | |
virtual | ~ModularWidget () |
virtual void | destroy () |
virtual void | clear () |
QAction * | insertMenuEntry (Position parent_id, const QString &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint=QString(""), UIOperationMode::OperationMode minimal_mode=UIOperationMode::MODE_ALL) |
void | setMenuHelp (QAction *action, const String &url) |
virtual void | addToolBarEntries (QToolBar *main_tb) |
void | setIcon (QAction *action, const String &filename, bool add_to_main_toolbar=true) |
bool | lockComposites () |
bool | unlockComposites () |
Unlock the Composites. More... | |
MainControl * | getMainControl () const |
virtual void | setStatusbarText (const String &text, bool important=false) |
virtual void | setStatusbarText (const QString &text, bool important=false) |
String | getWorkingDir () |
Implemented for convenience. More... | |
void | setWorkingDir (const String &dir) |
Implemented for convenience. More... | |
FragmentDB & | getFragmentDB () const |
![]() | |
Embeddable (const String &identifier="<Embeddable>") | |
Embeddable (const Embeddable &embeddable) | |
virtual | ~Embeddable () |
void | setIdentifier (const String &identifier) |
const String & | getIdentifier () const |
void | unregisterThis () |
virtual void | registerThis () |
![]() | |
ConnectionObject () | |
virtual | ~ConnectionObject () |
void | registerConnectionObject (ConnectionObject &object) |
void | unregisterConnectionObject (ConnectionObject &object) |
bool | isConnectionObjectRegistered (const ConnectionObject &object) |
ConnectionObject * | getParent () const |
ConnectionObject * | getRoot () |
virtual void | onNotify (Message *message) |
Friends | |
class | MyLineEdit |
Additional Inherited Members | |
![]() | |
typedef std::vector< Embeddable * > | EmbeddableVector |
![]() | |
virtual void | dropEvent (QDropEvent *e) |
virtual void | dragEnterEvent (QDragEnterEvent *e) |
virtual void | showGuestContextMenu (const QPoint &) |
![]() | |
static void | registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer) |
![]() | |
DockWidget () | |
DockWidget (const DockWidget &) | |
![]() | |
void | onNotify_ (Message *message) |
void | notify_ (Message *message) |
void | notify_ (Message &message) |
![]() | |
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance) |
static void | unregisterInstance_ (const Embeddable *instance) |
static Size | countInstances_ (const std::type_info &type) |
static Embeddable * | getInstance_ (const std::type_info &type, Position index) |
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier) |
![]() | |
QWidget * | container_ |
QWidget * | guest_ |
QGridLayout * | layout_ |
![]() | |
QAction * | window_menu_entry_ |
bool | show_window_enty_ |
bool | default_visible_ |
QList< QAction * > | main_toolbar_actions_ |
Python Widget This class is a Window for a Python interpreter interface. 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.
Definition at line 142 of file pyWidget.h.
BALL::VIEW::PyWidget::PyWidget | ( | QWidget * | parent = 0 , |
const char * | name = 0 |
||
) |
Standard constructor. If the widget is part of a BALL MainControl widget, it inserts a menu entry Tools|Restart Python
into the menu bar.
parent | the parent widget |
name | the widget name |
BALL::VIEW::PyWidget::PyWidget | ( | const PyWidget & | p | ) |
only needed for Pyhon Interface
BALL::VIEW::PyWidget::~PyWidget | ( | ) |
|
slot |
|
slot |
|
protected |
|
protected |
|
virtual |
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.
preferences | the Preferences dialog of the MainControl |
Reimplemented from BALL::VIEW::ModularWidget.
Test if this ModularWidget can handle a given file format. (Overloaded from ModularWidget)
fileform | short string with the file extension (e.g. PDB) |
Reimplemented from BALL::VIEW::ModularWidget.
|
virtual |
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).
main_control | the MainControl object whose menus should be checked |
Reimplemented from BALL::VIEW::ModularWidget.
|
slot |
|
protectedvirtualslot |
|
slot |
|
protectedvirtualslot |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protectedvirtualslot |
|
virtual |
Internal state dump. Dump the current internal state of this mainControl to the output ostream s with dumping depth depth. Calls ConnectionObject::dump.
s | output stream where to output the internal state |
depth | the dumping depth |
Reimplemented from BALL::VIEW::ModularWidget.
|
slot |
|
slot |
|
virtual |
Load settings from an INIFile
Reimplemented from BALL::VIEW::DockWidget.
|
virtual |
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.
preferences | the Preferences dialog of the MainControl |
Reimplemented from BALL::VIEW::ModularWidget.
|
virtual |
Remove menu entries.
Reimplemented from BALL::VIEW::ModularWidget.
|
protected |
|
protected |
String BALL::VIEW::PyWidget::getCurrentLine | ( | ) | const |
QString BALL::VIEW::PyWidget::getCurrentScript | ( | ) |
|
protected |
|
slot |
|
protected |
|
virtualslot |
|
virtual |
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.
preferences | the Preferences dialog of the MainControl |
Reimplemented from BALL::VIEW::ModularWidget.
|
virtual |
Setup the menu entries.
Reimplemented from BALL::VIEW::DockWidget.
void BALL::VIEW::PyWidget::insertHotkey | ( | const Hotkey & | hotkey | ) |
bool BALL::VIEW::PyWidget::isInDirectMode | ( | ) | const |
|
inlinevirtual |
Is full Python support available?
Reimplemented from BALL::VIEW::ConnectionObject.
Definition at line 204 of file pyWidget.h.
|
protected |
|
slot |
Map a key to a command Modifier can be: "", Ctrl, Shift Key should be F2 - F12
|
virtualslot |
|
protected |
Print prompt. Determine the correct type of prompt and append it to the current text. The cursor is placed after the prompt and textChanged
is emitted.
Tell this ModularWidget to open a given file. (Overloaded from ModularWidget)
Reimplemented from BALL::VIEW::ModularWidget.
Run a Python script from a given file
is_current | states wheter this file is currently loaded in the editor |
Parse a and execute a given string. If silent_ is set to true, no prompts are being printed.
|
protectedvirtual |
|
protectedvirtualslot |
void BALL::VIEW::PyWidget::reactTo | ( | const QKeyEvent & | e | ) |
void BALL::VIEW::PyWidget::removeHotkey | ( | const Hotkey & | hotkey | ) |
|
protected |
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 current_line_
if this is the first time the history function is used for this specific line.
|
protectedvirtualslot |
|
slot |
|
slot |
|
virtual |
Open a dialog to select a script.
|
protected |
|
slot |
|
slot |
|
slot |
|
slot |
|
protectedvirtualslot |
|
protectedvirtual |
Start the interpreter. This method initializes the interpreter if it is not yet running. An already running interpreter is reinitialized. This method calls PyInitialize()
to create an interpreter.
|
protected |
bool BALL::VIEW::PyWidget::toAbortScript | ( | ) |
|
virtual |
Write settings to an INIFile
Reimplemented from BALL::VIEW::DockWidget.
|
friend |
Definition at line 177 of file pyWidget.h.
|
protected |
Definition at line 447 of file pyWidget.h.
|
protected |
Definition at line 427 of file pyWidget.h.
|
protected |
Definition at line 446 of file pyWidget.h.
|
protected |
Definition at line 435 of file pyWidget.h.
|
protected |
Definition at line 452 of file pyWidget.h.
|
protected |
Definition at line 427 of file pyWidget.h.
|
protected |
Definition at line 450 of file pyWidget.h.
|
protected |
Definition at line 424 of file pyWidget.h.
|
protected |
Definition at line 424 of file pyWidget.h.
|
protected |
Definition at line 439 of file pyWidget.h.
|
protected |
Definition at line 441 of file pyWidget.h.
|
protected |
Definition at line 428 of file pyWidget.h.
|
protected |
Definition at line 448 of file pyWidget.h.
|
protected |
Definition at line 426 of file pyWidget.h.
|
protected |
Definition at line 447 of file pyWidget.h.
|
protected |
Definition at line 436 of file pyWidget.h.
|
protected |
Definition at line 438 of file pyWidget.h.
|
protected |
Definition at line 437 of file pyWidget.h.
|
protected |
Definition at line 433 of file pyWidget.h.
|
protected |
Definition at line 443 of file pyWidget.h.
|
protected |
Definition at line 440 of file pyWidget.h.
|
protected |
Definition at line 449 of file pyWidget.h.
|
protected |
Definition at line 422 of file pyWidget.h.
|
protected |
Definition at line 451 of file pyWidget.h.
|
protected |
Definition at line 421 of file pyWidget.h.
|
protected |
Definition at line 450 of file pyWidget.h.
|
protected |
Definition at line 432 of file pyWidget.h.
|
protected |
Definition at line 442 of file pyWidget.h.
|
protected |
Definition at line 445 of file pyWidget.h.
|
protected |
Definition at line 423 of file pyWidget.h.
|
protected |
Definition at line 421 of file pyWidget.h.
|
protected |
Definition at line 444 of file pyWidget.h.
|
protected |
Definition at line 431 of file pyWidget.h.
|
protected |
Definition at line 425 of file pyWidget.h.
|
protected |
Definition at line 430 of file pyWidget.h.