BALL  1.5.0
modifyRepresentationDialog.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_DIALOGS_MODIFYSURFACEDIALOG_H
6 #define BALL_VIEW_DIALOGS_MODIFYSURFACEDIALOG_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
14 #endif
15 
16 #ifndef BALL_VIEW_PRIMITIVES_MESH_H
18 #endif
19 
20 #ifndef BALL_VIEW_KERNEL_REPRESENTATION_H
22 #endif
23 
24 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
26 #endif
27 
28 #ifndef BALL_DATATYPE_REGULARDATA3D
30 #endif
31 
32 #ifndef BALL_DATATYPE_HASHGRID_H
33 # include <BALL/DATATYPE/hashGrid.h>
34 #endif
35 
36 #ifndef BALL_VIEW_DIALOG_MATERIALSETTINGS_H
38 #endif
39 
40 #include <BALL/VIEW/UIC/ui_modifyRepresentationDialog.h>
41 
42 namespace BALL
43 {
44  namespace VIEW
45  {
52  : public QDialog,
53  public Ui_ModifyRepresentationDialogData,
54  public ModularWidget
55  {
56  Q_OBJECT
57 
58  public:
59 
61 
62 
64  bool modal = false, Qt::WindowFlags fl = 0);
65 
68 
70  virtual void onNotify(Message *message);
71 
73  void setRepresentation(Representation* rep);
74 
76  void setGrid(RegularData3D* grid);
77 
79  void setMinValue(float value);
80 
82  void setMaxValue(float value);
83 
85  void setMidValue(float value);
86 
88  void setSplitRadius(float distance);
89 
91  void setMode(Position pos);
92 
93  public Q_SLOTS:
94 
95  void accept();
96  void tabChanged();
97  void autoScale();
98  void choosePressed();
99  void gridSelected();
100  void show();
101  void applySplit();
102 
103  protected Q_SLOTS:
104 
105  void customColorTransparencyChanged();
106  void changeDrawingModeTransparencyChanged();
107  void splitMethodChanged();
108 
109  protected:
110 
112 
113  typedef HashGrid3<const Atom*> AtomGrid;
114  typedef HashGridBox3<const Atom*> AtomBox;
115  void colorByCustomColor_();
116  bool colorByGrid_();
117  bool insertGrid_(RegularData3D& grid, const String& name);
118  void removeGrid_(RegularData3D& grid);
119  void invalidateGrid_();
120  void invalidateMesh_();
121  void changeDrawingMode_();
122  void checkApplyButton_();
123 
124  void calculateIncludedVertices_(vector<bool>& include_vertex, const Mesh& org_mesh, HashSet<const Composite*>& roots);
125  inline bool checkInclude_(const AtomGrid& atom_grid, const Vector3& point) const;
126 
128  float square_distance_;
129 
130  ColorRGBA selected_color, min_min_color, min_color, mid_color, max_color, max_max_color;
131 
133  std::list<RegularData3D*> grid_list_;
134  vector<Vector3> vertices_;
135  MaterialSettings* material_settings_;
136  };
137 
138  } // namespace VIEW
139 } // namespace BALL
140 
141 #endif
global.h
BALL::VIEW::MaterialSettings
Definition: materialSettings.h:37
BALL::TRegularData3D< float >
mesh.h
QDialog
BALL::VIEW::Message
Definition: message.h:53
BALL::Atom
Definition: atom.h:90
BALL::VIEW::Representation
Definition: representation.h:59
BALL::String
Definition: string.h:57
BALL::HashGridBox3
Definition: hashGrid.h:55
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
representation.h
BALL
Definition: constants.h:13
QWidget
BALL::HashSet
Definition: hashSet.h:46
BALL::VIEW::ColorRGBA
Definition: colorRGBA.h:32
hashGrid.h
modularWidget.h
BALL::Composite
Definition: composite.h:74
BALL_SIZE_TYPE
BALL::TVector3< float >
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::Mesh
Definition: mesh.h:42
colorRGBA.h
regularData3D.h
materialSettings.h
BALL::HashGrid3
Three-dimensional Hash Grid Class.
Definition: hashGrid.h:755
BALL::VIEW::ModifyRepresentationDialog
Definition: modifyRepresentationDialog.h:55
BALL::VIEW::ModularWidget
Definition: modularWidget.h:63