Changeset a5ddf0 for src/UIElements/Qt4/QtDialog.hpp
- Timestamp:
- Dec 4, 2010, 11:44:19 PM (14 years ago)
- Branches:
- 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
- Children:
- 87db7a
- Parents:
- 308aa4
- git-author:
- Frederik Heber <heber@…> (11/08/10 14:06:23)
- git-committer:
- Frederik Heber <heber@…> (12/04/10 23:44:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/QtDialog.hpp
r308aa4 ra5ddf0 11 11 #include "UIElements/Dialog.hpp" 12 12 #include <QtGui/QDialog> 13 #include <QtGui/QFileDialog>14 15 #include <boost/filesystem.hpp>16 13 17 14 #include <map> … … 20 17 21 18 class QBoxLayout; 22 class QLabel;23 class QSpinBox;24 class QDoubleSpinBox;25 class QLineEdit;26 class QListWidget;27 class QTableWidget;28 class QComboBox;29 19 class QDialogButtonBox; 30 31 class Matrix;32 33 20 34 21 class QtDialog : public QDialog, public Dialog … … 89 76 }; 90 77 91 // All kinds of plumbing for Queries92 // Plumbing needs to be outside of the class where it is needed,93 // since MOC doesn't like nested classes94 95 96 template<typename T> class QtQueryListPipe : public QWidget {97 public:98 QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);99 virtual ~QtQueryListPipe();100 void AddInteger();101 void RemoveInteger();102 void IntegerSelected();103 void IntegerEntered(const QString&);104 105 private:106 void AddValue(T item);107 void RemoveRow(int row);108 109 std::vector<T> *content;110 QtDialog *dialog;111 QLineEdit *inputBox;112 QListWidget *inputList;113 QPushButton *AddButton;114 QPushButton *RemoveButton;115 };116 117 118 class StringQtQueryPipe : public QWidget {119 Q_OBJECT120 public:121 StringQtQueryPipe(std::string *_content, QtDialog *_dialog);122 virtual ~StringQtQueryPipe();123 124 public slots:125 void update(const QString&);126 127 private:128 std::string *content;129 QtDialog *dialog;130 131 };132 133 class IntQtQueryPipe : public QWidget {134 Q_OBJECT135 public:136 IntQtQueryPipe(int *_content, QtDialog *_dialog);137 virtual ~IntQtQueryPipe();138 139 public slots:140 void update(int);141 142 private:143 int *content;144 QtDialog *dialog;145 146 };147 148 149 class DoubleQtQueryPipe : public QWidget {150 Q_OBJECT151 public:152 DoubleQtQueryPipe(double *_content, QtDialog *_dialog);153 virtual ~DoubleQtQueryPipe();154 155 public slots:156 void update(double);157 158 private:159 double *content;160 QtDialog *dialog;161 162 };163 164 class BoxQtQueryPipe : public QWidget {165 Q_OBJECT166 public:167 BoxQtQueryPipe(Box &_content, QtDialog *_dialog, QTableWidget *_inputTable);168 virtual ~BoxQtQueryPipe();169 170 public slots:171 void update(int,int);172 173 private:174 Box &content;175 QtDialog *dialog;176 QTableWidget *inputTable;177 178 Matrix *tmpM;179 };180 181 182 class AtomQtQueryPipe : public QWidget {183 Q_OBJECT184 public:185 AtomQtQueryPipe(const atom **_content, QtDialog *_dialog, QComboBox *_theBox);186 virtual ~AtomQtQueryPipe();187 188 public slots:189 void update(int);190 191 private:192 const atom **content;193 QtDialog *dialog;194 QComboBox *theBox;195 196 };197 198 199 class AtomsQtQueryPipe : public QWidget {200 Q_OBJECT201 public:202 AtomsQtQueryPipe(std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList);203 virtual ~AtomsQtQueryPipe();204 205 public slots:206 void update();207 void add();208 void remove();209 210 private:211 std::vector<const atom *>*content;212 std::map<int, const atom *> lookup;213 std::set<const atom *> currentList;214 QtDialog *dialog;215 QListWidget *theList;216 217 };218 219 class MoleculeQtQueryPipe : public QWidget {220 Q_OBJECT221 public:222 MoleculeQtQueryPipe(const molecule **_content, QtDialog *_dialog, QComboBox *_theBox);223 virtual ~MoleculeQtQueryPipe();224 225 public slots:226 void update(int);227 228 private:229 const molecule **content;230 QtDialog *dialog;231 QComboBox *theBox;232 233 };234 235 class MoleculesQtQueryPipe : public QWidget {236 Q_OBJECT237 public:238 MoleculesQtQueryPipe(std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox);239 virtual ~MoleculesQtQueryPipe();240 241 public slots:242 void update(int);243 244 private:245 std::vector<const molecule *>*content;246 QtDialog *dialog;247 QComboBox *theBox;248 249 };250 251 class VectorQtQueryPipe : public QWidget {252 Q_OBJECT253 public:254 VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox);255 virtual ~VectorQtQueryPipe();256 257 public slots:258 void update();259 260 private:261 Vector *content;262 QtDialog *dialog;263 QComboBox *theBox;264 };265 266 class VectorsQtQueryPipe : public QWidget {267 Q_OBJECT268 public:269 VectorsQtQueryPipe(std::vector<Vector>*_content, QtDialog *_dialog, QComboBox *_theBox);270 virtual ~VectorsQtQueryPipe();271 272 public slots:273 void update();274 275 private:276 std::vector<Vector> *content;277 QtDialog *dialog;278 QComboBox *theBox;279 };280 281 class EmptyQtQueryPipe : public QWidget {282 Q_OBJECT283 public:284 EmptyQtQueryPipe(QtDialog *_dialog, QLabel *_textLabel);285 virtual ~EmptyQtQueryPipe();286 287 public slots:288 void update();289 290 private:291 QtDialog *dialog;292 QLabel *textLabel;293 };294 295 class BooleanQtQueryPipe : public QWidget {296 Q_OBJECT297 public:298 BooleanQtQueryPipe(const bool *_content, QtDialog *_dialog, QComboBox *_booleanComboBox);299 virtual ~BooleanQtQueryPipe();300 301 public slots:302 void update();303 304 private:305 const bool *content;306 QtDialog *dialog;307 QComboBox *booleanComboBox;308 };309 310 class ElementQtQueryPipe : public QWidget {311 Q_OBJECT312 public:313 ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox);314 virtual ~ElementQtQueryPipe();315 316 public slots:317 void update(int);318 319 private:320 const element **content;321 QtDialog *dialog;322 QComboBox *theBox;323 };324 325 class ElementsQtQueryPipe : public QWidget {326 Q_OBJECT327 public:328 ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox);329 virtual ~ElementsQtQueryPipe();330 331 public slots:332 void update(int);333 334 private:335 std::vector<const element *>*content;336 QtDialog *dialog;337 QComboBox *theBox;338 };339 340 class FileQtQueryPipe : public QWidget {341 Q_OBJECT342 public:343 FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);344 virtual ~FileQtQueryPipe();345 346 public slots:347 void update();348 void showFileDialog();349 350 private:351 boost::filesystem::path *content;352 QtDialog *dialog;353 QLineEdit *filenameLineEdit;354 QPushButton *filedialogButton;355 QFileDialog *theFileDialog;356 };357 78 358 79 #endif /* QTDIALOG_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.