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