Changes in src/UIElements/Dialog.hpp [5605032:94d131]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Dialog.hpp
r5605032 r94d131 11 11 #include<string> 12 12 #include<list> 13 #include<vector> 13 14 14 class MoleculeListClass; 15 class atom; 16 class element; 15 17 class molecule; 16 18 class Vector; 17 class element;18 19 19 20 class Dialog … … 23 24 virtual ~Dialog(); 24 25 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; 26 virtual void queryEmpty(const char *, std::string = "")=0; 27 virtual void queryBoolean(const char *, bool *, std::string = "")=0; 28 virtual void queryInt(const char *, int *, std::string = "")=0; 29 virtual void queryDouble(const char*,double *, std::string = "")=0; 30 virtual void queryString(const char*, std::string *, std::string = "")=0; 31 virtual void queryAtom(const char*,atom**,std::string = "")=0; 32 virtual void queryMolecule(const char*,molecule**, std::string = "")=0; 33 virtual void queryVector(const char*,Vector *,const double *const,bool, std::string = "")=0; 34 virtual void queryBox(const char*,double ** const, std::string = "")=0; 35 virtual void queryElement(const char*, std::vector<element *> *, std::string = "")=0; 31 36 32 37 virtual bool display(); … … 45 50 //base class for all queries 46 51 class Query { 52 friend class Dialog; 47 53 public: 48 Query(std::string _title );54 Query(std::string _title, std::string _description = ""); 49 55 virtual ~Query(); 50 56 virtual bool handle()=0; … … 52 58 protected: 53 59 const std::string getTitle() const; 60 const std::string getDescription() const; 54 61 private: 55 std::string title; 62 std::string title; //!< short title of the query 63 std::string description; //!< longer description for tooltips or for help 64 }; 65 66 // Empty Query is just meant for showing text, such as version, help, initial message or alike 67 class EmptyQuery : public Query { 68 public: 69 EmptyQuery(std::string title, std::string _description = ""); 70 virtual ~EmptyQuery(); 71 virtual bool handle()=0; 72 virtual void setResult(); 56 73 }; 57 74 58 75 //Specialized classes for certain types. GUI-Types are not specialized at this time 76 class BooleanQuery : public Query { 77 public: 78 BooleanQuery(std::string title,bool *_target, std::string _description = ""); 79 virtual ~BooleanQuery(); 80 virtual bool handle()=0; 81 virtual void setResult(); 82 protected: 83 bool tmp; 84 private: 85 bool *target; 86 }; 87 59 88 class IntQuery : public Query { 60 89 public: 61 IntQuery(std::string title,int *_target );90 IntQuery(std::string title,int *_target, std::string _description = ""); 62 91 virtual ~IntQuery(); 63 92 virtual bool handle()=0; … … 71 100 class DoubleQuery : public Query { 72 101 public: 73 DoubleQuery(std::string title,double *_target );102 DoubleQuery(std::string title,double *_target, std::string _description = ""); 74 103 virtual ~DoubleQuery(); 75 104 virtual bool handle()=0; … … 83 112 class StringQuery : public Query { 84 113 public: 85 StringQuery(std::string title,std::string *_target );114 StringQuery(std::string title,std::string *_target, std::string _description = ""); 86 115 virtual ~StringQuery(); 87 116 virtual bool handle()=0; … … 93 122 }; 94 123 95 96 124 class MoleculeQuery : public Query { 97 125 public: 98 MoleculeQuery(std::string title, molecule **_target, MoleculeListClass *_molecules);126 MoleculeQuery(std::string title, molecule **_target, std::string _description = ""); 99 127 virtual ~MoleculeQuery(); 100 128 virtual bool handle()=0; … … 102 130 protected: 103 131 molecule *tmp; 104 MoleculeListClass *molecules;105 132 private: 106 133 molecule **target; 107 134 }; 108 135 136 class AtomQuery : public Query { 137 public: 138 AtomQuery(std::string title, atom **_target, std::string _description = ""); 139 virtual ~AtomQuery(); 140 virtual bool handle()=0; 141 virtual void setResult(); 142 protected: 143 atom *tmp; 144 private: 145 atom **target; 146 }; 147 109 148 class VectorQuery : public Query { 110 149 public: 111 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check );150 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = ""); 112 151 virtual ~VectorQuery(); 113 152 virtual bool handle()=0; … … 121 160 }; 122 161 162 class BoxQuery : public Query { 163 public: 164 BoxQuery(std::string title,double ** const _cellSize, std::string _description = ""); 165 virtual ~BoxQuery(); 166 virtual bool handle()=0; 167 virtual void setResult(); 168 protected: 169 double *tmp; 170 private: 171 double **target; 172 }; 173 123 174 class ElementQuery : public Query { 124 175 public: 125 ElementQuery(std::string title, const element**_target);176 ElementQuery(std::string title, std::vector<element *> *_target, std::string _description = ""); 126 177 virtual ~ElementQuery(); 127 178 virtual bool handle()=0; 128 179 virtual void setResult(); 129 180 protected: 130 const element *tmp;181 std::vector<element *> elements; 131 182 private: 132 const element **target;183 std::vector<element *> * const target; 133 184 }; 134 185 … … 140 191 }; 141 192 193 142 194 #endif /* DIALOG_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.