Index: src/UIElements/Qt4/QtDialog.hpp
===================================================================
--- src/UIElements/Qt4/QtDialog.hpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
+++ src/UIElements/Qt4/QtDialog.hpp	(revision 37a67f216a1ec48288bc1b314c99cfb0d6cb6963)
@@ -35,26 +35,25 @@
 
   virtual void queryEmpty(const std::string ="", const std::string = "");
-  virtual void queryBoolean(Parameter<bool> &, const std::string ="", const std::string = "");
-  virtual void queryInt(Parameter<int> &, const std::string ="", const std::string = "");
-  virtual void queryInts(Parameter<std::vector<int> > &, const std::string ="", const std::string = "");
-  virtual void queryUnsignedInt(Parameter<unsigned int> &, const std::string ="", const std::string = "");
-  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const std::string ="", const std::string = "");
-  virtual void queryDouble(Parameter<double> &, const std::string ="", const std::string = "");
-  virtual void queryDoubles(Parameter<std::vector<double> > &, const std::string ="", const std::string = "");
-  virtual void queryString(Parameter<std::string> &, const std::string ="", const std::string = "");
-  virtual void queryStrings(Parameter<std::vector<std::string> > &, const std::string ="", const std::string = "");
-  virtual void queryAtom(Parameter<const atom *> &, const std::string ="", const std::string = "");
-  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const std::string ="", const std::string = "");
-  virtual void queryMolecule(Parameter<const molecule *> &, const std::string ="", const std::string = "");
-  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const std::string ="", const std::string = "");
-  virtual void queryVector(Parameter<Vector> &, const std::string ="", const std::string = "");
-  virtual void queryVectors(Parameter<std::vector<Vector> > &, const std::string ="", const std::string = "");
-  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const std::string ="", const std::string = "");
-  virtual void queryElement(Parameter<const element *> &, const std::string ="", const std::string = "");
-  virtual void queryElements(Parameter<std::vector<const element *> > &, const std::string ="", const std::string = "");
-  virtual void queryFile(Parameter<boost::filesystem::path> &, const std::string ="", const std::string = "");
-  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> > &, const std::string ="", const std::string = "");
-  virtual void queryKeyValuePair(Parameter<KeyValuePair> &, const std::string ="", const std::string = "");
-  virtual void queryKeyValuePairs(Parameter< std::vector<KeyValuePair> > &, 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 <boost/preprocessor/facilities/empty.hpp>
+
+  // 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 */
 
   virtual bool display();
@@ -63,27 +62,26 @@
 
 protected:
-  class AtomQtQuery;
-  class AtomsQtQuery;
-  class BooleanQtQuery;
-  class RealSpaceMatrixQtQuery;
-  class DoubleQtQuery;
-  class DoublesQtQuery;
-  class ElementQtQuery;
-  class ElementsQtQuery;
+
   class EmptyQtQuery;
-  class FileQtQuery;
-  class FilesQtQuery;
-  class IntQtQuery;
-  class IntsQtQuery;
-  class KeyValuePairQtQuery;
-  class KeyValuePairsQtQuery;
-  class MoleculeQtQuery;
-  class MoleculesQtQuery;
-  class StringQtQuery;
-  class StringsQtQuery;
-  class UnsignedIntQtQuery;
-  class UnsignedIntsQtQuery;
-  class VectorQtQuery;
-  class VectorsQtQuery;
+
+  /** 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 <boost/preprocessor/facilities/empty.hpp>
+
+  // 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, QtQuery)
+  #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 */
 
 private:
