Changes in src/UIElements/Dialog.hpp [94d131:5605032]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Dialog.hpp
r94d131 r5605032 11 11 #include<string> 12 12 #include<list> 13 #include<vector>14 13 15 class atom; 16 class element; 14 class MoleculeListClass; 17 15 class molecule; 18 16 class Vector; 17 class element; 19 18 20 19 class Dialog … … 24 23 virtual ~Dialog(); 25 24 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; 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; 36 31 37 32 virtual bool display(); … … 50 45 //base class for all queries 51 46 class Query { 52 friend class Dialog;53 47 public: 54 Query(std::string _title , std::string _description = "");48 Query(std::string _title); 55 49 virtual ~Query(); 56 50 virtual bool handle()=0; … … 58 52 protected: 59 53 const std::string getTitle() const; 60 const std::string getDescription() const;61 54 private: 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(); 55 std::string title; 73 56 }; 74 57 75 58 //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 88 59 class IntQuery : public Query { 89 60 public: 90 IntQuery(std::string title,int *_target , std::string _description = "");61 IntQuery(std::string title,int *_target); 91 62 virtual ~IntQuery(); 92 63 virtual bool handle()=0; … … 100 71 class DoubleQuery : public Query { 101 72 public: 102 DoubleQuery(std::string title,double *_target , std::string _description = "");73 DoubleQuery(std::string title,double *_target); 103 74 virtual ~DoubleQuery(); 104 75 virtual bool handle()=0; … … 112 83 class StringQuery : public Query { 113 84 public: 114 StringQuery(std::string title,std::string *_target , std::string _description = "");85 StringQuery(std::string title,std::string *_target); 115 86 virtual ~StringQuery(); 116 87 virtual bool handle()=0; … … 122 93 }; 123 94 95 124 96 class MoleculeQuery : public Query { 125 97 public: 126 MoleculeQuery(std::string title, molecule **_target, std::string _description = "");98 MoleculeQuery(std::string title, molecule **_target, MoleculeListClass *_molecules); 127 99 virtual ~MoleculeQuery(); 128 100 virtual bool handle()=0; … … 130 102 protected: 131 103 molecule *tmp; 104 MoleculeListClass *molecules; 132 105 private: 133 106 molecule **target; 134 107 }; 135 108 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 148 109 class VectorQuery : public Query { 149 110 public: 150 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check , std::string _description = "");111 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check); 151 112 virtual ~VectorQuery(); 152 113 virtual bool handle()=0; … … 160 121 }; 161 122 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 174 123 class ElementQuery : public Query { 175 124 public: 176 ElementQuery(std::string title, std::vector<element *> *_target, std::string _description = "");125 ElementQuery(std::string title, const element**_target); 177 126 virtual ~ElementQuery(); 178 127 virtual bool handle()=0; 179 128 virtual void setResult(); 180 129 protected: 181 std::vector<element *> elements;130 const element *tmp; 182 131 private: 183 std::vector<element *> * consttarget;132 const element **target; 184 133 }; 185 134 … … 191 140 }; 192 141 193 194 142 #endif /* DIALOG_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.