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

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

QtQueryList applied to MoleculesQtQuery

  • 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
[2f4e81]55class QtDialog::AtomsQtQuery : public QWidget, public Dialog::AtomsQuery, public QtQueryList<const atom *> {
[7c9921]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
[2f4e81]62 virtual void onSubUpdate();
63
[7c9921]64public slots:
[2f4e81]65 void onAddElement();
66 void onRemoveElement();
67 void onElementSelected();
[7c9921]68
[308aa4]69private:
[2f4e81]70 AtomQtQuery *subQuery;
[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
[7e8e79]127class QtDialog::DoublesQtQuery : public QWidget, public Dialog::DoublesQuery, public QtQueryList<double> {
[7c9921]128 Q_OBJECT
[308aa4]129public:
[7e8e79]130 DoublesQtQuery(Parameter<std::vector<double> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]131 virtual ~DoublesQtQuery();
132 virtual bool handle();
[7c9921]133
[7e8e79]134 virtual void onSubUpdate();
135
[7c9921]136public slots:
[7e8e79]137 void onAddElement();
138 void onRemoveElement();
139 void onElementSelected();
[7c9921]140
[308aa4]141private:
[7e8e79]142 DoubleQtQuery *subQuery;
[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
[572701]163class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery, public QtQueryList<const element *> {
[7c9921]164 Q_OBJECT
[308aa4]165public:
[572701]166 ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]167 virtual ~ElementsQtQuery();
168 virtual bool handle();
[7c9921]169
[572701]170 virtual void onSubUpdate();
171
[7c9921]172public slots:
[572701]173 void onAddElement();
174 void onRemoveElement();
175 void onElementSelected();
[7c9921]176
[308aa4]177private:
[572701]178 ElementQtQuery *subQuery;
[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
[324403]214class QtDialog::FilesQtQuery : public QWidget, public Dialog::FilesQuery, public QtQueryList<boost::filesystem::path> {
[7c9921]215 Q_OBJECT
[2c5765]216public:
[324403]217 FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[2c5765]218 virtual ~FilesQtQuery();
219 virtual bool handle();
[324403]220
221 virtual void onSubUpdate();
[7c9921]222
223public slots:
[324403]224 void onAddElement();
225 void onRemoveElement();
226 void onElementSelected();
[7c9921]227
[2c5765]228private:
[324403]229 FileQtQuery *subQuery;
[2c5765]230};
231
[7c9921]232class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
233 Q_OBJECT
[308aa4]234public:
[7dfd07]235 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
[308aa4]236 virtual ~IntQtQuery();
237 virtual bool handle();
[7c9921]238
239public slots:
240 void onUpdate(int);
241
[308aa4]242private:
243 QBoxLayout *parent;
244 QBoxLayout *thisLayout;
245 QLabel *titleLabel;
246 QSpinBox *inputBox;
[7dfd07]247 Dialog *dialog;
[308aa4]248};
249
[26ac2d]250class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery, public QtQueryList<int> {
[7c9921]251 Q_OBJECT
[308aa4]252public:
[26ac2d]253 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]254 virtual ~IntsQtQuery();
255 virtual bool handle();
[26ac2d]256
257 virtual void onSubUpdate();
[7c9921]258
259public slots:
[26ac2d]260 void onAddElement();
261 void onRemoveElement();
262 void onElementSelected();
[7c9921]263
[308aa4]264private:
[26ac2d]265 IntQtQuery *subQuery;
[308aa4]266};
267
[7c9921]268class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
269 Q_OBJECT
[308aa4]270public:
[7dfd07]271 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]272 virtual ~MoleculeQtQuery();
273 virtual bool handle();
[7c9921]274
275public slots:
276 void onUpdate(int);
277
[308aa4]278private:
279 QBoxLayout *parent;
280 QBoxLayout *thisLayout;
281 QLabel *titleLabel;
282 QComboBox *inputBox;
[7dfd07]283 Dialog *dialog;
[308aa4]284};
285
[1ae820]286class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery, public QtQueryList<const molecule *> {
[7c9921]287 Q_OBJECT
[308aa4]288public:
[7dfd07]289 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]290 virtual ~MoleculesQtQuery();
291 virtual bool handle();
[7c9921]292
[1ae820]293 virtual void onSubUpdate();
294
[7c9921]295public slots:
[1ae820]296 void onAddElement();
297 void onRemoveElement();
298 void onElementSelected();
[7c9921]299
[308aa4]300private:
[1ae820]301 MoleculeQtQuery *subQuery;
[308aa4]302};
303
[7c9921]304class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
305 Q_OBJECT
[308aa4]306public:
[7dfd07]307 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]308 virtual ~StringQtQuery();
309 virtual bool handle();
[7c9921]310
311public slots:
312 void onUpdate(const QString&);
313
[308aa4]314private:
315 QBoxLayout *parent;
316 QBoxLayout *thisLayout;
317 QLabel *titleLabel;
318 QLineEdit *inputBox;
[7dfd07]319 Dialog *dialog;
[308aa4]320};
321
[7b8a8e]322class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery, public QtQueryList<std::string> {
[7c9921]323 Q_OBJECT
[308aa4]324public:
[7dfd07]325 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]326 virtual ~StringsQtQuery();
327 virtual bool handle();
[7c9921]328
[7b8a8e]329 virtual void onSubUpdate();
330
[7c9921]331public slots:
[7b8a8e]332 void onAddElement();
333 void onRemoveElement();
334 void onElementSelected();
[7c9921]335
[308aa4]336private:
[7b8a8e]337 StringQtQuery *subQuery;
[308aa4]338};
339
[7c9921]340class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
341 Q_OBJECT
[838cd0]342public:
[7dfd07]343 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
[838cd0]344 virtual ~UnsignedIntQtQuery();
345 virtual bool handle();
[7c9921]346
347public slots:
[a2aa2f]348 void onUpdate(int);
[7c9921]349
[838cd0]350private:
351 QBoxLayout *parent;
352 QBoxLayout *thisLayout;
353 QLabel *titleLabel;
354 QSpinBox *inputBox;
[7dfd07]355 Dialog *dialog;
[838cd0]356};
357
[a2aa2f]358class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery, public QtQueryList<unsigned int> {
[7c9921]359 Q_OBJECT
[12948c]360public:
[a2aa2f]361 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[12948c]362 virtual ~UnsignedIntsQtQuery();
363 virtual bool handle();
[a2aa2f]364
365 virtual void onSubUpdate();
[7c9921]366
367public slots:
[a2aa2f]368 void onAddElement();
369 void onRemoveElement();
370 void onElementSelected();
[7c9921]371
[12948c]372private:
[a2aa2f]373 UnsignedIntQtQuery *subQuery;
[12948c]374};
375
[7c9921]376class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
377 Q_OBJECT
[308aa4]378public:
[7dfd07]379 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
[308aa4]380 virtual ~VectorQtQuery();
381 virtual bool handle();
[7c9921]382
383public slots:
384 void onUpdateX(double);
385 void onUpdateY(double);
386 void onUpdateZ(double);
387
[308aa4]388private:
389 QBoxLayout *parent;
390 QBoxLayout *mainLayout;
391 QLabel *titleLabel;
392 QBoxLayout *subLayout;
393 QBoxLayout *coordLayout;
394 QLabel *coordLabel;
[a14fe3]395 QDoubleSpinBox *coordInputX;
396 QDoubleSpinBox *coordInputY;
397 QDoubleSpinBox *coordInputZ;
[7dfd07]398 Dialog *dialog;
[308aa4]399};
400
[f84992]401class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery, public QtQueryList<Vector> {
[7c9921]402 Q_OBJECT
[308aa4]403public:
[f84992]404 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
[308aa4]405 virtual ~VectorsQtQuery();
406 virtual bool handle();
[7c9921]407
[f84992]408 virtual void onSubUpdate();
409
[7c9921]410public slots:
[f84992]411 void onAddElement();
412 void onRemoveElement();
413 void onElementSelected();
[7c9921]414
[308aa4]415private:
[f84992]416 VectorQtQuery *subQuery;
[308aa4]417};
418
[7c9921]419class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
420 Q_OBJECT
[0275ad]421public:
[7dfd07]422 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
[0275ad]423 virtual ~RandomNumberDistribution_ParametersQtQuery();
424 virtual bool handle();
[7c9921]425
426public slots:
427 void onUpdate();
428
[0275ad]429private:
430 QBoxLayout *parent;
431 QHBoxLayout *thisLayout;
432 QLabel *titleLabel;
433 QTextEdit *inputBox;
434 QPushButton *okButton;
[7dfd07]435 Dialog *dialog;
[0275ad]436};
437
[308aa4]438#endif /* QTQUERY_HPP_ */
Note: See TracBrowser for help on using the repository browser.