Index: src/UIElements/Qt4/Query/AtomQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::AtomQuery(_param, _title),
+    Dialog::TQuery<const atom *>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/AtomsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::AtomsQuery(_param, _title),
+    Dialog::TQuery<std::vector<const atom *> >(_param, _title),
     QtQueryList<const atom *>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/BooleanQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -28,5 +28,5 @@
 
 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
-    Dialog::BooleanQuery(_param, _title),
+    Dialog::TQuery<bool>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/DoubleQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -28,5 +28,5 @@
 
 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::DoubleQuery(_param, title),
+    Dialog::TQuery<double>(_param, title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/DoublesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::DoublesQuery(_param, _title),
+    Dialog::TQuery<std::vector<double> >(_param, _title),
     QtQueryList<double>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/ElementQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -31,5 +31,5 @@
 
 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
-    Dialog::ElementQuery(_param, _title),
+    Dialog::TQuery<const element *>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/ElementsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::ElementsQuery(_param, _title),
+    Dialog::TQuery<std::vector<const element *> >(_param, _title),
     QtQueryList<const element *>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/FileQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
-    Dialog::FileQuery(_param, _title),
+    Dialog::TQuery<boost::filesystem::path>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/FilesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::FilesQuery(_param, _title),
+    Dialog::TQuery<std::vector<boost::filesystem::path> >(_param, _title),
     QtQueryList<boost::filesystem::path>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/IntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -28,5 +28,5 @@
 
 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::IntQuery(_param, _title),
+    Dialog::TQuery<int>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/IntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::IntsQuery(_param, _title),
+    Dialog::TQuery<std::vector<int> >(_param, _title),
     QtQueryList<int>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -31,5 +31,5 @@
 
 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::MoleculeQuery(_param, _title),
+    Dialog::TQuery<const molecule *>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::MoleculesQuery(_param, _title),
+    Dialog::TQuery<std::vector<const molecule *> >(_param, _title),
     QtQueryList<const molecule *>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -35,5 +35,5 @@
 class QFileDialog;
 
-class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery {
+class QtDialog::AtomQtQuery : public QWidget, public Dialog::TQuery<const atom *> {
   Q_OBJECT
 public:
@@ -53,5 +53,5 @@
 };
 
-class QtDialog::AtomsQtQuery : public QWidget, public Dialog::AtomsQuery, public QtQueryList<const atom *> {
+class QtDialog::AtomsQtQuery : public QWidget, public Dialog::TQuery<std::vector<const atom *> >, public QtQueryList<const atom *> {
   Q_OBJECT
 public:
@@ -71,5 +71,5 @@
 };
 
-class QtDialog::BooleanQtQuery : public QWidget, public Dialog::BooleanQuery {
+class QtDialog::BooleanQtQuery : public QWidget, public Dialog::TQuery<bool> {
   Q_OBJECT
 public:
@@ -89,5 +89,5 @@
 };
 
-class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::RealSpaceMatrixQuery {
+class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::TQuery<RealSpaceMatrix> {
   Q_OBJECT
 public:
@@ -107,5 +107,5 @@
 };
 
-class QtDialog::DoubleQtQuery : public QWidget, public Dialog::DoubleQuery {
+class QtDialog::DoubleQtQuery : public QWidget, public Dialog::TQuery<double> {
   Q_OBJECT
 public:
@@ -125,5 +125,5 @@
 };
 
-class QtDialog::DoublesQtQuery : public QWidget, public Dialog::DoublesQuery, public QtQueryList<double> {
+class QtDialog::DoublesQtQuery : public QWidget, public Dialog::TQuery<std::vector<double> >, public QtQueryList<double> {
   Q_OBJECT
 public:
@@ -143,5 +143,5 @@
 };
 
-class QtDialog::ElementQtQuery : public QWidget, public Dialog::ElementQuery {
+class QtDialog::ElementQtQuery : public QWidget, public Dialog::TQuery<const element *> {
   Q_OBJECT
 public:
@@ -161,5 +161,5 @@
 };
 
-class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery, public QtQueryList<const element *> {
+class QtDialog::ElementsQtQuery : public QWidget, public Dialog::TQuery<std::vector<const element *> >, public QtQueryList<const element *> {
   Q_OBJECT
 public:
@@ -191,5 +191,5 @@
 };
 
-class QtDialog::FileQtQuery : public QWidget, public Dialog::FileQuery {
+class QtDialog::FileQtQuery : public QWidget, public Dialog::TQuery<boost::filesystem::path> {
   Q_OBJECT
 public:
@@ -212,5 +212,5 @@
 };
 
-class QtDialog::FilesQtQuery : public QWidget, public Dialog::FilesQuery, public QtQueryList<boost::filesystem::path> {
+class QtDialog::FilesQtQuery : public QWidget, public Dialog::TQuery<std::vector<boost::filesystem::path> >, public QtQueryList<boost::filesystem::path> {
   Q_OBJECT
 public:
@@ -230,5 +230,5 @@
 };
 
-class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
+class QtDialog::IntQtQuery : public QWidget, public Dialog::TQuery<int> {
   Q_OBJECT
 public:
@@ -248,5 +248,5 @@
 };
 
-class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery, public QtQueryList<int> {
+class QtDialog::IntsQtQuery : public QWidget, public Dialog::TQuery<std::vector<int> >, public QtQueryList<int> {
   Q_OBJECT
 public:
@@ -266,5 +266,5 @@
 };
 
-class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
+class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::TQuery<const molecule *> {
   Q_OBJECT
 public:
@@ -284,5 +284,5 @@
 };
 
-class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery, public QtQueryList<const molecule *> {
+class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::TQuery<std::vector<const molecule *> >, public QtQueryList<const molecule *> {
   Q_OBJECT
 public:
@@ -302,5 +302,5 @@
 };
 
-class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
+class QtDialog::StringQtQuery : public QWidget, public Dialog::TQuery<std::string> {
   Q_OBJECT
 public:
@@ -320,5 +320,5 @@
 };
 
-class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery, public QtQueryList<std::string> {
+class QtDialog::StringsQtQuery : public QWidget, public Dialog::TQuery<std::vector<std::string> >, public QtQueryList<std::string> {
   Q_OBJECT
 public:
@@ -338,5 +338,5 @@
 };
 
-class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
+class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::TQuery<unsigned int> {
   Q_OBJECT
 public:
@@ -356,5 +356,5 @@
 };
 
-class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery, public QtQueryList<unsigned int> {
+class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::TQuery<std::vector<unsigned int> >, public QtQueryList<unsigned int> {
   Q_OBJECT
 public:
@@ -374,5 +374,5 @@
 };
 
-class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
+class QtDialog::VectorQtQuery : public QWidget, public Dialog::TQuery<Vector> {
   Q_OBJECT
 public:
@@ -399,5 +399,5 @@
 };
 
-class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery, public QtQueryList<Vector> {
+class QtDialog::VectorsQtQuery : public QWidget, public Dialog::TQuery<std::vector<Vector> >, public QtQueryList<Vector> {
   Q_OBJECT
 public:
@@ -417,5 +417,5 @@
 };
 
-class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
+class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::TQuery<RandomNumberDistribution_Parameters> {
   Q_OBJECT
 public:
Index: src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -31,5 +31,5 @@
 
 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::RandomNumberDistribution_ParametersQuery(_param, _title),
+    Dialog::TQuery<RandomNumberDistribution_Parameters>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::RealSpaceMatrixQuery(_param, _title),
+    Dialog::TQuery<RealSpaceMatrix>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/StringQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -28,5 +28,5 @@
 
 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::StringQuery(_param, _title),
+    Dialog::TQuery<std::string>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/StringsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::StringsQuery(_param, _title),
+    Dialog::TQuery<std::vector<std::string> >(_param, _title),
     QtQueryList<std::string>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -28,5 +28,5 @@
 
 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::UnsignedIntQuery(_param, _title),
+    Dialog::TQuery<unsigned int>(_param, _title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::UnsignedIntsQuery(_param, _title),
+    Dialog::TQuery<std::vector<unsigned int> >(_param, _title),
     QtQueryList<unsigned int>(_parent, _dialog, temp)
 {
Index: src/UIElements/Qt4/Query/VectorQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -29,5 +29,5 @@
 
 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::VectorQuery(_param, title),
+    Dialog::TQuery<Vector>(_param, title),
     parent(_parent),
     dialog(_dialog)
Index: src/UIElements/Qt4/Query/VectorsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision 22d99fe17d0e815c3d95d45fb214512ba69956a1)
+++ src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision 1c55b87bd6df0fd793f6ec74d286a02d9a0de67c)
@@ -30,5 +30,5 @@
 
 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
-    Dialog::VectorsQuery(_param, _title),
+    Dialog::TQuery<std::vector<Vector> >(_param, _title),
     QtQueryList<Vector>(_parent, _dialog, temp)
 {
