Changeset 1c55b8 for src/UIElements


Ignore:
Timestamp:
Aug 27, 2012, 11:36:59 AM (13 years ago)
Author:
Michael Ankele <ankele@…>
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:
852ea3
Parents:
a55e6f
git-author:
Michael Ankele <ankele@…> (08/14/12 14:52:25)
git-committer:
Michael Ankele <ankele@…> (08/27/12 11:36:59)
Message:

combined Query super classes into template

Location:
src/UIElements
Files:
21 deleted
69 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp

    ra55e6f r1c55b8  
    3434
    3535CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(Parameter<const atom *> &_param, std::string title, std::string _description) :
    36     Dialog::AtomQuery(_param, title, _description)
     36    Dialog::TQuery<const atom*>(_param, title, _description)
    3737{}
    3838
  • src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &_param, std::string title, std::string _description) :
    31     Dialog::AtomsQuery(_param, title, _description)
     31    Dialog::TQuery<std::vector<const atom *> >(_param, title, _description)
    3232{}
    3333
     
    3838  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    3939    IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
     40    const atom *temp_element;
    4041    for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) {
    4142      temp_element = World::getInstance().getAtom(AtomById(*iter));
  • src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(Parameter<bool> &_param, std::string title, std::string _description) :
    28     Dialog::BooleanQuery(_param, title, _description)
     28    Dialog::TQuery<bool>(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp

    ra55e6f r1c55b8  
    2424};
    2525
    26 class CommandLineDialog::IntCommandLineQuery : public Dialog::IntQuery {
     26class CommandLineDialog::IntCommandLineQuery : public Dialog::TQuery<int> {
    2727public:
    2828  IntCommandLineQuery(Parameter<int> &_param, std::string title, std::string _description = "");
     
    3131};
    3232
    33 class CommandLineDialog::IntsCommandLineQuery : public Dialog::IntsQuery {
     33class CommandLineDialog::IntsCommandLineQuery : public Dialog::TQuery<std::vector<int> > {
    3434public:
    3535  IntsCommandLineQuery(Parameter<std::vector<int> > &_param, std::string title, std::string _description = "");
     
    3838};
    3939
    40 class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::UnsignedIntQuery {
     40class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::TQuery<unsigned int> {
    4141public:
    4242  UnsignedIntCommandLineQuery(Parameter<unsigned int> &_param, std::string title, std::string _description = "");
     
    4545};
    4646
    47 class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::UnsignedIntsQuery {
     47class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::TQuery<std::vector<unsigned int> > {
    4848public:
    4949  UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &_param, std::string title, std::string _description = "");
     
    5252};
    5353
    54 class CommandLineDialog::BooleanCommandLineQuery : public Dialog::BooleanQuery {
     54class CommandLineDialog::BooleanCommandLineQuery : public Dialog::TQuery<bool> {
    5555public:
    5656  BooleanCommandLineQuery(Parameter<bool> &_param, std::string title, std::string _description = "");
     
    5959};
    6060
    61 class CommandLineDialog::DoubleCommandLineQuery : public Dialog::DoubleQuery {
     61class CommandLineDialog::DoubleCommandLineQuery : public Dialog::TQuery<double> {
    6262public:
    6363  DoubleCommandLineQuery(Parameter<double> &_param, std::string title, std::string _description = "");
     
    6666};
    6767
    68 class CommandLineDialog::DoublesCommandLineQuery : public Dialog::DoublesQuery {
     68class CommandLineDialog::DoublesCommandLineQuery : public Dialog::TQuery<std::vector<double> > {
    6969public:
    7070  DoublesCommandLineQuery(Parameter<std::vector<double> > &_param, std::string title, std::string _description = "");
     
    7373};
    7474
    75 class CommandLineDialog::StringCommandLineQuery : public Dialog::StringQuery {
     75class CommandLineDialog::StringCommandLineQuery : public Dialog::TQuery<std::string> {
    7676public:
    7777  StringCommandLineQuery(Parameter<std::string> &_param, std::string title, std::string _description = "");
     
    8080};
    8181
    82 class CommandLineDialog::StringsCommandLineQuery : public Dialog::StringsQuery {
     82class CommandLineDialog::StringsCommandLineQuery : public Dialog::TQuery<std::vector<std::string> > {
    8383public:
    8484  StringsCommandLineQuery(Parameter<std::vector<std::string> > &_param, std::string title, std::string _description = "");
     
    8787};
    8888
    89 class CommandLineDialog::AtomCommandLineQuery : public Dialog::AtomQuery {
     89class CommandLineDialog::AtomCommandLineQuery : public Dialog::TQuery<const atom *> {
    9090public:
    9191  AtomCommandLineQuery(Parameter<const atom *> &_param, std::string title, std::string _description = "");
     
    9494};
    9595
    96 class CommandLineDialog::AtomsCommandLineQuery : public Dialog::AtomsQuery {
     96class CommandLineDialog::AtomsCommandLineQuery : public Dialog::TQuery<std::vector<const atom*> > {
    9797public:
    9898  AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &_param, std::string title, std::string _description = "");
     
    101101};
    102102
    103 class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::MoleculeQuery {
     103class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::TQuery<const molecule *> {
    104104public:
    105105  MoleculeCommandLineQuery(Parameter<const molecule *> &_param, std::string title, std::string _description = "");
     
    108108};
    109109
    110 class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::MoleculesQuery {
     110class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::TQuery<std::vector<const molecule*> > {
    111111public:
    112112  MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &_param, std::string title, std::string _description = "");
     
    115115};
    116116
    117 class CommandLineDialog::VectorCommandLineQuery : public Dialog::VectorQuery {
     117class CommandLineDialog::VectorCommandLineQuery : public Dialog::TQuery<Vector> {
    118118public:
    119119  VectorCommandLineQuery(Parameter<Vector> &_param, std::string title, std::string _description = "");
     
    122122};
    123123
    124 class CommandLineDialog::VectorsCommandLineQuery : public Dialog::VectorsQuery {
     124class CommandLineDialog::VectorsCommandLineQuery : public Dialog::TQuery<std::vector<Vector> > {
    125125public:
    126126  VectorsCommandLineQuery(Parameter<std::vector<Vector> > &_param, std::string title, std::string _description = "");
     
    129129};
    130130
    131 class CommandLineDialog::RealSpaceMatrixCommandLineQuery : public Dialog::RealSpaceMatrixQuery {
     131class CommandLineDialog::RealSpaceMatrixCommandLineQuery : public Dialog::TQuery<RealSpaceMatrix> {
    132132public:
    133133  RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> &_param, std::string title, std::string _description = "");
     
    136136};
    137137
    138 class CommandLineDialog::ElementCommandLineQuery : public Dialog::ElementQuery {
     138class CommandLineDialog::ElementCommandLineQuery : public Dialog::TQuery<const element *> {
    139139public:
    140140  ElementCommandLineQuery(Parameter<const element *> &_param, std::string title, std::string _description = "");
     
    143143};
    144144
    145 class CommandLineDialog::ElementsCommandLineQuery : public Dialog::ElementsQuery {
     145class CommandLineDialog::ElementsCommandLineQuery : public Dialog::TQuery<std::vector<const element *> > {
    146146public:
    147147  ElementsCommandLineQuery(Parameter<std::vector<const element *> > &_param, std::string title, std::string _description = "");
     
    150150};
    151151
    152 class CommandLineDialog::FileCommandLineQuery : public Dialog::FileQuery {
     152class CommandLineDialog::FileCommandLineQuery : public Dialog::TQuery<boost::filesystem::path> {
    153153public:
    154154  FileCommandLineQuery(Parameter<boost::filesystem::path> &_param, std::string title, std::string _description = "");
     
    157157};
    158158
    159 class CommandLineDialog::FilesCommandLineQuery : public Dialog::FilesQuery {
     159class CommandLineDialog::FilesCommandLineQuery : public Dialog::TQuery<std::vector<boost::filesystem::path> > {
    160160public:
    161161  FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = "");
     
    164164};
    165165
    166 class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
     166class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::TQuery<RandomNumberDistribution_Parameters> {
    167167public:
    168168  RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string title, std::string _description = "");
  • src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2727
    2828CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(Parameter<double> &_param, std::string title, std::string _description) :
    29     Dialog::DoubleQuery(_param, title, _description)
     29    Dialog::TQuery<double>(_param, title, _description)
    3030{}
    3131
  • src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(Parameter<std::vector<double> > &_param, std::string title, std::string _description) :
    28     Dialog::DoublesQuery(_param, title, _description)
     28    Dialog::TQuery<std::vector<double> >(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(Parameter<const element*> &_param, std::string title, std::string _description) :
    31     Dialog::ElementQuery(_param, title, _description)
     31    Dialog::TQuery<const element *>(_param, title, _description)
    3232{}
    3333
  • src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(Parameter<std::vector<const element*> > &_param, std::string title, std::string _description) :
    31     Dialog::ElementsQuery(_param, title, _description)
     31    Dialog::TQuery<std::vector<const element *> >(_param, title, _description)
    3232{}
    3333
     
    4040  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    4141    vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
     42    const element *temp_element;
    4243    for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) {
    4344      temp_element = periode->FindElement(*ZRunner);
  • src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(Parameter<boost::filesystem::path> &_param, std::string title, std::string _description) :
    28     Dialog::FileQuery(_param, title, _description)
     28    Dialog::TQuery<boost::filesystem::path>(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &_param, std::string title, std::string _description) :
    28     Dialog::FilesQuery(_param, title, _description)
     28    Dialog::TQuery<std::vector<boost::filesystem::path> >(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(Parameter<int> &_param, std::string title, std::string _description) :
    28     Dialog::IntQuery(_param, title, _description)
     28    Dialog::TQuery<int>(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(Parameter<std::vector<int> > &_param, std::string title, std::string _description) :
    28     Dialog::IntsQuery(_param, title, _description)
     28    Dialog::TQuery<std::vector<int> >(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(Parameter<const molecule *> &_param, std::string title, std::string _description) :
    31     Dialog::MoleculeQuery(_param, title, _description)
     31    Dialog::TQuery<const molecule *>(_param, title, _description)
    3232{}
    3333
  • src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &_param, std::string title, std::string _description) :
    32     Dialog::MoleculesQuery(_param, title, _description)
     32    Dialog::TQuery<std::vector<const molecule *> >(_param, title, _description)
    3333{}
    3434
     
    4040    IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
    4141    for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) {
    42       temp_element = World::getInstance().getMolecule(MoleculeById(*iter));
     42      const molecule *temp_element = World::getInstance().getMolecule(MoleculeById(*iter));
    4343      if (temp_element)
    4444        temp.push_back(temp_element);
  • src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string title, std::string _description) :
    34     Dialog::RandomNumberDistribution_ParametersQuery(_param, title, _description)
     34    Dialog::TQuery<RandomNumberDistribution_Parameters>(_param, title, _description)
    3535{}
    3636
  • src/UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929CommandLineDialog::RealSpaceMatrixCommandLineQuery::RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> &_param, std::string title, std::string _description) :
    30     Dialog::RealSpaceMatrixQuery(_param, title, _description)
     30    Dialog::TQuery<RealSpaceMatrix>(_param, title, _description)
    3131{}
    3232
  • src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(Parameter<std::string> &_param, std::string title, std::string _description) :
    28     Dialog::StringQuery(_param, title, _description)
     28    Dialog::TQuery<std::string>(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(Parameter<std::vector<std::string> > &_param, std::string title, std::string _description) :
    28     Dialog::StringsQuery(_param, title, _description)
     28    Dialog::TQuery<std::vector<std::string> >(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(Parameter<unsigned int> &_param, std::string title, std::string _description) :
    28     Dialog::UnsignedIntQuery(_param, title, _description)
     28    Dialog::TQuery<unsigned int>(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    2626
    2727CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &_param, std::string title, std::string _description) :
    28     Dialog::UnsignedIntsQuery(_param, title, _description)
     28    Dialog::TQuery<std::vector<unsigned int> >(_param, title, _description)
    2929{}
    3030
  • src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(Parameter<Vector> &_param, std::string title, std::string _description) :
    32     Dialog::VectorQuery(_param, title, _description)
     32    Dialog::TQuery<Vector>(_param, title, _description)
    3333{}
    3434
  • src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(Parameter<std::vector<Vector> > &_param, std::string title, std::string _description) :
    32     Dialog::VectorsQuery(_param, title, _description)
     32    Dialog::TQuery<std::vector<Vector> >(_param, title, _description)
    3333{}
    3434
     
    4141    temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >();
    4242    for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) {
    43       temp_element = (*iter).toVector();
     43      Vector temp_element = (*iter).toVector();
    4444      temp.push_back(temp_element);
    4545    }
  • src/UIElements/Dialog.cpp

    ra55e6f r1c55b8  
    9999}
    100100
    101 template <> void Dialog::query<void *>(Parameter<void *> &param, const char *token, std::string description)
    102 {
    103   queryEmpty(token, description);
    104 }
     101/*template <> void Dialog::query<Dialog::EmptyType>(Parameter<Dialog::EmptyType> &param, const char *token, std::string description)
     102{
     103  queryEmpty(param, token, description);
     104}*/
    105105
    106106template <> void Dialog::query<bool>(Parameter<bool> &param, const char *token, std::string description)
  • src/UIElements/Dialog.hpp

    ra55e6f r1c55b8  
    156156  virtual ~Dialog();
    157157
     158  // Used as type for empty queries.
     159  //class EmptyType{};
     160
    158161  template <class T> void query(Parameter<T> &, const char *, std::string = "");
    159162
     
    256259  };
    257260
     261
     262  template<class T>
     263  class TQuery : public Query {
     264  public:
     265    TQuery(Parameter<T> &_param, std::string title, std::string _description = "") :
     266      Query(title, _description), param(_param) {}
     267    virtual ~TQuery(){}
     268    virtual bool handle()=0;
     269    virtual void setResult(){}
     270  protected:
     271    T temp;
     272    Parameter<T> &param;
     273  };
     274
    258275  // Empty Query is just meant for showing text, such as version, help, initial message or alike
    259276  class EmptyQuery : public Query {
     
    265282  };
    266283
    267   //Specialized classes for certain types. GUI-Types are not specialized at this time
    268   class BooleanQuery : public Query {
    269   public:
    270     BooleanQuery(Parameter<bool> &_param, std::string title, std::string _description = "");
    271     virtual ~BooleanQuery();
    272     virtual bool handle()=0;
    273     virtual void setResult();
    274   protected:
    275     bool temp;
    276     Parameter<bool> &param;
    277   };
    278 
    279   class IntQuery : public Query {
    280   public:
    281     IntQuery(Parameter<int> &_param, std::string title, std::string _description = "");
    282     virtual ~IntQuery();
    283     virtual bool handle()=0;
    284     virtual void setResult();
    285   protected:
    286     int temp;
    287     Parameter<int> &param;
    288   };
    289 
    290   class IntsQuery : public Query {
    291   public:
    292     IntsQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = "");
    293     virtual ~IntsQuery();
    294     virtual bool handle()=0;
    295     virtual void setResult();
    296   protected:
    297     int temp_element;
    298     std::vector<int> temp;
    299     Parameter<std::vector<int> > &param;
    300   };
    301 
    302   class UnsignedIntQuery : public Query {
    303   public:
    304     UnsignedIntQuery(Parameter<unsigned int> &, std::string title, std::string _description = "");
    305     virtual ~UnsignedIntQuery();
    306     virtual bool handle()=0;
    307     virtual void setResult();
    308   protected:
    309     unsigned int temp;
    310     Parameter<unsigned int> &param;
    311   };
    312 
    313   class UnsignedIntsQuery : public Query {
    314   public:
    315     UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = "");
    316     virtual ~UnsignedIntsQuery();
    317     virtual bool handle()=0;
    318     virtual void setResult();
    319   protected:
    320     unsigned int temp_element;
    321     std::vector<unsigned int> temp;
    322     Parameter<std::vector<unsigned int> > &param;
    323   };
    324 
    325   class DoubleQuery : public Query {
    326   public:
    327     DoubleQuery(Parameter<double> &, std::string title, std::string _description = "");
    328     virtual ~DoubleQuery();
    329     virtual bool handle()=0;
    330     virtual void setResult();
    331   protected:
    332     double temp;
    333     Parameter<double> &param;
    334   };
    335 
    336   class DoublesQuery : public Query {
    337   public:
    338     DoublesQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = "");
    339     virtual ~DoublesQuery();
    340     virtual bool handle()=0;
    341     virtual void setResult();
    342   protected:
    343     double temp_element;
    344     std::vector<double> temp;
    345     Parameter<std::vector<double> > &param;
    346   };
    347 
    348   class StringQuery : public Query {
    349   public:
    350     StringQuery(Parameter<std::string> &_param, std::string title, std::string _description = "");
    351     virtual ~StringQuery();
    352     virtual bool handle()=0;
    353     virtual void setResult();
    354   protected:
    355     std::string temp;
    356     Parameter<std::string> &param;
    357   };
    358 
    359   class StringsQuery : public Query {
    360   public:
    361     StringsQuery(Parameter<std::vector<std::string> > &_param, std::string title, std::string _description = "");
    362     virtual ~StringsQuery();
    363     virtual bool handle()=0;
    364     virtual void setResult();
    365   protected:
    366     std::string temp_element;
    367     std::vector<std::string> temp;
    368     Parameter<std::vector<std::string> > &param;
    369   };
    370 
    371   class MoleculeQuery : public Query {
    372   public:
    373     MoleculeQuery(Parameter<const molecule *> &_param, std::string title, std::string _description = "");
    374     virtual ~MoleculeQuery();
    375     virtual bool handle()=0;
    376     virtual void setResult();
    377   protected:
    378     const molecule * temp;
    379     Parameter<const molecule *> &param;
    380   };
    381 
    382   class MoleculesQuery : public Query {
    383   public:
    384     MoleculesQuery(Parameter<std::vector<const molecule *> > &_param, std::string title, std::string _description = "");
    385     virtual ~MoleculesQuery();
    386     virtual bool handle()=0;
    387     virtual void setResult();
    388   protected:
    389     const molecule * temp_element;
    390     std::vector<const molecule *> temp;
    391     Parameter<std::vector<const molecule *> > &param;
    392   };
    393 
    394   class AtomQuery : public Query {
    395   public:
    396     AtomQuery(Parameter<const atom *> &_param, std::string title, std::string _description = "");
    397     virtual ~AtomQuery();
    398     virtual bool handle()=0;
    399     virtual void setResult();
    400   protected:
    401     const atom *temp;
    402     Parameter<const atom *> &param;
    403   };
    404 
    405   class AtomsQuery : public Query {
    406   public:
    407     AtomsQuery(Parameter<std::vector<const atom *> > &_param, std::string title, std::string _description = "");
    408     virtual ~AtomsQuery();
    409     virtual bool handle()=0;
    410     virtual void setResult();
    411   protected:
    412     const atom *temp_element;
    413     std::vector<const atom *> temp;
    414     Parameter<std::vector<const atom *> > &param;
    415   };
    416 
    417   class VectorQuery : public Query {
    418   public:
    419       VectorQuery(Parameter<Vector> &_param, std::string title, std::string _description = "");
    420       virtual ~VectorQuery();
    421       virtual bool handle()=0;
    422       virtual void setResult();
    423     protected:
    424       Vector temp;
    425       Parameter<Vector> &param;
    426   };
    427 
    428   class VectorsQuery : public Query {
    429   public:
    430       VectorsQuery(Parameter<std::vector<Vector> > &_param, std::string title, std::string _description = "");
    431       virtual ~VectorsQuery();
    432       virtual bool handle()=0;
    433       virtual void setResult();
    434     protected:
    435       Vector temp_element;
    436       std::vector<Vector> temp;
    437       Parameter<std::vector<Vector> > &param;
    438   };
    439 
    440   class RealSpaceMatrixQuery : public Query {
    441   public:
    442       RealSpaceMatrixQuery(Parameter<RealSpaceMatrix> &_param, std::string title, std::string _description = "");
    443       virtual ~RealSpaceMatrixQuery();
    444       virtual bool handle()=0;
    445       virtual void setResult();
    446     protected:
    447       RealSpaceMatrix temp;
    448       Parameter<RealSpaceMatrix> &param;
    449   };
    450 
    451   class ElementQuery : public Query {
    452   public:
    453     ElementQuery(Parameter<const element*> &_param, std::string title, std::string _description = "");
    454     virtual ~ElementQuery();
    455     virtual bool handle()=0;
    456     virtual void setResult();
    457   protected:
    458     const element *temp;
    459     Parameter<const element *> &param;
    460   };
    461 
    462   class ElementsQuery : public Query {
    463   public:
    464     ElementsQuery(Parameter<std::vector<const element *> > &_param, std::string title, std::string _description = "");
    465     virtual ~ElementsQuery();
    466     virtual bool handle()=0;
    467     virtual void setResult();
    468   protected:
    469     const element *temp_element;
    470     std::vector<const element *> temp;
    471     Parameter<std::vector<const element *> > &param;
    472   };
    473 
    474   class FileQuery : public Query {
    475   public:
    476     FileQuery(Parameter<boost::filesystem::path> &_param, std::string title, std::string _description = "");
    477     virtual ~FileQuery();
    478     virtual bool handle()=0;
    479     virtual void setResult();
    480   protected:
    481     boost::filesystem::path temp;
    482     Parameter<boost::filesystem::path> &param;
    483   };
    484 
    485   class FilesQuery : public Query {
    486   public:
    487     FilesQuery(Parameter<std::vector<boost::filesystem::path> > &_param, std::string title, std::string _description = "");
    488     virtual ~FilesQuery();
    489     virtual bool handle()=0;
    490     virtual void setResult();
    491   protected:
    492     boost::filesystem::path temp_element;
    493     std::vector<boost::filesystem::path> temp;
    494     Parameter<std::vector<boost::filesystem::path> > &param;
    495   };
    496 
    497   class RandomNumberDistribution_ParametersQuery : public Query {
    498   public:
    499     RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string title, std::string _description = "");
    500     virtual ~RandomNumberDistribution_ParametersQuery();
    501     virtual bool handle()=0;
    502     virtual void setResult();
    503   protected:
    504     RandomNumberDistribution_Parameters temp;
    505     Parameter<RandomNumberDistribution_Parameters> &param;
    506   };
    507 
    508284void registerQuery(Query* query);
    509285
  • src/UIElements/Makefile.am

    ra55e6f r1c55b8  
    122122  ${TEXTUISOURCE} \
    123123  ${VIEWSOURCE} \
    124   UIElements/Query/AtomQuery.cpp \
    125   UIElements/Query/AtomsQuery.cpp \
    126   UIElements/Query/BooleanQuery.cpp \
    127   UIElements/Query/DoubleQuery.cpp \
    128   UIElements/Query/DoublesQuery.cpp \
    129   UIElements/Query/ElementQuery.cpp \
    130   UIElements/Query/ElementsQuery.cpp \
    131124  UIElements/Query/EmptyQuery.cpp \
    132   UIElements/Query/FileQuery.cpp \
    133   UIElements/Query/FilesQuery.cpp \
    134   UIElements/Query/IntQuery.cpp \
    135   UIElements/Query/IntsQuery.cpp \
    136   UIElements/Query/MoleculeQuery.cpp \
    137   UIElements/Query/MoleculesQuery.cpp \
    138125  UIElements/Query/Query.cpp \
    139   UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp \
    140   UIElements/Query/RealSpaceMatrixQuery.cpp \
    141   UIElements/Query/StringQuery.cpp \
    142   UIElements/Query/StringsQuery.cpp \
    143   UIElements/Query/UnsignedIntQuery.cpp \
    144   UIElements/Query/UnsignedIntsQuery.cpp \
    145   UIElements/Query/VectorQuery.cpp \
    146   UIElements/Query/VectorsQuery.cpp \
    147126  UIElements/Dialog.cpp \
    148127  UIElements/MainWindow.cpp
  • src/UIElements/Qt4/Query/AtomQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    32     Dialog::AtomQuery(_param, _title),
     32    Dialog::TQuery<const atom *>(_param, _title),
    3333    parent(_parent),
    3434    dialog(_dialog)
  • src/UIElements/Qt4/Query/AtomsQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::AtomsQuery(_param, _title),
     31    Dialog::TQuery<std::vector<const atom *> >(_param, _title),
    3232    QtQueryList<const atom *>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/BooleanQtQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    30     Dialog::BooleanQuery(_param, _title),
     30    Dialog::TQuery<bool>(_param, _title),
    3131    parent(_parent),
    3232    dialog(_dialog)
  • src/UIElements/Qt4/Query/DoubleQtQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) :
    30     Dialog::DoubleQuery(_param, title),
     30    Dialog::TQuery<double>(_param, title),
    3131    parent(_parent),
    3232    dialog(_dialog)
  • src/UIElements/Qt4/Query/DoublesQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::DoublesQuery(_param, _title),
     31    Dialog::TQuery<std::vector<double> >(_param, _title),
    3232    QtQueryList<double>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/ElementQtQuery.cpp

    ra55e6f r1c55b8  
    3131
    3232QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    33     Dialog::ElementQuery(_param, _title),
     33    Dialog::TQuery<const element *>(_param, _title),
    3434    parent(_parent),
    3535    dialog(_dialog)
  • src/UIElements/Qt4/Query/ElementsQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    32     Dialog::ElementsQuery(_param, _title),
     32    Dialog::TQuery<std::vector<const element *> >(_param, _title),
    3333    QtQueryList<const element *>(_parent, _dialog, temp)
    3434{
  • src/UIElements/Qt4/Query/FileQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    32     Dialog::FileQuery(_param, _title),
     32    Dialog::TQuery<boost::filesystem::path>(_param, _title),
    3333    parent(_parent),
    3434    dialog(_dialog)
  • src/UIElements/Qt4/Query/FilesQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    32     Dialog::FilesQuery(_param, _title),
     32    Dialog::TQuery<std::vector<boost::filesystem::path> >(_param, _title),
    3333    QtQueryList<boost::filesystem::path>(_parent, _dialog, temp)
    3434{
  • src/UIElements/Qt4/Query/IntQtQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    30     Dialog::IntQuery(_param, _title),
     30    Dialog::TQuery<int>(_param, _title),
    3131    parent(_parent),
    3232    dialog(_dialog)
  • src/UIElements/Qt4/Query/IntsQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::IntsQuery(_param, _title),
     31    Dialog::TQuery<std::vector<int> >(_param, _title),
    3232    QtQueryList<int>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/MoleculeQtQuery.cpp

    ra55e6f r1c55b8  
    3131
    3232QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) :
    33     Dialog::MoleculeQuery(_param, _title),
     33    Dialog::TQuery<const molecule *>(_param, _title),
    3434    parent(_parent),
    3535    dialog(_dialog)
  • src/UIElements/Qt4/Query/MoleculesQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::MoleculesQuery(_param, _title),
     31    Dialog::TQuery<std::vector<const molecule *> >(_param, _title),
    3232    QtQueryList<const molecule *>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/QtQuery.hpp

    ra55e6f r1c55b8  
    3535class QFileDialog;
    3636
    37 class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery {
     37class QtDialog::AtomQtQuery : public QWidget, public Dialog::TQuery<const atom *> {
    3838  Q_OBJECT
    3939public:
     
    5353};
    5454
    55 class QtDialog::AtomsQtQuery : public QWidget, public Dialog::AtomsQuery, public QtQueryList<const atom *> {
     55class QtDialog::AtomsQtQuery : public QWidget, public Dialog::TQuery<std::vector<const atom *> >, public QtQueryList<const atom *> {
    5656  Q_OBJECT
    5757public:
     
    7171};
    7272
    73 class QtDialog::BooleanQtQuery : public QWidget, public Dialog::BooleanQuery {
     73class QtDialog::BooleanQtQuery : public QWidget, public Dialog::TQuery<bool> {
    7474  Q_OBJECT
    7575public:
     
    8989};
    9090
    91 class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::RealSpaceMatrixQuery {
     91class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::TQuery<RealSpaceMatrix> {
    9292  Q_OBJECT
    9393public:
     
    107107};
    108108
    109 class QtDialog::DoubleQtQuery : public QWidget, public Dialog::DoubleQuery {
     109class QtDialog::DoubleQtQuery : public QWidget, public Dialog::TQuery<double> {
    110110  Q_OBJECT
    111111public:
     
    125125};
    126126
    127 class QtDialog::DoublesQtQuery : public QWidget, public Dialog::DoublesQuery, public QtQueryList<double> {
     127class QtDialog::DoublesQtQuery : public QWidget, public Dialog::TQuery<std::vector<double> >, public QtQueryList<double> {
    128128  Q_OBJECT
    129129public:
     
    143143};
    144144
    145 class QtDialog::ElementQtQuery : public QWidget, public Dialog::ElementQuery {
     145class QtDialog::ElementQtQuery : public QWidget, public Dialog::TQuery<const element *> {
    146146  Q_OBJECT
    147147public:
     
    161161};
    162162
    163 class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery, public QtQueryList<const element *> {
     163class QtDialog::ElementsQtQuery : public QWidget, public Dialog::TQuery<std::vector<const element *> >, public QtQueryList<const element *> {
    164164  Q_OBJECT
    165165public:
     
    191191};
    192192
    193 class QtDialog::FileQtQuery : public QWidget, public Dialog::FileQuery {
     193class QtDialog::FileQtQuery : public QWidget, public Dialog::TQuery<boost::filesystem::path> {
    194194  Q_OBJECT
    195195public:
     
    212212};
    213213
    214 class QtDialog::FilesQtQuery : public QWidget, public Dialog::FilesQuery, public QtQueryList<boost::filesystem::path> {
     214class QtDialog::FilesQtQuery : public QWidget, public Dialog::TQuery<std::vector<boost::filesystem::path> >, public QtQueryList<boost::filesystem::path> {
    215215  Q_OBJECT
    216216public:
     
    230230};
    231231
    232 class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
     232class QtDialog::IntQtQuery : public QWidget, public Dialog::TQuery<int> {
    233233  Q_OBJECT
    234234public:
     
    248248};
    249249
    250 class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery, public QtQueryList<int> {
     250class QtDialog::IntsQtQuery : public QWidget, public Dialog::TQuery<std::vector<int> >, public QtQueryList<int> {
    251251  Q_OBJECT
    252252public:
     
    266266};
    267267
    268 class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
     268class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::TQuery<const molecule *> {
    269269  Q_OBJECT
    270270public:
     
    284284};
    285285
    286 class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery, public QtQueryList<const molecule *> {
     286class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::TQuery<std::vector<const molecule *> >, public QtQueryList<const molecule *> {
    287287  Q_OBJECT
    288288public:
     
    302302};
    303303
    304 class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
     304class QtDialog::StringQtQuery : public QWidget, public Dialog::TQuery<std::string> {
    305305  Q_OBJECT
    306306public:
     
    320320};
    321321
    322 class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery, public QtQueryList<std::string> {
     322class QtDialog::StringsQtQuery : public QWidget, public Dialog::TQuery<std::vector<std::string> >, public QtQueryList<std::string> {
    323323  Q_OBJECT
    324324public:
     
    338338};
    339339
    340 class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
     340class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::TQuery<unsigned int> {
    341341  Q_OBJECT
    342342public:
     
    356356};
    357357
    358 class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery, public QtQueryList<unsigned int> {
     358class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::TQuery<std::vector<unsigned int> >, public QtQueryList<unsigned int> {
    359359  Q_OBJECT
    360360public:
     
    374374};
    375375
    376 class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
     376class QtDialog::VectorQtQuery : public QWidget, public Dialog::TQuery<Vector> {
    377377  Q_OBJECT
    378378public:
     
    399399};
    400400
    401 class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery, public QtQueryList<Vector> {
     401class QtDialog::VectorsQtQuery : public QWidget, public Dialog::TQuery<std::vector<Vector> >, public QtQueryList<Vector> {
    402402  Q_OBJECT
    403403public:
     
    417417};
    418418
    419 class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
     419class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::TQuery<RandomNumberDistribution_Parameters> {
    420420  Q_OBJECT
    421421public:
  • src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp

    ra55e6f r1c55b8  
    3131
    3232QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    33     Dialog::RandomNumberDistribution_ParametersQuery(_param, _title),
     33    Dialog::TQuery<RandomNumberDistribution_Parameters>(_param, _title),
    3434    parent(_parent),
    3535    dialog(_dialog)
  • src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    32     Dialog::RealSpaceMatrixQuery(_param, _title),
     32    Dialog::TQuery<RealSpaceMatrix>(_param, _title),
    3333    parent(_parent),
    3434    dialog(_dialog)
  • src/UIElements/Qt4/Query/StringQtQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    30     Dialog::StringQuery(_param, _title),
     30    Dialog::TQuery<std::string>(_param, _title),
    3131    parent(_parent),
    3232    dialog(_dialog)
  • src/UIElements/Qt4/Query/StringsQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::StringsQuery(_param, _title),
     31    Dialog::TQuery<std::vector<std::string> >(_param, _title),
    3232    QtQueryList<std::string>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp

    ra55e6f r1c55b8  
    2828
    2929QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    30     Dialog::UnsignedIntQuery(_param, _title),
     30    Dialog::TQuery<unsigned int>(_param, _title),
    3131    parent(_parent),
    3232    dialog(_dialog)
  • src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::UnsignedIntsQuery(_param, _title),
     31    Dialog::TQuery<std::vector<unsigned int> >(_param, _title),
    3232    QtQueryList<unsigned int>(_parent, _dialog, temp)
    3333{
  • src/UIElements/Qt4/Query/VectorQtQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) :
    31     Dialog::VectorQuery(_param, title),
     31    Dialog::TQuery<Vector>(_param, title),
    3232    parent(_parent),
    3333    dialog(_dialog)
  • src/UIElements/Qt4/Query/VectorsQtQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    32     Dialog::VectorsQuery(_param, _title),
     32    Dialog::TQuery<std::vector<Vector> >(_param, _title),
    3333    QtQueryList<Vector>(_parent, _dialog, temp)
    3434{
  • src/UIElements/TextUI/Query/AtomTextQuery.cpp

    ra55e6f r1c55b8  
    3131
    3232TextDialog::AtomTextQuery::AtomTextQuery(Parameter<const atom *> &_param, std::string title, std::string _description) :
    33     Dialog::AtomQuery(_param, title,_description)
     33    Dialog::TQuery<const atom *>(_param, title,_description)
    3434{}
    3535
  • src/UIElements/TextUI/Query/AtomsTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::AtomsTextQuery::AtomsTextQuery(Parameter<std::vector<const atom *> > &_param, std::string title, std::string _description) :
    34     Dialog::AtomsQuery(_param, title,_description)
     34    Dialog::TQuery<std::vector<const atom *> >(_param, title,_description)
    3535{}
    3636
     
    4343  getline(std::cin,line);
    4444  // dissect by " "
     45  const atom *temp_element;
    4546  std::string::iterator olditer = line.begin();
    4647  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/BooleanTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::BooleanTextQuery::BooleanTextQuery(Parameter<bool> &_param, std::string title, std::string _description) :
    31     Dialog::BooleanQuery(_param, title,_description)
     31    Dialog::TQuery<bool>(_param, title,_description)
    3232{}
    3333
  • src/UIElements/TextUI/Query/DoubleTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::DoubleTextQuery::DoubleTextQuery(Parameter<double> &_param, std::string title, std::string _description) :
    31     Dialog::DoubleQuery(_param, title,_description)
     31    Dialog::TQuery<double>(_param, title,_description)
    3232{}
    3333
  • src/UIElements/TextUI/Query/DoublesTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::DoublesTextQuery::DoublesTextQuery(Parameter<std::vector<double> > &_param, std::string title, std::string _description) :
    31     Dialog::DoublesQuery(_param, title,_description)
     31    Dialog::TQuery<std::vector<double> >(_param, title,_description)
    3232{}
    3333
     
    3939  getline(std::cin,line);
    4040  // dissect by " "
     41  double temp_element;
    4142  std::string::iterator olditer = line.begin();
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/ElementTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::ElementTextQuery::ElementTextQuery(Parameter<const element *> &_param, std::string title, std::string _description) :
    34     Dialog::ElementQuery(_param, title,_description)
     34    Dialog::TQuery<const element *>(_param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/ElementsTextQuery.cpp

    ra55e6f r1c55b8  
    3636
    3737TextDialog::ElementsTextQuery::ElementsTextQuery(Parameter<std::vector<const element *> > &_param, std::string title, std::string _description) :
    38     Dialog::ElementsQuery(_param, title,_description)
     38    Dialog::TQuery<std::vector<const element *> >(_param, title,_description)
    3939{}
    4040
     
    4949  getline(std::cin,line);
    5050  // dissect by " "
     51  const element *temp_element;
    5152  std::string::iterator olditer = line.begin();
    5253  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/FileTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::FileTextQuery::FileTextQuery(Parameter<boost::filesystem::path> &_param, std::string title, std::string _description) :
    34     Dialog::FileQuery(_param, title,_description)
     34    Dialog::TQuery<boost::filesystem::path>(_param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/FilesTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::FilesTextQuery::FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &_param, std::string title, std::string _description) :
    34     Dialog::FilesQuery(_param, title,_description)
     34    Dialog::TQuery<std::vector<boost::filesystem::path> >(_param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/IntTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::IntTextQuery::IntTextQuery(Parameter<int> &_param, std::string title, std::string _description) :
    31     Dialog::IntQuery(_param, title,_description)
     31    Dialog::TQuery<int>(_param, title,_description)
    3232{}
    3333
  • src/UIElements/TextUI/Query/IntsTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::IntsTextQuery::IntsTextQuery(Parameter<std::vector<int> > &_param, std::string title, std::string _description) :
    31     Dialog::IntsQuery(_param, title,_description)
     31    Dialog::TQuery<std::vector<int> >(_param, title,_description)
    3232{}
    3333
     
    3939  getline(std::cin,line);
    4040  // dissect by " "
     41  int temp_element;
    4142  std::string::iterator olditer = line.begin();
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/MoleculeTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::MoleculeTextQuery::MoleculeTextQuery(Parameter<const molecule *> &_param, std::string title, std::string _description) :
    34     Dialog::MoleculeQuery(_param, title,_description)
     34    Dialog::TQuery<const molecule *>(_param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/MoleculesTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::MoleculesTextQuery::MoleculesTextQuery(Parameter<std::vector<const molecule *> > &_param, std::string title, std::string _description) :
    34     Dialog::MoleculesQuery(_param, title,_description)
     34    Dialog::TQuery<std::vector<const molecule *> >(_param, title,_description)
    3535{}
    3636
     
    4343  getline(std::cin,line);
    4444  // dissect by " "
     45  const molecule *temp_element;
    4546  std::string::iterator olditer = line.begin();
    4647  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp

    ra55e6f r1c55b8  
    3131
    3232TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string title, std::string _description) :
    33     Dialog::RandomNumberDistribution_ParametersQuery(_param, title,_description)
     33    Dialog::TQuery<RandomNumberDistribution_Parameters>(_param, title,_description)
    3434{}
    3535
  • src/UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp

    ra55e6f r1c55b8  
    3030
    3131TextDialog::RealSpaceMatrixTextQuery::RealSpaceMatrixTextQuery(Parameter<RealSpaceMatrix> &_param, std::string title, std::string _description) :
    32     Dialog::RealSpaceMatrixQuery(_param, title,_description)
     32    Dialog::TQuery<RealSpaceMatrix>(_param, title,_description)
    3333{}
    3434
  • src/UIElements/TextUI/Query/StringTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::StringTextQuery::StringTextQuery(Parameter<std::string> &_param, std::string title, std::string _description) :
    31     Dialog::StringQuery(_param, title,_description)
     31    Dialog::TQuery<std::string>(_param, title,_description)
    3232{}
    3333
  • src/UIElements/TextUI/Query/StringsTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::StringsTextQuery::StringsTextQuery(Parameter<std::vector<std::string> > &_param, std::string title, std::string _description) :
    31     Dialog::StringsQuery(_param, title,_description)
     31    Dialog::TQuery<std::vector<std::string> >(_param, title,_description)
    3232{}
    3333
     
    3636bool TextDialog::StringsTextQuery::handle() {
    3737  std::cout << getDescription() << ": ";
     38  std::string temp_element;
    3839  getline(std::cin,temp_element);
    3940  // dissect by " "
  • src/UIElements/TextUI/Query/TextQuery.hpp

    ra55e6f r1c55b8  
    1717#include "TextUI/TextDialog.hpp"
    1818
    19 class TextDialog::AtomTextQuery : public Dialog::AtomQuery {
     19class TextDialog::AtomTextQuery : public Dialog::TQuery<const atom *> {
    2020public:
    2121  AtomTextQuery(Parameter<const atom *> &, std::string title, std::string _description = NULL);
     
    2424};
    2525
    26 class TextDialog::AtomsTextQuery : public Dialog::AtomsQuery {
     26class TextDialog::AtomsTextQuery : public Dialog::TQuery<std::vector<const atom *> > {
    2727public:
    2828  AtomsTextQuery(Parameter<std::vector<const atom *> > &, std::string title, std::string _description = NULL);
     
    3131};
    3232
    33 class TextDialog::BooleanTextQuery : public Dialog::BooleanQuery {
     33class TextDialog::BooleanTextQuery : public Dialog::TQuery<bool> {
    3434public:
    3535  BooleanTextQuery(Parameter<bool> &, std::string title, std::string _description = NULL);
     
    3838};
    3939
    40 class TextDialog::RealSpaceMatrixTextQuery : public Dialog::RealSpaceMatrixQuery {
     40class TextDialog::RealSpaceMatrixTextQuery : public Dialog::TQuery<RealSpaceMatrix> {
    4141public:
    4242  RealSpaceMatrixTextQuery(Parameter<RealSpaceMatrix> &, std::string title, std::string _description = NULL);
     
    4545};
    4646
    47 class TextDialog::DoubleTextQuery : public Dialog::DoubleQuery {
     47class TextDialog::DoubleTextQuery : public Dialog::TQuery<double> {
    4848public:
    4949  DoubleTextQuery(Parameter<double> &, std::string title, std::string _description = NULL);
     
    5252};
    5353
    54 class TextDialog::DoublesTextQuery : public Dialog::DoublesQuery {
     54class TextDialog::DoublesTextQuery : public Dialog::TQuery<std::vector<double> > {
    5555public:
    5656  DoublesTextQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = NULL);
     
    5959};
    6060
    61 class TextDialog::ElementTextQuery : public Dialog::ElementQuery {
     61class TextDialog::ElementTextQuery : public Dialog::TQuery<const element *> {
    6262public:
    6363  ElementTextQuery(Parameter<const element *> &, std::string title, std::string _description = NULL);
     
    6666};
    6767
    68 class TextDialog::ElementsTextQuery : public Dialog::ElementsQuery {
     68class TextDialog::ElementsTextQuery : public Dialog::TQuery<std::vector<const element *> > {
    6969public:
    7070  ElementsTextQuery(Parameter<std::vector<const element *> > &, std::string title, std::string _description = NULL);
     
    8080};
    8181
    82 class TextDialog::FileTextQuery : public Dialog::FileQuery {
     82class TextDialog::FileTextQuery : public Dialog::TQuery<boost::filesystem::path> {
    8383public:
    8484  FileTextQuery(Parameter<boost::filesystem::path> &, std::string title, std::string _description = NULL);
     
    8787};
    8888
    89 class TextDialog::FilesTextQuery : public Dialog::FilesQuery {
     89class TextDialog::FilesTextQuery : public Dialog::TQuery<std::vector<boost::filesystem::path> > {
    9090public:
    9191  FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = NULL);
     
    9494};
    9595
    96 class TextDialog::IntTextQuery : public Dialog::IntQuery {
     96class TextDialog::IntTextQuery : public Dialog::TQuery<int> {
    9797public:
    9898  IntTextQuery(Parameter<int> &, std::string title, std::string _description = NULL);
     
    101101};
    102102
    103 class TextDialog::IntsTextQuery : public Dialog::IntsQuery {
     103class TextDialog::IntsTextQuery : public Dialog::TQuery<std::vector<int> > {
    104104public:
    105105  IntsTextQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = NULL);
     
    108108};
    109109
    110 class TextDialog::MoleculeTextQuery : public Dialog::MoleculeQuery {
     110class TextDialog::MoleculeTextQuery : public Dialog::TQuery<const molecule *> {
    111111public:
    112112  MoleculeTextQuery(Parameter<const molecule *> &, std::string title, std::string _description = NULL);
     
    115115};
    116116
    117 class TextDialog::MoleculesTextQuery : public Dialog::MoleculesQuery {
     117class TextDialog::MoleculesTextQuery : public Dialog::TQuery<std::vector<const molecule *> > {
    118118public:
    119119  MoleculesTextQuery(Parameter<std::vector<const molecule *> > &, std::string title, std::string _description = NULL);
     
    122122};
    123123
    124 class TextDialog::StringTextQuery : public Dialog::StringQuery {
     124class TextDialog::StringTextQuery : public Dialog::TQuery<std::string> {
    125125public:
    126126  StringTextQuery(Parameter<std::string> &, std::string title, std::string _description = NULL);
     
    129129};
    130130
    131 class TextDialog::StringsTextQuery : public Dialog::StringsQuery {
     131class TextDialog::StringsTextQuery : public Dialog::TQuery<std::vector<std::string> > {
    132132public:
    133133  StringsTextQuery(Parameter<std::vector<std::string> > &, std::string title, std::string _description = NULL);
     
    136136};
    137137
    138 class TextDialog::UnsignedIntTextQuery : public Dialog::UnsignedIntQuery {
     138class TextDialog::UnsignedIntTextQuery : public Dialog::TQuery<unsigned int> {
    139139public:
    140140  UnsignedIntTextQuery(Parameter<unsigned int> &, std::string title, std::string _description = NULL);
     
    143143};
    144144
    145 class TextDialog::UnsignedIntsTextQuery : public Dialog::UnsignedIntsQuery {
     145class TextDialog::UnsignedIntsTextQuery : public Dialog::TQuery<std::vector<unsigned int> > {
    146146public:
    147147  UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = NULL);
     
    150150};
    151151
    152 class TextDialog::VectorTextQuery : public Dialog::VectorQuery {
     152class TextDialog::VectorTextQuery : public Dialog::TQuery<Vector> {
    153153public:
    154154  VectorTextQuery(Parameter<Vector> &, std::string title, std::string _description = NULL);
     
    157157};
    158158
    159 class TextDialog::VectorsTextQuery : public Dialog::VectorsQuery {
     159class TextDialog::VectorsTextQuery : public Dialog::TQuery<std::vector<Vector> > {
    160160public:
    161161  VectorsTextQuery(Parameter<std::vector<Vector> > &, std::string title, std::string _description = NULL);
     
    164164};
    165165
    166 class TextDialog::RandomNumberDistribution_ParametersTextQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
     166class TextDialog::RandomNumberDistribution_ParametersTextQuery : public Dialog::TQuery<RandomNumberDistribution_Parameters> {
    167167public:
    168168  RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title, std::string _description = NULL);
  • src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(Parameter<unsigned int> &_param, std::string title, std::string _description) :
    31     Dialog::UnsignedIntQuery(_param, title,_description)
     31    Dialog::TQuery<unsigned int>(_param, title,_description)
    3232{}
    3333
  • src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp

    ra55e6f r1c55b8  
    2929
    3030TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &_param, std::string title, std::string _description) :
    31     Dialog::UnsignedIntsQuery(_param, title,_description)
     31    Dialog::TQuery<std::vector<unsigned int> >(_param, title,_description)
    3232{}
    3333
     
    3939  getline(std::cin,line);
    4040  // dissect by " "
     41  unsigned int temp_element;
    4142  std::string::iterator olditer = line.begin();
    4243  for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
  • src/UIElements/TextUI/Query/VectorTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::VectorTextQuery::VectorTextQuery(Parameter<Vector> &_param, std::string title, std::string _description) :
    34     Dialog::VectorQuery(_param, title,_description)
     34    Dialog::TQuery<Vector>(_param, title,_description)
    3535{}
    3636
  • src/UIElements/TextUI/Query/VectorsTextQuery.cpp

    ra55e6f r1c55b8  
    3232
    3333TextDialog::VectorsTextQuery::VectorsTextQuery(Parameter<std::vector<Vector> > &_param, std::string title, std::string _description) :
    34     Dialog::VectorsQuery(_param, title,_description)
     34    Dialog::TQuery<std::vector<Vector> >(_param, title,_description)
    3535{}
    3636
     
    5353  std::string::iterator olditercomma = line.begin();
    5454  int counter = 0;
     55  Vector temp_element;
    5556  for(std::string::iterator vectoriter = line.begin(); vectoriter != line.end(); ++vectoriter) {
    5657    if (*vectoriter == ',')
Note: See TracChangeset for help on using the changeset viewer.