Loading...
Searching...
No Matches
editMode.h
Go to the documentation of this file.
#ifndef BALL_VIEW_KERNEL_MODES_EDITMODE_H
#define BALL_VIEW_KERNEL_MODES_EDITMODE_H
#include <BALL/VIEW/KERNEL/MODES/interactionMode.h>
#include <QtGui/QMouseEvent>
#include <vector>
namespace BALL
{
class Composite;
class FragmentDB;
class PDBAtom;
namespace VIEW
{
class EditMode : public InteractionMode
{
Q_OBJECT
public:
EditMode(Scene* scene);
virtual ~EditMode();
virtual void keyPressEvent(QKeyEvent* evt);
virtual void keyReleaseEvent(QKeyEvent* evt);
virtual void mouseDoubleClickEvent(QMouseEvent* evt);
virtual void wheelEvent(QWheelEvent* evt);
virtual void addToolBarEntries(QToolBar* tb);
virtual Qt::Key getKey() const;
virtual QString getName() const { return "EditMode"; }
virtual void activate();
virtual void populateContextMenu(QMenu* menu);
protected Q_SLOTS:
virtual void addStructure_();
virtual void setFormalCharge_();
virtual void changeBondOrder_();
virtual void activatedOrderItem_(QAction* action);
virtual void deleteCurrentBondTriggered_();
virtual void deleteCurrentAtomTriggered_();
virtual void atomPropertiesTriggered_();
virtual void changeAtomElementTriggered_();
virtual void createBond_();
protected:
bool temp_move_;
int atom_number_;
int bond_order_;
Qt::MouseButtons last_buttons_;
FragmentDB* fragment_db_;
QAction* element_action_;
QAction* bond_action_;
QAction* delete_atom_;
QAction* change_charge_;
QAction* atom_properties_;
QMenu* charge_menu_;
QMenu* order_menu_;
QMenu* add_menu_;
std::vector<QAction*> order_actions_;
virtual void mouseMoveEventImpl_ (QMouseEvent* evt);
virtual void mousePressEventImpl_ (QMouseEvent* evt);
virtual void mouseReleaseEventImpl_(QMouseEvent* evt);
void insert_(int x, int y, PDBAtom &atom);
void merge_(Composite* a1, Composite* a2);
virtual void createActions_();
private:
void checkBondOrderActions_(unsigned int bo);
void createContextMenuEntries_();
};
}
}
#endif //BALL_VIEW_KERNEL_MODES_EDITMODE_H
BALL::Composite
Definition composite.h:74
BALL::FragmentDB
Definition fragmentDB.h:45
BALL::PDBAtom
Definition PDBAtom.h:40
BALL::VIEW::EditMode::setFormalCharge_
virtual void setFormalCharge_()
BALL::VIEW::EditMode::changeBondOrder_
virtual void changeBondOrder_()
BALL::VIEW::EditMode::mouseReleaseEventImpl_
virtual void mouseReleaseEventImpl_(QMouseEvent *evt)
BALL::VIEW::EditMode::bond_action_
QAction * bond_action_
Definition editMode.h:60
BALL::VIEW::EditMode::delete_atom_
QAction * delete_atom_
Definition editMode.h:61
BALL::VIEW::EditMode::insert_
void insert_(int x, int y, PDBAtom &atom)
BALL::VIEW::EditMode::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *evt)
BALL::VIEW::EditMode::getKey
virtual Qt::Key getKey() const
BALL::VIEW::EditMode::createActions_
virtual void createActions_()
BALL::VIEW::EditMode::addToolBarEntries
virtual void addToolBarEntries(QToolBar *tb)
BALL::VIEW::EditMode::merge_
void merge_(Composite *a1, Composite *a2)
BALL::VIEW::EditMode::populateContextMenu
virtual void populateContextMenu(QMenu *menu)
BALL::VIEW::EditMode::fragment_db_
FragmentDB * fragment_db_
Definition editMode.h:58
BALL::VIEW::EditMode::addStructure_
virtual void addStructure_()
BALL::VIEW::EditMode::activate
virtual void activate()
BALL::VIEW::EditMode::createBond_
virtual void createBond_()
BALL::VIEW::EditMode::keyPressEvent
virtual void keyPressEvent(QKeyEvent *evt)
BALL::VIEW::EditMode::wheelEvent
virtual void wheelEvent(QWheelEvent *evt)
BALL::VIEW::EditMode::atom_number_
int atom_number_
Definition editMode.h:55
BALL::VIEW::EditMode::mouseMoveEventImpl_
virtual void mouseMoveEventImpl_(QMouseEvent *evt)
BALL::VIEW::EditMode::deleteCurrentAtomTriggered_
virtual void deleteCurrentAtomTriggered_()
BALL::VIEW::EditMode::getName
virtual QString getName() const
Definition editMode.h:37
BALL::VIEW::EditMode::order_menu_
QMenu * order_menu_
Definition editMode.h:65
BALL::VIEW::EditMode::changeAtomElementTriggered_
virtual void changeAtomElementTriggered_()
BALL::VIEW::EditMode::EditMode
EditMode(Scene *scene)
BALL::VIEW::EditMode::mousePressEventImpl_
virtual void mousePressEventImpl_(QMouseEvent *evt)
BALL::VIEW::EditMode::order_actions_
std::vector< QAction * > order_actions_
Definition editMode.h:67
BALL::VIEW::EditMode::element_action_
QAction * element_action_
Definition editMode.h:59
BALL::VIEW::EditMode::temp_move_
bool temp_move_
Definition editMode.h:54
BALL::VIEW::EditMode::change_charge_
QAction * change_charge_
Definition editMode.h:62
BALL::VIEW::EditMode::atomPropertiesTriggered_
virtual void atomPropertiesTriggered_()
BALL::VIEW::EditMode::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *evt)
BALL::VIEW::EditMode::last_buttons_
Qt::MouseButtons last_buttons_
Definition editMode.h:57
BALL::VIEW::EditMode::deleteCurrentBondTriggered_
virtual void deleteCurrentBondTriggered_()
BALL::VIEW::EditMode::~EditMode
virtual ~EditMode()
BALL::VIEW::EditMode::bond_order_
int bond_order_
Definition editMode.h:56
BALL::VIEW::EditMode::add_menu_
QMenu * add_menu_
Definition editMode.h:66
BALL::VIEW::EditMode::charge_menu_
QMenu * charge_menu_
Definition editMode.h:64
BALL::VIEW::EditMode::atom_properties_
QAction * atom_properties_
Definition editMode.h:63
BALL::VIEW::EditMode::activatedOrderItem_
virtual void activatedOrderItem_(QAction *action)
BALL::VIEW::InteractionMode::InteractionMode
InteractionMode(Scene *scene)
BALL::VIEW::Scene
Definition scene.h:141
QMouseEvent
interactionMode.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13