BALL 1.5.0
Loading...
Searching...
No Matches
dockDialog.h
Go to the documentation of this file.
1//
2// -*- Mode: C++; tab-width: 2; -*-
3// vi: set ts=2:
4//
5
6#ifndef BALL_VIEW_DIALOGS_DOCKDIALOG_H
7#define BALL_VIEW_DIALOGS_DOCKDIALOG_H
8
9#ifndef BALL_COMMON_GLOBAL_H
10# include <BALL/COMMON/global.h>
11#endif
12
13#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY_H
15#endif
16
17#ifndef BALL_MOLMEC_COMMON_RADIUSRULEPROCESSOR_H
19#endif
20
21#ifndef BALL_MOLMEC_COMMON_CHARGERULEPROCESSOR_H
23#endif
24
25#ifndef BALL_STRUCTURE_DEFAULTPROCESSORS_H
27#endif
28
29#ifndef BALL_DATATYPE_OPTIONS_H
31#endif
32
33#include <BALL/VIEW/UIC/ui_dockDialog.h>
34
35namespace BALL
36{
37 class INIFile;
38 class System;
39 class Options;
40
41 namespace VIEW
42 {
43 class DockingController;
44
45
53 public QDialog,
54 public Ui_DockDialogData,
55 public PreferencesEntry
56 {
57 Q_OBJECT
58
59 public:
60
64
75 DockDialog(QWidget* parent = 0, const char* name = "DockDialog");
76
79 virtual ~DockDialog();
81
85
88 const DockDialog& operator =(const DockDialog& dock_dialog);
90
94
99 void setSystems(System* system1, System* system2);
100
104
108
112
116
119 void isRedock(bool is_redock);
120
126 // remark: score_func isn't enum type because we then have cyclic includes of DockDialog and DockingController
127 void addAlgorithm(const QString& name, const int algorithm, QDialog* dialog);
128
134 // remark: score_func isn't enum type because we then have cyclic includes of DockDialog and DockingController
135 void addScoringFunction(const QString& name, const int score_func, QDialog* dialog=0);
136
143 virtual void initializeWidget();
144
151 virtual void fetchPreferences(INIFile& file);
152
158 virtual void writePreferences(INIFile& file);
159
160
163 void reset();
165
166 public Q_SLOTS:
167
172 int exec();
173
178
184 void okPressed();
185
190
195
200
205
210
215
220
225
230
235
240
241
242 protected:
243
248
252
255 void selectFile_(QLineEdit& lineedit);
256
261
269 void fetchPreferences_(INIFile& file, const String& entry, const QString& default_value);
270
276
277
278 private:
279
284 DockDialog(const DockDialog& dock_dialog);
285
288 bool is_redock_;
289
294 bool has_changed_;
295
299 HashMap<int, QDialog*> algorithm_dialogs_;
300
304 HashMap<int, QDialog*> scoring_dialogs_;
305
309 HashMap<int, vector<int> > allowed_sf_;
310
313 vector<System*> loaded_systems_;
314
317 System* docking_partner1_;
318
321 System* docking_partner2_;
322
325 Options algorithm_opt_, scoring_opt_;
326
332 vector<QString> backup_;
333
336 RadiusRuleProcessor radius_rule_processor_;
337 ChargeRuleProcessor charge_rule_processor_;
338 AssignRadiusProcessor radius_processor_;
339 AssignChargeProcessor charge_processor_;
340 };
341
342 } // end of namespace View
343} // end of namespace BALL
344#endif
HashMap class based on the STL map (containing serveral convenience functions)
void addScoringFunction(const QString &name, const int score_func, QDialog *dialog=0)
DockDialog(QWidget *parent=0, const char *name="DockDialog")
void addAlgorithm(const QString &name, const int algorithm, QDialog *dialog)
Options & getScoringOptions()
Options & getAlgorithmOptions()
void setSystems(System *system1, System *system2)
virtual void initializeWidget()
virtual void fetchPreferences(INIFile &file)
void fetchPreferences_(INIFile &file, const String &entry, const QString &default_value)
void selectFile_(QLineEdit &lineedit)
void isRedock(bool is_redock)
virtual void writePreferences(INIFile &file)
#define BALL_VIEW_EXPORT