Ignore:
Timestamp:
May 8, 2010, 6:30:53 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
7ac765
Parents:
401b97
Message:

Extended UIFactory to a CommandLine derivate.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/UIElements/Dialog.hpp

    r401b97 r83afe0  
    2323  virtual ~Dialog();
    2424
    25   virtual void queryInt(const char *, int *)=0;
    26   virtual void queryDouble(const char*,double *)=0;
    27   virtual void queryString(const char*, std::string *)=0;
    28   virtual void queryMolecule(const char*,molecule**,MoleculeListClass*)=0;
    29   virtual void queryVector(const char*,Vector *,const double *const,bool)=0;
    30   virtual void queryElement(const char*,const element **)=0;
     25  virtual void queryInt(const char *, int *, std::string = "")=0;
     26  virtual void queryDouble(const char*,double *, std::string = "")=0;
     27  virtual void queryString(const char*, std::string *, std::string = "")=0;
     28  virtual void queryMolecule(const char*,molecule**,MoleculeListClass*, std::string = "")=0;
     29  virtual void queryVector(const char*,Vector *,const double *const,bool, std::string = "")=0;
     30  virtual void queryElement(const char*,const element **, std::string = "")=0;
    3131
    3232  virtual bool display();
     
    4646  class Query {
    4747  public:
    48     Query(std::string _title);
     48    Query(std::string _title, std::string _description = "");
    4949    virtual ~Query();
    5050    virtual bool handle()=0;
     
    5252  protected:
    5353    const std::string getTitle() const;
     54    const std::string getDescription() const;
    5455  private:
    55     std::string title;
     56    std::string title;  //!< short title of the query
     57    std::string description; //!< longer description for tooltips or for help
    5658  };
    5759
     
    5961  class IntQuery : public Query {
    6062  public:
    61     IntQuery(std::string title,int *_target);
     63    IntQuery(std::string title,int *_target, std::string _description = "");
    6264    virtual ~IntQuery();
    6365    virtual bool handle()=0;
     
    7173  class DoubleQuery : public Query {
    7274  public:
    73     DoubleQuery(std::string title,double *_target);
     75    DoubleQuery(std::string title,double *_target, std::string _description = "");
    7476    virtual ~DoubleQuery();
    7577    virtual bool handle()=0;
     
    8385  class StringQuery : public Query {
    8486  public:
    85     StringQuery(std::string title,std::string *_target);
     87    StringQuery(std::string title,std::string *_target, std::string _description = "");
    8688    virtual ~StringQuery();
    8789    virtual bool handle()=0;
     
    9698  class MoleculeQuery : public Query {
    9799  public:
    98     MoleculeQuery(std::string title, molecule **_target, MoleculeListClass *_molecules);
     100    MoleculeQuery(std::string title, molecule **_target, MoleculeListClass *_molecules, std::string _description = "");
    99101    virtual ~MoleculeQuery();
    100102    virtual bool handle()=0;
     
    109111  class VectorQuery : public Query {
    110112  public:
    111       VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check);
     113      VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = "");
    112114      virtual ~VectorQuery();
    113115      virtual bool handle()=0;
     
    123125  class ElementQuery : public Query {
    124126  public:
    125     ElementQuery(std::string title, const element**_target);
     127    ElementQuery(std::string title, const element**_target, std::string _description = "");
    126128    virtual ~ElementQuery();
    127129    virtual bool handle()=0;
     
    140142};
    141143
     144
    142145#endif /* DIALOG_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.