BALL::VIEW::EditableScene Class Reference
[Modular Widgets]

#include <BALL/VIEW/WIDGETS/editableScene.h>

Inheritance diagram for BALL::VIEW::EditableScene:
Inheritance graph
[legend]

List of all members.

Classes

class  EditOperation

Public Types

enum  EditMode { EDIT__MODE = PICKING__MODE + 1 }

Public Slots

virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void wheelEvent (QWheelEvent *qmouse_event)
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 ()
 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)
void checkMenu (MainControl &main_control)
void initializePreferencesTab (Preferences &preferences)
void finalizePreferencesTab (Preferences &preferences)
virtual void applyPreferences ()
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 changeAtomElement_ ()
void createBond_ ()
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)
virtual void keyPressEvent (QKeyEvent *e)
 Catch key events.
virtual void mouseDoubleClickEvent (QMouseEvent *e)
virtual bool reactToKeyEvent_ (QKeyEvent *e)
virtual void onNotify (Message *message)
void insert_ (int x_, int y_, PDBAtom &atom_)
void merge_ (Composite *a1, Composite *a2)
TVector2< floatgetScreenPosition_ (Vector3 vec)
void getClickedItems_ (int x, int y)
void init_ ()
String getBondOrderString_ (Index order)
std::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_
QAction * bond_action_
Atomcurrent_atom_
Bondcurrent_bond_
Vector3 atom_pos_
int atomic_number_
Position atom_number_
int bond_order_
Position last_y_
Qt::MouseButtons last_buttons_
vector< EditOperationundo_
EditSettingsedit_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_

Detailed Description

Extended 3D view for editing molecules. The editing functionality is implemented as an own mode.

Definition at line 42 of file editableScene.h.


Member Enumeration Documentation

Enumerator:
EDIT__MODE 

Definition at line 89 of file editableScene.h.


Constructor & Destructor Documentation

BALL::VIEW::EditableScene::EditableScene (  ) 
BALL::VIEW::EditableScene::EditableScene ( QWidget parent_widget,
const char *  name = NULL,
Qt::WFlags  w_flags = 0 
)

Default Constructor.

BALL::VIEW::EditableScene::EditableScene ( const EditableScene eScene,
QWidget parent_widget = NULL,
const char *  name = NULL,
Qt::WFlags  wflags = 0 
)

Copy constructor.

virtual BALL::VIEW::EditableScene::~EditableScene (  )  [virtual]

Destructor.


Member Function Documentation

void BALL::VIEW::EditableScene::activatedOrderItem_ ( QAction *  action  )  [protected, slot]
void BALL::VIEW::EditableScene::addStructure ( String  name  ) 
void BALL::VIEW::EditableScene::addStructure_ (  )  [protected, slot]
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.

Parameters:
preferences the Preferences dialog of the MainControl
See also:
initializePreferencesTab
finalizePreferencesTab
applyPreferencesTab

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::atomProperties_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::changeAtomElement_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::changeBondOrder_ ( Index  delta  )  [protected]
void BALL::VIEW::EditableScene::changeBondOrder_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::changeElement_ (  )  [protected, slot]
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.

Parameters:
main_control the MainControl object whose menus should be checked
See also:
initializeWidget
finalizeWidget
checkMenus
show

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::computeBondOrders (  )  [slot]
void BALL::VIEW::EditableScene::createBond_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::createMolecule_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::createNewMolecule (  )  [slot]
void BALL::VIEW::EditableScene::deleteAtom_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::deleteBond_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::deselect_ ( bool  update = true  )  [protected]
virtual void BALL::VIEW::EditableScene::editMode_ (  )  [protected, virtual, slot]
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.

Parameters:
preferences the Preferences dialog of the MainControl

Reimplemented from BALL::VIEW::Scene.

String BALL::VIEW::EditableScene::getBondOrderString_ ( Index  order  )  [protected]
void BALL::VIEW::EditableScene::getClickedItems_ ( int  x,
int  y 
) [protected]
std::list<AtomContainer*> BALL::VIEW::EditableScene::getContainers_ (  )  [protected]
int BALL::VIEW::EditableScene::getEditElementType (  )  [slot]
TVector2<float> BALL::VIEW::EditableScene::getScreenPosition_ ( Vector3  vec  )  [protected]

Given a 3-dim. Coordinates (in Viewing Volume) getScreenPosition computes the 2-dim Coordinates on Screen.

void BALL::VIEW::EditableScene::init_ (  )  [protected]
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.

Parameters:
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:

  • 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)
    This method is called automatically immediately before the main application is started by MainControl::show().
    Parameters:
    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]

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.

virtual void BALL::VIEW::EditableScene::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

Catch key events.

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::merge_ ( Composite a1,
Composite a2 
) [protected]
virtual void BALL::VIEW::EditableScene::mouseDoubleClickEvent ( QMouseEvent e  )  [protected, virtual]

Reimplemented from BALL::VIEW::Scene.

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.

Parameters:
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.

Parameters:
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.

Parameters:
e the QT-mouse event (See QT-library for mouse events)

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::moveAtom_ (  )  [protected, slot]
void BALL::VIEW::EditableScene::newEditOperation ( EditableScene::EditOperation eo  )  [signal]
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.

Parameters:
message the pointer to the message that should be processed
See also:
ConnectionObject
Message

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::optimizeStructure (  )  [slot]
virtual bool BALL::VIEW::EditableScene::reactToKeyEvent_ ( QKeyEvent *  e  )  [protected, virtual]
void BALL::VIEW::EditableScene::renderGrid_ (  )  [protected]
void BALL::VIEW::EditableScene::saturateWithHydrogens (  )  [slot]
void BALL::VIEW::EditableScene::setCursor ( String  c  ) 
void BALL::VIEW::EditableScene::setEditElementType ( int  element_number  )  [slot]
void BALL::VIEW::EditableScene::setElementCursor (  ) 
void BALL::VIEW::EditableScene::setFormalCharge_ (  )  [protected, slot]
virtual void BALL::VIEW::EditableScene::setMode ( ModeType  mode  )  [virtual]

Reimplemented from BALL::VIEW::Scene.

void BALL::VIEW::EditableScene::showContextMenu ( QPoint  pos  ) 
virtual void BALL::VIEW::EditableScene::wheelEvent ( QWheelEvent *  qmouse_event  )  [virtual, slot]

Catch mouse wheel events and zoom the scene accordingly.

Parameters:
e the QT-mouse event (See QT-library for mouse events)

Reimplemented from BALL::VIEW::Scene.


Member Data Documentation

Definition at line 214 of file editableScene.h.

Definition at line 227 of file editableScene.h.

Definition at line 220 of file editableScene.h.

Definition at line 225 of file editableScene.h.

Definition at line 215 of file editableScene.h.

Definition at line 229 of file editableScene.h.

Definition at line 215 of file editableScene.h.

Definition at line 217 of file editableScene.h.

Definition at line 218 of file editableScene.h.

Definition at line 214 of file editableScene.h.

Definition at line 235 of file editableScene.h.

Definition at line 214 of file editableScene.h.

Definition at line 237 of file editableScene.h.

Definition at line 238 of file editableScene.h.

Qt::MouseButtons BALL::VIEW::EditableScene::last_buttons_ [protected]

Definition at line 231 of file editableScene.h.

Definition at line 230 of file editableScene.h.

Definition at line 236 of file editableScene.h.

Definition at line 214 of file editableScene.h.

Definition at line 223 of file editableScene.h.

Definition at line 214 of file editableScene.h.

Definition at line 239 of file editableScene.h.

Definition at line 241 of file editableScene.h.

Definition at line 240 of file editableScene.h.

Definition at line 234 of file editableScene.h.

Generated by  doxygen 1.6.3