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

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

Refactoring: removed QtPipe usage (list queries unusable at this point!)

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