Index: src/UIElements/Qt4/Query/KeyValuePairQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/KeyValuePairQtQuery.cpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
+++ src/UIElements/Qt4/Query/KeyValuePairQtQuery.cpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
@@ -0,0 +1,97 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2015 Frederik Heber. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * KeyValuePairQtQuery.cpp
+ *
+ *  Created on: May 16, 2015
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Qt/qboxlayout.h>
+#include <Qt/qlabel.h>
+#include <Qt/qlineedit.h>
+#include <Qt/qcombobox.h>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "UIElements/Qt4/Query/QtQuery.hpp"
+
+#include "Parameters/Specifics/KeyValuePair.hpp"
+
+QtDialog::KeyValuePairQtQuery::KeyValuePairQtQuery(Parameter<KeyValuePair> &_param, const std::string &_title, const std::string &_description,QBoxLayout *_parent,Dialog *_dialog) :
+    QtQuery<KeyValuePair>(_param, _title, _description),
+    parent(_parent),
+    dialog(_dialog)
+{
+  temp.clear();
+  if (param.isSet())
+    temp = param.get();
+  thisLayout = new QHBoxLayout();
+  titleLabel = new QLabel(QString(getTitle().c_str()));
+  titleLabel->setToolTip(QString(getDescription().c_str()));
+  parent->addLayout(thisLayout);
+  thisLayout->addWidget(titleLabel);
+
+  if (dynamic_cast<DiscreteValidator<KeyValuePair>*>(&_param.getValidator()) != NULL){
+    // Discrete set of valid string -> use a ComboBox.
+
+    const std::vector<std::string> &strings = dynamic_cast<DiscreteValidator<std::string>*>(&_param.getValidator())->getValidValues();
+    comboBox = new QComboBox();
+    for(vector<std::string>::const_iterator iter  = strings.begin();
+        iter != strings.end();
+        ++iter) {
+      comboBox->addItem(QString((*iter).c_str()));
+    }
+    thisLayout->addWidget(comboBox);
+
+    connect(comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdateCombo(int)));
+    onUpdateCombo(0);
+  }else{
+    // Use a LineEdit.
+    inputBox = new QLineEdit(QString(temp.c_str()));
+    thisLayout->addWidget(inputBox);
+
+    onUpdate(inputBox->text());
+    connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&)));
+  }
+}
+
+QtDialog::KeyValuePairQtQuery::~KeyValuePairQtQuery()
+{
+}
+
+void QtDialog::KeyValuePairQtQuery::onUpdate(const QString& newText) {
+  temp = newText.toStdString();
+  dialog->update();
+}
+
+void QtDialog::KeyValuePairQtQuery::onUpdateCombo(int newIndex) {
+  temp = comboBox->itemText(newIndex).toStdString();
+  dialog->update();
+}
+
Index: src/UIElements/Qt4/Query/KeyValuePairsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/KeyValuePairsQtQuery.cpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
+++ src/UIElements/Qt4/Query/KeyValuePairsQtQuery.cpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
@@ -0,0 +1,80 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2015 Frederik Heber. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * KeyValuePairsQtQuery.cpp
+ *
+ *  Created on: May 16, 2015
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Qt/qpushbutton.h>
+#include <Qt/qboxlayout.h>
+#include <Qt/qlistwidget.h>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "UIElements/Qt4/Query/QtQuery.hpp"
+#include "UIElements/Qt4/Query/QtQueryList.hpp"
+
+#include "Parameters/Specifics/KeyValuePair.hpp"
+
+QtDialog::KeyValuePairsQtQuery::KeyValuePairsQtQuery(Parameter<std::vector<KeyValuePair> > &_param, const std::string &_title, const std::string &_description,QBoxLayout *_parent,Dialog *_dialog) :
+    QtQuery<std::vector<KeyValuePair> >(_param, _title, _description),
+    QtQueryList<KeyValuePair>(_param, _parent, _dialog, temp)
+{
+  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this, _title);
+  subQuery = new KeyValuePairQtQuery(*subParam, _title, _description, thisVLayout, subDialog);
+  subDialog->setSubQuery(subQuery);
+
+  connect(inputList,SIGNAL(itemSelectionChanged()),this,SLOT(onElementSelected()));
+  connect(addButton,SIGNAL(clicked()),this,SLOT(onAddElement()));
+  connect(removeButton,SIGNAL(clicked()),this,SLOT(onRemoveElement()));
+}
+
+QtDialog::KeyValuePairsQtQuery::~KeyValuePairsQtQuery()
+{
+  delete(subQuery);
+}
+
+void QtDialog::KeyValuePairsQtQuery::onSubUpdate()
+{
+  addButton->setEnabled(subParam->isSet());
+}
+
+void QtDialog::KeyValuePairsQtQuery::onElementSelected() {
+  elementSelected();
+}
+
+void QtDialog::KeyValuePairsQtQuery::onAddElement() {
+  addElement();
+}
+
+void QtDialog::KeyValuePairsQtQuery::onRemoveElement() {
+  removeElements();
+}
+
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision 3a4be0dfdbe8f8c566c8fc42b0e9a6c0a2bf76b6)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
@@ -17,6 +17,7 @@
 #include <Qt/qwidget.h>
 #include "Qt4/QtDialog.hpp"
+#include "QtQueryList.hpp"
+
 #include "Parameters/Parameter.hpp"
-#include "QtQueryList.hpp"
 
 class QHBoxLayout;
@@ -300,4 +301,40 @@
 };
 
+class QtDialog::KeyValuePairQtQuery : public QWidget, public QtQuery<KeyValuePair> {
+  Q_OBJECT
+public:
+  KeyValuePairQtQuery(Parameter<KeyValuePair> &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
+  virtual ~KeyValuePairQtQuery();
+
+public slots:
+  void onUpdate(const QString&);
+  void onUpdateCombo(int index);
+
+private:
+  QBoxLayout *parent;
+  QBoxLayout *thisLayout;
+  QLabel *titleLabel;
+  QLineEdit *inputBox;
+  QComboBox *comboBox;
+  Dialog *dialog;
+};
+
+class QtDialog::KeyValuePairsQtQuery : public QWidget, public QtQuery<std::vector<KeyValuePair> >, public QtQueryList<KeyValuePair> {
+  Q_OBJECT
+public:
+  KeyValuePairsQtQuery(Parameter<std::vector<KeyValuePair> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
+  virtual ~KeyValuePairsQtQuery();
+
+  virtual void onSubUpdate();
+
+public slots:
+  void onAddElement();
+  void onRemoveElement();
+  void onElementSelected();
+
+private:
+  KeyValuePairQtQuery *subQuery;
+};
+
 class QtDialog::StringQtQuery : public QWidget, public QtQuery<std::string> {
   Q_OBJECT
Index: src/UIElements/Qt4/Query/QtQueryList.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQueryList.hpp	(revision 3a4be0dfdbe8f8c566c8fc42b0e9a6c0a2bf76b6)
+++ src/UIElements/Qt4/Query/QtQueryList.hpp	(revision 33e80133683ce15eb991faac6abc6d540afee182)
@@ -142,4 +142,7 @@
   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 = ""){}
+
 private:
   QtQueryListUntyped *parent;
