Index: src/UIElements/Menu/QT4/QTMenu.cpp
===================================================================
--- src/UIElements/Menu/QT4/QTMenu.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Menu/QT4/QTMenu.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,54 @@
+/*
+ * QTMenu.cpp
+ *
+ *  Created on: Jan 15, 2010
+ *      Author: crueger
+ */
+
+#include "Menu/QT4/QTMenu.hpp"
+
+#include <Qt/qaction.h>
+#include "Menu/MenuItem.hpp"
+
+QTMenu::QTMenu(const char * _title) :
+  QMenu(_title)
+{}
+
+QTMenu::~QTMenu()
+{
+  // yay... Just like Mario Bros.
+  for(list<QTMenuPipe*>::iterator it=plumbing.begin(); it != plumbing.end(); it++)
+    delete (*it);
+}
+
+void QTMenu::addItem(MenuItem* item) {
+  const string description = item->getDescription();
+  QAction *action = addAction(QString(description.c_str()));
+  QTMenuPipe *pipe = new QTMenuPipe(item,action);
+  QObject::connect(action, SIGNAL(triggered()),pipe,SLOT(called()));
+  plumbing.push_back(pipe);
+}
+
+void QTMenu::removeItem(MenuItem* item) {
+  list<QTMenuPipe*>::iterator iter;
+  for(iter=plumbing.begin(); iter!=plumbing.end(); iter++){
+    delete (*iter);
+  }
+}
+
+void QTMenu::display() {
+
+}
+
+QTMenuPipe::QTMenuPipe(MenuItem *_item, QAction *_action) :
+    theItem(_item), theAction(_action)
+{}
+
+QTMenuPipe::~QTMenuPipe() {
+  delete theAction;
+  delete theItem;
+}
+
+void QTMenuPipe::called() {
+  theItem->doTrigger();
+}
Index: src/UIElements/Menu/QT4/QTMenu.hpp
===================================================================
--- src/UIElements/Menu/QT4/QTMenu.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Menu/QT4/QTMenu.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,50 @@
+/*
+ * QTMenu.hpp
+ *
+ *  Created on: Jan 15, 2010
+ *      Author: crueger
+ */
+
+#ifndef QTMENU_HPP_
+#define QTMENU_HPP_
+
+#include <list>
+
+#include <QtGui/QMenu>
+#include <QtCore/QObject>
+
+#include "Menu/Menu.hpp"
+
+class QTMenuPipe;
+
+class QTMenu : public QMenu, public Menu
+{
+  Q_OBJECT
+
+public:
+  QTMenu(const char *);
+  virtual ~QTMenu();
+
+  virtual void addItem(MenuItem*);
+  virtual void removeItem(MenuItem*);
+  virtual void display();
+private:
+  list<QTMenuPipe*> plumbing;
+};
+
+// This handles the plumbing from QT to internal Items
+// Slots from QT are redirected to internal methods.
+// This way methods can be used where no QT is available
+class QTMenuPipe : public QObject {
+  Q_OBJECT
+public:
+  QTMenuPipe(MenuItem*,QAction*);
+  virtual ~QTMenuPipe();
+public slots:
+  void called();
+private:
+  MenuItem *theItem;
+  QAction *theAction;
+};
+
+#endif /* QTMENU_HPP_ */
Index: src/UIElements/Views/QT4/GLMoleculeView.cpp
===================================================================
--- src/UIElements/Views/QT4/GLMoleculeView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/GLMoleculeView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,15 @@
+/*
+ * GLMoleculeView.cpp
+ *
+ *  Created on: Jan 26, 2010
+ *      Author: crueger
+ */
+
+#include "GLMoleculeView.hpp"
+
+GLMoleculeView::GLMoleculeView(QWidget *parent) :
+  QGLWidget(parent)
+{}
+
+GLMoleculeView::~GLMoleculeView()
+{}
Index: src/UIElements/Views/QT4/GLMoleculeView.hpp
===================================================================
--- src/UIElements/Views/QT4/GLMoleculeView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/GLMoleculeView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,21 @@
+/*
+ * GLMoleculeView.hpp
+ *
+ *  Created on: Jan 26, 2010
+ *      Author: crueger
+ */
+
+#ifndef GLMOLECULEVIEW_HPP_
+#define GLMOLECULEVIEW_HPP_
+
+#include <QtOpenGL/QGLWidget>
+
+class GLMoleculeView :  public QGLWidget
+{
+  Q_OBJECT
+public:
+  GLMoleculeView(QWidget *parent=0);
+  virtual ~GLMoleculeView();
+};
+
+#endif /* GLMOLECULEVIEW_HPP_ */
Index: src/UIElements/Views/QT4/QTMoleculeView.cpp
===================================================================
--- src/UIElements/Views/QT4/QTMoleculeView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTMoleculeView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,92 @@
+/*
+ * QTMoleculeView.cpp
+ *
+ *  Created on: Mar 4, 2010
+ *      Author: crueger
+ */
+
+#include "Views/QT4/QTMoleculeView.hpp"
+
+#include <iostream>
+#include "molecule.hpp"
+
+
+using namespace std;
+
+/***************** Basic structure for tab layout ***********/
+
+QTMoleculeView::QTMoleculeView() :
+    QTabWidget()
+{
+  allPage = new QTAllMoleculePage();
+  addTab(allPage,QString("All Molecules"));
+
+  connect(this,SIGNAL(addMolecule(molecule*)),allPage,SLOT(addMolecule(molecule*)));
+  connect(this,SIGNAL(removeMolecule(molecule*)),allPage,SLOT(removeMolecule(molecule*)));
+}
+
+QTMoleculeView::~QTMoleculeView()
+{}
+
+void QTMoleculeView::moleculeSelected(molecule *mol){
+  if(!pages.count(mol)){
+    string molName = mol->GetName();
+    QTMoleculePage *molPage = new QTMoleculePage(mol,molName);
+    addTab(molPage,QString(molName.c_str()));
+    pages[mol] = molPage;
+
+    connect(molPage,SIGNAL(nameChanged(QTMoleculePage*,std::string)),this,SLOT(nameChanged(QTMoleculePage*,std::string)));
+
+    emit addMolecule(mol);
+  }
+}
+
+void QTMoleculeView::moleculeUnSelected(molecule *mol){
+  if(pages.count(mol)){
+    QTMoleculePage *molPage = pages[mol];
+    removeTab(indexOf(molPage));
+    pages.erase(mol);
+    delete molPage;
+    emit removeMolecule(mol);
+  }
+}
+
+void QTMoleculeView::nameChanged(QTMoleculePage *page, std::string name){
+  setTabText(indexOf(page),QString(name.c_str()));
+}
+
+/************************ Tab for all Molecules ********************/
+
+QTAllMoleculePage::QTAllMoleculePage() :
+  Observer("QTAllMoleculePage")
+{}
+
+void QTAllMoleculePage::addMolecule(molecule *mol){}
+
+void QTAllMoleculePage::removeMolecule(molecule *mol){}
+
+void QTAllMoleculePage::update(Observable *subject){}
+
+void QTAllMoleculePage::subjectKilled(Observable *subject){}
+
+/************************ Tab for single Molecules *****************/
+
+QTMoleculePage::QTMoleculePage(molecule *_mol, string _name) :
+    Observer("QTMoleculePage"),
+    mol(_mol), name(_name)
+{
+  mol->signOn(this);
+}
+
+QTMoleculePage::~QTMoleculePage(){
+  mol->signOff(this);
+}
+
+void QTMoleculePage::update(Observable *subject){
+  if(name != mol->GetName()){
+    name = mol->GetName();
+    emit nameChanged(this,name);
+  }
+}
+
+void QTMoleculePage::subjectKilled(Observable *subject){}
Index: src/UIElements/Views/QT4/QTMoleculeView.hpp
===================================================================
--- src/UIElements/Views/QT4/QTMoleculeView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTMoleculeView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,77 @@
+/*
+ * MoleculeView.hpp
+ *
+ *  Created on: Mar 4, 2010
+ *      Author: crueger
+ */
+
+#ifndef MOLECULEVIEW_HPP_
+#define MOLECULEVIEW_HPP_
+
+#include <string>
+#include <QtGui/QTabWidget>
+#include "Patterns/Observer.hpp"
+
+class molecule;
+
+// Forwarding of the Tab-Pages
+class QTAllMoleculePage;
+class QTMoleculePage;
+
+class QTMoleculeView : public QTabWidget
+{
+  Q_OBJECT
+public:
+  QTMoleculeView();
+  virtual ~QTMoleculeView();
+
+public slots:
+  void moleculeSelected(molecule *);
+  void moleculeUnSelected(molecule *);
+
+  void nameChanged(QTMoleculePage *page, std::string name);
+
+signals:
+  void addMolecule(molecule *);
+  void removeMolecule(molecule *);
+
+
+private:
+  QTAllMoleculePage *allPage; //!< contained widget to cary information of all selected molecules
+  std::map<molecule*,QTMoleculePage *> pages;//!< contained widget to cary information on a specific molecule
+};
+
+/**
+ * Widget to display the tab page for all selected molecules
+ */
+class QTAllMoleculePage : public QWidget, public Observer {
+  Q_OBJECT
+public:
+  QTAllMoleculePage();
+  void update(Observable *subject);
+  void subjectKilled(Observable *subject);
+public slots:
+  void addMolecule(molecule *mol);
+  void removeMolecule(molecule *mol);
+};
+
+/**
+ * Widget to display the tab page for a single molecule
+ */
+class QTMoleculePage : public QWidget,  public Observer {
+  Q_OBJECT
+public:
+  QTMoleculePage(molecule *_mol,std::string _name);
+  virtual ~QTMoleculePage();
+
+  void update(Observable *subject);
+  void subjectKilled(Observable *subject);
+
+signals:
+  void nameChanged(QTMoleculePage*,std::string);
+
+private:
+  molecule *mol;
+  std::string name;
+};
+#endif /* MOLECULEVIEW_HPP_ */
Index: src/UIElements/Views/QT4/QTStatusBar.cpp
===================================================================
--- src/UIElements/Views/QT4/QTStatusBar.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTStatusBar.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,113 @@
+/*
+ * QTStatusBar.cpp
+ *
+ *  Created on: Feb 17, 2010
+ *      Author: crueger
+ */
+
+#include <sstream>
+
+#include <QtGui/QLabel>
+#include <QtGui/QBoxLayout>
+#include <QtGui/QProgressBar>
+
+#include "QTStatusBar.hpp"
+#include "World.hpp"
+#include "helpers.hpp"
+#include "Actions/Process.hpp"
+
+
+QTStatusBar::QTStatusBar(QWidget *_parent) :
+  QStatusBar(_parent),
+  Observer("QTStatusBar"),
+  parent(_parent),
+  atomCount(World::getInstance().numAtoms()),
+  moleculeCount(World::getInstance().numMolecules())
+{
+  World::getInstance().signOn(this);
+  Process::AddObserver(this);
+  statusLabel = new QLabel(this);
+  statusLabel->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
+  addPermanentWidget(statusLabel);
+  redrawStatus();
+}
+
+QTStatusBar::~QTStatusBar()
+{
+  Process::RemoveObserver(this);
+  World::getInstance().signOff(this);
+}
+
+void QTStatusBar::update(Observable *subject){
+  if (subject==World::getPointer()){
+    atomCount = World::getInstance().numAtoms();
+    moleculeCount = World::getInstance().numMolecules();
+    redrawStatus();
+  }
+  else {
+    // we probably have some process
+    Process *proc;
+    if((proc=dynamic_cast<Process*>(subject))){
+      redrawProcess(proc);
+    }
+  }
+}
+
+void QTStatusBar::subjectKilled(Observable *subject){
+  // Processes don't notify when they are killed
+  atomCount = World::getInstance().numAtoms();
+  moleculeCount = World::getInstance().numMolecules();
+  World::getInstance().signOn(this);
+  redrawStatus();
+}
+
+void QTStatusBar::redrawStatus(){
+  stringstream sstr;
+  sstr << "You have " << atomCount << " atom" << PLURAL_S(atomCount)
+       <<" in " << moleculeCount << " molecule" << PLURAL_S(moleculeCount);
+  statusLabel->setText(QString(sstr.str().c_str()));
+}
+
+void QTStatusBar::redrawProcess(Process *proc){
+  progressIndicator *ind=0;
+  // see what we have to do with the process
+  if(proc->doesStart()){
+    ind = new progressIndicator(proc->getName());
+    ind->bar->setMaximum(proc->getMaxSteps());
+    progressBars.insert(pair<Process*,progressIndicator*>(proc,ind));
+  }
+  else {
+    ind = progressBars[proc];
+  }
+  if(activeProcess!=proc){
+    addWidget(ind->container);
+    activeProcess = proc;
+  }
+  ind->bar->setValue(proc->getCurrStep());
+  parent->repaint();
+  if(proc->doesStop()){
+    removeWidget(ind->container);
+    activeProcess = 0;
+    progressBars.erase(proc);
+    delete ind;
+  }
+}
+
+
+
+QTStatusBar::progressIndicator::progressIndicator(string name){
+  stringstream sstr;
+  sstr << "Busy (" << name << ")";
+  container = new QWidget();
+  layout = new QHBoxLayout(container);
+  label = new QLabel(QString(sstr.str().c_str()));
+  bar = new QProgressBar();
+
+  layout->addWidget(label);
+  layout->addWidget(bar);
+  container->setLayout(layout);
+}
+
+QTStatusBar::progressIndicator::~progressIndicator(){
+  delete container;
+}
Index: src/UIElements/Views/QT4/QTStatusBar.hpp
===================================================================
--- src/UIElements/Views/QT4/QTStatusBar.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTStatusBar.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,55 @@
+/*
+ * QTStatusBar.hpp
+ *
+ *  Created on: Feb 17, 2010
+ *      Author: crueger
+ */
+
+#ifndef QTSTATUSBAR_HPP_
+#define QTSTATUSBAR_HPP_
+
+#include <map>
+#include <utility>
+#include <string>
+#include <QtGui/QStatusBar>
+
+#include "Patterns/Observer.hpp"
+
+class QLabel;
+class QProgressBar;
+class Process;
+class QBoxLayout;
+
+class QTStatusBar : public QStatusBar, public Observer
+{
+  Q_OBJECT
+
+  struct progressIndicator{
+    progressIndicator(std::string);
+    ~progressIndicator();
+    QLabel *label;
+    QProgressBar *bar;
+    QBoxLayout *layout;
+    QWidget *container;
+  };
+public:
+  QTStatusBar(QWidget *parent=0);
+  virtual ~QTStatusBar();
+
+  void update(Observable *subject);
+  void subjectKilled(Observable *subject);
+
+private:
+  void redrawStatus();
+  void redrawProcess(Process *proc);
+
+  int atomCount;
+  int moleculeCount;
+
+  QLabel *statusLabel;
+  QWidget *parent;
+  std::map<Process*,progressIndicator*> progressBars;
+  Process* activeProcess;
+};
+
+#endif /* QTSTATUSBAR_HPP_ */
Index: src/UIElements/Views/QT4/QTWorldView.cpp
===================================================================
--- src/UIElements/Views/QT4/QTWorldView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTWorldView.cpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,130 @@
+/*
+ * QTWorldView.cpp
+ *
+ *  Created on: Jan 21, 2010
+ *      Author: crueger
+ */
+
+#include "Views/QT4/QTWorldView.hpp"
+
+#include <iostream>
+
+#include "atom.hpp"
+#include "molecule.hpp"
+
+using namespace std;
+
+// maybe this should go with the definition of molecules
+
+// some attributes need to be easier to find for molecules
+// these attributes are skiped so far
+const int QTWorldView::COLUMNCOUNT = COLUMNTYPES_MAX;
+const char *QTWorldView::COLUMNNAMES[QTWorldView::COLUMNCOUNT]={"Name","Atoms"/*,"Formula"*/,"Center"/*,"Size"*/};
+
+QTWorldView::QTWorldView(QWidget * _parent) :
+  QTableWidget (_parent),
+  Observer("QTWorldView")
+{
+  setRowCount(0);
+  setColumnCount(COLUMNCOUNT);
+
+  for(int i=0; i<COLUMNCOUNT;++i) {
+    QTableWidgetItem *heading = new QTableWidgetItem();
+    heading->setText(QString(COLUMNNAMES[i]));
+    setHorizontalHeaderItem(i,heading);
+  }
+
+  molecules->signOn(this);
+  update(molecules);
+
+  connect(this,SIGNAL(cellChanged(int,int)),this,SLOT(moleculeChanged(int,int)));
+  connect(this,SIGNAL(cellClicked(int,int)),this,SLOT(cellSelected(int,int)));
+
+}
+
+QTWorldView::~QTWorldView()
+{
+  molecules->signOff(this);
+}
+
+void QTWorldView::update(Observable *publisher) {
+  int numMolecules = molecules->ListOfMolecules.size();
+  setRowCount(numMolecules);
+  molSelection.resize(numMolecules);
+  int i;
+  MoleculeList::iterator iter;
+  for(iter = molecules->ListOfMolecules.begin(),i=0;
+      iter != molecules->ListOfMolecules.end();
+      ++i,++iter) {
+
+    const int index = (*iter)->IndexNr;
+    QTableWidgetItem *indexWidget = new QTableWidgetItem();
+    // there probably is an easier method to convert ints to QStrings... but i didn't find it
+    stringstream idxsstr;
+    idxsstr << index;
+    indexWidget->setText(QString(idxsstr.str().c_str()));
+    indexWidget->setData(Qt::UserRole,QVariant(index));
+    setVerticalHeaderItem(i,indexWidget);
+
+    const string name = (*iter)->getName();
+    QTableWidgetItem *nameWidget = new QTableWidgetItem();
+    nameWidget->setText(QString(name.c_str()));
+    setItem(i,NAME,nameWidget);
+
+    const int atomCount = (*iter)->getAtomCount();
+    QTableWidgetItem *countWidget= new QTableWidgetItem();
+    stringstream countsstr;
+    countsstr << atomCount;
+    countWidget->setText(QString(countsstr.str().c_str()));
+    countWidget->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+    setItem(i,ATOMS,countWidget);
+
+    const Vector center = (*iter)->Center;
+    QTableWidgetItem *centerWidget = new QTableWidgetItem();
+    stringstream centersstr;
+    centersstr << center;
+    centerWidget->setText(QString(centersstr.str().c_str()));
+    setItem(i,CENTER,centerWidget);
+    centerWidget->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+
+    molSelection[i]=nameWidget->isSelected();
+  }
+}
+
+void QTWorldView::subjectKilled(Observable *publisher) {
+}
+
+void QTWorldView::moleculeChanged(int row, int column) {
+  int idx = verticalHeaderItem(row)->data(Qt::UserRole).toInt();
+  molecule *mol = molecules->ReturnIndex(idx);
+  string cellValue = item(row,NAME)->text().toStdString();
+  if(mol->getName() != cellValue && cellValue !="") {
+    mol->setName(cellValue);
+  }
+  else if(cellValue==""){
+    item(row,NAME)->setText(QString(mol->getName().c_str()));
+  }
+}
+
+
+void QTWorldView::cellSelected(int row, int column){
+  bool state = item(row,column)->isSelected();
+  for(int i = 0; i<COLUMNCOUNT; i++){
+    item(row,i)->setSelected(state);
+  }
+  // figure out which rows have changed
+  for(int i=0; i<rowCount();++i){
+    state = item(i,0)->isSelected();
+    if(molSelection[i]!=state){
+      int idx = verticalHeaderItem(i)->data(Qt::UserRole).toInt();
+      molecule *mol = molecules->ReturnIndex(idx);
+      if(state){
+        emit moleculeSelected(mol);
+      }
+      else{
+        emit moleculeUnSelected(mol);
+      }
+      molSelection[i]=state;
+    }
+  }
+}
Index: src/UIElements/Views/QT4/QTWorldView.hpp
===================================================================
--- src/UIElements/Views/QT4/QTWorldView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
+++ src/UIElements/Views/QT4/QTWorldView.hpp	(revision b47bfce85c995a562a7a73f752c8e74cc40cc9de)
@@ -0,0 +1,47 @@
+/*
+ * QTWorldView.hpp
+ *
+ *  Created on: Jan 21, 2010
+ *      Author: crueger
+ */
+
+#ifndef QTMOLECULESVIEW_HPP_
+#define QTMOLECULESVIEW_HPP_
+
+#include <QtGui/QTableWidget>
+#include "Patterns/Observer.hpp"
+
+class molecule;
+class MoleculeListClass;
+
+class QTWorldView : public QTableWidget, public Observer
+{
+  Q_OBJECT
+
+public:
+  QTWorldView(QWidget * _parent=0);
+  virtual ~QTWorldView();
+
+protected:
+  virtual void update(Observable *publisher);
+  virtual void subjectKilled(Observable *publisher);
+
+  static const int COLUMNCOUNT;
+  enum {NAME,ATOMS,CENTER,COLUMNTYPES_MAX} COLUMNTYPES;
+  static const char *COLUMNNAMES[];
+
+private slots:
+  void moleculeChanged(int row, int column);
+
+  void cellSelected(int row, int column);
+
+signals:
+  void moleculeSelected(molecule*);
+  void moleculeUnSelected(molecule*);
+
+private:
+  std::vector<bool> molSelection; //!< needed to determine when a selection changes
+  MoleculeListClass *molecules;
+};
+
+#endif /* QTMOLECULESVIEW_HPP_ */
