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 
63  ModifyRepresentationDialog(QWidget* parent = 0, const char* name = "ModifyRepresentationDialog",
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 
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 
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_;
136  };
137 
138  } // namespace VIEW
139 } // namespace BALL
140 
141 #endif
BALL::VIEW::ModifyRepresentationDialog::AtomGrid
HashGrid3< const Atom * > AtomGrid
Definition: modifyRepresentationDialog.h:113
BALL::VIEW::MaterialSettings
Definition: materialSettings.h:33
BALL::TRegularData3D< float >
mesh.h
BALL::VIEW::Message
Definition: message.h:52
BALL::VIEW::ModifyRepresentationDialog::grid_list_
std::list< RegularData3D * > grid_list_
Definition: modifyRepresentationDialog.h:133
BALL::VIEW::ModifyRepresentationDialog::AtomBox
HashGridBox3< const Atom * > AtomBox
Definition: modifyRepresentationDialog.h:114
BALL::VIEW::Representation
Definition: representation.h:57
BALL::String
Definition: string.h:56
BALL::HashGridBox3< const Atom * >
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
representation.h
BALL
Definition: constants.h:12
BALL::HashSet
Definition: hashSet.h:45
BALL::VIEW::ColorRGBA
Definition: colorRGBA.h:31
hashGrid.h
modularWidget.h
BALL_SIZE_TYPE
BALL::TVector3< float >
BALL::VIEW::ModifyRepresentationDialog::rep_
Representation * rep_
Definition: modifyRepresentationDialog.h:132
BALL::VIEW::ModifyRepresentationDialog::square_distance_
float square_distance_
Definition: modifyRepresentationDialog.h:128
global.h
QWidget
BALL::VIEW::ModifyRepresentationDialog::material_settings_
MaterialSettings * material_settings_
Definition: modifyRepresentationDialog.h:135
BALL::VIEW::Mesh
Definition: mesh.h:38
colorRGBA.h
BALL::VIEW::ModifyRepresentationDialog::vertices_
vector< Vector3 > vertices_
Definition: modifyRepresentationDialog.h:134
BALL::VIEW::ModifyRepresentationDialog::selected_color
ColorRGBA selected_color
Definition: modifyRepresentationDialog.h:130
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
regularData3D.h
materialSettings.h
BALL::VIEW::ModifyRepresentationDialog::grid_
RegularData3D * grid_
Definition: modifyRepresentationDialog.h:127
BALL::HashGrid3< const Atom * >
QDialog
BALL::VIEW::ModifyRepresentationDialog
Definition: modifyRepresentationDialog.h:51
BALL::VIEW::ModularWidget
Definition: modularWidget.h:60