Index: src/UIElements/Views/Qt4/QtInfoBox.cpp
===================================================================
--- src/UIElements/Views/Qt4/QtInfoBox.cpp	(revision ca1535f36cf69069e69bd2f95dfffcb3dca61a70)
+++ src/UIElements/Views/Qt4/QtInfoBox.cpp	(revision 367489fe69bf3b53792dde0165df1c41347c98b6)
@@ -40,9 +40,8 @@
 #include "CodePatterns/MemDebug.hpp"
 
-#include "Descriptors/AtomIdDescriptor.hpp"
-#include "Descriptors/MoleculeIdDescriptor.hpp"
-
-#include "molecule.hpp"
+#include "UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp"
+
 #include "Element/element.hpp"
+#include "Element/periodentafel.hpp"
 #include "World.hpp"
 
@@ -51,9 +50,12 @@
 /***************** Basic structure for tab layout ***********/
 
-QtInfoBox::QtInfoBox() :
+QtInfoBox::QtInfoBox(QtObservedInstanceBoard *_board) :
     QTabWidget(),
     curAtomId(-1), nextAtomId(-1),
     curMoleculeId(-1), nextMoleculeId(-1),
-    page_mol(NULL), page_atom(NULL)
+    page_mol(NULL), page_atom(NULL),
+    board(_board),
+    currentPage(0),
+    periode(World::getInstance().getPeriode())
 {
   timer = new QTimer(this);
@@ -62,5 +64,4 @@
   setMinimumWidth(200);
   setMinimumHeight(220);
-  currentPage = 0;
 
   connect(timer, SIGNAL(timeout()), this, SLOT(timerTimeout()));
@@ -113,23 +114,27 @@
   clearTabs();
 
-  const atom *curAtom = const_cast<const World &>(World::getInstance()).
-      getAtom(AtomById(_id));
-  curAtomId = curAtom->getId();
-  nextAtomId = -1;
-  nextMoleculeId = -1;
+  QtObservedAtom::ptr curAtom = board->getObservedAtom(_id);
 
   // Show new tabs.
   if (curAtom){
-    page_atom = new QtAtomInfoPage(curAtom, this);
+    curAtomId = curAtom->getAtomIndex();
+    nextAtomId = -1;
+    nextMoleculeId = -1;
+
+    page_atom = new QtAtomInfoPage(curAtom, periode, this);
     addTab(page_atom, "Atom");
-    connect(page_atom, SIGNAL(atomKilled()), this, SLOT(clearTabs()));
-
-    if (curAtom->getMolecule()){
-      page_mol = new QtMoleculeInfoPage(curAtom->getMolecule(), this);
-      addTab(page_mol, "Molecule");
-      connect(page_mol, SIGNAL(moleculeKilled()), this, SLOT(clearTabs()));
-
-      if (currentPage > 0)
-        setCurrentIndex(currentPage);
+    connect(curAtom.get(), SIGNAL(atomRemoved()), this, SLOT(clearTabs()));
+
+    const moleculeId_t molid = curAtom->getAtomMoleculeIndex();
+    if (molid != (moleculeId_t)-1) {
+      QtObservedMolecule::ptr curMolecule = board->getObservedMolecule(molid);
+      if (curMolecule) {
+        page_mol = new QtMoleculeInfoPage(curMolecule, this);
+        addTab(page_mol, "Molecule");
+        connect(curMolecule.get(), SIGNAL(moleculeRemoved()), this, SLOT(clearMoleculeTab()));
+
+        if (currentPage > 0)
+          setCurrentIndex(currentPage);
+      }
     }
   }
@@ -143,6 +148,5 @@
   clearTabs();
 
-  const molecule *curMolecule = const_cast<const World &>(World::getInstance()).
-      getMolecule(MoleculeById(_id));
+  QtObservedMolecule::ptr curMolecule = board->getObservedMolecule(_id);
   nextAtomId = -1;
   nextMoleculeId = -1;
@@ -152,5 +156,5 @@
     page_mol = new QtMoleculeInfoPage(curMolecule, this);
     addTab(page_mol, "Molecule");
-    connect(page_mol, SIGNAL(moleculeKilled()), this, SLOT(clearTabs()));
+    connect(curMolecule.get(), SIGNAL(moleculeRemoved()), this, SLOT(clearTabs()));
 
     if (currentPage > 0)
@@ -168,11 +172,12 @@
 }
 
-QtAtomInfoPage::QtAtomInfoPage(const atom *_atom, QWidget *parent) :
+QtAtomInfoPage::QtAtomInfoPage(
+    QtObservedAtom::ptr &_atom,
+    periodentafel *_periode,
+    QWidget *parent) :
   QTreeWidget(parent),
-  Observer("QTAtomPage"),
-  atomRef(_atom)
-{
-  atomRef->signOn(this);
-
+  atomRef(_atom),
+  periode(_periode)
+{
   setColumnCount(2);
   QStringList header;
@@ -190,40 +195,26 @@
   if (atomRef == NULL)
     return;
-  addInfo(this, "Name", QString(atomRef->getName().c_str()));
-  addInfo(this, "Element", QString(atomRef->getElement().getName().c_str()));
-  addInfo(this, "Mass", QString("%1").arg(atomRef->getMass()));
-  addInfo(this, "Charge", QString("%1").arg(atomRef->getCharge()));
-  addInfo(this, "Bonds", QString("%1").arg(atomRef->getListOfBonds().size()));
-  addInfo(this, "Position x", QString(toString(atomRef->getPosition()[0]).c_str()));
-  addInfo(this, "Position y", QString(toString(atomRef->getPosition()[1]).c_str()));
-  addInfo(this, "Position z", QString(toString(atomRef->getPosition()[2]).c_str()));
+  const element * const _element = periode->FindElement(atomRef->getAtomElement());
+  addInfo(this, "Name", QString(atomRef->getAtomName().c_str()));
+  addInfo(this, "Element", QString(_element->getName().c_str()));
+  addInfo(this, "Mass", QString("%1").arg(_element->getMass()));
+  addInfo(this, "Charge", QString("%1").arg(_element->getCharge()));
+  addInfo(this, "Bonds", QString("%1").arg(atomRef->getAtomBonds().size()));
+  addInfo(this, "Position x", QString(toString(atomRef->getAtomPosition()[0]).c_str()));
+  addInfo(this, "Position y", QString(toString(atomRef->getAtomPosition()[1]).c_str()));
+  addInfo(this, "Position z", QString(toString(atomRef->getAtomPosition()[2]).c_str()));
 }
 
 QtAtomInfoPage::~QtAtomInfoPage()
-{
-  if (atomRef)
-    atomRef->signOff(this);
-}
-
-void QtAtomInfoPage::update(Observable *subject)
-{
-  if (dynamic_cast<atom *>(subject) == atomRef)
-    updatePage();
-}
-
-void QtAtomInfoPage::subjectKilled(Observable *subject){
-  atomRef = NULL;
-  emit atomKilled();
-}
+{}
 
 /************************ Tab for single Molecules *****************/
 
-QtMoleculeInfoPage::QtMoleculeInfoPage(const molecule *_mol, QWidget *parent) :
+QtMoleculeInfoPage::QtMoleculeInfoPage(
+    QtObservedMolecule::ptr &_mol,
+    QWidget *parent) :
     QTreeWidget(parent),
-    Observer("QTMoleculePage"),
     mol(_mol)
 {
-  mol->signOn(this);
-
   setColumnCount(2);
   QStringList header;
@@ -241,10 +232,10 @@
   if (mol == NULL)
     return;
-  addInfo(this, "Name", QString(mol->getName().c_str()));
-  addInfo(this, "Formula", QString(mol->getFormula().toString().c_str()));
+  addInfo(this, "Name", QString(mol->getMolName().c_str()));
+  addInfo(this, "Formula", QString(mol->getMolFormula().c_str()));
   addInfo(this, "Atoms", QString("%1").arg(mol->getAtomCount()));
-  addInfo(this, "NonHydrogens", QString("%1").arg(mol->getNoNonHydrogen()));
+  addInfo(this, "NonHydrogens", QString("%1").arg(mol->getNonHydrogenCount()));
   addInfo(this, "Bonds", QString("%1").arg(mol->getBondCount()));
-  const Vector molCenter = mol->DetermineCenterOfAll();
+  const Vector molCenter = mol->getMolCenter();
   addInfo(this, "Center x", QString("%1").arg(molCenter[0]));
   addInfo(this, "Center y", QString("%1").arg(molCenter[1]));
@@ -252,16 +243,4 @@
 }
 
-QtMoleculeInfoPage::~QtMoleculeInfoPage(){
-  if (mol)
-    mol->signOff(this);
-}
-
-void QtMoleculeInfoPage::update(Observable *subject){
-  if (dynamic_cast<molecule *>(subject) == mol)
-    updatePage();
-}
-
-void QtMoleculeInfoPage::subjectKilled(Observable *subject){
-  mol = NULL;
-  emit moleculeKilled();
-}
+QtMoleculeInfoPage::~QtMoleculeInfoPage()
+{}
Index: src/UIElements/Views/Qt4/QtInfoBox.hpp
===================================================================
--- src/UIElements/Views/Qt4/QtInfoBox.hpp	(revision ca1535f36cf69069e69bd2f95dfffcb3dca61a70)
+++ src/UIElements/Views/Qt4/QtInfoBox.hpp	(revision 367489fe69bf3b53792dde0165df1c41347c98b6)
@@ -20,10 +20,10 @@
 #include <QTimer>
 
-#include "CodePatterns/Observer/Observer.hpp"
+#include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp"
+#include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
 
 #include "types.hpp"
 
-class molecule;
-class atom;
+class periodentafel;
 
 // Forwarding of the Tab-Pages
@@ -31,9 +31,11 @@
 class QtMoleculeInfoPage;
 
+class QtObservedInstanceBoard;
+
 class QtInfoBox : public QTabWidget
 {
   Q_OBJECT
 public:
-  QtInfoBox();
+  QtInfoBox(QtObservedInstanceBoard *_board);
   virtual ~QtInfoBox();
 
@@ -58,5 +60,9 @@
   QTimer *timer;
 
+  QtObservedInstanceBoard *board;
+
   int currentPage;
+
+  periodentafel *periode;
 };
 
@@ -64,20 +70,17 @@
  * Widget to display the tab page for a single atom
  */
-class QtAtomInfoPage : public QTreeWidget, public Observer {
+class QtAtomInfoPage : public QTreeWidget
+{
   Q_OBJECT
 public:
-  QtAtomInfoPage(const atom *_atom, QWidget *parent);
+  QtAtomInfoPage(QtObservedAtom::ptr &_atom, periodentafel *_periode, QWidget *parent);
   virtual ~QtAtomInfoPage();
-  void update(Observable *subject);
-  void subjectKilled(Observable *subject);
 
-signals:
-  void atomKilled();
-
-private:
+private slots:
   void updatePage();
 
 private:
-  const atom *atomRef;
+  QtObservedAtom::ptr atomRef;
+  periodentafel *periode;
   QTreeWidget *info;
 };
@@ -86,21 +89,16 @@
  * Widget to display the tab page for a single molecule
  */
-class QtMoleculeInfoPage : public QTreeWidget,  public Observer {
+class QtMoleculeInfoPage : public QTreeWidget
+{
   Q_OBJECT
 public:
-  QtMoleculeInfoPage(const molecule *_mol, QWidget *parent);
+  QtMoleculeInfoPage(QtObservedMolecule::ptr &_mol, QWidget *parent);
   virtual ~QtMoleculeInfoPage();
 
-  void update(Observable *subject);
-  void subjectKilled(Observable *subject);
-
-  signals:
-    void moleculeKilled();
-
-private:
+private slots:
   void updatePage();
 
 private:
-  const molecule *mol;
+  QtObservedMolecule::ptr mol;
   QTreeWidget *info;
 };
