Index: src/UIElements/QT4/QTDialog.cpp
===================================================================
--- src/UIElements/QT4/QTDialog.cpp	(revision c96c66b9929d064bdd99474f03b644e0fa4ea88d)
+++ src/UIElements/QT4/QTDialog.cpp	(revision 41167c8739c609a9dafeb48042b2cf1989edf758)
@@ -26,13 +26,14 @@
 #include <limits>
 
+#include <QtGui/QDoubleSpinBox>
 #include <Qt/qboxlayout.h>
+#include <Qt/qcombobox.h>
+#include <Qt/qdialogbuttonbox.h>
 #include <Qt/qlabel.h>
-#include <Qt/qspinbox.h>
-#include <QtGui/QDoubleSpinBox>
 #include <Qt/qlineedit.h>
 #include <Qt/qlistwidget.h>
-#include <Qt/qdialogbuttonbox.h>
 #include <Qt/qpushbutton.h>
-#include <Qt/qcombobox.h>
+#include <Qt/qspinbox.h>
+#include <Qt/qtablewidget.h>
 
 #include <boost/lexical_cast.hpp>
@@ -118,46 +119,56 @@
 }
 
-void QTDialog::queryBox(const char* title, std::string){
+void QTDialog::queryBox(const char* title, std::string)
+{
+  registerQuery(new BoxQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryInt(const char *title,string)
+{
+  registerQuery(new IntQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryInts(const char *title,string)
+{
+  registerQuery(new IntsQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryDouble(const char* title,string)
+{
+  registerQuery(new DoubleQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryDoubles(const char* title,string)
+{
+  registerQuery(new DoublesQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryString(const char* title,string)
+{
+  registerQuery(new StringQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryStrings(const char* title,string)
+{
+  registerQuery(new StringsQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryMolecule(const char *title,string)
+{
+  registerQuery(new MoleculeQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryMolecules(const char *title,string)
+{
   // TODO
   ASSERT(false, "Not implemented yet");
 }
 
-
-void QTDialog::queryInt(const char *title,string)
-{
-  registerQuery(new IntQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryInts(const char *title,string)
-{
-  registerQuery(new IntsQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryDouble(const char* title,string)
-{
-  registerQuery(new DoubleQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryDoubles(const char* title,string)
-{
-  registerQuery(new DoublesQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryString(const char* title,string)
-{
-  registerQuery(new StringQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryStrings(const char* title,string)
-{
-  registerQuery(new StringsQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryMolecule(const char *title,string)
-{
-  registerQuery(new MoleculeQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryMolecules(const char *title,string)
+void QTDialog::queryVector(const char* title, bool check,string)
+{
+  registerQuery(new VectorQTQuery(title,check,inputLayout,this));
+}
+
+void QTDialog::queryVectors(const char* title, bool check,string)
 {
   // TODO
@@ -165,10 +176,10 @@
 }
 
-void QTDialog::queryVector(const char* title, bool check,string)
-{
-  registerQuery(new VectorQTQuery(title,check,inputLayout,this));
-}
-
-void QTDialog::queryVectors(const char* title, bool check,string)
+void QTDialog::queryElement(const char* title, std::string)
+{
+  registerQuery(new ElementQTQuery(title,inputLayout,this));
+}
+
+void QTDialog::queryElements(const char* title, std::string)
 {
   // TODO
@@ -176,15 +187,4 @@
 }
 
-void QTDialog::queryElement(const char* title, std::string)
-{
-  registerQuery(new ElementQTQuery(title,inputLayout,this));
-}
-
-void QTDialog::queryElements(const char* title, std::string)
-{
-  // TODO
-  ASSERT(false, "Not implemented yet");
-}
-
 void QTDialog::queryFile(const char* title, std::string)
 {
@@ -193,4 +193,46 @@
 
 /************************** Query Objects *******************************/
+
+QTDialog::BoxQTQuery::BoxQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
+    Dialog::BoxQuery(_title),
+    parent(_parent)
+{
+  thisLayout = new QHBoxLayout();
+  titleLabel = new QLabel(QString(getTitle().c_str()));
+
+  // init input table
+  inputTable = new QTableWidget(3,3, _dialog);
+  QStringList CoordinateList;
+  CoordinateList << "x" << "y" << "z";
+  inputTable->setHorizontalHeaderLabels(CoordinateList);
+  inputTable->setVerticalHeaderLabels(CoordinateList);
+
+  pipe = new BoxQTQueryPipe(tmp,_dialog, inputTable);
+
+  // fill the box with current matrix
+  const Matrix &domain = World::getInstance().getDomain().getM();
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++) {
+      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
+      inputTable->setItem(i,j,newItem);
+      pipe->update(i,j);
+    }
+
+  parent->addLayout(thisLayout);
+  thisLayout->addWidget(titleLabel);
+  thisLayout->addWidget(inputTable);
+
+  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
+}
+
+QTDialog::BoxQTQuery::~BoxQTQuery()
+{
+  delete pipe;
+}
+
+bool QTDialog::BoxQTQuery::handle() {
+  return true;
+}
+
 
 QTDialog::AtomQTQuery::AtomQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
@@ -931,4 +973,26 @@
 }
 
+BoxQTQueryPipe::BoxQTQueryPipe(Box &_content, QTDialog *_dialog, QTableWidget *_inputTable) :
+  content(_content),
+  dialog(_dialog),
+  inputTable(_inputTable)
+{
+  tmpM = new Matrix();
+  tmpM->zero();
+}
+
+BoxQTQueryPipe::~BoxQTQueryPipe()
+{
+  delete tmpM;
+}
+
+void BoxQTQueryPipe::update(int row, int column)
+{
+  tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble();
+  content.setM(*tmpM);
+  dialog->update();
+}
+
+
 AtomQTQueryPipe::AtomQTQueryPipe(atom **_content, QTDialog *_dialog, QComboBox *_theBox) :
   content(_content),
Index: src/UIElements/QT4/QTDialog.hpp
===================================================================
--- src/UIElements/QT4/QTDialog.hpp	(revision c96c66b9929d064bdd99474f03b644e0fa4ea88d)
+++ src/UIElements/QT4/QTDialog.hpp	(revision 41167c8739c609a9dafeb48042b2cf1989edf758)
@@ -25,11 +25,14 @@
 class QLineEdit;
 class QListWidget;
+class QTableWidget;
 class QComboBox;
 class QDialogButtonBox;
 
+class Matrix;
 
 // Forward declarations for plumbing
 template<typename T> class QTQueryListPipe;
 class BooleanQTQueryPipe;
+class BoxQTQueryPipe;
 class StringQTQueryPipe;
 class StringsQTQueryPipe;
@@ -166,4 +169,18 @@
     };
 
+    class BoxQTQuery : public Dialog::BoxQuery {
+    public:
+      BoxQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
+      virtual ~BoxQTQuery();
+      virtual bool handle();
+    private:
+      QBoxLayout *parent;
+      QBoxLayout *thisLayout;
+      QLabel *titleLabel;
+      QTableWidget *inputTable;
+
+      BoxQTQueryPipe *pipe;
+    };
+
     class AtomQTQuery : public Dialog::AtomQuery {
     public:
@@ -406,4 +423,22 @@
 };
 
+class BoxQTQueryPipe : public QWidget {
+  Q_OBJECT
+public:
+  BoxQTQueryPipe(Box &_content, QTDialog *_dialog, QTableWidget *_inputTable);
+  virtual ~BoxQTQueryPipe();
+
+public slots:
+  void update(int,int);
+
+private:
+  Box &content;
+  QTDialog *dialog;
+  QTableWidget *inputTable;
+
+  Matrix *tmpM;
+};
+
+
 class AtomQTQueryPipe : public QWidget {
   Q_OBJECT
