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 |
|
---|
11 | #include <string>
|
---|
12 |
|
---|
13 | #include "Dialog.hpp"
|
---|
14 |
|
---|
15 | class atom;
|
---|
16 | class element;
|
---|
17 | class molecule;
|
---|
18 | class Vector;
|
---|
19 |
|
---|
20 | class TextDialog : public Dialog
|
---|
21 | {
|
---|
22 | public:
|
---|
23 | TextDialog();
|
---|
24 | virtual ~TextDialog();
|
---|
25 |
|
---|
26 | virtual void queryEmpty(const char *, std::string = "");
|
---|
27 | virtual void queryBoolean(const char *, bool *, std::string = "");
|
---|
28 | virtual void queryInt(const char *, int *, std::string = "");
|
---|
29 | virtual void queryString(const char*, std::string *, std::string = "");
|
---|
30 | virtual void queryStrings(const char*, std::vector<std::string> *, std::string = "");
|
---|
31 | virtual void queryDouble(const char*, double*, std::string = "");
|
---|
32 | virtual void queryAtom(const char*,atom**,std::string = "");
|
---|
33 | virtual void queryMolecule(const char*,molecule**,std::string = "");
|
---|
34 | virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
|
---|
35 | virtual void queryBox(const char*,double ** const, std::string = "");
|
---|
36 | virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
|
---|
37 |
|
---|
38 | protected:
|
---|
39 | // specialized stuff for text queries
|
---|
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 |
|
---|
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 |
|
---|
54 | class IntTextQuery : public Dialog::IntQuery {
|
---|
55 | public:
|
---|
56 | IntTextQuery(std::string title, int *_target, std::string _description = NULL);
|
---|
57 | virtual ~IntTextQuery();
|
---|
58 | virtual bool handle();
|
---|
59 | };
|
---|
60 |
|
---|
61 | class DoubleTextQuery : public Dialog::DoubleQuery {
|
---|
62 | public:
|
---|
63 | DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
|
---|
64 | virtual ~DoubleTextQuery();
|
---|
65 | virtual bool handle();
|
---|
66 | };
|
---|
67 |
|
---|
68 | class StringTextQuery : public Dialog::StringQuery {
|
---|
69 | public:
|
---|
70 | StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
|
---|
71 | virtual ~StringTextQuery();
|
---|
72 | virtual bool handle();
|
---|
73 | };
|
---|
74 |
|
---|
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 |
|
---|
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 |
|
---|
89 | class MoleculeTextQuery : public Dialog::MoleculeQuery {
|
---|
90 | public:
|
---|
91 | MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
|
---|
92 | virtual ~MoleculeTextQuery();
|
---|
93 | virtual bool handle();
|
---|
94 | };
|
---|
95 |
|
---|
96 | class VectorTextQuery : public Dialog::VectorQuery {
|
---|
97 | public:
|
---|
98 | VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
|
---|
99 | virtual ~VectorTextQuery();
|
---|
100 | virtual bool handle();
|
---|
101 | };
|
---|
102 |
|
---|
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 |
|
---|
110 | class ElementTextQuery : public Dialog::ElementQuery {
|
---|
111 | public:
|
---|
112 | ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description = NULL);
|
---|
113 | virtual ~ElementTextQuery();
|
---|
114 | virtual bool handle();
|
---|
115 | };
|
---|
116 | };
|
---|
117 |
|
---|
118 | #endif /* TEXTDIALOG_HPP_ */
|
---|