#include <editableScene.h>
Inheritance diagram for VIEW::EditableScene:
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 | 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) throw () | |
Default Constructor. | |
EditableScene (const EditableScene &eScene, QWidget *parent_widget=NULL, const char *name=NULL, Qt::WFlags wflags=0) throw () | |
Copy constructor. | |
virtual | ~EditableScene () throw () |
Destructor. | |
void | initializeWidget (MainControl &main_control) throw () |
Initialize the popup menu Display and the menus of this scene: - the rotate mode (all mouse actions are attached to rotating, translating and zooming the scene) - the picking mode (all mouse actions are attached to picking objects from the scene). | |
void | checkMenu (MainControl &main_control) throw () |
Menu checking method. | |
void | initializePreferencesTab (Preferences &preferences) throw () |
Initialize a preferences tab for the widget (if needed). | |
void | finalizePreferencesTab (Preferences &preferences) throw () |
Remove the preferences tab. | |
virtual void | applyPreferences () throw () |
Apply the preferences of the specific tab. | |
void | showContextMenu (QPoint pos) |
virtual void | setMode (ModeType mode) throw () |
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) throw () |
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) |
virtual void | paintGL () |
Render the visualization. | |
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_ |
QAction * | optimize_ |
QAction * | add_hydrogens_ |
QAction * | element_action_ |
Atom * | current_atom_ |
Bond * | current_bond_ |
Vector3 | atom_pos_ |
bool | draw_line_ |
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_ |
Static Protected Attributes | |
bool | only_highlighted_ |
The editing functionality is implemented as an own mode.
|
Add the widgets actions to the (main) toolbar. This method is needed to enable ordering the entries. It is called in Mainframe. Reimplemented from VIEW::Scene. |
|
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.
Reimplemented from VIEW::Scene. |
|
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.
Reimplemented from VIEW::Scene. |
|
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.
Reimplemented from VIEW::Scene. |
|
Given a 3-dim. Coordinates (in Viewing Volume) getScreenPosition computes the 2-dim Coordinates on Screen. |
|
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.
Reimplemented from VIEW::Scene. |
|
Initialize the popup menu Display and the menus of this scene: - the rotate mode (all mouse actions are attached to rotating, translating and zooming the scene) - the picking mode (all mouse actions are attached to picking objects from the scene).
Reimplemented from VIEW::Scene. |
|
Insert a given Atom in the Scene. Its position is specified by the 2-dim Mouseclick coordinates of the Screen, which will be translated into the 3-dim space of Viewing Volume. |
|
Catch mouse move events, store the actual mouse position in this scene widget and sent events accordingly.
Reimplemented from VIEW::Scene. |
|
Catch mouse press events, store the actual mouse position in this scene widget and sent events accordingly.
Reimplemented from VIEW::Scene. |
|
Catch mouse release events, store the actual mouse position in this scene widget and sent events accordingly.
Reimplemented from VIEW::Scene. |
|
Handles messages sent by other registered ConnectionObject objects. Filters for SceneMessage and sets the Camera appropriate or updates the visualization.
Reimplemented from VIEW::Scene. |
|
Render the visualization. Overriden qt method for rendering the visualization of this scene. This method will be called automatically every time an update is necessary. See QT-library for information concerning qglwidgets and paintGL methods and events.
Reimplemented from VIEW::Scene. |
|
Catch mouse wheel events and zoom the scene accordingly.
Reimplemented from VIEW::Scene. |