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