/* * TextDialog.hpp * * Created on: Jan 5, 2010 * Author: crueger */ #ifndef TEXTDIALOG_HPP_ #define TEXTDIALOG_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "Dialog.hpp" class atom; class element; class molecule; class KeyValuePair; class RealSpaceMatrix; class Vector; class TextDialog : public Dialog { public: TextDialog(const std::string &_title); virtual ~TextDialog(); virtual void queryEmpty(const std::string ="", const std::string = ""); /** With the following boost::preprocessor code we generate virtual function * definitions for all desired query types in the abstract class Dialog. */ #include "UIElements/GlobalListOfParameterQueries.hpp" #include "UIElements/Dialog_impl_pre.hpp" #include // iterate over all parameter query types #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type #define SUFFIX BOOST_PP_EMPTY() #define BOOST_PP_LOCAL_MACRO(n) dialog_declaration(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, GLOBALLISTOFPARAMETERQUERIES_Type) #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1) #include BOOST_PP_LOCAL_ITERATE() #undef dialog_declaration #undef SUFFIX #endif #include "Dialog_impl_undef.hpp" /* End of preprocessor code piece */ protected: class EmptyTextQuery; /** With the following boost::preprocessor code we generate forward declarations * of query class for all desired query types in the Qt specialization class of * Dialog. */ #include "UIElements/GlobalListOfParameterQueries.hpp" #include "UIElements/Dialog_impl_pre.hpp" #include // iterate over all parameter query types for forward declarations #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type #define BOOST_PP_LOCAL_MACRO(n) forward_declaration(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, TextQuery) #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1) #include BOOST_PP_LOCAL_ITERATE() #undef forward_declaration #endif #include "Dialog_impl_undef.hpp" /* End of preprocessor code piece */ }; #endif /* TEXTDIALOG_HPP_ */