Changes in src/UIElements/Dialog.cpp [8df74d:72f611]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Dialog.cpp
r8df74d r72f611 23 23 #include "Actions/ValueStorage.hpp" 24 24 25 #include "Helpers/Log.hpp"26 25 #include "Helpers/Verbose.hpp" 27 28 class Atom; 29 class Box; 30 class element; 31 class Matrix; 32 class molecule; 33 class Vector; 26 #include "atom.hpp" 27 #include "Box.hpp" 28 #include "element.hpp" 29 #include "molecule.hpp" 30 #include "LinearAlgebra/BoxVector.hpp" 31 #include "LinearAlgebra/Vector.hpp" 32 #include "LinearAlgebra/Matrix.hpp" 34 33 35 34 using namespace std; … … 181 180 } 182 181 183 template <> void Dialog::query< boost::filesystem::path >(const char *token, std::string description) 184 { 185 queryFile(token, description); 186 } 187 188 /************************** Query Infrastructure ************************/ 189 /* ---> shifted to folder Query */ 190 /************************************************************************/ 182 /****************** Query types Infrastructure **************************/ 183 184 // Base class 185 Dialog::Query::Query(string _title, string _description) : 186 title(_title), 187 description(_description) 188 {} 189 190 Dialog::Query::~Query() {} 191 192 const std::string Dialog::Query::getTitle() const{ 193 return title; 194 } 195 196 const std::string Dialog::Query::getDescription() const{ 197 return description; 198 } 199 // empty Queries 200 201 Dialog::EmptyQuery::EmptyQuery(string title, std::string description) : 202 Query(title, description) 203 {} 204 205 Dialog::EmptyQuery::~EmptyQuery() {} 206 207 void Dialog::EmptyQuery::setResult() { 208 } 209 210 // Int Queries 211 212 Dialog::IntQuery::IntQuery(string title, std::string description) : 213 Query(title, description) 214 {} 215 216 Dialog::IntQuery::~IntQuery() {} 217 218 void Dialog::IntQuery::setResult() { 219 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 220 } 221 222 // Ints Queries 223 224 Dialog::IntsQuery::IntsQuery(string title, std::string description) : 225 Query(title, description) 226 {} 227 228 Dialog::IntsQuery::~IntsQuery() {} 229 230 void Dialog::IntsQuery::setResult() { 231 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 232 } 233 234 // Bool Queries 235 236 Dialog::BooleanQuery::BooleanQuery(string title,std::string description) : 237 Query(title, description) 238 {} 239 240 Dialog::BooleanQuery::~BooleanQuery() {} 241 242 void Dialog::BooleanQuery::setResult() { 243 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 244 } 245 246 // String Queries 247 248 Dialog::StringQuery::StringQuery(string title,std::string _description) : 249 Query(title, _description) 250 {} 251 252 Dialog::StringQuery::~StringQuery() {}; 253 254 void Dialog::StringQuery::setResult() { 255 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 256 } 257 258 // Strings Queries 259 260 Dialog::StringsQuery::StringsQuery(string title,std::string _description) : 261 Query(title, _description) 262 {} 263 264 Dialog::StringsQuery::~StringsQuery() {}; 265 266 void Dialog::StringsQuery::setResult() { 267 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 268 } 269 270 // Double Queries 271 272 Dialog::DoubleQuery::DoubleQuery(string title, std::string _description) : 273 Query(title, _description) 274 {} 275 276 Dialog::DoubleQuery::~DoubleQuery() {}; 277 278 void Dialog::DoubleQuery::setResult() { 279 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 280 } 281 282 // Doubles Queries 283 284 Dialog::DoublesQuery::DoublesQuery(string title, std::string _description) : 285 Query(title, _description) 286 {} 287 288 Dialog::DoublesQuery::~DoublesQuery() {}; 289 290 void Dialog::DoublesQuery::setResult() { 291 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 292 } 293 294 295 // Atom Queries 296 297 Dialog::AtomQuery::AtomQuery(string title, std::string _description) : 298 Query(title, _description), 299 tmp(0) 300 {} 301 302 Dialog::AtomQuery::~AtomQuery() {} 303 304 void Dialog::AtomQuery::setResult() { 305 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 306 } 307 308 // Atoms Queries 309 310 Dialog::AtomsQuery::AtomsQuery(string title, std::string _description) : 311 Query(title, _description), 312 tmp(0) 313 {} 314 315 Dialog::AtomsQuery::~AtomsQuery() {} 316 317 void Dialog::AtomsQuery::setResult() { 318 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 319 } 320 321 // Molecule Queries 322 323 Dialog::MoleculeQuery::MoleculeQuery(string title, std::string _description) : 324 Query(title, _description), 325 tmp(0) 326 {} 327 328 Dialog::MoleculeQuery::~MoleculeQuery() {} 329 330 void Dialog::MoleculeQuery::setResult() { 331 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 332 } 333 334 // Molecules Queries 335 336 Dialog::MoleculesQuery::MoleculesQuery(string title, std::string _description) : 337 Query(title, _description), 338 tmp(0) 339 {} 340 341 Dialog::MoleculesQuery::~MoleculesQuery() {} 342 343 void Dialog::MoleculesQuery::setResult() { 344 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 345 } 346 347 // Vector Queries 348 349 Dialog::VectorQuery::VectorQuery(std::string title,bool _check, std::string _description) : 350 Query(title, _description), 351 check(_check) 352 {} 353 354 Dialog::VectorQuery::~VectorQuery() 355 {} 356 357 void Dialog::VectorQuery::setResult() { 358 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 359 } 360 361 // Vectors Queries 362 363 Dialog::VectorsQuery::VectorsQuery(std::string title,bool _check, std::string _description) : 364 Query(title, _description), 365 check(_check) 366 {} 367 368 Dialog::VectorsQuery::~VectorsQuery() 369 {} 370 371 void Dialog::VectorsQuery::setResult() { 372 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 373 } 374 375 // Box Queries 376 377 Dialog::BoxQuery::BoxQuery(std::string title, std::string _description) : 378 Query(title, _description) 379 {} 380 381 Dialog::BoxQuery::~BoxQuery() 382 {} 383 384 void Dialog::BoxQuery::setResult() { 385 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 386 } 387 388 // Element Queries 389 Dialog::ElementQuery::ElementQuery(std::string title, std::string _description) : 390 Query(title, _description) 391 {} 392 393 Dialog::ElementQuery::~ElementQuery(){} 394 395 void Dialog::ElementQuery::setResult(){ 396 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 397 } 398 399 // Elements Queries 400 Dialog::ElementsQuery::ElementsQuery(std::string title, std::string _description) : 401 Query(title, _description) 402 {} 403 404 Dialog::ElementsQuery::~ElementsQuery(){} 405 406 void Dialog::ElementsQuery::setResult(){ 407 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 408 }
Note:
See TracChangeset
for help on using the changeset viewer.