source: src/UIElements/QT4/QTDialog.hpp@ cef1d7

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 cef1d7 was cef1d7, checked in by Tillmann Crueger <crueger@…>, 15 years ago

Added basic structure for a GL-Visualization of molecules.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*
2 * QTDialog.hpp
3 *
4 * Created on: Jan 18, 2010
5 * Author: crueger
6 */
7
8#ifndef QTDIALOG_HPP_
9#define QTDIALOG_HPP_
10
11#include "UIElements/Dialog.hpp"
12#include <QtGui/QDialog>
13
14class QBoxLayout;
15class QLabel;
16class QSpinBox;
17class QLineEdit;
18class QComboBox;
19class QDialogButtonBox;
20
21
22// Forward declarations for plumbing
23class StringQTQueryPipe;
24class IntQTQueryPipe;
25class MoleculeQTQueryPipe;
26
27class QTDialog : public QDialog, public Dialog
28{
29 Q_OBJECT
30public:
31 QTDialog();
32 virtual ~QTDialog();
33
34 virtual void queryInt(const char *, int *);
35 virtual void queryString(const char*, std::string *);
36 virtual void queryMolecule(const char*,molecule**,MoleculeListClass*);
37
38 virtual bool display();
39
40 virtual void update();
41
42protected:
43 class IntQTQuery : public Dialog::IntQuery {
44 public:
45 IntQTQuery(std::string _title, int *_target,QBoxLayout *_parent,QTDialog *_dialog);
46 ~IntQTQuery();
47 virtual bool handle();
48 private:
49 QBoxLayout *parent;
50 QBoxLayout *thisLayout;
51 QLabel *titleLabel;
52 QSpinBox *inputBox;
53
54 IntQTQueryPipe *pipe;
55 };
56
57 class StringQTQuery : public Dialog::StringQuery {
58 public:
59 StringQTQuery(std::string _title, std::string *_target, QBoxLayout *_parent,QTDialog *_dialog);
60 ~StringQTQuery();
61 virtual bool handle();
62 private:
63 QBoxLayout *parent;
64 QBoxLayout *thisLayout;
65 QLabel *titleLabel;
66 QLineEdit *inputBox;
67
68 StringQTQueryPipe *pipe;
69 };
70
71 class MoleculeQTQuery : public Dialog::MoleculeQuery {
72 public:
73 MoleculeQTQuery(std::string _title, molecule **_target, MoleculeListClass *_molecules, QBoxLayout *_parent,QTDialog *_dialog);
74 ~MoleculeQTQuery();
75 virtual bool handle();
76 private:
77 QBoxLayout *parent;
78 QBoxLayout *thisLayout;
79 QLabel *titleLabel;
80 QComboBox *inputBox;
81
82 MoleculeQTQueryPipe *pipe;
83 };
84
85private:
86 QBoxLayout *mainLayout;
87 QBoxLayout *inputLayout;
88 QBoxLayout *buttonLayout;
89 QDialogButtonBox *buttons;
90};
91
92// All kinds of plumbing for Queries
93// Plumbing needs to be outside of the class where it is needed,
94// since MOC doesn't like nested classes
95
96class StringQTQueryPipe : public QWidget {
97 Q_OBJECT
98public:
99 StringQTQueryPipe(std::string *_content, QTDialog *_dialog);
100 ~StringQTQueryPipe();
101
102public slots:
103 void update(const QString&);
104
105private:
106 std::string *content;
107 QTDialog *dialog;
108
109};
110
111class IntQTQueryPipe : public QWidget {
112 Q_OBJECT
113public:
114 IntQTQueryPipe(int *_content, QTDialog *_dialog);
115 ~IntQTQueryPipe();
116
117public slots:
118 void update(int);
119
120private:
121 int *content;
122 QTDialog *dialog;
123
124};
125
126
127class MoleculeQTQueryPipe : public QWidget {
128 Q_OBJECT
129public:
130 MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox, MoleculeListClass *_molecules);
131 ~MoleculeQTQueryPipe();
132
133public slots:
134 void update(int);
135
136private:
137 molecule **content;
138 MoleculeListClass *molecules;
139 QTDialog *dialog;
140 QComboBox *theBox;
141
142};
143#endif /* QTDIALOG_HPP_ */
Note: See TracBrowser for help on using the repository browser.