BALL  1.5.0
geometricControl.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
6 #define BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
7 
8 #ifndef BALL_COMMON_H
9 # include <BALL/common.h>
10 #endif
11 
12 #ifndef BALL_VIEW_WIDGETS_GENERICCONTROL_H
14 #endif
15 
16 #ifndef BALL_VIEW_KERNEL_COMMON_H
17 # include <BALL/VIEW/KERNEL/common.h>
18 #endif
19 
20 #include <QtCore/QPoint>
21 #include <QtWidgets/QMenu>
22 
23 namespace BALL
24 {
25  namespace VIEW
26  {
27  class Representation;
28  class ModifyRepresentationDialog;
29  class ClippingPlane;
30  class TransformationMessage;
31 
42  : public GenericControl
43  {
44  Q_OBJECT
45 
46  public:
47 
49 
50 
53 
69  GeometricControl(QWidget* parent = 0, const char* name = 0);
70 
72  virtual ~GeometricControl();
73 
77  virtual void clear(){};
78 
80  virtual void initializeWidget(MainControl& main_control);
81 
83 
84 
87  virtual void addRepresentation(Representation& rep);
88 
92 
95  virtual void updateRepresentation(Representation& rep, bool force=false);
96 
102  std::list<Representation*> getHighlightedRepresentations() const;
103 
107  virtual void onNotify(Message *message);
108 
115  virtual void buildContextMenu();
116 
118  virtual void checkMenu(MainControl& main_control);
119 
122 
124 
125  public Q_SLOTS:
126 
128 
131 
133  virtual void renameRepresentation();
134 
136  virtual void selectAtoms();
137 
139  virtual void selectedRepresentation(Representation& representation, bool state);
140 
142  virtual void updateSelection();
143 
145  virtual void focus();
146 
148  virtual void enterMoveMode();
149 
151  virtual void flipClippingCapping();
152 
154  virtual void flipClippingPlane();
155 
157  virtual void setClippingPosition();
158 
160  virtual void setClippingPlaneX();
161 
163  virtual void setClippingPlaneY();
164 
166  virtual void setClippingPlaneZ();
167 
170 
173 
176 
178  void duplicate();
179 
181  void saveSurface();
182 
184  void loadSurface();
185 
188 
189  protected Q_SLOTS:
190 
192 
194 
196  virtual void modifyRepresentation_();
197 
201 
203  virtual void deleteCurrentItems();
204 
206  virtual void setupProximityLight();
207 
209 
210  protected Q_SLOTS:
211 
212  virtual void onItemClicked(QTreeWidgetItem* item, int col);
213  void showGuestContextMenu(const QPoint& pos);
214 
215  protected:
216 
217  void addItem_(const String& text, const char* member, QWidget* widget = 0);
218 
219  // only for Python Interface
221 
222  enum ColumnID
223  {
224  COLUMN_ID__TYPE = 0,
225  COLUMN_ID__Properties
226  };
227 
228  void setClippingPlane_(const Vector3& n);
229 
230  // the context menu
233 
236 
241 
243 
246 
247  QAction* menu_clipping_plane_, *menu_load_surface_, *modify_surface_;
248  vector<QAction*> context_menu_actions_;
249  };
250 
251 } } // namespaces
252 
253 #endif // BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
BALL::VIEW::GeometricControl::checkMenu
virtual void checkMenu(MainControl &main_control)
Overloaded from ModularWidget.
BALL::VIEW::GeometricControl::item_to_plane_
HashMap< QTreeWidgetItem *, ClippingPlane * > item_to_plane_
Definition: geometricControl.h:240
BALL::VIEW::GeometricControl::setClippingPlaneY
virtual void setClippingPlaneY()
BALL::VIEW::GeometricControl::updateClippingPlanes
void updateClippingPlanes()
BALL::VIEW::GeometricControl::setClippingPlaneZ
virtual void setClippingPlaneZ()
BALL::VIEW::GeometricControl::selectedRepresentation
virtual void selectedRepresentation(Representation &representation, bool state)
BALL::VIEW::GeometricControl::updateRepresentation
virtual void updateRepresentation(Representation &rep, bool force=false)
BALL::VIEW::GeometricControl::updateSelection
virtual void updateSelection()
BALL::VIEW::GeometricControl::onNotify
virtual void onNotify(Message *message)
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
BALL::VIEW::GeometricControl::ignore_change_
bool ignore_change_
Definition: geometricControl.h:245
BALL::VIEW::Message
Definition: message.h:53
genericControl.h
BALL::VIEW::GeometricControl::selectAtoms
virtual void selectAtoms()
BALL::VIEW::Representation
Definition: representation.h:59
BALL::VIEW::GeometricControl::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::GeometricControl::hideShowClippingPlane
void hideShowClippingPlane()
BALL::VIEW::GeometricControl::enterMoveMode
virtual void enterMoveMode()
BALL::String
Definition: string.h:57
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
BALL::VIEW::GenericControl
Definition: genericControl.h:52
BALL::VIEW::MainControl
Definition: mainControl.h:118
BALL::VIEW::GeometricControl::generateListViewItem_
virtual void generateListViewItem_(Representation &rep)
BALL::VIEW::GeometricControl::item_to_representation_
HashMap< QTreeWidgetItem *, Representation * > item_to_representation_
Definition: geometricControl.h:239
BALL
Definition: constants.h:13
BALL::VIEW::GeometricControl::renameRepresentation
virtual void renameRepresentation()
QWidget
BALL::VIEW::GeometricControl::setClippingPlaneX
virtual void setClippingPlaneX()
BALL::VIEW::TransformationMessage
Definition: message.h:736
BALL::VIEW::GeometricControl::selectClipRepresentations
virtual void selectClipRepresentations()
BALL::VIEW::GeometricControl::showGuestContextMenu
void showGuestContextMenu(const QPoint &pos)
BALL::VIEW::GeometricControl::plane_to_item_
HashMap< ClippingPlane *, QTreeWidgetItem * > plane_to_item_
Definition: geometricControl.h:238
BALL::VIEW::GeometricControl::flipClippingPlane
virtual void flipClippingPlane()
BALL::VIEW::GeometricControl::flipClippingCapping
virtual void flipClippingCapping()
BALL::VIEW::GeometricControl::modify_rep_dialog_
ModifyRepresentationDialog * modify_rep_dialog_
Definition: geometricControl.h:242
BALL::VIEW::GeometricControl::context_menu_actions_
vector< QAction * > context_menu_actions_
Definition: geometricControl.h:248
BALL::TVector3< float >
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::GeometricControl::addItem_
void addItem_(const String &text, const char *member, QWidget *widget=0)
BALL::VIEW::GeometricControl::context_representation_
Representation * context_representation_
Definition: geometricControl.h:234
BALL::VIEW::GeometricControl::clipping_plane_context_menu_
QMenu clipping_plane_context_menu_
Definition: geometricControl.h:232
BALL::VIEW::GeometricControl::context_menu_
QMenu context_menu_
Definition: geometricControl.h:231
BALL::VIEW::GeometricControl::setClippingPosition
virtual void setClippingPosition()
BALL::VIEW::GeometricControl::modifyRepresentation_
virtual void modifyRepresentation_()
BALL::VIEW::GeometricControl::loadSurface
void loadSurface()
BALL::VIEW::GeometricControl::focus
virtual void focus()
BALL::VIEW::GeometricControl::buildContextMenu
virtual void buildContextMenu()
QTreeWidgetItem
BALL::VIEW::GeometricControl::getHighlightedRepresentations
std::list< Representation * > getHighlightedRepresentations() const
BALL::VIEW::GeometricControl::context_plane_
ClippingPlane * context_plane_
Definition: geometricControl.h:235
BALL::VIEW::GeometricControl::deleteCurrentItems
virtual void deleteCurrentItems()
Overloaded from GenericControl.
common.h
common.h
BALL::VIEW::GeometricControl::onItemClicked
virtual void onItemClicked(QTreeWidgetItem *item, int col)
BALL::VIEW::GeometricControl
Definition: geometricControl.h:43
BALL::VIEW::GeometricControl::moveItems
void moveItems(const TransformationMessage &msg)
BALL::VIEW::ClippingPlane
Definition: clippingPlane.h:26
BALL::VIEW::GeometricControl::setClippingPlane_
void setClippingPlane_(const Vector3 &n)
BALL::VIEW::GeometricControl::setupProximityLight
virtual void setupProximityLight()
BALL::VIEW::GeometricControl::saveSurface
void saveSurface()
BALL::VIEW::GeometricControl::addRepresentation
virtual void addRepresentation(Representation &rep)
BALL::VIEW::GeometricControl::representation_to_item_
HashMap< Representation *, QTreeWidgetItem * > representation_to_item_
Definition: geometricControl.h:237
BALL::VIEW::GeometricControl::removeRepresentation
virtual void removeRepresentation(Representation &rep)
BALL::VIEW::GeometricControl::duplicate
void duplicate()
BALL::VIEW::GeometricControl::getModifySurfaceDialog
ModifyRepresentationDialog * getModifySurfaceDialog()
BALL::VIEW::ModifyRepresentationDialog
Definition: modifyRepresentationDialog.h:55
BALL::VIEW::GeometricControl::creating_representations_
bool creating_representations_
Definition: geometricControl.h:244
BALL::VIEW::GeometricControl::GeometricControl
GeometricControl(const GeometricControl &control)
BALL::VIEW::GeometricControl::modify_surface_
QAction * modify_surface_
Definition: geometricControl.h:247
BALL::VIEW::GeometricControl::createNewClippingPlane
void createNewClippingPlane()
BALL::VIEW::GeometricControl::ColumnID
ColumnID
Definition: geometricControl.h:223