BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
modelSettingsDialog.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_MODELSETTINGSDIALOG_H
6 #define BALL_VIEW_DIALOGS_MODELSETTINGSDIALOG_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_VIEW_MODELS_MODELPROCESSOR_H
14 #endif
15 
16 #ifndef BALL_VIEW_KERNEL_COMMON_H
17 # include <BALL/VIEW/KERNEL/common.h>
18 #endif
19 
20 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
22 #endif
23 
24 #include <BALL/VIEW/UIC/ui_modelSettingsDialog.h>
25 
26 #include <QtGui/QCheckBox>
27 #include <QtGui/QLabel>
28 
29 class QSlider;
30 class QLabel;
31 
32 namespace BALL
33 {
34  class INIFile;
35  class String;
36 
37  namespace VIEW
38  {
43  : public QWidget,
44  public Ui_ModelSettingsDialogData,
45  public PreferencesEntry
46  {
47  Q_OBJECT
48 
49  public:
50 
52  ModelSettingsDialog( QWidget* parent = 0, const char* name = "ModelSettingsDialog",
53  Qt::WFlags fl = 0 );
54 
56  virtual ~ModelSettingsDialog() {}
57 
59  virtual void applySettingsTo(ModelProcessor& cp) const;
60 
62  virtual ModelProcessor* createModelProcessor(ModelType type) const
64 
66  virtual void getSettings(const ModelProcessor& mp);
67 
69  virtual QWidget* getEntryFor(ModelType type);
70 
72  float getStickStickRadius() const
73  {return getFloatValue_(stick_radius_slider);}
74 
77  {return getFloatValue_(ball_stick_cylinder_radius_slider);}
78 
81  {return ball_stick_dashed_bonds->isChecked();}
82 
84  float getBallRadius() const
85  {return getFloatValue_(ball_stick_sphere_radius_slider);}
86 
88  float getVDWRadiusFactor() const
89  {return getFloatValue_(vdw_radius_factor_slider);}
90 
92  float getSurfaceProbeRadius() const
93  {return getFloatValue_(surface_probe_radius_slider);}
94 
96  float getTubeRadius() const
97  {return getFloatValue_(tube_radius_slider);}
98 
100  float getCartoonTubeRadius() const
101  {return getFloatValue_(cartoon_tube_radius_slider);}
102 
104  float getCartoonHelixRadius() const
105  {return getFloatValue_(cartoon_helix_radius_slider);}
106 
108  float getCartoonArrowWidth() const
109  {return getFloatValue_(strand_arrow_width_slider);}
110 
113  {return getFloatValue_(strand_height_slider);}
114 
116  float getCartoonStrandWidth() const
117  {return getFloatValue_(strand_width_slider);}
118 
120  float getHBondsRadius() const
121  {return getFloatValue_(hbonds_radius_slider);}
122 
124  float getForceMaxLength() const
125  {return getFloatValue_(force_max_length_slider);}
126 
128  float getForceScaling() const
129  { return getFloatValue_(force_scaling_slider);}
130 
132  float getForceBase() const
133  {return getFloatValue_(force_base_slider);}
134 
136  float getForceOffset() const
137  {return getFloatValue_(force_offset_slider);}
138 
140  float getDNALadderRadius() const
141  {return getFloatValue_(cartoon_dna_ladder_radius_slider);}
142 
144  float getDNABaseRadius() const
145  {return getFloatValue_(cartoon_dna_base_radius_slider);}
146 
148  float getDNAHelixRadius() const
149  {return getFloatValue_(cartoon_dna_helix_radius_slider);}
150 
152  void setStickStickRadius(float value)
153  { setValue_(stick_radius_slider,value);}
154 
156  void setBallAndStickStickRadius(float value)
157  { setValue_(ball_stick_cylinder_radius_slider,value);}
158 
161  { ball_stick_dashed_bonds->setChecked(state);}
162 
164  void setBallRadius(float value)
165  { setValue_(ball_stick_sphere_radius_slider,value);}
166 
168  void setVDWRadiusFactor(float value)
169  { setValue_(vdw_radius_factor_slider,value);}
170 
172  void setSurfaceProbeRadius(float value)
173  { setValue_(surface_probe_radius_slider,value);}
174 
176  void setTubeRadius(float value)
177  { setValue_(tube_radius_slider,value);}
178 
180  void setCartoonTubeRadius(float value)
181  { setValue_(cartoon_tube_radius_slider,value);}
182 
184  void setCartoonHelixRadius(float value)
185  { setValue_(cartoon_helix_radius_slider,value);}
186 
188  void setCartoonArrowWidth(float value)
189  { setValue_(strand_arrow_width_slider ,value);}
190 
192  void setCartoonStrandHeight(float value)
193  { setValue_(strand_height_slider,value);}
194 
196  void setCartoonStrandWidth(float value)
197  { setValue_(strand_width_slider,value);}
198 
200  void setHBondRadius(float value)
201  { setValue_(hbonds_radius_slider,value);}
202 
204  void setForceMaxLenght(float value)
205  { setValue_(force_max_length_slider,value);}
206 
208  void setForceScaling(float value)
209  { setValue_(force_scaling_slider,value);}
210 
212  void setForceOffset(float value)
213  { setValue_(force_offset_slider ,value);}
214 
216  void setForceBase(float value)
217  { setValue_(force_base_slider, value);}
218 
220  void setCartoonDNALadderRadius(float value)
221  { setValue_(cartoon_dna_ladder_radius_slider, value / 10.);}
222 
224  void setCartoonDNAHelixRadius(float value)
225  { setValue_(cartoon_dna_helix_radius_slider, value / 10.);}
226 
228  void setCartoonDNABaseRadius(float value)
229  { setValue_(cartoon_dna_base_radius_slider, value / 10.);}
230 
231  public slots:
232 
234 
235  protected slots:
236  void stickRadiusChanged() {setLabelText_(stick_radius_label, stick_radius_slider);}
237  void VDWfactorChanged() {setLabelText_(vdw_radius_factor_label, vdw_radius_factor_slider);}
238  void ballStickSphereRadiusChanged() {setLabelText_(ball_stick_sphere_radius_label, ball_stick_sphere_radius_slider);}
239  void ballStickCylinderRadiusChanged() {setLabelText_(ball_stick_cylinder_radius_label, ball_stick_cylinder_radius_slider);}
240  void probeRadiusChanged() {setLabelText_(surface_probe_radius_label, surface_probe_radius_slider);}
241  void tubeRadiusChanged() {setLabelText_(tube_radius_label, tube_radius_slider);}
242  void cartoonTubeRadiusChanged(){setLabelText_(cartoon_tube_radius_label, cartoon_tube_radius_slider);}
243  void cartoonHelixRadiusChanged(){setLabelText_(cartoon_helix_radius_label, cartoon_helix_radius_slider);}
244 
245  void cartoonStrandArrowWidthChanged(){setLabelText_(strand_arrow_width_label, strand_arrow_width_slider);}
246  void cartoonStrandHeightChanged(){setLabelText_(strand_height_label, strand_height_slider);}
247  void cartoonStrandWidthChanged() {setLabelText_(strand_width_label, strand_width_slider);}
248 
249  void cartoonDNAHelixRadiusChanged(){setLabelText_(cartoon_dna_helix_radius_label, cartoon_dna_helix_radius_slider);}
250  void cartoonDNABaseRadiusChanged(){setLabelText_(cartoon_dna_base_radius_label, cartoon_dna_base_radius_slider);}
251  void cartoonDNALadderRadiusChanged(){setLabelText_(cartoon_dna_ladder_radius_label, cartoon_dna_ladder_radius_slider);}
252  void hbondsRadiusChanged(){setLabelText_(hbonds_radius_label, hbonds_radius_slider);}
253  void forceScalingChanged(){setLabelText_(force_scaling_label, force_scaling_slider);}
254  void forceMaxLengthChanged(){setLabelText_(force_max_length_label, force_max_length_slider);}
255  void forceBaseChanged(){setLabelText_(force_base_label, force_base_slider);}
256  void forceOffsetChanged(){setLabelText_(force_offset_label, force_offset_slider);}
257  void changedNAMode_(bool state);
258 
259  protected:
260 
261  float getFloatValue_(const QSlider* const& le) const;
262 
263  void setValue_(QSlider* le, float value);
264 
265  void setLabelText_(QLabel* label, const QSlider* const from);
266 
267  void setDefaultValues_();
268  };
269 
270 } }
271 
272 #endif
Exception to be thrown if an invalid option is given.
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
virtual ~ModelSettingsDialog()
Destructor.
void setBallAndStickStickDashedBondsEnabled(bool state)
void setBallAndStickStickRadius(float value)