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

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 c7e000 was bd81f9, checked in by Frederik Heber <heber@…>, 13 years ago

Merge branch 'Candidate_v1.3.0' into stable

Conflicts:

src/Actions/unittests/stubs/DummyUI.hpp
src/UIElements/CommandLineUI/CommandLineDialog.cpp
src/UIElements/CommandLineUI/CommandLineDialog.hpp
src/UIElements/Dialog.cpp
src/UIElements/Dialog.hpp
src/UIElements/Makefile.am
src/UIElements/Qt4/QtDialog.cpp
src/UIElements/Qt4/QtDialog.hpp
src/UIElements/TextUI/TextDialog.cpp
src/UIElements/TextUI/TextDialog.hpp

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