source: src/UIElements/Qt4/Query/QtQuery.hpp@ 7e8e79

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 7e8e79 was 7e8e79, checked in by Michael Ankele <ankele@…>, 13 years ago

QtQueryList applied to DoublesQtQuery

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