[f5a86a] | 1 | /*
|
---|
| 2 | * TextDialog.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Jan 5, 2010
|
---|
| 5 | * Author: crueger
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef TEXTDIALOG_HPP_
|
---|
| 9 | #define TEXTDIALOG_HPP_
|
---|
| 10 |
|
---|
[45f5d6] | 11 | #include <string>
|
---|
| 12 |
|
---|
[5079a0] | 13 | #include "Dialog.hpp"
|
---|
[f5a86a] | 14 |
|
---|
[97ebf8] | 15 | class atom;
|
---|
| 16 | class element;
|
---|
| 17 | class molecule;
|
---|
| 18 | class Vector;
|
---|
| 19 |
|
---|
[f5a86a] | 20 | class TextDialog : public Dialog
|
---|
| 21 | {
|
---|
| 22 | public:
|
---|
| 23 | TextDialog();
|
---|
| 24 | virtual ~TextDialog();
|
---|
| 25 |
|
---|
[86466e] | 26 | virtual void queryEmpty(const char *, std::string = "");
|
---|
[97ebf8] | 27 | virtual void queryBoolean(const char *, bool *, std::string = "");
|
---|
[a2ab15] | 28 | virtual void queryInt(const char *, int *, std::string = "");
|
---|
| 29 | virtual void queryString(const char*, std::string *, std::string = "");
|
---|
[cd8e55] | 30 | virtual void queryStrings(const char*, std::vector<std::string> *, std::string = "");
|
---|
[a2ab15] | 31 | virtual void queryDouble(const char*, double*, std::string = "");
|
---|
[97ebf8] | 32 | virtual void queryAtom(const char*,atom**,std::string = "");
|
---|
| 33 | virtual void queryMolecule(const char*,molecule**,std::string = "");
|
---|
[a2ab15] | 34 | virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
|
---|
[97ebf8] | 35 | virtual void queryBox(const char*,double ** const, std::string = "");
|
---|
[104524] | 36 | virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
|
---|
[45f5d6] | 37 |
|
---|
| 38 | protected:
|
---|
| 39 | // specialized stuff for text queries
|
---|
[86466e] | 40 | class EmptyTextQuery : public Dialog::EmptyQuery {
|
---|
| 41 | public:
|
---|
| 42 | EmptyTextQuery(std::string title, std::string _description = NULL);
|
---|
| 43 | virtual ~EmptyTextQuery();
|
---|
| 44 | virtual bool handle();
|
---|
| 45 | };
|
---|
| 46 |
|
---|
[97ebf8] | 47 | class BooleanTextQuery : public Dialog::BooleanQuery {
|
---|
| 48 | public:
|
---|
| 49 | BooleanTextQuery(std::string title, bool *_target, std::string _description = NULL);
|
---|
| 50 | virtual ~BooleanTextQuery();
|
---|
| 51 | virtual bool handle();
|
---|
| 52 | };
|
---|
| 53 |
|
---|
[45f5d6] | 54 | class IntTextQuery : public Dialog::IntQuery {
|
---|
| 55 | public:
|
---|
[a2ab15] | 56 | IntTextQuery(std::string title, int *_target, std::string _description = NULL);
|
---|
[5a7243] | 57 | virtual ~IntTextQuery();
|
---|
[45f5d6] | 58 | virtual bool handle();
|
---|
| 59 | };
|
---|
| 60 |
|
---|
[2ededc2] | 61 | class DoubleTextQuery : public Dialog::DoubleQuery {
|
---|
| 62 | public:
|
---|
[a2ab15] | 63 | DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
|
---|
[5a7243] | 64 | virtual ~DoubleTextQuery();
|
---|
[2ededc2] | 65 | virtual bool handle();
|
---|
| 66 | };
|
---|
| 67 |
|
---|
[45f5d6] | 68 | class StringTextQuery : public Dialog::StringQuery {
|
---|
| 69 | public:
|
---|
[a2ab15] | 70 | StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
|
---|
[5a7243] | 71 | virtual ~StringTextQuery();
|
---|
[45f5d6] | 72 | virtual bool handle();
|
---|
| 73 | };
|
---|
[7aa000] | 74 |
|
---|
[cd8e55] | 75 | class StringsTextQuery : public Dialog::StringsQuery {
|
---|
| 76 | public:
|
---|
| 77 | StringsTextQuery(std::string title, std::vector<std::string> *_target, std::string _description = NULL);
|
---|
| 78 | virtual ~StringsTextQuery();
|
---|
| 79 | virtual bool handle();
|
---|
| 80 | };
|
---|
| 81 |
|
---|
[97ebf8] | 82 | class AtomTextQuery : public Dialog::AtomQuery {
|
---|
| 83 | public:
|
---|
| 84 | AtomTextQuery(std::string title, atom **_target, std::string _description = NULL);
|
---|
| 85 | virtual ~AtomTextQuery();
|
---|
| 86 | virtual bool handle();
|
---|
| 87 | };
|
---|
| 88 |
|
---|
[7aa000] | 89 | class MoleculeTextQuery : public Dialog::MoleculeQuery {
|
---|
| 90 | public:
|
---|
[97ebf8] | 91 | MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
|
---|
[5a7243] | 92 | virtual ~MoleculeTextQuery();
|
---|
[7aa000] | 93 | virtual bool handle();
|
---|
| 94 | };
|
---|
[2ededc2] | 95 |
|
---|
| 96 | class VectorTextQuery : public Dialog::VectorQuery {
|
---|
| 97 | public:
|
---|
[a2ab15] | 98 | VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
|
---|
[5a7243] | 99 | virtual ~VectorTextQuery();
|
---|
| 100 | virtual bool handle();
|
---|
| 101 | };
|
---|
| 102 |
|
---|
[97ebf8] | 103 | class BoxTextQuery : public Dialog::BoxQuery {
|
---|
| 104 | public:
|
---|
| 105 | BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
|
---|
| 106 | virtual ~BoxTextQuery();
|
---|
| 107 | virtual bool handle();
|
---|
| 108 | };
|
---|
| 109 |
|
---|
[5a7243] | 110 | class ElementTextQuery : public Dialog::ElementQuery {
|
---|
| 111 | public:
|
---|
[104524] | 112 | ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description = NULL);
|
---|
[5a7243] | 113 | virtual ~ElementTextQuery();
|
---|
[2ededc2] | 114 | virtual bool handle();
|
---|
| 115 | };
|
---|
[f5a86a] | 116 | };
|
---|
| 117 |
|
---|
| 118 | #endif /* TEXTDIALOG_HPP_ */
|
---|