source: src/UIElements/Qt4/Query/QtQuery.hpp@ b2a7cc

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since b2a7cc was 1ae820, checked in by Michael Ankele <ankele@…>, 13 years ago

QtQueryList applied to MoleculesQtQuery

  • Property mode set to 100644
File size: 10.3 KB
Line 
1/*
2 * QtQuery.hpp
3 *
4 * Created on: Nov 8, 2010
5 * Author: heber
6 */
7
8#ifndef QTQUERY_HPP_
9#define QTQUERY_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include <Qt/qwidget.h>
18#include "Qt4/QtDialog.hpp"
19#include "Parameters/Parameter.hpp"
20#include "QtQueryList.hpp"
21
22class QHBoxLayout;
23class QBoxLayout;
24class QDialogButtonBox;
25class QLabel;
26class QSpinBox;
27class QDoubleSpinBox;
28class QLineEdit;
29class QListWidget;
30class QPushButton;
31class QTableWidget;
32class QTextEdit;
33class QComboBox;
34class QCheckBox;
35class QFileDialog;
36
37class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery {
38 Q_OBJECT
39public:
40 AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
41 virtual ~AtomQtQuery();
42 virtual bool handle();
43
44public slots:
45 void onUpdate(int);
46
47private:
48 QBoxLayout *parent;
49 QBoxLayout *thisLayout;
50 QLabel *titleLabel;
51 QComboBox *inputBox;
52 Dialog *dialog;
53};
54
55class QtDialog::AtomsQtQuery : public QWidget, public Dialog::AtomsQuery, public QtQueryList<const atom *> {
56 Q_OBJECT
57public:
58 AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
59 virtual ~AtomsQtQuery();
60 virtual bool handle();
61
62 virtual void onSubUpdate();
63
64public slots:
65 void onAddElement();
66 void onRemoveElement();
67 void onElementSelected();
68
69private:
70 AtomQtQuery *subQuery;
71};
72
73class QtDialog::BooleanQtQuery : public QWidget, public Dialog::BooleanQuery {
74 Q_OBJECT
75public:
76 BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
77 virtual ~BooleanQtQuery();
78 virtual bool handle();
79
80public slots:
81 void onUpdate(int);
82
83private:
84 QBoxLayout *parent;
85 QBoxLayout *thisLayout;
86 QLabel *titleLabel;
87 QCheckBox *booleanCheckBox;
88 Dialog *dialog;
89};
90
91class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::RealSpaceMatrixQuery {
92 Q_OBJECT
93public:
94 RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
95 virtual ~RealSpaceMatrixQtQuery();
96 virtual bool handle();
97
98public slots:
99 void onUpdate(int, int);
100
101private:
102 QBoxLayout *parent;
103 QBoxLayout *thisLayout;
104 QLabel *titleLabel;
105 QTableWidget *inputTable;
106 Dialog *dialog;
107};
108
109class QtDialog::DoubleQtQuery : public QWidget, public Dialog::DoubleQuery {
110 Q_OBJECT
111public:
112 DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,Dialog *_dialog);
113 virtual ~DoubleQtQuery();
114 virtual bool handle();
115
116public slots:
117 void onUpdate(double);
118
119private:
120 QBoxLayout *parent;
121 QBoxLayout *thisLayout;
122 QLabel *titleLabel;
123 QDoubleSpinBox *inputBox;
124 Dialog *dialog;
125};
126
127class QtDialog::DoublesQtQuery : public QWidget, public Dialog::DoublesQuery, public QtQueryList<double> {
128 Q_OBJECT
129public:
130 DoublesQtQuery(Parameter<std::vector<double> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
131 virtual ~DoublesQtQuery();
132 virtual bool handle();
133
134 virtual void onSubUpdate();
135
136public slots:
137 void onAddElement();
138 void onRemoveElement();
139 void onElementSelected();
140
141private:
142 DoubleQtQuery *subQuery;
143};
144
145class QtDialog::ElementQtQuery : public QWidget, public Dialog::ElementQuery {
146 Q_OBJECT
147public:
148 ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
149 virtual ~ElementQtQuery();
150 virtual bool handle();
151
152public slots:
153 void onUpdate(int);
154
155private:
156 QBoxLayout *parent;
157 QBoxLayout *thisLayout;
158 QLabel *titleLabel;
159 QComboBox *inputBox;
160 Dialog *dialog;
161};
162
163class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery, public QtQueryList<const element *> {
164 Q_OBJECT
165public:
166 ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
167 virtual ~ElementsQtQuery();
168 virtual bool handle();
169
170 virtual void onSubUpdate();
171
172public slots:
173 void onAddElement();
174 void onRemoveElement();
175 void onElementSelected();
176
177private:
178 ElementQtQuery *subQuery;
179};
180
181class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery {
182public:
183 EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog);
184 virtual ~EmptyQtQuery();
185 virtual bool handle();
186private:
187 QBoxLayout *parent;
188 QBoxLayout *thisLayout;
189 QLabel *titleLabel;
190 Dialog *dialog;
191};
192
193class QtDialog::FileQtQuery : public QWidget, public Dialog::FileQuery {
194 Q_OBJECT
195public:
196 FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
197 virtual ~FileQtQuery();
198 virtual bool handle();
199
200public slots:
201 void onUpdate();
202 void showFileDialog();
203
204private:
205 QBoxLayout *parent;
206 QBoxLayout *thisLayout;
207 QLabel *filenameLabel;
208 QLineEdit *filenameLineEdit;
209 QPushButton *filedialogButton;
210 QFileDialog *theFileDialog;
211 Dialog *dialog;
212};
213
214class QtDialog::FilesQtQuery : public QWidget, public Dialog::FilesQuery, public QtQueryList<boost::filesystem::path> {
215 Q_OBJECT
216public:
217 FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
218 virtual ~FilesQtQuery();
219 virtual bool handle();
220
221 virtual void onSubUpdate();
222
223public slots:
224 void onAddElement();
225 void onRemoveElement();
226 void onElementSelected();
227
228private:
229 FileQtQuery *subQuery;
230};
231
232class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
233 Q_OBJECT
234public:
235 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
236 virtual ~IntQtQuery();
237 virtual bool handle();
238
239public slots:
240 void onUpdate(int);
241
242private:
243 QBoxLayout *parent;
244 QBoxLayout *thisLayout;
245 QLabel *titleLabel;
246 QSpinBox *inputBox;
247 Dialog *dialog;
248};
249
250class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery, public QtQueryList<int> {
251 Q_OBJECT
252public:
253 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
254 virtual ~IntsQtQuery();
255 virtual bool handle();
256
257 virtual void onSubUpdate();
258
259public slots:
260 void onAddElement();
261 void onRemoveElement();
262 void onElementSelected();
263
264private:
265 IntQtQuery *subQuery;
266};
267
268class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
269 Q_OBJECT
270public:
271 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
272 virtual ~MoleculeQtQuery();
273 virtual bool handle();
274
275public slots:
276 void onUpdate(int);
277
278private:
279 QBoxLayout *parent;
280 QBoxLayout *thisLayout;
281 QLabel *titleLabel;
282 QComboBox *inputBox;
283 Dialog *dialog;
284};
285
286class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery, public QtQueryList<const molecule *> {
287 Q_OBJECT
288public:
289 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
290 virtual ~MoleculesQtQuery();
291 virtual bool handle();
292
293 virtual void onSubUpdate();
294
295public slots:
296 void onAddElement();
297 void onRemoveElement();
298 void onElementSelected();
299
300private:
301 MoleculeQtQuery *subQuery;
302};
303
304class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
305 Q_OBJECT
306public:
307 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
308 virtual ~StringQtQuery();
309 virtual bool handle();
310
311public slots:
312 void onUpdate(const QString&);
313
314private:
315 QBoxLayout *parent;
316 QBoxLayout *thisLayout;
317 QLabel *titleLabel;
318 QLineEdit *inputBox;
319 Dialog *dialog;
320};
321
322class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery, public QtQueryList<std::string> {
323 Q_OBJECT
324public:
325 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
326 virtual ~StringsQtQuery();
327 virtual bool handle();
328
329 virtual void onSubUpdate();
330
331public slots:
332 void onAddElement();
333 void onRemoveElement();
334 void onElementSelected();
335
336private:
337 StringQtQuery *subQuery;
338};
339
340class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
341 Q_OBJECT
342public:
343 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
344 virtual ~UnsignedIntQtQuery();
345 virtual bool handle();
346
347public slots:
348 void onUpdate(int);
349
350private:
351 QBoxLayout *parent;
352 QBoxLayout *thisLayout;
353 QLabel *titleLabel;
354 QSpinBox *inputBox;
355 Dialog *dialog;
356};
357
358class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery, public QtQueryList<unsigned int> {
359 Q_OBJECT
360public:
361 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
362 virtual ~UnsignedIntsQtQuery();
363 virtual bool handle();
364
365 virtual void onSubUpdate();
366
367public slots:
368 void onAddElement();
369 void onRemoveElement();
370 void onElementSelected();
371
372private:
373 UnsignedIntQtQuery *subQuery;
374};
375
376class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
377 Q_OBJECT
378public:
379 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
380 virtual ~VectorQtQuery();
381 virtual bool handle();
382
383public slots:
384 void onUpdateX(double);
385 void onUpdateY(double);
386 void onUpdateZ(double);
387
388private:
389 QBoxLayout *parent;
390 QBoxLayout *mainLayout;
391 QLabel *titleLabel;
392 QBoxLayout *subLayout;
393 QBoxLayout *coordLayout;
394 QLabel *coordLabel;
395 QDoubleSpinBox *coordInputX;
396 QDoubleSpinBox *coordInputY;
397 QDoubleSpinBox *coordInputZ;
398 Dialog *dialog;
399};
400
401class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery, public QtQueryList<Vector> {
402 Q_OBJECT
403public:
404 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
405 virtual ~VectorsQtQuery();
406 virtual bool handle();
407
408 virtual void onSubUpdate();
409
410public slots:
411 void onAddElement();
412 void onRemoveElement();
413 void onElementSelected();
414
415private:
416 VectorQtQuery *subQuery;
417};
418
419class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
420 Q_OBJECT
421public:
422 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
423 virtual ~RandomNumberDistribution_ParametersQtQuery();
424 virtual bool handle();
425
426public slots:
427 void onUpdate();
428
429private:
430 QBoxLayout *parent;
431 QHBoxLayout *thisLayout;
432 QLabel *titleLabel;
433 QTextEdit *inputBox;
434 QPushButton *okButton;
435 Dialog *dialog;
436};
437
438#endif /* QTQUERY_HPP_ */
Note: See TracBrowser for help on using the repository browser.