Changeset 7dfd07 for src/UIElements/Qt4/Query
- Timestamp:
- Jul 20, 2012, 9:25:14 AM (13 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:
- 7b8a8e
- Parents:
- 7c9921
- Location:
- src/UIElements/Qt4/Query
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/Query/AtomQtQuery.cpp
r7c9921 r7dfd07 30 30 #include "World.hpp" 31 31 32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::AtomQuery(_param, _title), 34 34 parent(_parent), … … 47 47 thisLayout->addWidget(inputBox); 48 48 49 pipe = new AtomQtQueryPipe(temp,_dialog, inputBox); 50 pipe->update(inputBox->currentIndex()); 49 onUpdate(inputBox->currentIndex()); 51 50 connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int))); 52 51 } … … 54 53 QtDialog::AtomQtQuery::~AtomQtQuery() 55 54 { 56 delete pipe;57 55 } 58 56 -
src/UIElements/Qt4/Query/AtomsQtQuery.cpp
r7c9921 r7dfd07 33 33 34 34 35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 36 36 Dialog::AtomsQuery(_param, _title), 37 37 parent(_parent), … … 68 68 thisHLayout->addLayout(thisV2Layout); 69 69 70 pipe = new AtomsQtQueryPipe(temp,_dialog,inputList); 71 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 70 /*connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 72 71 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add())); 73 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(remove())); 72 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(remove()));*/ 74 73 } 75 74 76 75 QtDialog::AtomsQtQuery::~AtomsQtQuery() 77 76 { 78 delete pipe;79 77 } 80 78 -
src/UIElements/Qt4/Query/BooleanQtQuery.cpp
r7c9921 r7dfd07 28 28 29 29 30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 31 31 Dialog::BooleanQuery(_param, _title), 32 32 parent(_parent), … … 37 37 temp = param.get(); 38 38 thisLayout = new QHBoxLayout(); 39 titleLabel = new QLabel(QString(getTitle().c_str()) ,_dialog);40 booleanCheckBox = new QCheckBox(QString(getTitle().c_str()) , _dialog);39 titleLabel = new QLabel(QString(getTitle().c_str())); 40 booleanCheckBox = new QCheckBox(QString(getTitle().c_str())); 41 41 booleanCheckBox->setCheckState(temp ? Qt::Checked : Qt::Unchecked); 42 42 … … 45 45 thisLayout->addWidget(booleanCheckBox); 46 46 47 pipe = new BooleanQtQueryPipe(temp,_dialog,booleanCheckBox);48 47 connect(booleanCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onUpdate(int))); 49 48 } … … 51 50 QtDialog::BooleanQtQuery::~BooleanQtQuery() 52 51 { 53 delete pipe;54 52 } 55 53 -
src/UIElements/Qt4/Query/DoubleQtQuery.cpp
r7c9921 r7dfd07 28 28 29 29 30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent, QtDialog *_dialog) :30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) : 31 31 Dialog::DoubleQuery(_param, title), 32 32 parent(_parent), … … 46 46 thisLayout->addWidget(inputBox); 47 47 48 //pipe = new DoubleQtQueryPipe(temp,_dialog);49 //pipe->update(inputBox->value());50 48 connect(inputBox,SIGNAL(valueChanged(double)),this,SLOT(onUpdate(double))); 51 49 } -
src/UIElements/Qt4/Query/DoublesQtQuery.cpp
r7c9921 r7dfd07 30 30 31 31 32 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::DoublesQuery(_param, title), 34 34 parent(_parent), … … 61 61 thisHLayout->addLayout(thisV2Layout); 62 62 63 pipe = new QtQueryListPipe<double>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);63 /*pipe = new QtQueryListPipe<double>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 64 64 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 65 65 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 66 66 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue())); 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));} 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/ 68 } 68 69 69 70 QtDialog::DoublesQtQuery::~DoublesQtQuery() 70 71 { 71 delete pipe;72 72 } 73 73 -
src/UIElements/Qt4/Query/ElementQtQuery.cpp
r7c9921 r7dfd07 31 31 #include "World.hpp" 32 32 33 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :33 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 34 34 Dialog::ElementQuery(_param, _title), 35 35 parent(_parent), … … 52 52 thisLayout->addWidget(inputBox); 53 53 54 pipe = new ElementQtQueryPipe(temp,_dialog,inputBox);55 pipe->update(inputBox->currentIndex());56 54 connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int))); 57 55 } … … 59 57 QtDialog::ElementQtQuery::~ElementQtQuery() 60 58 { 61 delete pipe;62 59 } 63 60 -
src/UIElements/Qt4/Query/ElementsQtQuery.cpp
r7c9921 r7dfd07 32 32 33 33 34 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :34 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 35 35 Dialog::ElementsQuery(_param, _title), 36 36 parent(_parent), … … 53 53 thisLayout->addWidget(inputBox); 54 54 55 pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox);55 /*pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox); 56 56 pipe->update(inputBox->currentIndex()); 57 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); 57 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));*/ 58 58 } 59 59 60 60 QtDialog::ElementsQtQuery::~ElementsQtQuery() 61 61 { 62 delete pipe;63 62 } 64 63 -
src/UIElements/Qt4/Query/EmptyQtQuery.cpp
r7c9921 r7dfd07 27 27 28 28 29 QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :29 QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 30 30 Dialog::EmptyQuery(_title), 31 31 parent(_parent), … … 37 37 parent->addLayout(thisLayout); 38 38 thisLayout->addWidget(titleLabel); 39 40 pipe = new EmptyQtQueryPipe(_dialog,titleLabel);41 39 } 42 40 43 41 QtDialog::EmptyQtQuery::~EmptyQtQuery() 44 42 { 45 delete pipe;46 43 } 47 44 -
src/UIElements/Qt4/Query/FileQtQuery.cpp
r7c9921 r7dfd07 30 30 31 31 32 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 33 33 Dialog::FileQuery(_param, _title), 34 34 parent(_parent), … … 36 36 { 37 37 38 filenameLineEdit = new QLineEdit( _dialog);38 filenameLineEdit = new QLineEdit(); 39 39 filenameLineEdit->setText(QString()); 40 40 filenameLineEdit->setReadOnly(true); … … 43 43 filenameLabel->setBuddy(filenameLineEdit); 44 44 45 filedialogButton = new QPushButton("&Choose" , _dialog);45 filedialogButton = new QPushButton("&Choose"); 46 46 theFileDialog = NULL; 47 48 pipe = new FileQtQueryPipe(temp,_dialog,filenameLineEdit,filedialogButton);49 47 50 48 thisLayout = new QHBoxLayout(); … … 59 57 QtDialog::FileQtQuery::~FileQtQuery() 60 58 { 61 delete pipe;62 59 if (theFileDialog != NULL) 63 60 delete theFileDialog; -
src/UIElements/Qt4/Query/FilesQtQuery.cpp
r7c9921 r7dfd07 32 32 33 33 34 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :34 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > ¶m, std::string _title, QBoxLayout *_parent, Dialog *_dialog) : 35 35 Dialog::FilesQuery(param, _title), 36 36 parent(_parent), … … 63 63 thisHLayout->addLayout(thisV2Layout); 64 64 65 pipe = new QtQueryListPipe<boost::filesystem::path>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);65 /*pipe = new QtQueryListPipe<boost::filesystem::path>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 66 66 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 67 67 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 68 68 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue())); 69 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow())); 69 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/ 70 70 } 71 71 72 72 QtDialog::FilesQtQuery::~FilesQtQuery() 73 73 { 74 delete pipe;75 74 } 76 75 -
src/UIElements/Qt4/Query/IntQtQuery.cpp
r7c9921 r7dfd07 28 28 29 29 30 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :30 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 31 31 Dialog::IntQuery(_param, _title), 32 32 parent(_parent), … … 44 44 thisLayout->addWidget(inputBox); 45 45 46 pipe = new IntQtQueryPipe(temp,_dialog);47 pipe->update(inputBox->value());48 46 connect(inputBox,SIGNAL(valueChanged(int)),this,SLOT(onUpdate(int))); 49 47 } … … 51 49 QtDialog::IntQtQuery::~IntQtQuery() 52 50 { 53 delete pipe;54 51 } 55 52 -
src/UIElements/Qt4/Query/IntsQtQuery.cpp
r7c9921 r7dfd07 30 30 31 31 32 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::IntsQuery(_param, _title), 34 34 parent(_parent), … … 61 61 thisHLayout->addLayout(thisV2Layout); 62 62 63 pipe = new QtQueryListPipe<int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);63 /*pipe = new QtQueryListPipe<int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 64 64 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 65 65 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 66 66 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue())); 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow())); 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/ 68 68 } 69 69 70 70 QtDialog::IntsQtQuery::~IntsQtQuery() 71 71 { 72 delete pipe;73 72 } 74 73 -
src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
r7c9921 r7dfd07 31 31 32 32 33 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :33 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) : 34 34 Dialog::MoleculeQuery(_param, _title), 35 35 parent(_parent), … … 52 52 thisLayout->addWidget(inputBox); 53 53 54 pipe = new MoleculeQtQueryPipe(temp,_dialog,inputBox);55 pipe->update(inputBox->currentIndex());56 54 connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int))); 57 55 } … … 59 57 QtDialog::MoleculeQtQuery::~MoleculeQtQuery() 60 58 { 61 delete pipe;62 59 } 63 60 -
src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
r7c9921 r7dfd07 31 31 32 32 33 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :33 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) : 34 34 Dialog::MoleculesQuery(_param, _title), 35 35 parent(_parent), … … 52 52 thisLayout->addWidget(inputBox); 53 53 54 pipe = new MoleculesQtQueryPipe(temp,_dialog,inputBox);54 /*pipe = new MoleculesQtQueryPipe(temp,_dialog,inputBox); 55 55 pipe->update(inputBox->currentIndex()); 56 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); 56 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));*/ 57 57 } 58 58 59 59 QtDialog::MoleculesQtQuery::~MoleculesQtQuery() 60 60 { 61 delete pipe;62 61 } 63 62 -
src/UIElements/Qt4/Query/QtQuery.hpp
r7c9921 r7dfd07 34 34 class QFileDialog; 35 35 36 // Forward declarations for plumbing37 template<typename T> class QtQueryListPipe;38 class AtomQtQueryPipe;39 class AtomsQtQueryPipe;40 class BooleanQtQueryPipe;41 class RealSpaceMatrixQtQueryPipe;42 class DoubleQtQueryPipe;43 class DoublesQtQueryPipe;44 class ElementQtQueryPipe;45 class ElementsQtQueryPipe;46 class EmptyQtQueryPipe;47 class FileQtQueryPipe;48 class FilesQtQueryPipe;49 class IntQtQueryPipe;50 class MoleculeQtQueryPipe;51 class MoleculesQtQueryPipe;52 class StringQtQueryPipe;53 class StringsQtQueryPipe;54 class UnsignedIntQtQueryPipe;55 class UnsignedIntsQtQueryPipe;56 class VectorQtQueryPipe;57 class VectorsQtQueryPipe;58 class RandomNumberDistribution_ParametersQtQueryPipe;59 60 36 class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery { 61 37 Q_OBJECT 62 38 public: 63 AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);39 AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 64 40 virtual ~AtomQtQuery(); 65 41 virtual bool handle(); … … 73 49 QLabel *titleLabel; 74 50 QComboBox *inputBox; 75 QtDialog *dialog; 76 77 AtomQtQueryPipe *pipe; 51 Dialog *dialog; 78 52 }; 79 53 … … 81 55 Q_OBJECT 82 56 public: 83 AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);57 AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 84 58 virtual ~AtomsQtQuery(); 85 59 virtual bool handle(); … … 94 68 QLabel *inputLabel; 95 69 QListWidget *inputList; 96 QtDialog *dialog; 97 98 AtomsQtQueryPipe *pipe; 70 Dialog *dialog; 99 71 }; 100 72 … … 102 74 Q_OBJECT 103 75 public: 104 BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);76 BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog); 105 77 virtual ~BooleanQtQuery(); 106 78 virtual bool handle(); … … 114 86 QLabel *titleLabel; 115 87 QCheckBox *booleanCheckBox; 116 QtDialog *dialog; 117 118 BooleanQtQueryPipe *pipe; 88 Dialog *dialog; 119 89 }; 120 90 … … 122 92 Q_OBJECT 123 93 public: 124 RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);94 RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 125 95 virtual ~RealSpaceMatrixQtQuery(); 126 96 virtual bool handle(); … … 134 104 QLabel *titleLabel; 135 105 QTableWidget *inputTable; 136 QtDialog *dialog; 137 138 RealSpaceMatrixQtQueryPipe *pipe; 106 Dialog *dialog; 139 107 }; 140 108 … … 142 110 Q_OBJECT 143 111 public: 144 DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent, QtDialog *_dialog);112 DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,Dialog *_dialog); 145 113 virtual ~DoubleQtQuery(); 146 114 virtual bool handle(); … … 154 122 QLabel *titleLabel; 155 123 QDoubleSpinBox *inputBox; 156 QtDialog *dialog; 157 158 DoubleQtQueryPipe *pipe; 124 Dialog *dialog; 159 125 }; 160 126 … … 162 128 Q_OBJECT 163 129 public: 164 DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent, QtDialog *_dialog);130 DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,Dialog *_dialog); 165 131 virtual ~DoublesQtQuery(); 166 132 virtual bool handle(); … … 174 140 QLabel *titleLabel; 175 141 QDoubleSpinBox *inputBox; 176 QtDialog *dialog; 177 178 QtQueryListPipe<double> *pipe; 142 Dialog *dialog; 179 143 }; 180 144 … … 182 146 Q_OBJECT 183 147 public: 184 ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);148 ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog); 185 149 virtual ~ElementQtQuery(); 186 150 virtual bool handle(); … … 194 158 QLabel *titleLabel; 195 159 QComboBox *inputBox; 196 QtDialog *dialog; 197 198 ElementQtQueryPipe *pipe; 160 Dialog *dialog; 199 161 }; 200 162 … … 202 164 Q_OBJECT 203 165 public: 204 ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);166 ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, Dialog *_dialog); 205 167 virtual ~ElementsQtQuery(); 206 168 virtual bool handle(); … … 214 176 QLabel *titleLabel; 215 177 QComboBox *inputBox; 216 QtDialog *dialog; 217 218 ElementsQtQueryPipe *pipe; 178 Dialog *dialog; 219 179 }; 220 180 221 181 class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery { 222 182 public: 223 EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);183 EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog); 224 184 virtual ~EmptyQtQuery(); 225 185 virtual bool handle(); … … 228 188 QBoxLayout *thisLayout; 229 189 QLabel *titleLabel; 230 QtDialog *dialog; 231 232 EmptyQtQueryPipe *pipe; 190 Dialog *dialog; 233 191 }; 234 192 … … 236 194 Q_OBJECT 237 195 public: 238 FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);196 FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog); 239 197 virtual ~FileQtQuery(); 240 198 virtual bool handle(); … … 251 209 QPushButton *filedialogButton; 252 210 QFileDialog *theFileDialog; 253 QtDialog *dialog; 254 255 FileQtQueryPipe *pipe; 211 Dialog *dialog; 256 212 }; 257 213 … … 259 215 Q_OBJECT 260 216 public: 261 FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);217 FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, Dialog *_dialog); 262 218 virtual ~FilesQtQuery(); 263 219 virtual bool handle(); … … 274 230 QBoxLayout *thisLayout; 275 231 QLabel *titleLabel; 276 QtDialog *dialog; 277 278 QtQueryListPipe<boost::filesystem::path> *pipe; 232 Dialog *dialog; 279 233 }; 280 234 … … 282 236 Q_OBJECT 283 237 public: 284 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent, QtDialog *_dialog);238 IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog); 285 239 virtual ~IntQtQuery(); 286 240 virtual bool handle(); … … 294 248 QLabel *titleLabel; 295 249 QSpinBox *inputBox; 296 QtDialog *dialog; 297 298 IntQtQueryPipe *pipe; 250 Dialog *dialog; 299 251 }; 300 252 … … 302 254 Q_OBJECT 303 255 public: 304 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent, QtDialog *_dialog);256 IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog); 305 257 virtual ~IntsQtQuery(); 306 258 virtual bool handle(); … … 317 269 QBoxLayout *thisLayout; 318 270 QLabel *titleLabel; 319 QtDialog *dialog; 320 321 QtQueryListPipe<int> *pipe; 271 Dialog *dialog; 322 272 }; 323 273 … … 325 275 Q_OBJECT 326 276 public: 327 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);277 MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 328 278 virtual ~MoleculeQtQuery(); 329 279 virtual bool handle(); … … 337 287 QLabel *titleLabel; 338 288 QComboBox *inputBox; 339 QtDialog *dialog; 340 341 MoleculeQtQueryPipe *pipe; 289 Dialog *dialog; 342 290 }; 343 291 … … 345 293 Q_OBJECT 346 294 public: 347 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);295 MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 348 296 virtual ~MoleculesQtQuery(); 349 297 virtual bool handle(); … … 357 305 QLabel *titleLabel; 358 306 QComboBox *inputBox; 359 QtDialog *dialog; 360 361 MoleculesQtQueryPipe *pipe; 307 Dialog *dialog; 362 308 }; 363 309 … … 365 311 Q_OBJECT 366 312 public: 367 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);313 StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 368 314 virtual ~StringQtQuery(); 369 315 virtual bool handle(); … … 377 323 QLabel *titleLabel; 378 324 QLineEdit *inputBox; 379 QtDialog *dialog; 380 381 StringQtQueryPipe *pipe; 325 Dialog *dialog; 382 326 }; 383 327 … … 385 329 Q_OBJECT 386 330 public: 387 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);331 StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog); 388 332 virtual ~StringsQtQuery(); 389 333 virtual bool handle(); … … 397 341 QLabel *titleLabel; 398 342 QLineEdit *inputBox; 399 QtDialog *dialog; 400 401 StringsQtQueryPipe *pipe; 343 Dialog *dialog; 402 344 }; 403 345 … … 405 347 Q_OBJECT 406 348 public: 407 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent, QtDialog *_dialog);349 UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog); 408 350 virtual ~UnsignedIntQtQuery(); 409 351 virtual bool handle(); … … 417 359 QLabel *titleLabel; 418 360 QSpinBox *inputBox; 419 QtDialog *dialog; 420 421 UnsignedIntQtQueryPipe *pipe; 361 Dialog *dialog; 422 362 }; 423 363 … … 425 365 Q_OBJECT 426 366 public: 427 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent, QtDialog *_dialog);367 UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog); 428 368 virtual ~UnsignedIntsQtQuery(); 429 369 virtual bool handle(); … … 440 380 QBoxLayout *thisLayout; 441 381 QLabel *titleLabel; 442 QtDialog *dialog; 443 444 QtQueryListPipe<unsigned int> *pipe; 382 Dialog *dialog; 445 383 }; 446 384 … … 449 387 Q_OBJECT 450 388 public: 451 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *, QtDialog *);389 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *); 452 390 virtual ~VectorQtQuery(); 453 391 virtual bool handle(); … … 468 406 QDoubleSpinBox *coordInputY; 469 407 QDoubleSpinBox *coordInputZ; 470 QtDialog *dialog; 471 472 VectorQtQueryPipe *pipe; 408 Dialog *dialog; 473 409 }; 474 410 … … 476 412 Q_OBJECT 477 413 public: 478 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *, QtDialog *);414 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,Dialog *); 479 415 virtual ~VectorsQtQuery(); 480 416 virtual bool handle(); … … 491 427 QLabel *coordLabel; 492 428 QDoubleSpinBox *coordInput; 493 QtDialog *dialog; 494 495 VectorsQtQueryPipe *pipe; 429 Dialog *dialog; 496 430 }; 497 431 … … 499 433 Q_OBJECT 500 434 public: 501 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *, QtDialog *);435 RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *); 502 436 virtual ~RandomNumberDistribution_ParametersQtQuery(); 503 437 virtual bool handle(); … … 512 446 QTextEdit *inputBox; 513 447 QPushButton *okButton; 514 QtDialog *dialog; 515 516 RandomNumberDistribution_ParametersQtQueryPipe *pipe; 448 Dialog *dialog; 517 449 }; 518 450 -
src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
r7c9921 r7dfd07 31 31 #include "World.hpp" 32 32 33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 34 34 Dialog::RandomNumberDistribution_ParametersQuery(_param, _title), 35 35 parent(_parent), … … 51 51 okButton = new QPushButton(tr("Ok")); 52 52 53 pipe = new RandomNumberDistribution_ParametersQtQueryPipe(temp,_dialog, inputBox);54 53 connect(okButton,SIGNAL(clicked()),this,SLOT(onUpdate())); 55 54 } … … 57 56 QtDialog::RandomNumberDistribution_ParametersQtQuery::~RandomNumberDistribution_ParametersQtQuery() 58 57 { 59 delete pipe;60 58 } 61 59 -
src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
r7c9921 r7dfd07 30 30 #include "World.hpp" 31 31 32 QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::RealSpaceMatrixQuery(_param, _title), 34 34 parent(_parent), … … 39 39 40 40 // init input table 41 inputTable = new QTableWidget(3,3 , _dialog);41 inputTable = new QTableWidget(3,3); 42 42 QStringList CoordinateList; 43 43 CoordinateList << "x" << "y" << "z"; 44 44 inputTable->setHorizontalHeaderLabels(CoordinateList); 45 45 inputTable->setVerticalHeaderLabels(CoordinateList); 46 47 pipe = new RealSpaceMatrixQtQueryPipe(temp,_dialog, inputTable);48 46 49 47 // fill the box with current matrix … … 53 51 QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j))); 54 52 inputTable->setItem(i,j,newItem); 55 pipe->update(i,j);53 onUpdate(i,j); 56 54 } 57 55 … … 65 63 QtDialog::RealSpaceMatrixQtQuery::~RealSpaceMatrixQtQuery() 66 64 { 67 delete pipe;68 65 } 69 66 -
src/UIElements/Qt4/Query/StringQtQuery.cpp
r7c9921 r7dfd07 28 28 29 29 30 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :30 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 31 31 Dialog::StringQuery(_param, _title), 32 32 parent(_parent), … … 43 43 thisLayout->addWidget(inputBox); 44 44 45 pipe = new StringQtQueryPipe(temp,_dialog); 46 pipe->update(inputBox->text()); 45 onUpdate(inputBox->text()); 47 46 connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&))); 48 47 } … … 50 49 QtDialog::StringQtQuery::~StringQtQuery() 51 50 { 52 delete pipe;53 51 } 54 52 -
src/UIElements/Qt4/Query/StringsQtQuery.cpp
r7c9921 r7dfd07 30 30 31 31 32 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::StringsQuery(_param, _title), 34 34 parent(_parent), … … 61 61 thisHLayout->addLayout(thisV2Layout); 62 62 63 pipe = new StringsQtQueryPipe(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);63 /* pipe = new StringsQtQueryPipe(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 64 64 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(elementEntered(const QString&))); 65 65 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(elementSelected())); 66 66 connect(AddButton,SIGNAL(clicked()),pipe,SLOT(addElement())); 67 connect(RemoveButton,SIGNAL(clicked()),pipe,SLOT(removeElement()));} 67 connect(RemoveButton,SIGNAL(clicked()),pipe,SLOT(removeElement()));*/ 68 } 68 69 69 70 QtDialog::StringsQtQuery::~StringsQtQuery() 70 71 { 71 delete pipe;72 72 } 73 73 -
src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
r7c9921 r7dfd07 28 28 29 29 30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 31 31 Dialog::UnsignedIntQuery(_param, _title), 32 32 parent(_parent), … … 44 44 thisLayout->addWidget(inputBox); 45 45 46 pipe = new UnsignedIntQtQueryPipe(temp,_dialog); 47 pipe->update(inputBox->value()); 46 onUpdate(inputBox->value()); 48 47 connect(inputBox,SIGNAL(valueChanged(unsigned int)),this,SLOT(onUpdate(unsigned int))); 49 48 } … … 51 50 QtDialog::UnsignedIntQtQuery::~UnsignedIntQtQuery() 52 51 { 53 delete pipe;54 52 } 55 53 -
src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
r7c9921 r7dfd07 30 30 31 31 32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent, QtDialog *_dialog) :32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 33 33 Dialog::UnsignedIntsQuery(_param, _title), 34 34 parent(_parent), … … 61 61 thisHLayout->addLayout(thisV2Layout); 62 62 63 pipe = new QtQueryListPipe<unsigned int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);63 /*pipe = new QtQueryListPipe<unsigned int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 64 64 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 65 65 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 66 66 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue())); 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow())); 67 connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/ 68 68 } 69 69 70 70 QtDialog::UnsignedIntsQtQuery::~UnsignedIntsQtQuery() 71 71 { 72 delete pipe;73 72 } 74 73 -
src/UIElements/Qt4/Query/VectorQtQuery.cpp
r7c9921 r7dfd07 29 29 30 30 31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent, QtDialog *_dialog) :31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) : 32 32 Dialog::VectorQuery(_param, title), 33 33 parent(_parent), … … 65 65 coordInputZ->setDecimals(3); 66 66 coordLayout->addWidget(coordInputZ); 67 pipe = new VectorQtQueryPipe(temp,_dialog,inputBox);68 //pipe->update(coordInput->value());69 67 connect(coordInputX,SIGNAL(valueChanged(double)),this,SLOT(onUpdateX(double))); 70 68 connect(coordInputY,SIGNAL(valueChanged(double)),this,SLOT(onUpdateY(double))); -
src/UIElements/Qt4/Query/VectorsQtQuery.cpp
r7c9921 r7dfd07 29 29 30 30 31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string title, QBoxLayout *_parent, QtDialog *_dialog) :31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) : 32 32 Dialog::VectorsQuery(_param, title), 33 33 parent(_parent), … … 48 48 coordInput->setDecimals(3); 49 49 coordLayout->addWidget(coordInput); 50 pipe = new VectorsQtQueryPipe(temp,_dialog,inputBox);50 /*pipe = new VectorsQtQueryPipe(temp,_dialog,inputBox); 51 51 //pipe->update(coordInput->value()); 52 connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double))); 52 connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));*/ 53 53 parent->addLayout(mainLayout); 54 54 }
Note:
See TracChangeset
for help on using the changeset viewer.