BALL 1.5.0
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
18#endif
19
20#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
22#endif
23
24#include <BALL/VIEW/UIC/ui_modelSettingsDialog.h>
25
26#include <QtWidgets/QCheckBox>
27#include <QtWidgets/QLabel>
28
29class QSlider;
30class QLabel;
31
32namespace 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::WindowFlags fl = 0 );
54
57
59 virtual void applySettingsTo(ModelProcessor& cp) const;
60
63
65 virtual void getSettings(const ModelProcessor& mp);
66
69
71 float getStickStickRadius() const
72 {return getFloatValue_(stick_radius_slider);}
73
76 {return getFloatValue_(ball_stick_cylinder_radius_slider);}
77
80 {return ball_stick_dashed_bonds->isChecked();}
81
83 float getBallRadius() const
84 {return getFloatValue_(ball_stick_sphere_radius_slider);}
85
87 float getVDWRadiusFactor() const
88 {return getFloatValue_(vdw_radius_factor_slider);}
89
92 {return getFloatValue_(surface_probe_radius_slider);}
93
95 float getTubeRadius() const
96 {return getFloatValue_(tube_radius_slider);}
97
100 {return getFloatValue_(cartoon_tube_radius_slider);}
101
104 {return getFloatValue_(cartoon_helix_radius_slider);}
105
108 {return getFloatValue_(strand_arrow_width_slider);}
109
112 {return getFloatValue_(strand_height_slider);}
113
116 {return getFloatValue_(strand_width_slider);}
117
119 float getHBondsRadius() const
120 {return getFloatValue_(hbonds_radius_slider);}
121
123 float getForceMaxLength() const
124 {return getFloatValue_(force_max_length_slider);}
125
127 float getForceScaling() const
128 { return getFloatValue_(force_scaling_slider);}
129
131 float getForceBase() const
132 {return getFloatValue_(force_base_slider);}
133
135 float getForceOffset() const
136 {return getFloatValue_(force_offset_slider);}
137
139 float getDNALadderRadius() const
140 {return getFloatValue_(cartoon_dna_ladder_radius_slider);}
141
143 float getDNABaseRadius() const
144 {return getFloatValue_(cartoon_dna_base_radius_slider);}
145
147 float getDNAHelixRadius() const
148 {return getFloatValue_(cartoon_dna_helix_radius_slider);}
149
151 void setStickStickRadius(float value)
152 { setValue_(stick_radius_slider,value);}
153
155 void setBallAndStickStickRadius(float value)
156 { setValue_(ball_stick_cylinder_radius_slider,value);}
157
160 { ball_stick_dashed_bonds->setChecked(state);}
161
163 void setBallRadius(float value)
164 { setValue_(ball_stick_sphere_radius_slider,value);}
165
167 void setVDWRadiusFactor(float value)
168 { setValue_(vdw_radius_factor_slider,value);}
169
171 void setSurfaceProbeRadius(float value)
172 { setValue_(surface_probe_radius_slider,value);}
173
175 void setTubeRadius(float value)
176 { setValue_(tube_radius_slider,value);}
177
179 void setCartoonTubeRadius(float value)
180 { setValue_(cartoon_tube_radius_slider,value);}
181
183 void setCartoonHelixRadius(float value)
184 { setValue_(cartoon_helix_radius_slider,value);}
185
187 void setCartoonArrowWidth(float value)
188 { setValue_(strand_arrow_width_slider ,value);}
189
191 void setCartoonStrandHeight(float value)
192 { setValue_(strand_height_slider,value);}
193
195 void setCartoonStrandWidth(float value)
196 { setValue_(strand_width_slider,value);}
197
199 void setHBondRadius(float value)
200 { setValue_(hbonds_radius_slider,value);}
201
203 void setForceMaxLenght(float value)
204 { setValue_(force_max_length_slider,value);}
205
207 void setForceScaling(float value)
208 { setValue_(force_scaling_slider,value);}
209
211 void setForceOffset(float value)
212 { setValue_(force_offset_slider ,value);}
213
215 void setForceBase(float value)
216 { setValue_(force_base_slider, value);}
217
220 { setValue_(cartoon_dna_ladder_radius_slider, value / 10.);}
221
223 void setCartoonDNAHelixRadius(float value)
224 { setValue_(cartoon_dna_helix_radius_slider, value / 10.);}
225
227 void setCartoonDNABaseRadius(float value)
228 { setValue_(cartoon_dna_base_radius_slider, value / 10.);}
229
230 public Q_SLOTS:
231
233
234 protected Q_SLOTS:
235 void stickRadiusChanged() {setLabelText_(stick_radius_label, stick_radius_slider);}
236 void VDWfactorChanged() {setLabelText_(vdw_radius_factor_label, vdw_radius_factor_slider);}
237 void ballStickSphereRadiusChanged() {setLabelText_(ball_stick_sphere_radius_label, ball_stick_sphere_radius_slider);}
238 void ballStickCylinderRadiusChanged() {setLabelText_(ball_stick_cylinder_radius_label, ball_stick_cylinder_radius_slider);}
239 void probeRadiusChanged() {setLabelText_(surface_probe_radius_label, surface_probe_radius_slider);}
240 void tubeRadiusChanged() {setLabelText_(tube_radius_label, tube_radius_slider);}
241 void cartoonTubeRadiusChanged(){setLabelText_(cartoon_tube_radius_label, cartoon_tube_radius_slider);}
242 void cartoonHelixRadiusChanged(){setLabelText_(cartoon_helix_radius_label, cartoon_helix_radius_slider);}
243
244 void cartoonStrandArrowWidthChanged(){setLabelText_(strand_arrow_width_label, strand_arrow_width_slider);}
245 void cartoonStrandHeightChanged(){setLabelText_(strand_height_label, strand_height_slider);}
246 void cartoonStrandWidthChanged() {setLabelText_(strand_width_label, strand_width_slider);}
247
248 void cartoonDNAHelixRadiusChanged(){setLabelText_(cartoon_dna_helix_radius_label, cartoon_dna_helix_radius_slider);}
249 void cartoonDNABaseRadiusChanged(){setLabelText_(cartoon_dna_base_radius_label, cartoon_dna_base_radius_slider);}
250 void cartoonDNALadderRadiusChanged(){setLabelText_(cartoon_dna_ladder_radius_label, cartoon_dna_ladder_radius_slider);}
251 void hbondsRadiusChanged(){setLabelText_(hbonds_radius_label, hbonds_radius_slider);}
252 void forceScalingChanged(){setLabelText_(force_scaling_label, force_scaling_slider);}
253 void forceMaxLengthChanged(){setLabelText_(force_max_length_label, force_max_length_slider);}
254 void forceBaseChanged(){setLabelText_(force_base_label, force_base_slider);}
255 void forceOffsetChanged(){setLabelText_(force_offset_label, force_offset_slider);}
256 void changedNAMode_(bool state);
257
258 protected:
259
260 float getFloatValue_(const QSlider* const& le) const;
261
262 void setValue_(QSlider* le, float value);
263
264 void setLabelText_(QLabel* label, const QSlider* const from);
265
267 };
268
269} }
270
271#endif
Definition: constants.h:13
ModelSettingsDialog(QWidget *parent=0, const char *name="ModelSettingsDialog", Qt::WindowFlags fl=0)
Constructor.
float getFloatValue_(const QSlider *const &le) const
virtual ModelProcessor * createModelProcessor(ModelType type) const
void setBallAndStickStickRadius(float value)
void setBallAndStickStickDashedBondsEnabled(bool state)
virtual void applySettingsTo(ModelProcessor &cp) const
virtual void getSettings(const ModelProcessor &mp)
virtual ~ModelSettingsDialog()
Destructor.
void setLabelText_(QLabel *label, const QSlider *const from)
virtual QWidget * getEntryFor(ModelType type)
void setValue_(QSlider *le, float value)
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52