| 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 config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | #include <string>
|
|---|
| 18 |
|
|---|
| 19 | #include "Dialog.hpp"
|
|---|
| 20 |
|
|---|
| 21 | class atom;
|
|---|
| 22 | class element;
|
|---|
| 23 | class molecule;
|
|---|
| 24 | class KeyValuePair;
|
|---|
| 25 | class RealSpaceMatrix;
|
|---|
| 26 | class Vector;
|
|---|
| 27 |
|
|---|
| 28 | class TextDialog : public Dialog
|
|---|
| 29 | {
|
|---|
| 30 | public:
|
|---|
| 31 | TextDialog(const std::string &_title);
|
|---|
| 32 | virtual ~TextDialog();
|
|---|
| 33 |
|
|---|
| 34 | virtual void queryEmpty(const std::string ="", const std::string = "");
|
|---|
| 35 |
|
|---|
| 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 |
|
|---|
| 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 */
|
|---|
| 59 |
|
|---|
| 60 | protected:
|
|---|
| 61 |
|
|---|
| 62 | class EmptyTextQuery;
|
|---|
| 63 |
|
|---|
| 64 | class VectorTextQuery;
|
|---|
| 65 | class VectorsTextQuery;
|
|---|
| 66 |
|
|---|
| 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 |
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 | #endif /* TEXTDIALOG_HPP_ */
|
|---|