BALL 1.5.0
Loading...
Searching...
No Matches
displayProperties.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: displayProperties.h,v 1.43.16.1 2007/03/25 21:25:46 oliver Exp $
5//
6
7#ifndef BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
8#define BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
9
10#ifndef BALL_COMMON_GLOBAL_H
11# include <BALL/COMMON/global.h>
12#endif
13
14#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
16#endif
17
18#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
20#endif
21
22#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
24#endif
25
26#include <BALL/VIEW/UIC/ui_displayProperties.h>
27
28namespace BALL
29{
30 class Composite;
31
32 namespace VIEW
33 {
34 class Representation;
35
36 class ColoringSettingsDialog;
37 class ModelSettingsDialog;
38 class Preferences;
39 class ModelInformation;
40
55 : public QDialog,
56 public Ui_DisplayPropertiesData,
57 public ModularWidget,
58 public PreferencesEntry
59 {
60 Q_OBJECT
61
62 public:
63
65
66
69
70
73 DisplayProperties(QWidget *parent = NULL, const char* name = "DisplayProperties");
74
77
81
83
86
98 virtual void onNotify(Message *message);
99
101
104
111 virtual void initializeWidget(MainControl& main_control);
112
114 virtual void initializePreferencesTab(Preferences &preferences);
115
117 virtual void finalizePreferencesTab(Preferences &preferences);
118
120 void applyPreferences();
121
127 virtual void checkMenu(MainControl& main_control);
128
130 void createRepresentationMode();
131
133 void modifyRepresentationMode(Representation* rep);
134
136 bool getSettingsFromString(const String& data);
137
139 void createRepresentation(String data_string, const vector<const Composite*>& new_systems);
140
142 void enableCreationForNewMolecules(bool state)
143 { create_representations_for_new_molecules_ = state;}
144
147 { return rep_;}
148
149 /* Create the new representation for the selection in the MolecularControl or for a given List of Composites.
150 Called by onNotify() after receiving CompositeMessage::NEW_MOLECULE and by apply().
151 To insert a new type of model, this is the only method in DisplayProperties you have to
152 change (See also VIEW/KERNEL/common.h).
153 @param hidden set to true will prevent that the representations model is created right now
154 */
155 virtual Representation* createRepresentation(const std::list<Composite*>& composites, bool hidden = false);
156
157
160
163
164 public Q_SLOTS:
165
167
170
174 void show();
175
176
182 void selectModel(int index);
183
189 void selectMode(int index);
190
196 void selectColoringMethod(int index);
197
199 void setSurfaceDrawingPrecision(float value);
200
202 void setDrawingPrecision(int value);
203
205 void setTransparency(int value);
206
208 void setCustomColor(const ColorRGBA& color);
209
216 virtual void apply();
217
221 void editSelectionColor(QColor color);
222
225
228
230 void precisionBoxChanged(int index);
231
234
237
240
243
245
246
247 protected:
248
249 //_ Set buttons and slider according to the values
251
252 //_
254
255 //_
257
258 //_
260
261 //_
263
264 protected:
265
267
268 // --------------------------------------------------------------------------------
269 // attributs
270 // --------------------------------------------------------------------------------
274
275 // the menu entry id of the dialog
276 QAction* id_;
278
279 // used by GeometricControl to modify an existing representation
281
287 };
288
289} } // namespaces
290
291#endif // BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
void setCustomColor(const ColorRGBA &color)
virtual void applyColoringSettings_(Representation &rep)
void editSelectionColor(QColor color)
ColoringSettingsDialog * coloring_settings_
virtual Representation * createRepresentation(const std::list< Composite * > &composites, bool hidden=false)
ModelSettingsDialog * model_settings_
virtual void getAdvancedModelOptions_()
Representation * getRepresentation()
Get the Representation on which DisplayProperties is working on.
void precisionBoxChanged(int index)
void setTransparency(int value)
void setSurfaceDrawingPrecision(float value)
virtual void getAdvancedColoringOptions_()
const ModelInformation * model_information_
virtual void applyModelSettings_(Representation &rep)
void setDrawingPrecision(int value)
void selectColoringMethod(int index)
void applyTo_(Representation *rep)
void setModelSettingsDialog(ModelSettingsDialog *dialog)
void setColoringSettingsDialog(ColoringSettingsDialog *dialog)
#define BALL_VIEW_EXPORT