BALL
1.4.2
|
#include <BALL/VIEW/WIDGETS/molecularControl.h>
Classes | |
class | MyTreeWidgetItem |
Public Slots | |
Public slots | |
void | createRepresentation () |
Create a Representation with the DisplayProperties Dialog. More... | |
void | compositeProperties () |
Composite properties dialog requested. More... | |
void | bondProperties () |
Bond properties dialog requested. More... | |
void | checkResidue () |
void | buildBonds () |
void | centerCamera () |
void | countItems () |
Count the molecular items and print the info. More... | |
void | showFilename () |
Show the filename from which the composite was loaded. More... | |
virtual void | updateSelection () |
void | highlightSelection () |
void | highlight (const std::list< Composite * > &composite) |
void | cut () |
void | copy () |
void | paste () |
void | clearClipboard () |
void | select () |
void | deselect () |
void | moveItems () |
Move a composite. More... | |
void | collapseAll () |
Collapse all QListViewItem. More... | |
void | expandAll () |
Expand all QListViewItem. More... | |
Size | applySelector () |
void | showSelectorHelp () |
Show a help dialog for the Selector. More... | |
virtual void | deleteCurrentItems () |
Overloaded from GenericControl, calls cut. More... | |
virtual void | clearSelector () |
Connected to the clear selection button. More... | |
void | switchShowSecondaryStructure () |
void | showAtomOverview () |
void | showAtomOverviewForSelection () |
void | showDistance () |
void | showAngle () |
Public Slots inherited from BALL::VIEW::GenericControl | |
virtual void | deleteCurrentItems () |
Called by if del is pressed. More... | |
Public Slots inherited from BALL::VIEW::DockWidget | |
virtual void | dropEvent (QDropEvent *e) |
virtual void | dragEnterEvent (QDragEnterEvent *e) |
virtual void | showGuestContextMenu (const QPoint &) |
Public Member Functions | |
Constructors and Destructor | |
MolecularControl (QWidget *parent=0, const char *name=0) | |
virtual | ~MolecularControl () |
Accessors: inspectors and mutators | |
virtual void | checkMenu (VIEW::MainControl &main_control) |
void | addComposite (Composite &composite, String given_name="") |
Size | removeComposite (Composite &composite) |
const std::list< Composite * > & | getSelection () const |
virtual void | onNotify (Message *message) |
virtual void | updateContextMenu (Composite &composite) |
virtual void | initializeWidget (MainControl &main_control) |
Size | applySelector (const String &expression) |
void | writePreferences (INIFile &inifile) |
void | fetchPreferences (INIFile &inifile) |
void | showDistance (Atom *a1, Atom *a2) |
void | showAngle (Atom *a1, Atom *a2, Atom *a3, Atom *a4=0) |
Public Member Functions inherited from BALL::VIEW::GenericControl | |
GenericControl (QWidget *parent=0, const char *name=0) | |
virtual | ~GenericControl () |
ItemList | getSelectedItems () |
QTreeWidgetItem * | addRow (const QStringList &entries) |
Public Member Functions inherited from BALL::VIEW::DockWidget | |
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 () |
Public Member Functions inherited from BALL::VIEW::ModularWidget | |
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 String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence()) |
void | setMenuHint (const String &hint) |
void | setMenuHelp (const String &url) |
virtual void | addToolBarEntries (QToolBar *main_tb) |
void | setIcon (const String &filename, bool add_to_main_toolbar=true) |
virtual void | initializePreferencesTab (Preferences &preferences) |
virtual void | finalizePreferencesTab (Preferences &preferences) |
virtual void | applyPreferences () |
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) |
More... | |
String | getWorkingDir () |
Implemented for convenience. More... | |
void | setWorkingDir (const String &dir) |
Implemented for convenience. More... | |
FragmentDB & | getFragmentDB () const |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
virtual void | finalizeWidget (MainControl &main_control) |
virtual bool | canHandle (const String &) const |
virtual bool | openFile (const String &) |
Public Member Functions inherited from BALL::Embeddable | |
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 () |
Public Member Functions inherited from BALL::VIEW::ConnectionObject | |
ConnectionObject () | |
virtual | ~ConnectionObject () |
void | registerConnectionObject (ConnectionObject &object) |
void | unregisterConnectionObject (ConnectionObject &object) |
bool | isConnectionObjectRegistered (const ConnectionObject &object) |
ConnectionObject * | getParent () const |
ConnectionObject * | getRoot () |
virtual bool | isValid () const |
Private Types | |
enum | MolecularMenuEntries { CREATE_REPRESENTATION, OBJECT__MOVE, SELECT, DESELECT, EDIT_MENU, CUT, COPY, DELETE_ENTRY, PASTE, CAMERA__CENTER, COMPOSITE__PROPERTIES, COUNT__ITEMS, BOND__PROPERTIES, COLLAPSE_ALL, EXPAND_ALL } |
Friends | |
class | BondProperties |
Protected members | |
void | showGuestContextMenu (const QPoint &pos) |
void | activatedItem_ (QAction *action) |
void | createRepresentation_ () |
void | onItemClicked (QTreeWidgetItem *item, int) |
void | buildContextMenu_ () |
void | setSelection_ (bool open, bool force=false) |
virtual MolecularInformation & | getInformationVisitor_ () |
virtual void | recurseGeneration_ (QTreeWidgetItem *item, Composite &composite) |
virtual bool | reactToMessages_ (Message *message) |
QTreeWidgetItem * | generateListViewItem_ (QTreeWidgetItem *parent, Composite &composite, QString *default_name=0) |
bool | pasteAllowedFor_ (Composite &composite) |
void | removeRecursive_ (QTreeWidgetItem *item) |
MolecularControl (const MolecularControl &mc) | |
std::list< QTreeWidgetItem * > | getAllItems_ () |
void | enableUpdates_ (bool state) |
void | newSelection_ (std::list< Composite * > &sel, bool selected) |
bool | allowPaste_ () |
Additional Inherited Members | |
Public Types inherited from BALL::VIEW::GenericControl | |
typedef QList< QTreeWidgetItem * > | ItemList |
typedef More... | |
Static Public Member Functions inherited from BALL::VIEW::ModularWidget | |
static void | registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer) |
Protected Slots inherited from BALL::VIEW::GenericControl | |
virtual void | deselectOtherControls_ () |
virtual void | updateSelection () |
virtual void | onItemClicked (QTreeWidgetItem *, int) |
Protected Member Functions inherited from BALL::VIEW::GenericControl | |
virtual void | removeItem_ (QTreeWidgetItem *item) |
Static Protected Member Functions inherited from BALL::Embeddable | |
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) |
MolecularControl is a widget to display the molecular structure of Composite objects. This class is derived from the class GenericControl and extends it for showing and modifiying molecular structures. The methods checkMenu() and buildContextMenu() are overridden for performing special molecular tasks. MolecularControl has also a QLineEdit to select Composites by BALL expressions. For further informations on this topic have a look at the class Selector.
Definition at line 45 of file molecularControl.h.
|
private |
Enumerator | |
---|---|
CREATE_REPRESENTATION |
create a new Representation |
OBJECT__MOVE | |
SELECT | |
DESELECT | |
EDIT_MENU | |
CUT | |
COPY | |
DELETE_ENTRY | |
PASTE | |
CAMERA__CENTER |
Center camera on one Composite (done in MolecularProperites) |
COMPOSITE__PROPERTIES |
Show a dialog with the atom properties. |
COUNT__ITEMS | |
BOND__PROPERTIES |
Show a dialog with the bond properties. |
COLLAPSE_ALL |
Collapse all QListViewItem. |
EXPAND_ALL |
Expand all QListViewItem. |
Definition at line 64 of file molecularControl.h.
BALL::VIEW::MolecularControl::MolecularControl | ( | QWidget * | parent = 0 , |
const char * | name = 0 |
||
) |
Default Constructor.
parent | the parent widget |
name | the name of this widget |
|
virtual |
Destructor.
|
protected |
|
protectedslot |
Insert a Composite object into this Control. If name == ""
than the Information visitor is used for determining a name for the Composite.
composite | a pointer to the Composite to be inserted into the Control |
|
protected |
Apply a given BALL expression
|
slot |
|
slot |
Bond properties dialog requested.
|
slot |
Build bonds
|
protected |
|
slot |
Center the camera on a composite.
|
virtual |
Menu checking method. This method is called by MainControl::checkMenus before a popup menu is shown. The copy menu entry is only enabled for selected System objects.
main_control | the MainControl object whose menus should be checked |
Reimplemented from BALL::VIEW::ModularWidget.
|
slot |
Check residues
|
slot |
Clear the copied Composite objects from the internal copy list.
|
virtualslot |
Connected to the clear selection button.
|
slot |
Collapse all QListViewItem.
|
slot |
Composite properties dialog requested.
|
slot |
|
slot |
Count the molecular items and print the info.
|
slot |
Create a Representation with the DisplayProperties Dialog.
|
protectedslot |
|
slot |
Cut the selected Composite objects and copy them into an internal copy list. If there are already Composite objects in the copy list they will be deleted. All Composite objects that are cutted are removed from the Control. Cuted systems are moved to the copy list. A RemovedCompositeMessage will be sent for each cutted object. After all selected objects are removed a SceneMessage will be sent to update the Scene.
|
virtualslot |
Overloaded from GenericControl, calls cut.
|
slot |
Deselect
|
protected |
|
slot |
Expand all QListViewItem.
|
virtual |
Load settings from an INIFile
Reimplemented from BALL::VIEW::DockWidget.
|
protected |
Generate a new QTreeWidgetItem for the given Composite. If default_name == 0
than a new name is created using the Information visitor accessed with the method getInformationVisitor_(). If parent == 0
than the new QTreeWidgetItem is a root item. Otherwise a new QTreeWidgetItem for is created that will be inserted into given parent. All children of composite will be inserted recursivly into the newly created item by the method recurseGeneration_().
parent | a QTreeWidgetItem into which a subtree of items will be inserted, or 0 if a new root item should be created |
composite | the Composite object whose subtree will be inserted into parent |
default_name | the name of the item |
|
protected |
|
protectedvirtual |
Access the MolecularInformation visitor. With the MolecularInformation, the names and type entries for the Items are generated. Override this method if another information visitor is needed. This method is used in the method generateListViewItem_() to retrieve certain information of the given Composite.
const std::list<Composite*>& BALL::VIEW::MolecularControl::getSelection | ( | ) | const |
Non-mutable inspection of the selection.
|
slot |
|
slot |
|
virtual |
Initialize the menu entries:
main_control | the MainControl object to be initialized with this ModularWidget |
Reimplemented from BALL::VIEW::GenericControl.
|
slot |
Move a composite.
|
protected |
|
protectedslot |
|
virtual |
Message handling. Overridden method from ConnectionObject to handle incoming messages.
message | a pointer to a Message object |
Reimplemented from BALL::VIEW::GenericControl.
|
slot |
Message handling. Catch the Message objects and react accordingly to the different messages. Override this method if new messages should be catched.
message | a pointer to the Message object |
true
if an update of the Control is necessary, false
otherwise
|
protectedvirtual |
Iterate over the children of the Composite and call for each the method generateListViewItem_().
item | a pointer to a QTreeWidgetItem to which all children of the Composite will be inserted |
composite | whose children will be inserted into item |
Recursive removal of a Composite from the Control.
|
inlineprotected |
|
slot |
Select
Set the selection of the checkboxes and the opening of the tree according to the selection in the MainControl.
open | true means, that the item tree is opend and closed according to the changes |
force | true means, that the item tree is opend and closed also if more than 50 items are selected. |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Show the filename from which the composite was loaded.
|
protectedslot |
|
slot |
Show a help dialog for the Selector.
|
slot |
|
virtual |
Build a context menu for a Composite. If the Composite has certain properties a context menu is created. This method only creates the necessary interface for derived classes. Override this method for creating other context menu entries, but call Control::buildContextMenu at the end of your method to create the standard entries. Calls insertContextMenuEntry() for each context menu entry that will be created.
composite | the Composite object for that a context menu should be created |
|
virtualslot |
Prints the filename from which a Systems was loaded, after its selection.
|
virtual |
Write settings to an INIFile
Reimplemented from BALL::VIEW::DockWidget.
|
friend |
Definition at line 98 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 432 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 443 of file molecularControl.h.
|
protected |
Definition at line 437 of file molecularControl.h.
|
protected |
Definition at line 439 of file molecularControl.h.
|
protected |
Definition at line 432 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 424 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 432 of file molecularControl.h.
|
protected |
Definition at line 455 of file molecularControl.h.
|
protected |
Definition at line 426 of file molecularControl.h.
|
protected |
Definition at line 432 of file molecularControl.h.
|
protected |
Definition at line 448 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 451 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 423 of file molecularControl.h.
|
protected |
Definition at line 442 of file molecularControl.h.
|
protected |
Definition at line 441 of file molecularControl.h.
|
protected |
Definition at line 428 of file molecularControl.h.
|
protected |
Definition at line 450 of file molecularControl.h.
|
protected |
Definition at line 418 of file molecularControl.h.
|
protected |
Definition at line 429 of file molecularControl.h.
|
protected |
Definition at line 446 of file molecularControl.h.