#include <editableScene.h>
Public Types |
|
enum | EditMode { EDIT__MODE = PICKING__MODE + 1 } |
Public Slots |
|
virtual void | mousePressEvent (QMouseEvent *e) |
Catch mouse press events, store the
actual mouse position in this scene widget and sent events
accordingly. |
|
virtual void | mouseMoveEvent (QMouseEvent *e) |
Catch mouse move events, store the
actual mouse position in this scene widget and sent events
accordingly. |
|
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Catch mouse release events, store
the actual mouse position in this scene widget and sent
events accordingly. |
|
virtual void | wheelEvent (QWheelEvent *qmouse_event) |
Catch mouse wheel events and zoom
the scene accordingly. |
|
void | createNewMolecule () |
void | saturateWithHydrogens () |
void | optimizeStructure () |
void | computeBondOrders () |
void | setEditElementType (int element_number) |
int | getEditElementType () |
Signals |
|
void | newEditOperation (EditableScene::EditOperation &eo) |
Public Member Functions |
|
EditableScene (QWidget *parent_widget, const char *name=NULL, Qt::WFlags w_flags=0) | |
Default Constructor. |
|
EditableScene (const EditableScene &eScene, QWidget *parent_widget=NULL, const char *name=NULL, Qt::WFlags wflags=0) | |
Copy constructor. |
|
virtual | ~EditableScene () |
Destructor. |
|
void | initializeWidget (MainControl &main_control) |
ModularWidget methods. |
|
void | checkMenu (MainControl &main_control) |
Menu checking method. |
|
void | initializePreferencesTab (Preferences &preferences) |
Initialize a preferences tab for the
widget (if needed). |
|
void | finalizePreferencesTab (Preferences &preferences) |
Remove the preferences tab. |
|
virtual void | applyPreferences () |
Apply the preferences of the
specific tab. |
|
void | showContextMenu (QPoint pos) |
virtual void | setMode (ModeType mode) |
void | addStructure (String name) |
void | setCursor (String c) |
void | setElementCursor () |
Protected Slots |
|
virtual void | editMode_ () |
void | deleteAtom_ () |
void | changeElement_ () |
void | deleteBond_ () |
void | changeBondOrder_ () |
void | activatedOrderItem_ (QAction *action) |
void | moveAtom_ () |
void | atomProperties_ () |
void | createMolecule_ () |
void | addStructure_ () |
void | setFormalCharge_ () |
Protected Member Functions |
|
virtual void | addToolBarEntries (QToolBar *tb) |
Add the widgets actions to the
(main) toolbar. |
|
virtual void | keyPressEvent (QKeyEvent *e) |
Catch key events. |
|
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual bool | reactToKeyEvent_ (QKeyEvent *e) |
virtual void | onNotify (Message *message) |
Handles messages sent by other
registered
ConnectionObject objects. |
|
void | insert_ (int x_, int y_, PDBAtom &atom_) |
Insert a given Atom in
the
Scene. |
|
void | merge_ (Composite *a1, Composite *a2) |
TVector2< float > | getScreenPosition_ (Vector3 vec) |
Given a 3-dim. |
|
void | getClickedItems_ (int x, int y) |
void | init_ () |
String | getBondOrderString_ (Index order) |
List< AtomContainer * > | getContainers_ () |
void | changeBondOrder_ (Index delta) |
void | deselect_ (bool update=true) |
void | renderGrid_ () |
Protected Attributes |
|
QAction * | edit_id_ |
QAction * | new_molecule_action_ |
QAction * | optimize_action_ |
QAction * | add_hydrogens_action_ |
QAction * | element_action_ |
QAction * | bondorders_action_ |
Atom * | current_atom_ |
Bond * | current_bond_ |
Vector3 | atom_pos_ |
int | atomic_number_ |
Position | atom_number_ |
int | bond_order_ |
Position | last_y_ |
Qt::MouseButtons | last_buttons_ |
vector< EditOperation > | undo_ |
EditSettings * | edit_settings_ |
QPoint | menu_point_ |
FragmentDB | fragment_db_ |
bool | fragment_db_initialized_ |
bool | temp_move_ |
QToolBar * | toolbar_edit_controls_ |
QList< QAction * > | toolbar_actions_edit_controls_ |
Static Protected Attributes |
|
static bool | only_highlighted_ |
The editing functionality is implemented as an own mode.
virtual void BALL::VIEW::EditableScene::addToolBarEntries | ( | QToolBar * | main_tb | ) | [protected, virtual] |
Add the widgets actions to the (main) toolbar.
This method is needed to enable ordering the entries. It is called in Mainframe.
Reimplemented from BALL::VIEW::Scene.
virtual void BALL::VIEW::EditableScene::applyPreferences | ( | ) | [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 |
applyPreferencesTab
Reimplemented from BALL::VIEW::Scene.
void BALL::VIEW::EditableScene::checkMenu | ( | MainControl & | main_control | ) | [virtual] |
Menu checking method.
This method is called by MainControl::checkMenus before a popup menu is shown. The menus rotate mode and picking mode each will be checked if this scene is in the corresponding mode.
main_control | the MainControl object whose menus should be checked |
checkMenus
show
Reimplemented from BALL::VIEW::Scene.
void BALL::VIEW::EditableScene::finalizePreferencesTab | ( | Preferences & | preferences | ) | [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::Scene.
Given a 3-dim.
Coordinates (in Viewing Volume) getScreenPosition computes the 2-dim Coordinates on Screen.
void BALL::VIEW::EditableScene::initializePreferencesTab | ( | Preferences & | preferences | ) | [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::Scene.
void BALL::VIEW::EditableScene::initializeWidget | ( | MainControl & | main_control | ) | [virtual] |
ModularWidget methods.
Initialize the popup menu Display and the menus of this scene:
main_control | the MainControl object to be initialized with this scene |
Reimplemented from BALL::VIEW::Scene.
void BALL::VIEW::EditableScene::insert_ | ( | int | x_, | |
int | y_, | |||
PDBAtom & | atom_ | |||
) | [protected] |
virtual void BALL::VIEW::EditableScene::mouseMoveEvent | ( | QMouseEvent * | qmouse_event | ) | [virtual, slot] |
Catch mouse move events, store the actual mouse position in this scene widget and sent events accordingly.
e | the QT-mouse event (See QT-library for mouse events) |
Reimplemented from BALL::VIEW::Scene.
virtual void BALL::VIEW::EditableScene::mousePressEvent | ( | QMouseEvent * | qmouse_event | ) | [virtual, slot] |
Catch mouse press events, store the actual mouse position in this scene widget and sent events accordingly.
e | the QT-mouse event (See QT-library for mouse events) |
Reimplemented from BALL::VIEW::Scene.
virtual void BALL::VIEW::EditableScene::mouseReleaseEvent | ( | QMouseEvent * | qmouse_event | ) | [virtual, slot] |
Catch mouse release events, store the actual mouse position in this scene widget and sent events accordingly.
e | the QT-mouse event (See QT-library for mouse events) |
Reimplemented from BALL::VIEW::Scene.
virtual void BALL::VIEW::EditableScene::onNotify | ( | Message * | message | ) | [protected, virtual] |
Handles messages sent by other registered ConnectionObject objects.
Filters for SceneMessage and sets the Camera appropriate or updates the visualization.
message | the pointer to the message that should be processed |
Reimplemented from BALL::VIEW::Scene.
virtual void BALL::VIEW::EditableScene::wheelEvent | ( | QWheelEvent * | qmouse_event | ) | [virtual, slot] |
Catch mouse wheel events and zoom the scene accordingly.
e | the QT-mouse event (See QT-library for mouse events) |
Reimplemented from BALL::VIEW::Scene.