| 1 | /*
|
|---|
| 2 | * TextQuery.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Nov 8, 2010
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef TEXTQUERY_HPP_
|
|---|
| 9 | #define TEXTQUERY_HPP_
|
|---|
| 10 |
|
|---|
| 11 | // include config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | #include "TextUI/TextDialog.hpp"
|
|---|
| 18 |
|
|---|
| 19 | class TextDialog::EmptyTextQuery : public Dialog::EmptyQuery {
|
|---|
| 20 | public:
|
|---|
| 21 | EmptyTextQuery(const std::string &_title, const std::string &_description = NULL);
|
|---|
| 22 | virtual ~EmptyTextQuery();
|
|---|
| 23 | virtual void handle();
|
|---|
| 24 | };
|
|---|
| 25 |
|
|---|
| 26 | class TextDialog::VectorTextQuery : public Dialog::TQuery<Vector> {
|
|---|
| 27 | public:
|
|---|
| 28 | VectorTextQuery(Parameter<Vector> &_param, const std::string &_title, const std::string &_description = "");
|
|---|
| 29 | virtual ~VectorTextQuery();
|
|---|
| 30 | virtual void handle();
|
|---|
| 31 | };
|
|---|
| 32 |
|
|---|
| 33 | class TextDialog::VectorsTextQuery : public Dialog::TQuery< std::vector<Vector> > {
|
|---|
| 34 | public:
|
|---|
| 35 | VectorsTextQuery(Parameter< std::vector<Vector> > &_param, const std::string &_title, const std::string &_description = "");
|
|---|
| 36 | virtual ~VectorsTextQuery();
|
|---|
| 37 | virtual void handle();
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | /** With the following boost::preprocessor code we generate forward declarations
|
|---|
| 41 | * of query class for all desired query types in the Qt specialization class of
|
|---|
| 42 | * Dialog.
|
|---|
| 43 | */
|
|---|
| 44 | #include "UIElements/GlobalListOfParameterQueries.hpp"
|
|---|
| 45 | #include "UIElements/Dialog_impl_pre.hpp"
|
|---|
| 46 |
|
|---|
| 47 | #include <boost/preprocessor/facilities/empty.hpp>
|
|---|
| 48 |
|
|---|
| 49 | // iterate over all parameter query types for forward declarations
|
|---|
| 50 | #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type
|
|---|
| 51 | #define BOOST_PP_LOCAL_MACRO(n) queryclass_definition(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, GLOBALLISTOFPARAMETERQUERIES_Type, Text)
|
|---|
| 52 | #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1)
|
|---|
| 53 | #include BOOST_PP_LOCAL_ITERATE()
|
|---|
| 54 | #undef queryclass_definition
|
|---|
| 55 | #endif
|
|---|
| 56 |
|
|---|
| 57 | #include "Dialog_impl_undef.hpp"
|
|---|
| 58 | /* End of preprocessor code piece */
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | #endif /* TEXTQUERY_HPP_ */
|
|---|