source: src/UIElements/Qt4/Query/QtQuery.hpp@ 8de597

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 8de597 was 12948c, checked in by Frederik Heber <heber@…>, 13 years ago

Added new Query for std::vector of unsigned int.

  • this is preparatory to make selection rectangle possible.
  • Property mode set to 100644
File size: 8.5 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 "Qt4/QtDialog.hpp"
18
19class QHBoxLayout;
20class QBoxLayout;
21class QDialogButtonBox;
22class QLabel;
23class QSpinBox;
24class QDoubleSpinBox;
25class QLineEdit;
26class QListWidget;
27class QPushButton;
28class QTableWidget;
29class QTextEdit;
30class QComboBox;
31
32// Forward declarations for plumbing
33template<typename T> class QtQueryListPipe;
34class AtomQtQueryPipe;
35class AtomsQtQueryPipe;
36class BooleanQtQueryPipe;
37class BoxQtQueryPipe;
38class DoubleQtQueryPipe;
39class DoublesQtQueryPipe;
40class ElementQtQueryPipe;
41class ElementsQtQueryPipe;
42class EmptyQtQueryPipe;
43class FileQtQueryPipe;
44class IntQtQueryPipe;
45class MoleculeQtQueryPipe;
46class MoleculesQtQueryPipe;
47class StringQtQueryPipe;
48class StringsQtQueryPipe;
49class UnsignedIntQtQueryPipe;
50class UnsignedIntsQtQueryPipe;
51class VectorQtQueryPipe;
52class VectorsQtQueryPipe;
53class RandomNumberDistribution_ParametersQtQueryPipe;
54
55class QtDialog::AtomQtQuery : public Dialog::AtomQuery {
56public:
57 AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
58 virtual ~AtomQtQuery();
59 virtual bool handle();
60private:
61 QBoxLayout *parent;
62 QBoxLayout *thisLayout;
63 QLabel *titleLabel;
64 QComboBox *inputBox;
65
66 AtomQtQueryPipe *pipe;
67};
68
69class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery {
70public:
71 AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
72 virtual ~AtomsQtQuery();
73 virtual bool handle();
74private:
75 QBoxLayout *parent;
76 QBoxLayout *thisLayout;
77 QLabel *titleLabel;
78 QLabel *inputLabel;
79 QListWidget *inputList;
80
81 AtomsQtQueryPipe *pipe;
82};
83
84class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery {
85public:
86 BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
87 virtual ~BooleanQtQuery();
88 virtual bool handle();
89private:
90 QBoxLayout *parent;
91 QBoxLayout *thisLayout;
92 QLabel *titleLabel;
93 QComboBox *booleanComboBox;
94
95 BooleanQtQueryPipe *pipe;
96};
97
98class QtDialog::BoxQtQuery : public Dialog::BoxQuery {
99public:
100 BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
101 virtual ~BoxQtQuery();
102 virtual bool handle();
103private:
104 QBoxLayout *parent;
105 QBoxLayout *thisLayout;
106 QLabel *titleLabel;
107 QTableWidget *inputTable;
108
109 BoxQtQueryPipe *pipe;
110};
111
112class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery {
113public:
114 DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
115 virtual ~DoubleQtQuery();
116 virtual bool handle();
117private:
118 QBoxLayout *parent;
119 QBoxLayout *thisLayout;
120 QLabel *titleLabel;
121 QDoubleSpinBox *inputBox;
122
123 DoubleQtQueryPipe *pipe;
124};
125
126class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery {
127public:
128 DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
129 virtual ~DoublesQtQuery();
130 virtual bool handle();
131private:
132 QBoxLayout *parent;
133 QBoxLayout *thisLayout;
134 QLabel *titleLabel;
135 QDoubleSpinBox *inputBox;
136
137 QtQueryListPipe<double> *pipe;
138};
139
140class QtDialog::ElementQtQuery : public Dialog::ElementQuery {
141public:
142 ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
143 virtual ~ElementQtQuery();
144 virtual bool handle();
145private:
146 QBoxLayout *parent;
147 QBoxLayout *thisLayout;
148 QLabel *titleLabel;
149 QComboBox *inputBox;
150
151 ElementQtQueryPipe *pipe;
152};
153
154class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery {
155public:
156 ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
157 virtual ~ElementsQtQuery();
158 virtual bool handle();
159private:
160 QBoxLayout *parent;
161 QBoxLayout *thisLayout;
162 QLabel *titleLabel;
163 QComboBox *inputBox;
164
165 ElementsQtQueryPipe *pipe;
166};
167
168class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery {
169public:
170 EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
171 virtual ~EmptyQtQuery();
172 virtual bool handle();
173private:
174 QBoxLayout *parent;
175 QBoxLayout *thisLayout;
176 QLabel *titleLabel;
177
178 EmptyQtQueryPipe *pipe;
179};
180
181class QtDialog::FileQtQuery : public Dialog::FileQuery {
182public:
183 FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
184 virtual ~FileQtQuery();
185 virtual bool handle();
186private:
187 QBoxLayout *parent;
188 QBoxLayout *thisLayout;
189 QLabel *filenameLabel;
190 QLineEdit *filenameLineEdit;
191 QPushButton *filedialogButton;
192
193 FileQtQueryPipe *pipe;
194};
195
196class QtDialog::IntQtQuery : public Dialog::IntQuery {
197public:
198 IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
199 virtual ~IntQtQuery();
200 virtual bool handle();
201private:
202 QBoxLayout *parent;
203 QBoxLayout *thisLayout;
204 QLabel *titleLabel;
205 QSpinBox *inputBox;
206
207 IntQtQueryPipe *pipe;
208};
209
210class QtDialog::IntsQtQuery : public Dialog::IntsQuery {
211public:
212 IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
213 virtual ~IntsQtQuery();
214 virtual bool handle();
215 void IntegerEntered(const QString&);
216 void IntegerSelected();
217 void AddInteger();
218 void RemoveInteger();
219private:
220 QBoxLayout *parent;
221 QBoxLayout *thisLayout;
222 QLabel *titleLabel;
223
224 QtQueryListPipe<int> *pipe;
225};
226
227class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery {
228public:
229 MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
230 virtual ~MoleculeQtQuery();
231 virtual bool handle();
232private:
233 QBoxLayout *parent;
234 QBoxLayout *thisLayout;
235 QLabel *titleLabel;
236 QComboBox *inputBox;
237
238 MoleculeQtQueryPipe *pipe;
239};
240
241class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery {
242public:
243 MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
244 virtual ~MoleculesQtQuery();
245 virtual bool handle();
246private:
247 QBoxLayout *parent;
248 QBoxLayout *thisLayout;
249 QLabel *titleLabel;
250 QComboBox *inputBox;
251
252 MoleculesQtQueryPipe *pipe;
253};
254
255class QtDialog::StringQtQuery : public Dialog::StringQuery {
256public:
257 StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
258 virtual ~StringQtQuery();
259 virtual bool handle();
260private:
261 QBoxLayout *parent;
262 QBoxLayout *thisLayout;
263 QLabel *titleLabel;
264 QLineEdit *inputBox;
265
266 StringQtQueryPipe *pipe;
267};
268
269class QtDialog::StringsQtQuery : public Dialog::StringsQuery {
270public:
271 StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
272 virtual ~StringsQtQuery();
273 virtual bool handle();
274private:
275 QBoxLayout *parent;
276 QBoxLayout *thisLayout;
277 QLabel *titleLabel;
278 QLineEdit *inputBox;
279
280 QtQueryListPipe<std::string> *pipe;
281};
282
283class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery {
284public:
285 UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
286 virtual ~UnsignedIntQtQuery();
287 virtual bool handle();
288private:
289 QBoxLayout *parent;
290 QBoxLayout *thisLayout;
291 QLabel *titleLabel;
292 QSpinBox *inputBox;
293
294 UnsignedIntQtQueryPipe *pipe;
295};
296
297class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery {
298public:
299 UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
300 virtual ~UnsignedIntsQtQuery();
301 virtual bool handle();
302 void IntegerEntered(const QString&);
303 void IntegerSelected();
304 void AddInteger();
305 void RemoveInteger();
306private:
307 QBoxLayout *parent;
308 QBoxLayout *thisLayout;
309 QLabel *titleLabel;
310
311 QtQueryListPipe<unsigned int> *pipe;
312};
313
314
315class QtDialog::VectorQtQuery : public Dialog::VectorQuery {
316public:
317 VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
318 virtual ~VectorQtQuery();
319 virtual bool handle();
320private:
321 QBoxLayout *parent;
322 QBoxLayout *mainLayout;
323 QLabel *titleLabel;
324 QBoxLayout *subLayout;
325 QBoxLayout *coordLayout;
326 QLabel *coordLabel;
327 QDoubleSpinBox *coordInput;
328
329 VectorQtQueryPipe *pipe;
330};
331
332class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery {
333public:
334 VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
335 virtual ~VectorsQtQuery();
336 virtual bool handle();
337private:
338 QBoxLayout *parent;
339 QBoxLayout *mainLayout;
340 QLabel *titleLabel;
341 QBoxLayout *subLayout;
342 QBoxLayout *coordLayout;
343 QLabel *coordLabel;
344 QDoubleSpinBox *coordInput;
345
346 VectorsQtQueryPipe *pipe;
347};
348
349class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
350public:
351 RandomNumberDistribution_ParametersQtQuery(std::string title,QBoxLayout *,QtDialog *);
352 virtual ~RandomNumberDistribution_ParametersQtQuery();
353 virtual bool handle();
354private:
355 QBoxLayout *parent;
356 QHBoxLayout *thisLayout;
357 QLabel *titleLabel;
358 QTextEdit *inputBox;
359 QPushButton *okButton;
360
361 RandomNumberDistribution_ParametersQtQueryPipe *pipe;
362};
363
364#endif /* QTQUERY_HPP_ */
Note: See TracBrowser for help on using the repository browser.