Changeset 2c5765


Ignore:
Timestamp:
Jul 6, 2012, 10:18:42 AM (12 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
c586d8
Parents:
30438f
git-author:
Frederik Heber <heber@…> (05/21/12 09:56:07)
git-committer:
Frederik Heber <heber@…> (07/06/12 10:18:42)
Message:

Added Query for File_s_, i.e. vector of boost::filesystem::path.

Location:
src
Files:
4 added
13 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/unittests/stubs/DummyUI.hpp

    r30438f r2c5765  
    4343  virtual void queryElements(const char*, std::string = ""){}
    4444  virtual void queryFile(const char*, std::string = ""){}
     45  virtual void queryFiles(const char*, std::string = ""){}
    4546  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = ""){}
    4647};
  • src/UIElements/CommandLineUI/CommandLineDialog.cpp

    r30438f r2c5765  
    116116}
    117117
     118void CommandLineDialog::queryFiles(const char* title, std::string _description){
     119  registerQuery(new FilesCommandLineQuery(title, _description));
     120}
     121
    118122void CommandLineDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string _description){
    119123  registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(title, _description));
  • src/UIElements/CommandLineUI/CommandLineDialog.hpp

    r30438f r2c5765  
    5353  virtual void queryElements(const char*, std::string = "");
    5454  virtual void queryFile(const char*, std::string = "");
     55  virtual void queryFiles(const char*, std::string = "");
    5556  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
    5657protected:
     
    6869  class EmptyCommandLineQuery;
    6970  class FileCommandLineQuery;
     71  class FilesCommandLineQuery;
    7072  class IntCommandLineQuery;
    7173  class IntsCommandLineQuery;
  • src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp

    r30438f r2c5765  
    157157};
    158158
     159class CommandLineDialog::FilesCommandLineQuery : public Dialog::FilesQuery {
     160public:
     161  FilesCommandLineQuery(std::string title, std::string _description = "");
     162  virtual ~FilesCommandLineQuery();
     163  virtual bool handle();
     164};
     165
    159166class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
    160167public:
  • src/UIElements/Dialog.cpp

    r30438f r2c5765  
    196196}
    197197
     198template <> void Dialog::query< std::vector<boost::filesystem::path> >(const char *token, std::string description)
     199{
     200  queryFiles(token, description);
     201}
     202
    198203template <> void Dialog::query< RandomNumberDistribution_Parameters >(const char *token, std::string description)
    199204{
  • src/UIElements/Dialog.hpp

    r30438f r2c5765  
    177177  virtual void queryElements(const char*, std::string = "")=0;
    178178  virtual void queryFile(const char*, std::string = "")=0;
     179  virtual void queryFiles(const char*, std::string = "")=0;
    179180  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "")=0;
    180181
     
    462463  };
    463464
     465  class FilesQuery : public Query {
     466  public:
     467    FilesQuery(std::string title, std::string _description = "");
     468    virtual ~FilesQuery();
     469    virtual bool handle()=0;
     470    virtual void setResult();
     471  protected:
     472    std::vector<boost::filesystem::path> tmp;
     473  };
     474
    464475  class RandomNumberDistribution_ParametersQuery : public Query {
    465476  public:
  • src/UIElements/Makefile.am

    r30438f r2c5765  
    1212  UIElements/CommandLineUI/Query/EmptyCommandLineQuery.cpp \
    1313  UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp \
     14  UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp \
    1415  UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp \
    1516  UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp \
     
    8182  UIElements/TextUI/Query/EmptyTextQuery.cpp \
    8283  UIElements/TextUI/Query/FileTextQuery.cpp \
     84  UIElements/TextUI/Query/FilesTextQuery.cpp \
    8385  UIElements/TextUI/Query/IntTextQuery.cpp \
    8486  UIElements/TextUI/Query/IntsTextQuery.cpp \
     
    130132  UIElements/Query/EmptyQuery.cpp \
    131133  UIElements/Query/FileQuery.cpp \
     134  UIElements/Query/FilesQuery.cpp \
    132135  UIElements/Query/IntQuery.cpp \
    133136  UIElements/Query/IntsQuery.cpp \
     
    182185  UIElements/Qt4/Query/EmptyQtQuery.cpp \
    183186  UIElements/Qt4/Query/FileQtQuery.cpp \
     187  UIElements/Qt4/Query/FilesQtQuery.cpp \
    184188  UIElements/Qt4/Query/IntQtQuery.cpp \
    185189  UIElements/Qt4/Query/IntsQtQuery.cpp \
  • src/UIElements/Qt4/QtDialog.cpp

    r30438f r2c5765  
    175175}
    176176
     177void QtDialog::queryFiles(const char* title, std::string)
     178{
     179  registerQuery(new FilesQtQuery(title,inputLayout,this));
     180}
     181
    177182void QtDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string)
    178183{
  • src/UIElements/Qt4/QtDialog.hpp

    r30438f r2c5765  
    5252  virtual void queryElements(const char*,std::string = "");
    5353  virtual void queryFile(const char*,std::string = "");
     54  virtual void queryFiles(const char*,std::string = "");
    5455  virtual void queryRandomNumberDistribution_Parameters(const char*,std::string = "");
    5556
     
    6970  class EmptyQtQuery;
    7071  class FileQtQuery;
     72  class FilesQtQuery;
    7173  class IntQtQuery;
    7274  class IntsQtQuery;
  • src/UIElements/Qt4/Query/QtQuery.hpp

    r30438f r2c5765  
    195195};
    196196
     197class QtDialog::FilesQtQuery : public Dialog::FilesQuery {
     198public:
     199  FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     200  virtual ~FilesQtQuery();
     201  virtual bool handle();
     202  void IntegerEntered(const QString&);
     203  void IntegerSelected();
     204  void AddInteger();
     205  void RemoveInteger();
     206private:
     207  QBoxLayout *parent;
     208  QBoxLayout *thisLayout;
     209  QLabel *titleLabel;
     210
     211  QtQueryListPipe<boost::filesystem::path> *pipe;
     212};
     213
    197214class QtDialog::IntQtQuery : public Dialog::IntQuery {
    198215public:
  • src/UIElements/TextUI/Query/TextQuery.hpp

    r30438f r2c5765  
    8787};
    8888
     89class TextDialog::FilesTextQuery : public Dialog::FilesQuery {
     90public:
     91  FilesTextQuery(std::string title, std::string _description = NULL);
     92  virtual ~FilesTextQuery();
     93  virtual bool handle();
     94};
     95
    8996class TextDialog::IntTextQuery : public Dialog::IntQuery {
    9097public:
  • src/UIElements/TextUI/TextDialog.cpp

    r30438f r2c5765  
    114114}
    115115
     116void TextDialog::queryFiles(const char* title, std::string description){
     117  registerQuery(new FilesTextQuery(title,description));
     118}
     119
    116120void TextDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string description){
    117121  registerQuery(new RandomNumberDistribution_ParametersTextQuery(title,description));
  • src/UIElements/TextUI/TextDialog.hpp

    r30438f r2c5765  
    5050  virtual void queryElements(const char*, std::string = "");
    5151  virtual void queryFile(const char*, std::string = "");
     52  virtual void queryFiles(const char*, std::string = "");
    5253  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
    5354
     
    6667  class EmptyTextQuery;
    6768  class FileTextQuery;
     69  class FilesTextQuery;
    6870  class IntTextQuery;
    6971  class IntsTextQuery;
Note: See TracChangeset for help on using the changeset viewer.