Changes in src/UIElements/Dialog.cpp [112b09:5605032]
- File:
-
- 1 edited
-
src/UIElements/Dialog.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Dialog.cpp
r112b09 r5605032 6 6 */ 7 7 8 #include "Helpers/MemDebug.hpp"9 10 8 #include <cassert> 11 9 12 #include " Dialog.hpp"10 #include "UIElements/Dialog.hpp" 13 11 14 #include "atom.hpp"15 #include "element.hpp"16 #include "molecule.hpp"17 12 #include "vector.hpp" 18 13 … … 56 51 57 52 // Base class 58 Dialog::Query::Query(string _title, string _description) : 59 title(_title), 60 description(_description) 53 Dialog::Query::Query(string _title) : 54 title(_title) 61 55 {} 62 56 … … 67 61 } 68 62 69 const std::string Dialog::Query::getDescription() const{70 return description;71 }72 // empty Queries73 74 Dialog::EmptyQuery::EmptyQuery(string title, std::string description) :75 Query(title, description)76 {}77 78 Dialog::EmptyQuery::~EmptyQuery() {}79 80 void Dialog::EmptyQuery::setResult() {81 }82 83 63 // Int Queries 84 64 85 Dialog::IntQuery::IntQuery(string title,int *_target , std::string description) :86 Query(title , description), target(_target)65 Dialog::IntQuery::IntQuery(string title,int *_target) : 66 Query(title), target(_target) 87 67 {} 88 68 … … 93 73 } 94 74 95 // Int Queries96 97 Dialog::BooleanQuery::BooleanQuery(string title,bool *_target, std::string description) :98 Query(title, description), target(_target)99 {}100 101 Dialog::BooleanQuery::~BooleanQuery() {}102 103 void Dialog::BooleanQuery::setResult() {104 *target = tmp;105 }106 107 75 // String Queries 108 76 109 Dialog::StringQuery::StringQuery(string title,string *_target , std::string _description) :110 Query(title , _description), target(_target)77 Dialog::StringQuery::StringQuery(string title,string *_target) : 78 Query(title), target(_target) 111 79 {} 112 80 … … 119 87 // Double Queries 120 88 121 Dialog::DoubleQuery::DoubleQuery(string title,double *_target , std::string _description) :122 Query(title , _description), target(_target)89 Dialog::DoubleQuery::DoubleQuery(string title,double *_target) : 90 Query(title), target(_target) 123 91 {} 124 92 … … 130 98 131 99 132 // Atom Queries133 134 Dialog::AtomQuery::AtomQuery(string title, atom **_target, std::string _description) :135 Query(title, _description),136 tmp(0),137 target(_target)138 139 {}140 141 Dialog::AtomQuery::~AtomQuery() {}142 143 void Dialog::AtomQuery::setResult() {144 *target = tmp;145 }146 147 100 // Molecule Queries 148 101 149 Dialog::MoleculeQuery::MoleculeQuery(string title, molecule **_target, std::string _description) :150 Query(title , _description),102 Dialog::MoleculeQuery::MoleculeQuery(string title, molecule **_target, MoleculeListClass *_molecules) : 103 Query(title), 151 104 tmp(0), 105 molecules(_molecules), 152 106 target(_target) 153 107 … … 162 116 // Vector Queries 163 117 164 Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check , std::string _description) :165 Query(title , _description),118 Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check) : 119 Query(title), 166 120 cellSize(_cellSize), 167 121 check(_check), 168 122 target(_target) 169 123 { 170 tmp = new Vector();124 tmp = new Vector(); 171 125 } 172 126 … … 180 134 } 181 135 182 // Box Queries183 184 Dialog::BoxQuery::BoxQuery(std::string title, double ** const _cellSize, std::string _description) :185 Query(title, _description),186 target(_cellSize)187 {188 tmp = new double[6];189 }190 191 Dialog::BoxQuery::~BoxQuery()192 {193 delete[] tmp;194 }195 196 void Dialog::BoxQuery::setResult() {197 for (int i=0;i<6;i++) {198 (*target)[i] = tmp[i];199 }200 }201 202 136 // Element Queries 203 Dialog::ElementQuery::ElementQuery(std::string title, const element **_target , std::string _description) :204 Query(title , _description),137 Dialog::ElementQuery::ElementQuery(std::string title, const element **_target) : 138 Query(title), 205 139 tmp(0), 206 140 target(_target)
Note:
See TracChangeset
for help on using the changeset viewer.
