Ignore:
Timestamp:
Jan 28, 2010, 1:54:35 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
03d7ac
Parents:
d34341
git-author:
Tillmann Crueger <crueger@…> (01/28/10 13:02:49)
git-committer:
Tillmann Crueger <crueger@…> (01/28/10 13:54:35)
Message:

Added possibility to query doubles and vectors using dialogs.

File:
1 edited

Legend:

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

    rd34341 rdbd19f  
    1414class MoleculeListClass;
    1515class molecule;
     16class Vector;
    1617
    1718class Dialog
     
    2223
    2324  virtual void queryInt(const char *, int *)=0;
     25  virtual void queryDouble(const char*,double *)=0;
    2426  virtual void queryString(const char*, std::string *)=0;
    2527  virtual void queryMolecule(const char*,molecule**,MoleculeListClass*)=0;
     28  virtual void queryVector(const char*,Vector *,const double *const,bool)=0;
    2629
    2730  virtual bool display();
     
    6467  };
    6568
     69  class DoubleQuery : public Query {
     70  public:
     71    DoubleQuery(std::string title,double *_target);
     72    ~DoubleQuery();
     73    virtual bool handle()=0;
     74    virtual void setResult();
     75  protected:
     76    double tmp;
     77  private:
     78    double *target;
     79  };
     80
    6681  class StringQuery : public Query {
    6782  public:
     
    7590    std::string *target;
    7691  };
     92
    7793
    7894  class MoleculeQuery : public Query {
     
    89105  };
    90106
     107  class VectorQuery : public Query {
     108  public:
     109      VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check);
     110      ~VectorQuery();
     111      virtual bool handle()=0;
     112      virtual void setResult();
     113    protected:
     114      Vector *tmp;
     115      const double *const cellSize;
     116      bool check;
     117    private:
     118      Vector *target;
     119  };
     120
    91121void registerQuery(Query* query);
    92122
Note: See TracChangeset for help on using the changeset viewer.