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 queryDouble(const char*, double*, std::string = "");
|
---|
31 | virtual void queryAtom(const char*,atom**,std::string = "");
|
---|
32 | virtual void queryMolecule(const char*,molecule**,std::string = "");
|
---|
33 | virtual void queryVector(const char*,Vector *,bool, std::string = "");
|
---|
34 | virtual void queryBox(const char*,Box*, std::string = "");
|
---|
35 | virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
|
---|
36 |
|
---|
37 | protected:
|
---|
38 | // specialized stuff for text queries
|
---|
39 | class EmptyTextQuery : public Dialog::EmptyQuery {
|
---|
40 | public:
|
---|
41 | EmptyTextQuery(std::string title, std::string _description = NULL);
|
---|
42 | virtual ~EmptyTextQuery();
|
---|
43 | virtual bool handle();
|
---|
44 | };
|
---|
45 |
|
---|
46 | class BooleanTextQuery : public Dialog::BooleanQuery {
|
---|
47 | public:
|
---|
48 | BooleanTextQuery(std::string title, bool *_target, std::string _description = NULL);
|
---|
49 | virtual ~BooleanTextQuery();
|
---|
50 | virtual bool handle();
|
---|
51 | };
|
---|
52 |
|
---|
53 | class IntTextQuery : public Dialog::IntQuery {
|
---|
54 | public:
|
---|
55 | IntTextQuery(std::string title, int *_target, std::string _description = NULL);
|
---|
56 | virtual ~IntTextQuery();
|
---|
57 | virtual bool handle();
|
---|
58 | };
|
---|
59 |
|
---|
60 | class DoubleTextQuery : public Dialog::DoubleQuery {
|
---|
61 | public:
|
---|
62 | DoubleTextQuery(std::string title, double *_target, std::string _description = NULL);
|
---|
63 | virtual ~DoubleTextQuery();
|
---|
64 | virtual bool handle();
|
---|
65 | };
|
---|
66 |
|
---|
67 | class StringTextQuery : public Dialog::StringQuery {
|
---|
68 | public:
|
---|
69 | StringTextQuery(std::string title, std::string *_target, std::string _description = NULL);
|
---|
70 | virtual ~StringTextQuery();
|
---|
71 | virtual bool handle();
|
---|
72 | };
|
---|
73 |
|
---|
74 | class AtomTextQuery : public Dialog::AtomQuery {
|
---|
75 | public:
|
---|
76 | AtomTextQuery(std::string title, atom **_target, std::string _description = NULL);
|
---|
77 | virtual ~AtomTextQuery();
|
---|
78 | virtual bool handle();
|
---|
79 | };
|
---|
80 |
|
---|
81 | class MoleculeTextQuery : public Dialog::MoleculeQuery {
|
---|
82 | public:
|
---|
83 | MoleculeTextQuery(std::string title, molecule **_target, std::string _description = NULL);
|
---|
84 | virtual ~MoleculeTextQuery();
|
---|
85 | virtual bool handle();
|
---|
86 | };
|
---|
87 |
|
---|
88 | class VectorTextQuery : public Dialog::VectorQuery {
|
---|
89 | public:
|
---|
90 | VectorTextQuery(std::string title,Vector *_target,bool _check, std::string _description = NULL);
|
---|
91 | virtual ~VectorTextQuery();
|
---|
92 | virtual bool handle();
|
---|
93 | };
|
---|
94 |
|
---|
95 | class BoxTextQuery : public Dialog::BoxQuery {
|
---|
96 | public:
|
---|
97 | BoxTextQuery(std::string title,Box* _cellSize, std::string _description = NULL);
|
---|
98 | virtual ~BoxTextQuery();
|
---|
99 | virtual bool handle();
|
---|
100 | };
|
---|
101 |
|
---|
102 | class ElementTextQuery : public Dialog::ElementQuery {
|
---|
103 | public:
|
---|
104 | ElementTextQuery(std::string title, std::vector<element *> *_target, std::string _description = NULL);
|
---|
105 | virtual ~ElementTextQuery();
|
---|
106 | virtual bool handle();
|
---|
107 | };
|
---|
108 | };
|
---|
109 |
|
---|
110 | #endif /* TEXTDIALOG_HPP_ */
|
---|