Index: src/UIElements/Views/Qt4/Plotting/QSeisPageRegistry.hpp
===================================================================
--- src/UIElements/Views/Qt4/Plotting/QSeisPageRegistry.hpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/Plotting/QSeisPageRegistry.hpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -58,4 +58,5 @@
     QSeisPageRegistry();
     ~QSeisPageRegistry();
+public:
     void registerInstance(QSeisPlotPage *instance);
     void unregisterInstance(QSeisPlotPage *instance);
Index: src/UIElements/Views/Qt4/Plotting/QSeisPlot.cpp
===================================================================
--- src/UIElements/Views/Qt4/Plotting/QSeisPlot.cpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/Plotting/QSeisPlot.cpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -29,14 +29,25 @@
     //insertLegend(new QwtLegend(), QwtPlot::RightLegend);
 
-    plottype* tmp = QSeisXMLParser::getInstance().return_plottype_by_name(type.toStdString());
-    ASSERT(tmp != NULL,
+    {
+      const std::string name("energy");
+      const std::string xlabel("Distance");
+      const std::string ylabel("Energy");
+      const std::string style("");
+      const std::vector<int> xunits;
+      const std::vector<int> yunits;
+      const std::vector<std::string> unitnames;
+      const std::map<std::string,std::string> unitmap;
+      m_plottype = new plottype(name,xlabel,ylabel,style,xunits,yunits, unitnames,unitmap);
+    }
+//    plottype* tmp = QSeisXMLParser::getInstance().return_plottype_by_name(type.toStdString());
+    ASSERT(m_plottype != NULL,
         "QSeisPlot::QSeisPlot() - could not find desired plottype by name "+type.toStdString()+".");
-    std::cout << "Type is " << type.toStdString() << ", " << tmp << std::endl;
+    std::cout << "Type is " << type.toStdString() << ", " << m_plottype << std::endl;
 
     //label axes
-    const std::string xlabel = tmp->get_label(plottype::X);
-    const std::string ylabel = tmp->get_label(plottype::Y);
-    const std::string xunits = tmp->get_units(plottype::X);
-    const std::string yunits = tmp->get_units(plottype::Y);
+    const std::string xlabel = m_plottype->get_label(plottype::X);
+    const std::string ylabel = m_plottype->get_label(plottype::Y);
+    const std::string xunits = m_plottype->get_units(plottype::X);
+    const std::string yunits = m_plottype->get_units(plottype::Y);
     setAxisTitle(xBottom, (xlabel+std::string(" [")+xunits+std::string("]")).c_str());
     setAxisTitle(yLeft, (ylabel+std::string(" [")+yunits+std::string("]")).c_str());
@@ -88,5 +99,5 @@
 QSeisPlot::~QSeisPlot()
 {
-
+  delete m_plottype;
 }
 
Index: src/UIElements/Views/Qt4/Plotting/QSeisPlot.hpp
===================================================================
--- src/UIElements/Views/Qt4/Plotting/QSeisPlot.hpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/Plotting/QSeisPlot.hpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -28,4 +28,6 @@
 #include <map>
 #include <string>
+
+class plottype;
 
 /**
@@ -75,4 +77,6 @@
     QPointF startPan;
     bool panning;
+    plottype *m_plottype;
+
     void mouseMoveEvent(QMouseEvent *event);
     void mousePressEvent(QMouseEvent *event);
Index: src/UIElements/Views/Qt4/QtFragmentList.cpp
===================================================================
--- src/UIElements/Views/Qt4/QtFragmentList.cpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/QtFragmentList.cpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -60,6 +60,4 @@
 {
   setColumnCount(COLUMNCOUNT);
-  setSelectionMode(QAbstractItemView::MultiSelection);
-
   QStringList header;
 	for(int i=0; i<COLUMNCOUNT;++i)
Index: src/UIElements/Views/Qt4/QtHomologyList.cpp
===================================================================
--- src/UIElements/Views/Qt4/QtHomologyList.cpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/QtHomologyList.cpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -40,10 +40,25 @@
 #include <QAbstractItemView>
 #include <QtGui/QTreeWidget>
+#include <QtGui/QTabWidget>
 #include<Qt/qsplitter.h>
 
 #include "CodePatterns/MemDebug.hpp"
 
+#include "CodePatterns/Log.hpp"
+
 #include "Fragmentation/Homology/HomologyContainer.hpp"
+#include "FunctionApproximation/FunctionModel.hpp"
+#include "FunctionApproximation/TrainingData.hpp"
+#include "Potentials/CompoundPotential.hpp"
+#include "Potentials/EmpiricalPotential.hpp"
+#include "Potentials/InternalCoordinates/Coordinator.hpp"
 #include "Potentials/PotentialRegistry.hpp"
+#ifdef HAVE_QWT
+#include "UIElements/Views/Qt4/Plotting/QSeisData.hpp"
+#include "UIElements/Views/Qt4/Plotting/QSeisPageRegistry.hpp"
+#include "UIElements/Views/Qt4/Plotting/QSeisPlotCurve.hpp"
+#include "UIElements/Views/Qt4/Plotting/QSeisPlotPage.hpp"
+#include "UIElements/Views/Qt4/Plotting/QSeisCurveRegistry.hpp"
+#endif
 #include "World.hpp"
 
@@ -61,11 +76,17 @@
   treewidget = new QTreeWidget (splitter);
   splitter->addWidget(treewidget);
-  widget = new QWidget (splitter);
+
+#ifdef HAVE_QWT
+  widget = new QSeisPlotPage ("energy", splitter);
+  QSeisPageRegistry::getInstance().registerInstance(widget);
+#else
+  widget = new QWidget(splitter);
+#endif
   splitter->addWidget(widget);
-  splitter->setStretchFactor(10, 1);
+//  splitter->setStretchFactor(10, 1);
+
+  treewidget->setSelectionMode( QTreeWidget::SingleSelection );
 
   treewidget->setColumnCount(COLUMNCOUNT);
-  treewidget->setSelectionMode(QAbstractItemView::MultiSelection);
-
   QStringList header;
 	for(int i=0; i<COLUMNCOUNT;++i)
@@ -83,4 +104,11 @@
 	potentialregistry_enabled = true;
 
+#ifdef HAVE_QWT
+  //connect the PlotCurveRegistry directly to the PlotPage registry
+  connect(QSeisCurveRegistry::getPointer(), SIGNAL(curveAdded(std::string, QString)), QSeisPageRegistry::getPointer(), SLOT(addCurve(std::string, QString)));
+  connect(QSeisCurveRegistry::getPointer(), SIGNAL(curveRemoved(std::string, QString)), QSeisPageRegistry::getPointer(), SLOT(removeCurve(std::string, QString)));
+  connect(QSeisCurveRegistry::getPointer(), SIGNAL(curveChanged(std::string, QString)), QSeisPageRegistry::getPointer(), SLOT(updateCurve(std::string, QString)));
+#endif
+
   connect(treewidget,SIGNAL(itemSelectionChanged()),this,SLOT(rowSelected()));
   connect(this,SIGNAL(changed()),this,SLOT(update()));
@@ -100,8 +128,8 @@
 
   // force an update from Qt...
-  clearing = true;
-  treewidget->clear();
-  clearing = false;
-  //emit changed(); doesn't work!?!
+//  clearing = true;
+//  treewidget->clear();
+//  clearing = false;
+  emit changed(); //doesn't work!?!
 }
 
@@ -114,12 +142,17 @@
   HomologySelection.clear();
   treewidget->clear();
+#ifdef HAVE_QWT
+  QSeisCurveRegistry::getInstance().resetRegistry();
+#endif
 
   size_t count = 0;
-  for (HomologyContainer::const_key_iterator iter = homologies.key_begin();
-      iter != homologies.key_end(); iter = homologies.getNextKey(iter), ++count) {
-    HomologyContainer::range_t occurences = homologies.getHomologousGraphs(*iter);
+  for (HomologyContainer::const_key_iterator homologyiter = homologies.key_begin();
+      homologyiter != homologies.key_end();
+      homologyiter = homologies.getNextKey(homologyiter), ++count) {
+    HomologyContainer::range_t occurences = homologies.getHomologousGraphs(*homologyiter);
     const HomologyGraph &graph = occurences.first->first;
     const size_t times = std::distance(occurences.first, occurences.second);
 
+    // create item
     QTreeWidgetItem *treeItem = new QTreeWidgetItem(treewidget);
     treeItem->setText(NUMBER, QString::number(count));
@@ -141,4 +174,73 @@
     }
     HomologySelection.push_back(treeItem->isSelected());
+
+#ifdef HAVE_QWT
+    // create associated curve in plot
+    CompoundPotential *compound = new CompoundPotential(graph);
+    ASSERT( compound != NULL,
+        "QtHomologyList::refill() - compound is NULL.");
+    TrainingData data(compound->getSpecificFilter());
+    data(homologies.getHomologousGraphs(graph));
+    if (!data.getTrainingInputs().empty()) {
+      // generate QSeisData
+      const TrainingData::InputVector_t &inputs = data.getTrainingInputs();
+      const TrainingData::OutputVector_t &outputs = data.getTrainingOutputs();
+      std::vector<double> xvalues;
+      std::vector<double> yvalues;
+      for (TrainingData::OutputVector_t::const_iterator outputiter = outputs.begin();
+          outputiter != outputs.end(); ++outputiter)
+        yvalues.push_back((*outputiter)[0]);
+
+      // go through each potential
+      for (CompoundPotential::models_t::const_iterator potiter = compound->begin();
+          potiter != compound->end();
+          ++potiter) {
+        const EmpiricalPotential &potential = dynamic_cast<const EmpiricalPotential &>(**potiter);
+        const std::string potentialname = potential.getName();
+        Coordinator::ptr coordinator = potential.getCoordinator();
+        // then we need to sample the potential
+        xvalues.clear();
+        for (TrainingData::InputVector_t::const_iterator inputiter = inputs.begin();
+            inputiter != inputs.end(); ++inputiter)
+          xvalues.push_back((*coordinator)(*inputiter));
+
+        // We need to sort the xvalues (and yvalues also)
+        std::vector<double>::const_iterator xiter = xvalues.begin();
+        std::vector<double>::const_iterator yiter = yvalues.begin();
+        std::map<double, std::set<double> > sorted_xy;
+        for (;xiter != xvalues.end(); ++xiter, ++yiter) {
+          std::set<double> yset;
+          yset.insert(*yiter);
+          std::pair<std::map<double, std::set<double> >::iterator, bool> inserter =
+              sorted_xy.insert(std::make_pair(*xiter, yset));
+          if (!inserter.second)
+            inserter.first->second.insert(*yiter);
+        }
+        xvalues.clear();
+        yvalues.clear();
+        for (std::map<double, std::set<double> >::const_iterator iter = sorted_xy.begin();
+            iter != sorted_xy.end(); ++iter) {
+          for (std::set<double>::const_iterator valueiter = iter->second.begin();
+              valueiter != iter->second.end();
+              ++valueiter) {
+            xvalues.push_back(iter->first);
+            yvalues.push_back(*valueiter);
+          }
+        }
+
+        QSeisData data(xvalues, yvalues, QString(potentialname.c_str()));
+        // couple to QSeisPlotCurve and register the curve
+        QSeisPlotCurve *curve = new QSeisPlotCurve(QString(potentialname.c_str()), "energy");
+        curve->updateCurve(&data);
+        if (!QSeisCurveRegistry::getInstance().isPresentByName(curve->getName()))
+          QSeisCurveRegistry::getInstance().registerInstance(curve);
+        else
+          delete curve;
+        // couple to QSeisPlotPage
+        widget->addCurve(potentialname);
+
+      }
+    }
+#endif
   }
   dirty = false;
@@ -171,5 +273,5 @@
     bool newSelection = item->isSelected();
     if (newSelection != HomologySelection[i]){
-      HomologySelection[i] = newSelection;
+      // TODO: Add selected curve to QTabWidget
     }
   }
Index: src/UIElements/Views/Qt4/QtHomologyList.hpp
===================================================================
--- src/UIElements/Views/Qt4/QtHomologyList.hpp	(revision f0964cb5f2f053c3e0aed176849d832df3814314)
+++ src/UIElements/Views/Qt4/QtHomologyList.hpp	(revision b677ab5201194a0236fb05cf30291c0d3fd0bd89)
@@ -19,4 +19,5 @@
 
 class HomologyGraph;
+class QSeisPlotPage;
 class QTreeWidget;
 
@@ -58,5 +59,10 @@
 private:
   QTreeWidget *treewidget;
+
+#ifdef HAVE_QWT
+  QSeisPlotPage *widget;
+#else
   QWidget *widget;
+#endif
 };
 
