Changeset f4b6bc9 for src/UIElements/Qt4
- Timestamp:
- Apr 4, 2018, 4:59:24 PM (7 years ago)
- Branches:
- Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
- Children:
- 0aae02
- Parents:
- 775f3f
- git-author:
- Frederik Heber <frederik.heber@…> (07/06/17 22:18:13)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/04/18 16:59:24)
- Location:
- src/UIElements/Qt4
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/QtDialog.cpp
r775f3f rf4b6bc9 78 78 update(); 79 79 if(exec()) { 80 // handleAll() basically just sets handleSuccess to true 81 handleAll(); 82 // setAll() will then set the Parameter<> using the internal temp value of the QtQuery instances 80 83 setAll(); 81 84 return true; -
src/UIElements/Qt4/Query/AtomQtQuery.cpp
r775f3f rf4b6bc9 75 75 int idx = data.toInt(); 76 76 temp = const_cast<const World &>(World::getInstance()).getAtom(AtomById(idx)); 77 QtQuery<const atom *>::handle(); 77 78 dialog->update(); 78 79 } -
src/UIElements/Qt4/Query/AtomsQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::AtomsQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<const atom *> >::handle(); 74 75 } 75 76 76 77 void QtDialog::AtomsQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<const atom *> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/BooleanQtQuery.cpp
r775f3f rf4b6bc9 69 69 void QtDialog::BooleanQtQuery::onUpdate(int state) { 70 70 temp = (state == Qt::Checked); 71 QtQuery<bool>::handle(); 71 72 dialog->update(); 72 73 } -
src/UIElements/Qt4/Query/DoubleQtQuery.cpp
r775f3f rf4b6bc9 70 70 void QtDialog::DoubleQtQuery::onUpdate(double newDbl) { 71 71 temp = newDbl; 72 QtQuery<double>::handle(); 72 73 dialog->update(); 73 74 } -
src/UIElements/Qt4/Query/DoublesQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::DoublesQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<double> >::handle(); 74 75 } 75 76 76 77 void QtDialog::DoublesQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<double> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/ElementQtQuery.cpp
r775f3f rf4b6bc9 79 79 int idx = data.toInt(); 80 80 temp = World::getInstance().getPeriode()->FindElement(idx); 81 QtQuery<const element *>::handle(); 81 82 dialog->update(); 82 83 } -
src/UIElements/Qt4/Query/ElementsQtQuery.cpp
r775f3f rf4b6bc9 73 73 void QtDialog::ElementsQtQuery::onAddElement() { 74 74 addElement(); 75 QtQuery<std::vector<const element *> >::handle(); 75 76 } 76 77 77 78 void QtDialog::ElementsQtQuery::onRemoveElement() { 78 79 removeElements(); 80 QtQuery<std::vector<const element *> >::handle(); 79 81 } 80 82 -
src/UIElements/Qt4/Query/EmptyQtQuery.cpp
r775f3f rf4b6bc9 58 58 } 59 59 60 boolQtDialog::EmptyQtQuery::handle(){61 return true;60 void QtDialog::EmptyQtQuery::handle(){ 61 return; 62 62 } 63 63 -
src/UIElements/Qt4/Query/FileQtQuery.cpp
r775f3f rf4b6bc9 113 113 std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl; 114 114 temp = ListOfFilenames.at(0).toStdString(); 115 QtQuery<boost::filesystem::path>::handle(); 115 116 filenameLineEdit->setText(QString::fromStdString(temp.string())); 116 117 dialog->update(); -
src/UIElements/Qt4/Query/FilesQtQuery.cpp
r775f3f rf4b6bc9 73 73 void QtDialog::FilesQtQuery::onAddElement() { 74 74 addElement(); 75 QtQuery<std::vector<boost::filesystem::path> >::handle(); 75 76 } 76 77 77 78 void QtDialog::FilesQtQuery::onRemoveElement() { 78 79 removeElements(); 80 QtQuery<std::vector<boost::filesystem::path> >::handle(); 79 81 } 80 82 -
src/UIElements/Qt4/Query/IntQtQuery.cpp
r775f3f rf4b6bc9 68 68 void QtDialog::IntQtQuery::onUpdate(int newInt) { 69 69 temp = newInt; 70 QtQuery<int>::handle(); 70 71 dialog->update(); 71 72 } -
src/UIElements/Qt4/Query/IntsQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::IntsQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<int> >::handle(); 74 75 } 75 76 76 77 void QtDialog::IntsQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<int> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/KeyValuePairQtQuery.cpp
r775f3f rf4b6bc9 88 88 void QtDialog::KeyValuePairQtQuery::onUpdate(const QString& newText) { 89 89 temp = newText.toStdString(); 90 QtQuery<KeyValuePair>::handle(); 90 91 dialog->update(); 91 92 } … … 93 94 void QtDialog::KeyValuePairQtQuery::onUpdateCombo(int newIndex) { 94 95 temp = comboBox->itemText(newIndex).toStdString(); 96 QtQuery<KeyValuePair>::handle(); 95 97 dialog->update(); 96 98 } -
src/UIElements/Qt4/Query/KeyValuePairsQtQuery.cpp
r775f3f rf4b6bc9 73 73 void QtDialog::KeyValuePairsQtQuery::onAddElement() { 74 74 addElement(); 75 QtQuery<std::vector<KeyValuePair> >::handle(); 75 76 } 76 77 77 78 void QtDialog::KeyValuePairsQtQuery::onRemoveElement() { 78 79 removeElements(); 80 QtQuery<std::vector<KeyValuePair> >::handle(); 79 81 } 80 82 -
src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
r775f3f rf4b6bc9 79 79 int idx = data.toInt(); 80 80 temp = const_cast<const World &>(World::getInstance()).getMolecule(MoleculeById(idx)); 81 QtQuery<const molecule *>::handle(); 81 82 dialog->update(); 82 83 } -
src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::MoleculesQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<const molecule *> >::handle(); 74 75 } 75 76 76 77 void QtDialog::MoleculesQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<const molecule *> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/QtQuery.hpp
r775f3f rf4b6bc9 43 43 Dialog::TQuery<T>(_param, _title, _description) {} 44 44 // QtQueries are interactive - no need for handle(). 45 virtual bool handle(){ return true; } 45 virtual ~QtQuery() {} 46 virtual void handle(){ Dialog::TQuery<T>::handleSuccess = true; } 46 47 }; 47 48 … … 186 187 EmptyQtQuery(const std::string &_title, const std::string &description, QBoxLayout *_parent, Dialog *_dialog); 187 188 virtual ~EmptyQtQuery(); 188 virtual boolhandle();189 virtual void handle(); 189 190 private: 190 191 QBoxLayout *parent; -
src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
r775f3f rf4b6bc9 83 83 { 84 84 temp.at(row, column) = inputTable->item(row, column)->text().toDouble(); 85 QtQuery<RealSpaceMatrix>::handle(); 85 86 dialog->update(); 86 87 } -
src/UIElements/Qt4/Query/StringQtQuery.cpp
r775f3f rf4b6bc9 87 87 void QtDialog::StringQtQuery::onUpdate(const QString& newText) { 88 88 temp = newText.toStdString(); 89 QtQuery<std::string>::handle(); 89 90 dialog->update(); 90 91 } … … 92 93 void QtDialog::StringQtQuery::onUpdateCombo(int newIndex) { 93 94 temp = comboBox->itemText(newIndex).toStdString(); 95 QtQuery<std::string>::handle(); 94 96 dialog->update(); 95 97 } -
src/UIElements/Qt4/Query/StringsQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::StringsQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<std::string> >::handle(); 74 75 } 75 76 76 77 void QtDialog::StringsQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<std::string> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
r775f3f rf4b6bc9 70 70 void QtDialog::UnsignedIntQtQuery::onUpdate(int newUnsignedInt) { 71 71 temp = newUnsignedInt; 72 QtQuery<unsigned int>::handle(); 72 73 dialog->update(); 73 74 } -
src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
r775f3f rf4b6bc9 72 72 void QtDialog::UnsignedIntsQtQuery::onAddElement() { 73 73 addElement(); 74 QtQuery<std::vector<unsigned int> >::handle(); 74 75 } 75 76 76 77 void QtDialog::UnsignedIntsQtQuery::onRemoveElement() { 77 78 removeElements(); 79 QtQuery<std::vector<unsigned int> >::handle(); 78 80 } 79 81 -
src/UIElements/Qt4/Query/VectorQtQuery.cpp
r775f3f rf4b6bc9 165 165 const QString itemtext = nameComboBox->itemText(index); 166 166 temp = itemtext.toStdString(); 167 QtQuery<Vector>::handle(); 167 168 dialog->update(); 168 169 } … … 170 171 void QtDialog::VectorQtQuery::onUpdateX(double newDouble) { 171 172 updateVectorString(temp, newDouble, 0); 173 QtQuery<Vector>::handle(); 172 174 dialog->update(); 173 175 } … … 175 177 void QtDialog::VectorQtQuery::onUpdateY(double newDouble) { 176 178 updateVectorString(temp, newDouble, 1); 179 QtQuery<Vector>::handle(); 177 180 dialog->update(); 178 181 } … … 180 183 void QtDialog::VectorQtQuery::onUpdateZ(double newDouble) { 181 184 updateVectorString(temp, newDouble, 2); 185 QtQuery<Vector>::handle(); 182 186 dialog->update(); 183 187 } -
src/UIElements/Qt4/Query/VectorsQtQuery.cpp
r775f3f rf4b6bc9 73 73 void QtDialog::VectorsQtQuery::onAddElement() { 74 74 addElement(); 75 QtQuery<std::vector<Vector> >::handle(); 75 76 } 76 77 77 78 void QtDialog::VectorsQtQuery::onRemoveElement() { 78 79 removeElements(); 80 QtQuery<std::vector<Vector> >::handle(); 79 81 } 80 82
Note:
See TracChangeset
for help on using the changeset viewer.