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

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

QtQueryList added (only used in StringsQtQuery yet)

  • 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 {
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 {
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
135public slots:
136 void onUpdate();
137
138private:
139 QBoxLayout *parent;
140 QBoxLayout *thisLayout;
141 QLabel *titleLabel;
142 QDoubleSpinBox *inputBox;
143 Dialog *dialog;
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 {
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
171public slots:
172 void onUpdate();
173
174private:
175 QBoxLayout *parent;
176 QBoxLayout *thisLayout;
177 QLabel *titleLabel;
178 QComboBox *inputBox;
179 Dialog *dialog;
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 {
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 void IntegerEntered(const QString&);
222 void IntegerSelected();
223 void AddInteger();
224 void RemoveInteger();
225
226public slots:
227 void onUpdate();
228
229private:
230 QBoxLayout *parent;
231 QBoxLayout *thisLayout;
232 QLabel *titleLabel;
233 Dialog *dialog;
234};
235
236class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
237 Q_OBJECT
238public:
239 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
240 virtual ~IntQtQuery();
241 virtual bool handle();
242
243public slots:
244 void onUpdate(int);
245
246private:
247 QBoxLayout *parent;
248 QBoxLayout *thisLayout;
249 QLabel *titleLabel;
250 QSpinBox *inputBox;
251 Dialog *dialog;
252};
253
254class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery {
255 Q_OBJECT
256public:
257 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
258 virtual ~IntsQtQuery();
259 virtual bool handle();
260 void IntegerEntered(const QString&);
261 void IntegerSelected();
262 void AddInteger();
263 void RemoveInteger();
264
265public slots:
266 void onUpdate();
267
268private:
269 QBoxLayout *parent;
270 QBoxLayout *thisLayout;
271 QLabel *titleLabel;
272 Dialog *dialog;
273};
274
275class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
276 Q_OBJECT
277public:
278 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
279 virtual ~MoleculeQtQuery();
280 virtual bool handle();
281
282public slots:
283 void onUpdate(int);
284
285private:
286 QBoxLayout *parent;
287 QBoxLayout *thisLayout;
288 QLabel *titleLabel;
289 QComboBox *inputBox;
290 Dialog *dialog;
291};
292
293class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery {
294 Q_OBJECT
295public:
296 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
297 virtual ~MoleculesQtQuery();
298 virtual bool handle();
299
300public slots:
301 void onUpdate();
302
303private:
304 QBoxLayout *parent;
305 QBoxLayout *thisLayout;
306 QLabel *titleLabel;
307 QComboBox *inputBox;
308 Dialog *dialog;
309};
310
311class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
312 Q_OBJECT
313public:
314 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
315 virtual ~StringQtQuery();
316 virtual bool handle();
317
318public slots:
319 void onUpdate(const QString&);
320
321private:
322 QBoxLayout *parent;
323 QBoxLayout *thisLayout;
324 QLabel *titleLabel;
325 QLineEdit *inputBox;
326 Dialog *dialog;
327};
328
329class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery, public QtQueryList<std::string> {
330 Q_OBJECT
331public:
332 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
333 virtual ~StringsQtQuery();
334 virtual bool handle();
335
336 virtual void onSubUpdate();
337
338public slots:
339 void onAddElement();
340 void onRemoveElement();
341 void onElementSelected();
342
343private:
344 StringQtQuery *subQuery;
345};
346
347class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
348 Q_OBJECT
349public:
350 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
351 virtual ~UnsignedIntQtQuery();
352 virtual bool handle();
353
354public slots:
355 void onUpdate(unsigned int);
356
357private:
358 QBoxLayout *parent;
359 QBoxLayout *thisLayout;
360 QLabel *titleLabel;
361 QSpinBox *inputBox;
362 Dialog *dialog;
363};
364
365class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery {
366 Q_OBJECT
367public:
368 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
369 virtual ~UnsignedIntsQtQuery();
370 virtual bool handle();
371 void IntegerEntered(const QString&);
372 void IntegerSelected();
373 void AddInteger();
374 void RemoveInteger();
375
376public slots:
377 void onUpdate();
378
379private:
380 QBoxLayout *parent;
381 QBoxLayout *thisLayout;
382 QLabel *titleLabel;
383 Dialog *dialog;
384};
385
386
387class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
388 Q_OBJECT
389public:
390 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
391 virtual ~VectorQtQuery();
392 virtual bool handle();
393
394public slots:
395 void onUpdateX(double);
396 void onUpdateY(double);
397 void onUpdateZ(double);
398
399private:
400 QBoxLayout *parent;
401 QBoxLayout *mainLayout;
402 QLabel *titleLabel;
403 QBoxLayout *subLayout;
404 QBoxLayout *coordLayout;
405 QLabel *coordLabel;
406 QDoubleSpinBox *coordInputX;
407 QDoubleSpinBox *coordInputY;
408 QDoubleSpinBox *coordInputZ;
409 Dialog *dialog;
410};
411
412class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery {
413 Q_OBJECT
414public:
415 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,Dialog *);
416 virtual ~VectorsQtQuery();
417 virtual bool handle();
418
419public slots:
420 void onUpdate();
421
422private:
423 QBoxLayout *parent;
424 QBoxLayout *mainLayout;
425 QLabel *titleLabel;
426 QBoxLayout *subLayout;
427 QBoxLayout *coordLayout;
428 QLabel *coordLabel;
429 QDoubleSpinBox *coordInput;
430 Dialog *dialog;
431};
432
433class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
434 Q_OBJECT
435public:
436 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
437 virtual ~RandomNumberDistribution_ParametersQtQuery();
438 virtual bool handle();
439
440public slots:
441 void onUpdate();
442
443private:
444 QBoxLayout *parent;
445 QHBoxLayout *thisLayout;
446 QLabel *titleLabel;
447 QTextEdit *inputBox;
448 QPushButton *okButton;
449 Dialog *dialog;
450};
451
452#endif /* QTQUERY_HPP_ */
Note: See TracBrowser for help on using the repository browser.