[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 |
|
---|
[56f73b] | 11 | // include config.h
|
---|
| 12 | #ifdef HAVE_CONFIG_H
|
---|
| 13 | #include <config.h>
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
| 16 |
|
---|
[45f5d6] | 17 | #include <string>
|
---|
| 18 |
|
---|
[5079a0] | 19 | #include "Dialog.hpp"
|
---|
[f5a86a] | 20 |
|
---|
[97ebf8] | 21 | class atom;
|
---|
| 22 | class element;
|
---|
| 23 | class molecule;
|
---|
[33e801] | 24 | class KeyValuePair;
|
---|
[7d9416] | 25 | class RealSpaceMatrix;
|
---|
[97ebf8] | 26 | class Vector;
|
---|
| 27 |
|
---|
[f5a86a] | 28 | class TextDialog : public Dialog
|
---|
| 29 | {
|
---|
| 30 | public:
|
---|
[163110] | 31 | TextDialog(const std::string &_title);
|
---|
[f5a86a] | 32 | virtual ~TextDialog();
|
---|
| 33 |
|
---|
[f130d4] | 34 | virtual void queryEmpty(const std::string ="", const std::string = "");
|
---|
[37a67f] | 35 |
|
---|
[6af6470] | 36 | virtual void queryVector(Parameter<Vector> &, const std::string ="", const std::string = "");
|
---|
| 37 | virtual void queryVectors(Parameter< std::vector<Vector> > &, const std::string ="", const std::string = "");
|
---|
| 38 |
|
---|
[37a67f] | 39 | /** With the following boost::preprocessor code we generate virtual function
|
---|
| 40 | * definitions for all desired query types in the abstract class Dialog.
|
---|
| 41 | */
|
---|
| 42 | #include "UIElements/GlobalListOfParameterQueries.hpp"
|
---|
| 43 | #include "UIElements/Dialog_impl_pre.hpp"
|
---|
| 44 |
|
---|
| 45 | #include <boost/preprocessor/facilities/empty.hpp>
|
---|
| 46 |
|
---|
| 47 | // iterate over all parameter query types
|
---|
| 48 | #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type
|
---|
| 49 | #define SUFFIX BOOST_PP_EMPTY()
|
---|
| 50 | #define BOOST_PP_LOCAL_MACRO(n) dialog_declaration(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, GLOBALLISTOFPARAMETERQUERIES_Type)
|
---|
| 51 | #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1)
|
---|
| 52 | #include BOOST_PP_LOCAL_ITERATE()
|
---|
| 53 | #undef dialog_declaration
|
---|
| 54 | #undef SUFFIX
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 | #include "Dialog_impl_undef.hpp"
|
---|
| 58 | /* End of preprocessor code piece */
|
---|
[45f5d6] | 59 |
|
---|
| 60 | protected:
|
---|
[37a67f] | 61 |
|
---|
[738ae1] | 62 | class EmptyTextQuery;
|
---|
[37a67f] | 63 |
|
---|
[6af6470] | 64 | class VectorTextQuery;
|
---|
| 65 | class VectorsTextQuery;
|
---|
| 66 |
|
---|
[37a67f] | 67 | /** With the following boost::preprocessor code we generate forward declarations
|
---|
| 68 | * of query class for all desired query types in the Qt specialization class of
|
---|
| 69 | * Dialog.
|
---|
| 70 | */
|
---|
| 71 | #include "UIElements/GlobalListOfParameterQueries.hpp"
|
---|
| 72 | #include "UIElements/Dialog_impl_pre.hpp"
|
---|
| 73 |
|
---|
| 74 | #include <boost/preprocessor/facilities/empty.hpp>
|
---|
| 75 |
|
---|
| 76 | // iterate over all parameter query types for forward declarations
|
---|
| 77 | #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type
|
---|
| 78 | #define BOOST_PP_LOCAL_MACRO(n) forward_declaration(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, TextQuery)
|
---|
| 79 | #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1)
|
---|
| 80 | #include BOOST_PP_LOCAL_ITERATE()
|
---|
| 81 | #undef forward_declaration
|
---|
| 82 | #endif
|
---|
| 83 |
|
---|
| 84 | #include "Dialog_impl_undef.hpp"
|
---|
| 85 | /* End of preprocessor code piece */
|
---|
| 86 |
|
---|
[f5a86a] | 87 | };
|
---|
| 88 |
|
---|
| 89 | #endif /* TEXTDIALOG_HPP_ */
|
---|