#include <molecularControl.h>
Public Slots |
|
Public slots
|
|
void | createRepresentation () |
Create a
Representation with the
DisplayProperties Dialog. |
|
void | compositeProperties () |
Composite properties dialog
requested. |
|
void | bondProperties () |
Bond
properties dialog requested. |
|
void | checkResidue () |
Check residues. |
|
void | buildBonds () |
Build bonds. |
|
void | centerCamera () |
Center the camera on a
composite. |
|
void | countItems () |
Count the molecular items and print
the info. |
|
void | showFilename () |
Show the filename from which the
composite was loaded. |
|
virtual void | updateSelection () |
Prints the filename from which a
Systems was loaded, after its selection. |
|
void | highlightSelection () |
void | highlight (const List< Composite * > &composite) |
void | cut () |
Cut the selected Composite objects and copy them into
an internal copy list. |
|
void | copy () |
Copy the selected Composite objects into an internal
copy list. |
|
void | paste () |
Paste the copied Composite objects from the internal
copy list into the Control. |
|
void | clearClipboard () |
Clear the copied Composite objects from the internal
copy list. |
|
void | select () |
Select. |
|
void | deselect () |
Deselect. |
|
void | moveItems () |
Move a composite. |
|
void | collapseAll () |
Collapse all
QListViewItem. |
|
void | expandAll () |
Expand all QListViewItem. |
|
Size | applySelector () |
Apply the BALL expression from the
QLineEdit. |
|
void | showSelectorHelp () |
Show a help dialog for the Selector. |
|
virtual void | deleteCurrentItems () |
Overloaded from
GenericControl, calls cut. |
|
virtual void | clearSelector () |
Connected to the clear selection
button. |
|
void | switchShowSecondaryStructure () |
void | showAtomOverview () |
void | showAtomOverviewForSelection () |
void | showDistance () |
void | showAngle () |
Public Member Functions |
|
Constructors and Destructor
|
|
MolecularControl (QWidget *parent=0, const char *name=0) | |
Default Constructor. |
|
virtual | ~MolecularControl () |
Destructor. |
|
Accessors: inspectors and mutators
|
|
virtual void | checkMenu (VIEW::MainControl &main_control) |
Menu checking method. |
|
void | addComposite (Composite &composite, String given_name="") |
Insert a Composite object into this Control.
|
|
Size | removeComposite (Composite &composite) |
Recursive removal of a Composite from the
Control. |
|
const List< Composite * > & | getSelection () const |
Non-mutable inspection of the
selection. |
|
virtual void | onNotify (Message *message) |
Message handling. |
|
virtual void | updateContextMenu (Composite &composite) |
Build a context menu for a Composite. |
|
virtual void | initializeWidget (MainControl &main_control) |
Initialize the menu entries:
|
|
Size | applySelector (const String &expression) |
Apply a given BALL expression.
|
|
void | writePreferences (INIFile &inifile) |
Write settings to an INIFile. |
|
void | fetchPreferences (INIFile &inifile) |
Load settings from an INIFile. |
|
void | showDistance (Atom *a1, Atom *a2) |
void | showAngle (Atom *a1, Atom *a2, Atom *a3, Atom *a4=0) |
Protected Attributes |
|
List< Composite * > | selected_ |
List< Composite * > | copy_list_ |
MolecularInformation | information_ |
QComboBox * | selector_edit_ |
QComboBox * | smarts_edit_ |
QMenu | context_menu_ |
QMenu | model_menu_ |
QMenu | edit_menu_ |
QMenu | color_menu_ [MODEL_LABEL-MODEL_LINES] |
Composite * | context_composite_ |
QTreeWidgetItem * | context_item_ |
ModelType | selected_model_ |
ColoringMethod | selected_coloring_method_ |
std::map< Composite *, MyTreeWidgetItem * > |
composite_to_item_ |
bool | was_delete_ |
Size | nr_items_removed_ |
bool | show_ss_ |
QAction * | center_camera_action_ |
QAction * | composite_properties_action_ |
QAction * | bond_propertes_action_ |
QAction * | select_action_ |
QAction * | deselect_action_ |
QAction * | count_items_action_ |
QAction * | atom_overview_ |
QAction * | atom_overview_selection_ |
QAction * | angle_action_ |
QAction * | distance_action_ |
bool | ignore_messages_ |
Menu entries ids
|
|
QAction * | cut_id_ |
QAction * | copy_id_ |
QAction * | paste_id_ |
QAction * | delete_id_ |
QAction * | clipboard_id_ |
QAction * | select_id_ |
QAction * | deselect_id_ |
QAction * | show_ss_id_ |
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) |
Set the selection of the checkboxes
and the opening of the tree according to the selection in
the
MainControl. |
|
virtual MolecularInformation & | getInformationVisitor_ () |
Access the MolecularInformation
visitor. |
|
virtual void | recurseGeneration_ (QTreeWidgetItem *item, Composite &composite) |
Iterate over the children of the
Composite and call for each the
method generateListViewItem_().
|
|
virtual bool | reactToMessages_ (Message *message) |
Message handling. |
|
QTreeWidgetItem * | generateListViewItem_ (QTreeWidgetItem *parent, Composite &composite, QString *default_name=0) |
Generate a new QTreeWidgetItem for
the given Composite. |
|
bool | pasteAllowedFor_ (Composite &composite) |
void | removeRecursive_ (QTreeWidgetItem *item) |
MolecularControl (const MolecularControl &mc) | |
List< QTreeWidgetItem * > | getAllItems_ () |
void | enableUpdates_ (bool state) |
void | newSelection_ (List< Composite * > &sel, bool selected) |
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.
BALL::VIEW::MolecularControl::MolecularControl | ( | QWidget * | parent =
0 , |
|
const char * | name =
0 |
|||
) |
Default Constructor.
parent | the parent widget | |
name | the name of this widget |
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 |
Size BALL::VIEW::MolecularControl::applySelector | ( | ) | [slot] |
Apply the BALL expression from the QLineEdit.
Size BALL::VIEW::MolecularControl::applySelector | ( | const String & | expression | ) |
Apply a given BALL expression.
virtual void BALL::VIEW::MolecularControl::checkMenu | ( | VIEW::MainControl & | main_control | ) | [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.
void BALL::VIEW::MolecularControl::copy | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::cut | ( | ) | [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.
void BALL::VIEW::MolecularControl::fetchPreferences | ( | INIFile & | inifile | ) | [virtual] |
Load settings from an INIFile.
Reimplemented from BALL::VIEW::DockWidget.
QTreeWidgetItem* BALL::VIEW::MolecularControl::generateListViewItem_ | ( | QTreeWidgetItem * | parent, | |
Composite & | composite, | |||
QString * | default_name =
0 |
|||
) | [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 |
virtual MolecularInformation& BALL::VIEW::MolecularControl::getInformationVisitor_ | ( | ) | [protected, virtual] |
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.
virtual void BALL::VIEW::MolecularControl::initializeWidget | ( | MainControl & | main_control | ) | [virtual] |
Initialize the menu entries:
main_control | the MainControl object to be initialized with this ModularWidget |
Reimplemented from BALL::VIEW::GenericControl.
virtual void BALL::VIEW::MolecularControl::onNotify | ( | Message * | message | ) | [virtual] |
Message handling.
Overridden method from ConnectionObject to handle incoming messages.
message | a pointer to a Message object |
Reimplemented from BALL::VIEW::GenericControl.
void BALL::VIEW::MolecularControl::paste | ( | ) | [slot] |
virtual bool BALL::VIEW::MolecularControl::reactToMessages_ | ( | Message * | message | ) | [protected, virtual] |
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
otherwisevirtual void BALL::VIEW::MolecularControl::recurseGeneration_ | ( | QTreeWidgetItem * | item, | |
Composite & | composite | |||
) | [protected, virtual] |
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 |
void BALL::VIEW::MolecularControl::setSelection_ | ( | bool | open, | |
bool | force =
false |
|||
) | [protected] |
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. |
virtual void BALL::VIEW::MolecularControl::updateContextMenu | ( | Composite & | composite | ) | [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 |
virtual void BALL::VIEW::MolecularControl::updateSelection | ( | ) | [virtual, slot] |
Prints the filename from which a Systems was loaded, after its selection.
Reimplemented from BALL::VIEW::GenericControl.
void BALL::VIEW::MolecularControl::writePreferences | ( | INIFile & | inifile | ) | [virtual] |
Write settings to an INIFile.
Reimplemented from BALL::VIEW::DockWidget.