Changeset 9d5531 for src/UIElements/Qt4
- Timestamp:
- Jul 18, 2012, 2:02:13 PM (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, Candidate_v1.7.0, 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:
- b3a54d
- Parents:
- 30cd0d
- git-author:
- Michael Ankele <ankele@…> (07/04/12 13:49:18)
- git-committer:
- Michael Ankele <ankele@…> (07/18/12 14:02:13)
- Location:
- src/UIElements/Qt4
- Files:
-
- 58 edited
-
Pipe/AtomQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/AtomQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/AtomsQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/AtomsQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/BooleanQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/BooleanQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/DoubleQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/DoubleQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/ElementQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/ElementQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/ElementsQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/ElementsQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/FileQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/FileQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/IntQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/IntQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/MoleculeQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/MoleculeQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/MoleculesQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/MoleculesQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/QtQueryListPipe.hpp (modified) (4 diffs)
-
Pipe/QtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp (modified) (1 diff)
-
Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/RealSpaceMatrixQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/RealSpaceMatrixQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/StringQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/StringQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/UnsignedIntQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/UnsignedIntQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/VectorQtQueryPipe.cpp (modified) (2 diffs)
-
Pipe/VectorQtQueryPipe.hpp (modified) (3 diffs)
-
Pipe/VectorsQtQueryPipe.cpp (modified) (1 diff)
-
Pipe/VectorsQtQueryPipe.hpp (modified) (3 diffs)
-
QtDialog.cpp (modified) (1 diff)
-
QtDialog.hpp (modified) (1 diff)
-
Query/AtomQtQuery.cpp (modified) (3 diffs)
-
Query/AtomsQtQuery.cpp (modified) (3 diffs)
-
Query/BooleanQtQuery.cpp (modified) (3 diffs)
-
Query/DoubleQtQuery.cpp (modified) (3 diffs)
-
Query/DoublesQtQuery.cpp (modified) (2 diffs)
-
Query/ElementQtQuery.cpp (modified) (2 diffs)
-
Query/ElementsQtQuery.cpp (modified) (2 diffs)
-
Query/FileQtQuery.cpp (modified) (2 diffs)
-
Query/FilesQtQuery.cpp (modified) (2 diffs)
-
Query/IntQtQuery.cpp (modified) (2 diffs)
-
Query/IntsQtQuery.cpp (modified) (2 diffs)
-
Query/MoleculeQtQuery.cpp (modified) (2 diffs)
-
Query/MoleculesQtQuery.cpp (modified) (2 diffs)
-
Query/QtQuery.hpp (modified) (3 diffs)
-
Query/RandomNumberDistribution_ParametersQtQuery.cpp (modified) (2 diffs)
-
Query/RealSpaceMatrixQtQuery.cpp (modified) (2 diffs)
-
Query/StringQtQuery.cpp (modified) (2 diffs)
-
Query/StringsQtQuery.cpp (modified) (2 diffs)
-
Query/UnsignedIntQtQuery.cpp (modified) (2 diffs)
-
Query/UnsignedIntsQtQuery.cpp (modified) (2 diffs)
-
Query/VectorQtQuery.cpp (modified) (3 diffs)
-
Query/VectorsQtQuery.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp
r30cd0d r9d5531 28 28 29 29 30 AtomQtQueryPipe::AtomQtQueryPipe( Parameter<const atom *>&_content, QtDialog *_dialog, QComboBox *_theBox) :30 AtomQtQueryPipe::AtomQtQueryPipe(const atom *&_content, QtDialog *_dialog, QComboBox *_theBox) : 31 31 content(_content), 32 32 dialog(_dialog), … … 40 40 QVariant data = theBox->itemData(newIndex); 41 41 int idx = data.toInt(); 42 content .set(World::getInstance().getAtom(AtomById(idx)));42 content = World::getInstance().getAtom(AtomById(idx)); 43 43 dialog->update(); 44 44 } -
src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 26 25 Q_OBJECT 27 26 public: 28 AtomQtQueryPipe( Parameter<const atom *>&_content, QtDialog *_dialog, QComboBox *_theBox);27 AtomQtQueryPipe(const atom *&_content, QtDialog *_dialog, QComboBox *_theBox); 29 28 virtual ~AtomQtQueryPipe(); 30 29 … … 33 32 34 33 private: 35 Parameter<const atom *>&content;34 const atom *&content; 36 35 QtDialog *dialog; 37 36 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp
r30cd0d r9d5531 30 30 31 31 32 AtomsQtQueryPipe::AtomsQtQueryPipe( Parameter<std::vector<const atom *>> &_content, QtDialog *_dialog, QListWidget *_theList) :32 AtomsQtQueryPipe::AtomsQtQueryPipe(std::vector<const atom *> &_content, QtDialog *_dialog, QListWidget *_theList) : 33 33 content(_content), 34 34 dialog(_dialog), … … 41 41 void AtomsQtQueryPipe::update() { 42 42 // clear target and put all atoms therein 43 std::vector<const atom *> temp_atoms;43 content.clear(); 44 44 for (std::set<const atom *>::iterator iter = currentList.begin(); iter != currentList.end(); ++iter) 45 temp_atoms.push_back(*iter); 46 content.set(temp_atoms); 45 content.push_back(*iter); 47 46 dialog->update(); 48 47 } -
src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 30 29 Q_OBJECT 31 30 public: 32 AtomsQtQueryPipe( Parameter<std::vector<const atom *>> &_content, QtDialog *_dialog, QListWidget *_theList);31 AtomsQtQueryPipe(std::vector<const atom *> &_content, QtDialog *_dialog, QListWidget *_theList); 33 32 virtual ~AtomsQtQueryPipe(); 34 33 … … 39 38 40 39 private: 41 Parameter<std::vector<const atom *>> &content;40 std::vector<const atom *> &content; 42 41 std::map<int, const atom *> lookup; 43 42 std::set<const atom *> currentList; -
src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp
r30cd0d r9d5531 25 25 #include "CodePatterns/MemDebug.hpp" 26 26 27 BooleanQtQueryPipe::BooleanQtQueryPipe( Parameter<bool>&_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :27 BooleanQtQueryPipe::BooleanQtQueryPipe(bool &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) : 28 28 content(_content), 29 29 dialog(_dialog), … … 35 35 36 36 void BooleanQtQueryPipe::update(int state) { 37 content .set(state == Qt::Checked);37 content = (state == Qt::Checked); 38 38 dialog->update(); 39 39 } -
src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 24 23 Q_OBJECT 25 24 public: 26 BooleanQtQueryPipe( Parameter<bool>&_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);25 BooleanQtQueryPipe(bool &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox); 27 26 virtual ~BooleanQtQueryPipe(); 28 27 … … 31 30 32 31 private: 33 Parameter<bool>&content;32 bool &content; 34 33 QtDialog *dialog; 35 34 QCheckBox *booleanCheckBox; -
src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp
r30cd0d r9d5531 23 23 #include "CodePatterns/MemDebug.hpp" 24 24 25 DoubleQtQueryPipe::DoubleQtQueryPipe( Parameter<double>&_content, QtDialog *_dialog) :25 DoubleQtQueryPipe::DoubleQtQueryPipe(double &_content, QtDialog *_dialog) : 26 26 content(_content), 27 27 dialog(_dialog) … … 32 32 33 33 void DoubleQtQueryPipe::update(double newDbl) { 34 content .set(newDbl);34 content = newDbl; 35 35 dialog->update(); 36 36 } -
src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 23 22 Q_OBJECT 24 23 public: 25 DoubleQtQueryPipe( Parameter<double>&_content, QtDialog *_dialog);24 DoubleQtQueryPipe(double &_content, QtDialog *_dialog); 26 25 virtual ~DoubleQtQueryPipe(); 27 26 … … 30 29 31 30 private: 32 Parameter<double>&content;31 double &content; 33 32 QtDialog *dialog; 34 33 -
src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp
r30cd0d r9d5531 29 29 30 30 31 ElementQtQueryPipe::ElementQtQueryPipe( Parameter<const element *>&_content, QtDialog *_dialog, QComboBox *_theBox) :31 ElementQtQueryPipe::ElementQtQueryPipe(const element * &_content, QtDialog *_dialog, QComboBox *_theBox) : 32 32 content(_content), 33 33 dialog(_dialog), … … 41 41 QVariant data = theBox->itemData(newIndex); 42 42 int idx = data.toInt(); 43 content .set(World::getInstance().getPeriode()->FindElement(idx));43 content = World::getInstance().getPeriode()->FindElement(idx); 44 44 dialog->update(); 45 45 } -
src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 26 25 Q_OBJECT 27 26 public: 28 ElementQtQueryPipe( Parameter<const element *>&_content, QtDialog *_dialog, QComboBox *_theBox);27 ElementQtQueryPipe(const element * &_content, QtDialog *_dialog, QComboBox *_theBox); 29 28 virtual ~ElementQtQueryPipe(); 30 29 … … 33 32 34 33 private: 35 Parameter<const element *>&content;34 const element * &content; 36 35 QtDialog *dialog; 37 36 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp
r30cd0d r9d5531 31 31 32 32 33 ElementsQtQueryPipe::ElementsQtQueryPipe( Parameter<std::vector<const element *>> &_content, QtDialog *_dialog, QComboBox *_theBox) :33 ElementsQtQueryPipe::ElementsQtQueryPipe(std::vector<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox) : 34 34 content(_content), 35 35 dialog(_dialog), … … 44 44 int idx = data.toInt(); 45 45 const element *elemental = World::getInstance().getPeriode()->FindElement(idx); 46 std::vector<const element *> temp_elements;47 46 if(elemental) 48 temp_elements.push_back(elemental); 49 content.set(temp_elements); 47 content.push_back(elemental); 50 48 dialog->update(); 51 49 } -
src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 29 28 Q_OBJECT 30 29 public: 31 ElementsQtQueryPipe( Parameter<std::vector<const element *>> &_content, QtDialog *_dialog, QComboBox *_theBox);30 ElementsQtQueryPipe(std::vector<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox); 32 31 virtual ~ElementsQtQueryPipe(); 33 32 … … 36 35 37 36 private: 38 Parameter<std::vector<const element *>> &content;37 std::vector<const element *> &content; 39 38 QtDialog *dialog; 40 39 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp
r30cd0d r9d5531 31 31 #include "UIElements/Qt4/QtDialog.hpp" 32 32 33 FileQtQueryPipe::FileQtQueryPipe( Parameter<boost::filesystem::path>&_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :33 FileQtQueryPipe::FileQtQueryPipe(boost::filesystem::path &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) : 34 34 content(_content), 35 35 dialog(_dialog), … … 49 49 QStringList ListOfFilenames = theFileDialog->selectedFiles(); 50 50 std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl; 51 content .set(ListOfFilenames.at(0).toStdString());52 filenameLineEdit->setText(QString::fromStdString(content. get().string()));51 content = ListOfFilenames.at(0).toStdString(); 52 filenameLineEdit->setText(QString::fromStdString(content.string())); 53 53 dialog->update(); 54 54 } -
src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 28 27 Q_OBJECT 29 28 public: 30 FileQtQueryPipe( Parameter<boost::filesystem::path>&_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);29 FileQtQueryPipe(boost::filesystem::path &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton); 31 30 virtual ~FileQtQueryPipe(); 32 31 … … 36 35 37 36 private: 38 Parameter<boost::filesystem::path>&content;37 boost::filesystem::path &content; 39 38 QtDialog *dialog; 40 39 QLineEdit *filenameLineEdit; -
src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp
r30cd0d r9d5531 24 24 25 25 26 IntQtQueryPipe::IntQtQueryPipe( Parameter<int>&_content, QtDialog *_dialog) :26 IntQtQueryPipe::IntQtQueryPipe(int &_content, QtDialog *_dialog) : 27 27 content(_content), 28 28 dialog(_dialog) … … 33 33 34 34 void IntQtQueryPipe::update(int newInt) { 35 content .set(newInt);35 content = newInt; 36 36 dialog->update(); 37 37 } -
src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 23 22 Q_OBJECT 24 23 public: 25 IntQtQueryPipe( Parameter<int>&_content, QtDialog *_dialog);24 IntQtQueryPipe(int &_content, QtDialog *_dialog); 26 25 virtual ~IntQtQueryPipe(); 27 26 … … 30 29 31 30 private: 32 Parameter<int>&content;31 int &content; 33 32 QtDialog *dialog; 34 33 -
src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp
r30cd0d r9d5531 29 29 30 30 31 MoleculeQtQueryPipe::MoleculeQtQueryPipe( Parameter<const molecule *>&_content, QtDialog *_dialog, QComboBox *_theBox) :31 MoleculeQtQueryPipe::MoleculeQtQueryPipe(const molecule * &_content, QtDialog *_dialog, QComboBox *_theBox) : 32 32 content(_content), 33 33 dialog(_dialog), … … 41 41 QVariant data = theBox->itemData(newIndex); 42 42 int idx = data.toInt(); 43 content .set(World::getInstance().getMolecule(MoleculeById(idx)));43 content = World::getInstance().getMolecule(MoleculeById(idx)); 44 44 dialog->update(); 45 45 } -
src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 26 25 Q_OBJECT 27 26 public: 28 MoleculeQtQueryPipe( Parameter<const molecule *>&_content, QtDialog *_dialog, QComboBox *_theBox);27 MoleculeQtQueryPipe(const molecule * &_content, QtDialog *_dialog, QComboBox *_theBox); 29 28 virtual ~MoleculeQtQueryPipe(); 30 29 … … 33 32 34 33 private: 35 Parameter<const molecule *>&content;34 const molecule * &content; 36 35 QtDialog *dialog; 37 36 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp
r30cd0d r9d5531 31 31 32 32 33 MoleculesQtQueryPipe::MoleculesQtQueryPipe( Parameter<std::vector<const molecule *>> &_content, QtDialog *_dialog, QComboBox *_theBox) :33 MoleculesQtQueryPipe::MoleculesQtQueryPipe(std::vector<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox) : 34 34 content(_content), 35 35 dialog(_dialog), … … 44 44 int idx = data.toInt(); 45 45 molecule *mol = World::getInstance().getMolecule(MoleculeById(idx)); 46 std::vector<const molecule *> temp_mols;47 46 if (mol) 48 temp_mols.push_back(mol); 49 content.set(temp_mols); 47 content.push_back(mol); 50 48 dialog->update(); 51 49 } -
src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 28 27 Q_OBJECT 29 28 public: 30 MoleculesQtQueryPipe( Parameter<std::vector<const molecule *>> &_content, QtDialog *_dialog, QComboBox *_theBox);29 MoleculesQtQueryPipe(std::vector<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox); 31 30 virtual ~MoleculesQtQueryPipe(); 32 31 … … 35 34 36 35 private: 37 Parameter<std::vector<const molecule *>> &content;36 std::vector<const molecule *> &content; 38 37 QtDialog *dialog; 39 38 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp
r30cd0d r9d5531 31 31 32 32 33 template<typename T> QtQueryListPipe<T>::QtQueryListPipe( Parameter<std::vector<T>> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :33 template<typename T> QtQueryListPipe<T>::QtQueryListPipe(std::vector<T> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) : 34 34 content(_content), 35 35 dialog(_dialog), … … 71 71 72 72 template<typename T> void QtQueryListPipe<T>::addValue(T item) { 73 std::vector<T> temp = content.get(); 74 temp.push_back(item); 75 content.set(temp); 73 content.push_back(item); 76 74 77 75 dialog->update(); … … 92 90 template<typename T> void QtQueryListPipe<T>::removeRow(int row) { 93 91 int counter = 0; 94 std::vector<T> temp = content.get(); 95 typename std::vector<T>::iterator iter = temp.begin(); 96 for (; iter != temp.end(); ++iter) 92 typename std::vector<T>::iterator iter = content.begin(); 93 for (; iter != content.end(); ++iter) 97 94 if (counter++ == row) 98 95 break; 99 if (iter != temp.end()) 100 temp.erase(iter); 101 content.set(temp); 96 if (iter != content.end()) 97 content.erase(iter); 102 98 } 103 99 … … 106 102 Q_OBJECT 107 103 public: 108 StringsQtQueryPipe( Parameter<std::vector<std::string>> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :104 StringsQtQueryPipe(std::vector<std::string> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) : 109 105 QtQueryListPipe<std::string>(_content, _dialog, _inputBox, _inputList, _AddButton, _RemoveButton) { } 110 106 -
src/UIElements/Qt4/Pipe/QtQueryPipe.hpp
r30cd0d r9d5531 19 19 // since MOC doesn't like nested classes 20 20 21 #include "Parameters/Parameter.hpp"22 21 #include <Qt/qwidget.h> 23 22 … … 32 31 template<typename T> class QtQueryListPipe : public QWidget { 33 32 public: 34 QtQueryListPipe( Parameter<std::vector<T>> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);33 QtQueryListPipe(std::vector<T> &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton); 35 34 virtual ~QtQueryListPipe(); 36 35 … … 45 44 void removeRow(int row); 46 45 47 Parameter<std::vector<T>> &content;46 std::vector<T> &content; 48 47 QtDialog *dialog; 49 48 QLineEdit *inputBox; -
src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp
r30cd0d r9d5531 30 30 class RandomNumberDistribution_Parameters; 31 31 32 RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe( Parameter<RandomNumberDistribution_Parameters>&_content, QtDialog *_dialog, QTextEdit *_theBox) :32 RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(RandomNumberDistribution_Parameters &_content, QtDialog *_dialog, QTextEdit *_theBox) : 33 33 content(_content), 34 34 dialog(_dialog), -
src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 26 25 Q_OBJECT 27 26 public: 28 RandomNumberDistribution_ParametersQtQueryPipe( Parameter<RandomNumberDistribution_Parameters>&_content, QtDialog *_dialog, QTextEdit *_theBox);27 RandomNumberDistribution_ParametersQtQueryPipe(RandomNumberDistribution_Parameters &_content, QtDialog *_dialog, QTextEdit *_theBox); 29 28 virtual ~RandomNumberDistribution_ParametersQtQueryPipe(); 30 29 … … 33 32 34 33 private: 35 Parameter<RandomNumberDistribution_Parameters>&content;34 RandomNumberDistribution_Parameters &content; 36 35 QtDialog *dialog; 37 36 QTextEdit *theBox; -
src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp
r30cd0d r9d5531 27 27 #include "LinearAlgebra/RealSpaceMatrix.hpp" 28 28 29 RealSpaceMatrixQtQueryPipe::RealSpaceMatrixQtQueryPipe( Parameter<RealSpaceMatrix>&_content, QtDialog *_dialog, QTableWidget *_inputTable) :29 RealSpaceMatrixQtQueryPipe::RealSpaceMatrixQtQueryPipe(RealSpaceMatrix &_content, QtDialog *_dialog, QTableWidget *_inputTable) : 30 30 content(_content), 31 31 dialog(_dialog), … … 44 44 { 45 45 tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble(); 46 content .set(*tmpM);46 content = *tmpM; 47 47 dialog->update(); 48 48 } -
src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 27 26 Q_OBJECT 28 27 public: 29 RealSpaceMatrixQtQueryPipe( Parameter<RealSpaceMatrix>&_content, QtDialog *_dialog, QTableWidget *_inputTable);28 RealSpaceMatrixQtQueryPipe(RealSpaceMatrix &_content, QtDialog *_dialog, QTableWidget *_inputTable); 30 29 virtual ~RealSpaceMatrixQtQueryPipe(); 31 30 … … 34 33 35 34 private: 36 Parameter<RealSpaceMatrix>&content;35 RealSpaceMatrix &content; 37 36 QtDialog *dialog; 38 37 QTableWidget *inputTable; -
src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp
r30cd0d r9d5531 26 26 27 27 28 StringQtQueryPipe::StringQtQueryPipe( Parameter<std::string>&_content, QtDialog *_dialog) :28 StringQtQueryPipe::StringQtQueryPipe(std::string &_content, QtDialog *_dialog) : 29 29 content(_content), 30 30 dialog(_dialog) … … 35 35 36 36 void StringQtQueryPipe::update(const QString& newText) { 37 content .set(newText.toStdString());37 content = newText.toStdString(); 38 38 dialog->update(); 39 39 } -
src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 25 24 Q_OBJECT 26 25 public: 27 StringQtQueryPipe( Parameter<std::string>&_content, QtDialog *_dialog);26 StringQtQueryPipe(std::string &_content, QtDialog *_dialog); 28 27 virtual ~StringQtQueryPipe(); 29 28 … … 32 31 33 32 private: 34 Parameter<std::string>&content;33 std::string &content; 35 34 QtDialog *dialog; 36 35 -
src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp
r30cd0d r9d5531 24 24 25 25 26 UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe( Parameter<unsigned int>&_content, QtDialog *_dialog) :26 UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(unsigned int &_content, QtDialog *_dialog) : 27 27 content(_content), 28 28 dialog(_dialog) … … 33 33 34 34 void UnsignedIntQtQueryPipe::update(unsigned int newUnsignedInt) { 35 content .set(newUnsignedInt);35 content = newUnsignedInt; 36 36 dialog->update(); 37 37 } -
src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 23 22 Q_OBJECT 24 23 public: 25 UnsignedIntQtQueryPipe( Parameter<unsigned int>&_content, QtDialog *_dialog);24 UnsignedIntQtQueryPipe(unsigned int &_content, QtDialog *_dialog); 26 25 virtual ~UnsignedIntQtQueryPipe(); 27 26 … … 30 29 31 30 private: 32 Parameter<unsigned int>&content;31 unsigned int &content; 33 32 QtDialog *dialog; 34 33 -
src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp
r30cd0d r9d5531 26 26 27 27 28 VectorQtQueryPipe::VectorQtQueryPipe( Parameter<Vector>&_content, QtDialog *_dialog, QComboBox *_theBox) :28 VectorQtQueryPipe::VectorQtQueryPipe(Vector &_content, QtDialog *_dialog, QComboBox *_theBox) : 29 29 content(_content), 30 30 dialog(_dialog), … … 36 36 37 37 void VectorQtQueryPipe::updateX(double newDouble) { 38 Vector v = content.get(); 39 v[0] = newDouble; 40 content.set(v); 38 content[0] = newDouble; 41 39 dialog->update(); 42 40 } 43 41 44 42 void VectorQtQueryPipe::updateY(double newDouble) { 45 Vector v = content.get(); 46 v[1] = newDouble; 47 content.set(v); 43 content[1] = newDouble; 48 44 dialog->update(); 49 45 } 50 46 51 47 void VectorQtQueryPipe::updateZ(double newDouble) { 52 Vector v = content.get(); 53 v[2] = newDouble; 54 content.set(v); 48 content[2] = newDouble; 55 49 dialog->update(); 56 50 } -
src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 26 25 Q_OBJECT 27 26 public: 28 VectorQtQueryPipe( Parameter<Vector>&_content, QtDialog *_dialog, QComboBox *_theBox);27 VectorQtQueryPipe(Vector &_content, QtDialog *_dialog, QComboBox *_theBox); 29 28 virtual ~VectorQtQueryPipe(); 30 29 … … 35 34 36 35 private: 37 Parameter<Vector>&content;36 Vector &content; 38 37 QtDialog *dialog; 39 38 QComboBox *theBox; -
src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp
r30cd0d r9d5531 28 28 29 29 30 VectorsQtQueryPipe::VectorsQtQueryPipe( Parameter<std::vector<Vector>> &_content, QtDialog *_dialog, QComboBox *_theBox) :30 VectorsQtQueryPipe::VectorsQtQueryPipe(std::vector<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox) : 31 31 content(_content), 32 32 dialog(_dialog), -
src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp
r30cd0d r9d5531 15 15 16 16 17 #include "Parameters/Parameter.hpp"18 17 #include <Qt/qwidget.h> 19 18 … … 28 27 Q_OBJECT 29 28 public: 30 VectorsQtQueryPipe( Parameter<std::vector<Vector>> &_content, QtDialog *_dialog, QComboBox *_theBox);29 VectorsQtQueryPipe(std::vector<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox); 31 30 virtual ~VectorsQtQueryPipe(); 32 31 … … 35 34 36 35 private: 37 Parameter<std::vector<Vector>> &content;36 std::vector<Vector> &content; 38 37 QtDialog *dialog; 39 38 QComboBox *theBox; -
src/UIElements/Qt4/QtDialog.cpp
r30cd0d r9d5531 150 150 } 151 151 152 void QtDialog::queryVector(Parameter<Vector> ¶m, const char* title, bool check,string)152 void QtDialog::queryVector(Parameter<Vector> ¶m, const char* title, string) 153 153 { 154 registerQuery(new VectorQtQuery(param,title, check,inputLayout,this));154 registerQuery(new VectorQtQuery(param,title,inputLayout,this)); 155 155 } 156 156 157 void QtDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, bool check,string)157 void QtDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, string) 158 158 { 159 registerQuery(new VectorsQtQuery(param, title, check,inputLayout,this));159 registerQuery(new VectorsQtQuery(param, title,inputLayout,this)); 160 160 } 161 161 -
src/UIElements/Qt4/QtDialog.hpp
r30cd0d r9d5531 47 47 virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = ""); 48 48 virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = ""); 49 virtual void queryVector(Parameter<Vector> &, const char*, bool,std::string = "");50 virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*, bool,std::string = "");49 virtual void queryVector(Parameter<Vector> &, const char*,std::string = ""); 50 virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,std::string = ""); 51 51 virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = ""); 52 52 virtual void queryElement(Parameter<const element *> &, const char*,std::string = ""); -
src/UIElements/Qt4/Query/AtomQtQuery.cpp
r30cd0d r9d5531 30 30 #include "World.hpp" 31 31 32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> & param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :33 Dialog::AtomQuery( param, _title),32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 33 Dialog::AtomQuery(_param, _title), 34 34 parent(_parent) 35 35 { … … 46 46 thisLayout->addWidget(inputBox); 47 47 48 pipe = new AtomQtQueryPipe(t mp,_dialog, inputBox);48 pipe = new AtomQtQueryPipe(temp,_dialog, inputBox); 49 49 pipe->update(inputBox->currentIndex()); 50 50 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); … … 57 57 58 58 bool QtDialog::AtomQtQuery::handle() { 59 return true; 59 if (param.isValid(temp)){ 60 param.set(temp); 61 return true; 62 } 63 return false; 60 64 } 61 65 -
src/UIElements/Qt4/Query/AtomsQtQuery.cpp
r30cd0d r9d5531 33 33 34 34 35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > & param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :36 Dialog::AtomsQuery( param, _title),35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) : 36 Dialog::AtomsQuery(_param, _title), 37 37 parent(_parent) 38 38 { … … 67 67 thisHLayout->addLayout(thisV2Layout); 68 68 69 pipe = new AtomsQtQueryPipe(t mp,_dialog,inputList);69 pipe = new AtomsQtQueryPipe(temp,_dialog,inputList); 70 70 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); 71 71 connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add())); … … 79 79 80 80 bool QtDialog::AtomsQtQuery::handle() { 81 return true; 81 if (param.isValid(temp)){ 82 param.set(temp); 83 return true; 84 } 85 return false; 82 86 } 83 87 -
src/UIElements/Qt4/Query/BooleanQtQuery.cpp
r30cd0d r9d5531 28 28 29 29 30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> & param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :31 Dialog::BooleanQuery( param, _title),30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : 31 Dialog::BooleanQuery(_param, _title), 32 32 parent(_parent) 33 33 { … … 43 43 thisLayout->addWidget(booleanCheckBox); 44 44 45 pipe = new BooleanQtQueryPipe(t mp,_dialog,booleanCheckBox);45 pipe = new BooleanQtQueryPipe(temp,_dialog,booleanCheckBox); 46 46 connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int))); 47 47 } … … 53 53 54 54 bool QtDialog::BooleanQtQuery::handle(){ 55 return true; 55 if (param.isValid(temp)){ 56 param.set(temp); 57 return true; 58 } 59 return false; 56 60 } 57 61 -
src/UIElements/Qt4/Query/DoubleQtQuery.cpp
r30cd0d r9d5531 28 28 29 29 30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> & param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :31 Dialog::DoubleQuery( param, title),30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) : 31 Dialog::DoubleQuery(_param, title), 32 32 parent(_parent) 33 33 { … … 44 44 thisLayout->addWidget(inputBox); 45 45 46 pipe = new DoubleQtQueryPipe(t mp,_dialog);46 pipe = new DoubleQtQueryPipe(temp,_dialog); 47 47 pipe->update(inputBox->value()); 48 48 connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double))); … … 55 55 56 56 bool QtDialog::DoubleQtQuery::handle() { 57 return true; 57 if (param.isValid(temp)){ 58 param.set(temp); 59 return true; 60 } 61 return false; 58 62 } 59 63 -
src/UIElements/Qt4/Query/DoublesQtQuery.cpp
r30cd0d r9d5531 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<double>(t mp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<double>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); … … 72 72 73 73 bool QtDialog::DoublesQtQuery::handle() { 74 return true; 74 if (param.isValid(temp)){ 75 param.set(temp); 76 return true; 77 } 78 return false; 75 79 } 76 80 -
src/UIElements/Qt4/Query/ElementQtQuery.cpp
r30cd0d r9d5531 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new ElementQtQueryPipe(t mp,_dialog,inputBox);53 pipe = new ElementQtQueryPipe(temp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); … … 62 62 63 63 bool QtDialog::ElementQtQuery::handle(){ 64 return true; 64 if (param.isValid(temp)){ 65 param.set(temp); 66 return true; 67 } 68 return false; 65 69 } 66 70 -
src/UIElements/Qt4/Query/ElementsQtQuery.cpp
r30cd0d r9d5531 52 52 thisLayout->addWidget(inputBox); 53 53 54 pipe = new ElementsQtQueryPipe(t mp,_dialog,inputBox);54 pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox); 55 55 pipe->update(inputBox->currentIndex()); 56 56 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); … … 63 63 64 64 bool QtDialog::ElementsQtQuery::handle(){ 65 return true; 65 if (param.isValid(temp)){ 66 param.set(temp); 67 return true; 68 } 69 return false; 66 70 } 67 71 -
src/UIElements/Qt4/Query/FileQtQuery.cpp
r30cd0d r9d5531 43 43 filedialogButton = new QPushButton("&Choose", _dialog); 44 44 45 pipe = new FileQtQueryPipe(t mp,_dialog,filenameLineEdit,filedialogButton);45 pipe = new FileQtQueryPipe(temp,_dialog,filenameLineEdit,filedialogButton); 46 46 47 47 thisLayout = new QHBoxLayout(); … … 60 60 61 61 bool QtDialog::FileQtQuery::handle(){ 62 return true; 62 if (param.isValid(temp)){ 63 param.set(temp); 64 return true; 65 } 66 return false; 63 67 } 64 68 -
src/UIElements/Qt4/Query/FilesQtQuery.cpp
r30cd0d r9d5531 62 62 thisHLayout->addLayout(thisV2Layout); 63 63 64 pipe = new QtQueryListPipe<boost::filesystem::path>(t mp,_dialog,inputBox,inputList,AddButton,RemoveButton);64 pipe = new QtQueryListPipe<boost::filesystem::path>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 65 65 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 66 66 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); … … 75 75 76 76 bool QtDialog::FilesQtQuery::handle(){ 77 if (param.isValid(temp)){ 78 param.set(temp); 79 return true; 80 } 77 81 return true; 78 82 } -
src/UIElements/Qt4/Query/IntQtQuery.cpp
r30cd0d r9d5531 42 42 thisLayout->addWidget(inputBox); 43 43 44 pipe = new IntQtQueryPipe(t mp,_dialog);44 pipe = new IntQtQueryPipe(temp,_dialog); 45 45 pipe->update(inputBox->value()); 46 46 connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int))); … … 53 53 54 54 bool QtDialog::IntQtQuery::handle() { 55 return true; 55 if (param.isValid(temp)){ 56 param.set(temp); 57 return true; 58 } 59 return false; 56 60 } 57 61 -
src/UIElements/Qt4/Query/IntsQtQuery.cpp
r30cd0d r9d5531 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<int>(t mp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); … … 73 73 74 74 bool QtDialog::IntsQtQuery::handle() { 75 return true; 75 if (param.isValid(temp)){ 76 param.set(temp); 77 return true; 78 } 79 return false; 76 80 } 77 81 -
src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
r30cd0d r9d5531 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new MoleculeQtQueryPipe(t mp,_dialog,inputBox);53 pipe = new MoleculeQtQueryPipe(temp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); … … 64 64 bool QtDialog::MoleculeQtQuery::handle() 65 65 { 66 return true; 66 if (param.isValid(temp)){ 67 param.set(temp); 68 return true; 69 } 70 return false; 67 71 } 68 72 -
src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
r30cd0d r9d5531 51 51 thisLayout->addWidget(inputBox); 52 52 53 pipe = new MoleculesQtQueryPipe(t mp,_dialog,inputBox);53 pipe = new MoleculesQtQueryPipe(temp,_dialog,inputBox); 54 54 pipe->update(inputBox->currentIndex()); 55 55 connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int))); … … 64 64 bool QtDialog::MoleculesQtQuery::handle() 65 65 { 66 return true; 66 if (param.isValid(temp)){ 67 param.set(temp); 68 return true; 69 } 70 return false; 67 71 } 68 72 -
src/UIElements/Qt4/Query/QtQuery.hpp
r30cd0d r9d5531 199 199 class QtDialog::FilesQtQuery : public Dialog::FilesQuery { 200 200 public: 201 FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > & param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);201 FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog); 202 202 virtual ~FilesQtQuery(); 203 203 virtual bool handle(); … … 335 335 class QtDialog::VectorQtQuery : public Dialog::VectorQuery { 336 336 public: 337 VectorQtQuery(Parameter<Vector> &, std::string title, bool _check,QBoxLayout *,QtDialog *);337 VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,QtDialog *); 338 338 virtual ~VectorQtQuery(); 339 339 virtual bool handle(); … … 354 354 class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery { 355 355 public: 356 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title, bool _check,QBoxLayout *,QtDialog *);356 VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,QtDialog *); 357 357 virtual ~VectorsQtQuery(); 358 358 virtual bool handle(); -
src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
r30cd0d r9d5531 50 50 okButton = new QPushButton(tr("Ok")); 51 51 52 pipe = new RandomNumberDistribution_ParametersQtQueryPipe(t mp,_dialog, inputBox);52 pipe = new RandomNumberDistribution_ParametersQtQueryPipe(temp,_dialog, inputBox); 53 53 connect(okButton,SIGNAL(clicked()),pipe,SLOT(update())); 54 54 } … … 60 60 61 61 bool QtDialog::RandomNumberDistribution_ParametersQtQuery::handle() { 62 return true; 62 if (param.isValid(temp)){ 63 param.set(temp); 64 return true; 65 } 66 return false; 63 67 } 64 68 -
src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
r30cd0d r9d5531 44 44 inputTable->setVerticalHeaderLabels(CoordinateList); 45 45 46 pipe = new RealSpaceMatrixQtQueryPipe(t mp,_dialog, inputTable);46 pipe = new RealSpaceMatrixQtQueryPipe(temp,_dialog, inputTable); 47 47 48 48 // fill the box with current matrix … … 68 68 69 69 bool QtDialog::RealSpaceMatrixQtQuery::handle() { 70 return true; 70 if (param.isValid(temp)){ 71 param.set(temp); 72 return true; 73 } 74 return false; 71 75 } 72 76 -
src/UIElements/Qt4/Query/StringQtQuery.cpp
r30cd0d r9d5531 41 41 thisLayout->addWidget(inputBox); 42 42 43 pipe = new StringQtQueryPipe(t mp,_dialog);43 pipe = new StringQtQueryPipe(temp,_dialog); 44 44 pipe->update(inputBox->text()); 45 45 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&))); … … 54 54 bool QtDialog::StringQtQuery::handle() 55 55 { 56 return tmp.get() != ""; 56 //return tmp.get() != ""; 57 if (param.isValid(temp)){ 58 param.set(temp); 59 return true; 60 } 61 return false; 57 62 } 58 63 -
src/UIElements/Qt4/Query/StringsQtQuery.cpp
r30cd0d r9d5531 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new StringsQtQueryPipe(t mp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new StringsQtQueryPipe(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(elementEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(elementSelected())); … … 88 88 89 89 return temp!="";*/ 90 return true; 90 if (param.isValid(temp)){ 91 param.set(temp); 92 return true; 93 } 94 return false; 91 95 } 92 96 -
src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
r30cd0d r9d5531 42 42 thisLayout->addWidget(inputBox); 43 43 44 pipe = new UnsignedIntQtQueryPipe(t mp,_dialog);44 pipe = new UnsignedIntQtQueryPipe(temp,_dialog); 45 45 pipe->update(inputBox->value()); 46 46 connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int))); … … 53 53 54 54 bool QtDialog::UnsignedIntQtQuery::handle() { 55 return true; 55 if (param.isValid(temp)){ 56 param.set(temp); 57 return true; 58 } 59 return false; 56 60 } 57 61 -
src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
r30cd0d r9d5531 60 60 thisHLayout->addLayout(thisV2Layout); 61 61 62 pipe = new QtQueryListPipe<unsigned int>(t mp,_dialog,inputBox,inputList,AddButton,RemoveButton);62 pipe = new QtQueryListPipe<unsigned int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton); 63 63 connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&))); 64 64 connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected())); … … 73 73 74 74 bool QtDialog::UnsignedIntsQtQuery::handle() { 75 return true; 75 if (param.isValid(temp)){ 76 param.set(temp); 77 return true; 78 } 79 return false; 76 80 } 77 81 -
src/UIElements/Qt4/Query/VectorQtQuery.cpp
r30cd0d r9d5531 29 29 30 30 31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> ¶m, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :32 Dialog::VectorQuery(param, title ,_check),31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> ¶m, std::string title, QBoxLayout *_parent,QtDialog *_dialog) : 32 Dialog::VectorQuery(param, title), 33 33 parent(_parent) 34 34 { … … 63 63 coordInputZ->setDecimals(3); 64 64 coordLayout->addWidget(coordInputZ); 65 pipe = new VectorQtQueryPipe(t mp,_dialog,inputBox);65 pipe = new VectorQtQueryPipe(temp,_dialog,inputBox); 66 66 //pipe->update(coordInput->value()); 67 67 connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double))); … … 75 75 76 76 bool QtDialog::VectorQtQuery::handle() { 77 return true; 77 if (param.isValid(temp)){ 78 param.set(temp); 79 return true; 80 } 81 return false; 78 82 } 79 83 -
src/UIElements/Qt4/Query/VectorsQtQuery.cpp
r30cd0d r9d5531 29 29 30 30 31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > ¶m, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :32 Dialog::VectorsQuery(param, title ,_check),31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > ¶m, std::string title, QBoxLayout *_parent,QtDialog *_dialog) : 32 Dialog::VectorsQuery(param, title), 33 33 parent(_parent) 34 34 { … … 47 47 coordInput->setDecimals(3); 48 48 coordLayout->addWidget(coordInput); 49 pipe = new VectorsQtQueryPipe(t mp,_dialog,inputBox);49 pipe = new VectorsQtQueryPipe(temp,_dialog,inputBox); 50 50 //pipe->update(coordInput->value()); 51 51 connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double))); … … 57 57 58 58 bool QtDialog::VectorsQtQuery::handle() { 59 return true; 59 if (param.isValid(temp)){ 60 param.set(temp); 61 return true; 62 } 63 return false; 60 64 } 61 65
Note:
See TracChangeset
for help on using the changeset viewer.
