#include <BALL/VIEW/WIDGETS/molecularControl.h>
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.
enum BALL::VIEW::MolecularControl::MolecularMenuEntries [private] |
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. |
BALL::VIEW::MolecularControl::MolecularControl | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Default Constructor.
parent | the parent widget | |
name | the name of this widget |
virtual BALL::VIEW::MolecularControl::~MolecularControl | ( | ) | [virtual] |
Destructor.
BALL::VIEW::MolecularControl::MolecularControl | ( | const MolecularControl & | mc | ) | [protected] |
void BALL::VIEW::MolecularControl::activatedItem_ | ( | QAction * | action | ) | [protected, slot] |
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 a given BALL expression
void BALL::VIEW::MolecularControl::bondProperties | ( | ) | [slot] |
Bond properties dialog requested.
void BALL::VIEW::MolecularControl::buildBonds | ( | ) | [slot] |
Build bonds
void BALL::VIEW::MolecularControl::buildContextMenu_ | ( | ) | [protected] |
void BALL::VIEW::MolecularControl::centerCamera | ( | ) | [slot] |
Center the camera on a composite.
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::checkResidue | ( | ) | [slot] |
Check residues
void BALL::VIEW::MolecularControl::clearClipboard | ( | ) | [slot] |
Clear the copied Composite objects from the internal copy list.
virtual void BALL::VIEW::MolecularControl::clearSelector | ( | ) | [virtual, slot] |
Connected to the clear selection button.
void BALL::VIEW::MolecularControl::collapseAll | ( | ) | [slot] |
Collapse all QListViewItem.
void BALL::VIEW::MolecularControl::compositeProperties | ( | ) | [slot] |
Composite properties dialog requested.
void BALL::VIEW::MolecularControl::copy | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::countItems | ( | ) | [slot] |
Count the molecular items and print the info.
void BALL::VIEW::MolecularControl::createRepresentation | ( | ) | [slot] |
Create a Representation with the DisplayProperties Dialog.
void BALL::VIEW::MolecularControl::createRepresentation_ | ( | ) | [protected, 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.
virtual void BALL::VIEW::MolecularControl::deleteCurrentItems | ( | ) | [virtual, slot] |
Overloaded from GenericControl, calls cut.
Reimplemented from BALL::VIEW::GenericControl.
void BALL::VIEW::MolecularControl::deselect | ( | ) | [slot] |
Deselect
void BALL::VIEW::MolecularControl::enableUpdates_ | ( | bool | state | ) | [protected] |
void BALL::VIEW::MolecularControl::expandAll | ( | ) | [slot] |
Expand all QListViewItem.
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 |
List<QTreeWidgetItem*> BALL::VIEW::MolecularControl::getAllItems_ | ( | ) | [protected] |
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.
Non-mutable inspection of the selection.
void BALL::VIEW::MolecularControl::highlightSelection | ( | ) | [slot] |
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.
void BALL::VIEW::MolecularControl::moveItems | ( | ) | [slot] |
Move a composite.
void BALL::VIEW::MolecularControl::newSelection_ | ( | List< Composite * > & | sel, | |
bool | selected | |||
) | [protected] |
void BALL::VIEW::MolecularControl::onItemClicked | ( | QTreeWidgetItem * | item, | |
int | ||||
) | [protected, virtual, slot] |
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
otherwise virtual 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 |
Recursive removal of a Composite from the Control.
void BALL::VIEW::MolecularControl::removeRecursive_ | ( | QTreeWidgetItem * | item | ) | [inline, protected] |
void BALL::VIEW::MolecularControl::select | ( | ) | [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. |
void BALL::VIEW::MolecularControl::showAngle | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::showAtomOverview | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::showAtomOverviewForSelection | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::showDistance | ( | ) | [slot] |
void BALL::VIEW::MolecularControl::showFilename | ( | ) | [slot] |
Show the filename from which the composite was loaded.
void BALL::VIEW::MolecularControl::showGuestContextMenu | ( | const QPoint & | pos | ) | [protected, virtual, slot] |
Reimplemented from BALL::VIEW::DockWidget.
void BALL::VIEW::MolecularControl::showSelectorHelp | ( | ) | [slot] |
Show a help dialog for the Selector.
void BALL::VIEW::MolecularControl::switchShowSecondaryStructure | ( | ) | [slot] |
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.
friend class BondProperties [friend] |
QAction * BALL::VIEW::MolecularControl::angle_action_ [protected] |
QAction * BALL::VIEW::MolecularControl::atom_overview_ [protected] |
QAction * BALL::VIEW::MolecularControl::atom_overview_selection_ [protected] |
QAction * BALL::VIEW::MolecularControl::bond_propertes_action_ [protected] |
QAction* BALL::VIEW::MolecularControl::center_camera_action_ [protected] |
QAction * BALL::VIEW::MolecularControl::clipboard_id_ [protected] |
QMenu BALL::VIEW::MolecularControl::color_menu_[MODEL_LABEL-MODEL_LINES] [protected] |
QAction * BALL::VIEW::MolecularControl::composite_properties_action_ [protected] |
std::map<Composite*, MyTreeWidgetItem*> BALL::VIEW::MolecularControl::composite_to_item_ [protected] |
Reimplemented from BALL::VIEW::GenericControl.
QMenu BALL::VIEW::MolecularControl::context_menu_ [protected] |
QAction * BALL::VIEW::MolecularControl::copy_id_ [protected] |
List<Composite*> BALL::VIEW::MolecularControl::copy_list_ [protected] |
QAction * BALL::VIEW::MolecularControl::count_items_action_ [protected] |
QAction* BALL::VIEW::MolecularControl::cut_id_ [protected] |
QAction * BALL::VIEW::MolecularControl::delete_id_ [protected] |
QAction * BALL::VIEW::MolecularControl::deselect_action_ [protected] |
QAction * BALL::VIEW::MolecularControl::deselect_id_ [protected] |
QAction * BALL::VIEW::MolecularControl::distance_action_ [protected] |
QMenu BALL::VIEW::MolecularControl::edit_menu_ [protected] |
bool BALL::VIEW::MolecularControl::ignore_messages_ [protected] |
QMenu BALL::VIEW::MolecularControl::model_menu_ [protected] |
Size BALL::VIEW::MolecularControl::nr_items_removed_ [protected] |
QAction * BALL::VIEW::MolecularControl::paste_id_ [protected] |
QAction * BALL::VIEW::MolecularControl::select_action_ [protected] |
QAction * BALL::VIEW::MolecularControl::select_id_ [protected] |
List<Composite*> BALL::VIEW::MolecularControl::selected_ [protected] |
QComboBox* BALL::VIEW::MolecularControl::selector_edit_ [protected] |
bool BALL::VIEW::MolecularControl::show_ss_ [protected] |
QAction * BALL::VIEW::MolecularControl::show_ss_id_ [protected] |
QComboBox* BALL::VIEW::MolecularControl::smarts_edit_ [protected] |
bool BALL::VIEW::MolecularControl::was_delete_ [protected] |