Index: Evidence/Edd/Edd.cc
===================================================================
--- Evidence/Edd/Edd.cc	(revision 171)
+++ Evidence/Edd/Edd.cc	(revision 174)
@@ -6,5 +6,5 @@
 Qt-based graphical user interface for the Evidence contron system
 
-Edd_Indicator changes its background colour in case it display
+EddLineDisplay changes its background colour in case it display
 a DIM status service
 
@@ -21,5 +21,5 @@
 
 
-class Edd_DIM *Handler;
+class EddDim *Handler;
 
 
@@ -31,8 +31,8 @@
 
   Browser.getServices(Service);
-  if (Browser.getNextService(Name, Format) != DimSERVICE) return new Edd_Plot(Service, Index);//return NULL;
-  
-  if (strlen(Format) == 1 && *Format != 'C') return new Edd_Plot(Service, Index);
-  else return new Edd_TextHist(Service);
+  if (Browser.getNextService(Name, Format) != DimSERVICE) return new EddPlot(Service, Index);
+  
+  if (strlen(Format) == 1 && *Format != 'C') return new EddPlot(Service, Index);
+  else return new EddText(Service);
 }
 
@@ -43,6 +43,8 @@
 
 // Constructor
-Edd_Indicator::Edd_Indicator(QString Name, int Index, QWidget *P):
+EddLineDisplay::EddLineDisplay(QString Name, int Index, QWidget *P):
 	QLineEdit(P), ServiceName(Name), Index(Index) {
+ 
+ LastPlot = NULL;
  
   // Widget properties
@@ -67,5 +69,5 @@
 
 // Destructor
-Edd_Indicator::~Edd_Indicator() {
+EddLineDisplay::~EddLineDisplay() {
 
   Handler->Unsubscribe(ServiceName);
@@ -73,5 +75,5 @@
 
 // Update widget
-void Edd_Indicator::Update(QString Name, int Time, QByteArray Array, QString Format, QString Text) {
+void EddLineDisplay::Update(QString Name, int Time, QByteArray Array, QString Format, QString Text) {
 
   if (ServiceName != Name) return;
@@ -109,5 +111,5 @@
 
 // Open plot if mouse release within widget
-void Edd_Indicator::mouseReleaseEvent(QMouseEvent *Event) {
+void EddLineDisplay::mouseReleaseEvent(QMouseEvent *Event) {
 
   if (Event->button()!=Qt::LeftButton || !contentsRect().contains(Event->pos())) return;
@@ -123,9 +125,9 @@
 
   // If not, open new plot
-  Edd_Indicator::MenuOpenHistory();
+  EddLineDisplay::MenuOpenHistory();
 }
 
 // Handling of mouse press event: Register start position for drag
-void Edd_Indicator::mousePressEvent(QMouseEvent *Event) {
+void EddLineDisplay::mousePressEvent(QMouseEvent *Event) {
 
   if (Event->button() == Qt::LeftButton) dragStart = Event->pos();
@@ -133,5 +135,5 @@
 
 // Handling of dragging (Drag and MimeData will be deleted by Qt)
-void Edd_Indicator::mouseMoveEvent(QMouseEvent *Event) {
+void EddLineDisplay::mouseMoveEvent(QMouseEvent *Event) {
 
   if ((Event->buttons() & Qt::LeftButton) == 0) return;
@@ -149,5 +151,5 @@
 // Opening context menu
 //
-void Edd_Indicator::contextMenuEvent(QContextMenuEvent *Event) {
+void EddLineDisplay::contextMenuEvent(QContextMenuEvent *Event) {
 
   Menu->exec(Event->globalPos());
@@ -155,5 +157,5 @@
 
 // Menu: Open history plot
-void Edd_Indicator::MenuOpenHistory() {
+void EddLineDisplay::MenuOpenHistory() {
   
   LastPlot = OpenHistory(ServiceName.toAscii().data(), Index);
@@ -162,5 +164,5 @@
 
 // Menu: Copy service name
-void Edd_Indicator::MenuCopyService() {
+void EddLineDisplay::MenuCopyService() {
   
   QMimeData *MimeData = new QMimeData;
@@ -171,5 +173,5 @@
 
 // Menu: Copy data
-void Edd_Indicator::MenuCopyData() {
+void EddLineDisplay::MenuCopyData() {
 
   QApplication::clipboard()->setText(text());
@@ -184,6 +186,6 @@
 // Constructor
 //
-Edd_Plot::Edd_Plot(QString DIMService, int Index, QWidget *P):
-	QwtPlot(P), EvidenceHistory() {
+EddPlot::EddPlot(QString DIMService, int Index, QWidget *P):
+	QwtPlot(P) {
 
   Mutex = new QMutex(QMutex::Recursive);
@@ -238,5 +240,5 @@
 // Destructor (items with parent widget are automatically deleted)
 //
-Edd_Plot::~Edd_Plot() {
+EddPlot::~EddPlot() {
 
   for (int i=0; i<Items.size(); i++) {
@@ -251,5 +253,5 @@
 // Add history service to plot
 //
-void Edd_Plot::AddService(QString Name, int Index) {
+void EddPlot::AddService(QString Name, int Index) {
 
   // Lock before accessing Items list
@@ -280,5 +282,5 @@
 
 // Update widget (must happen in GUI thread)
-void Edd_Plot::Update(QString Name, int Time, QByteArray, QString Format, QString Text) {
+void EddPlot::Update(QString Name, int Time, QByteArray, QString Format, QString Text) {
 
   // Lock before accessing Items list
@@ -306,8 +308,10 @@
 	  void *Data;
 
-	  if (GetHistory(Items[ItemNo].Name.toAscii().data())) {
+	  class EvidenceHistory *HistClass = Handler->GetHistory(Items[ItemNo].Name);
+	  
+	  if (HistClass->GetHistory()) {
      	double Smallest = DBL_MAX, Largest = DBL_MIN;
 		double Number=0;
-		while (Next(Time, Size, Data)) {
+		while (HistClass->Next(Time, Size, Data)) {
 		  switch (Format[0].toUpper().toAscii()) {
     		case 'I':
@@ -357,5 +361,5 @@
 // Update all curves in plot
 //
-void Edd_Plot::UpdatePlot() {
+void EddPlot::UpdatePlot() {
 
   static QwtSymbol Symbol, Sym1;
@@ -405,5 +409,5 @@
 // Reset graph axes to autoscale when fully unzoomed
 //
-void Edd_Plot::HandleZoom(const QwtDoubleRect &) {
+void EddPlot::HandleZoom(const QwtDoubleRect &) {
 
   if(Zoomer->zoomRectIndex() == 0) {
@@ -417,10 +421,10 @@
 //
 
-void Edd_Plot::dragEnterEvent(QDragEnterEvent *Event) {
+void EddPlot::dragEnterEvent(QDragEnterEvent *Event) {
     
   if (Event->mimeData()->hasFormat("Edd/Service")) Event->acceptProposedAction();
 }
 
-void Edd_Plot::dropEvent(QDropEvent *Event) {
+void EddPlot::dropEvent(QDropEvent *Event) {
 
   QByteArray D(Event->mimeData()->data("Edd/Service"));
@@ -429,5 +433,5 @@
     
 // Opening context menu
-void Edd_Plot::contextMenuEvent(QContextMenuEvent *Event) {
+void EddPlot::contextMenuEvent(QContextMenuEvent *Event) {
 
   Menu->exec(Event->globalPos());
@@ -435,5 +439,5 @@
 
 // Drag&Drop method
-void Edd_Plot::LegendClicked(QwtPlotItem *Item) {
+void EddPlot::LegendClicked(QwtPlotItem *Item) {
 
 
@@ -451,5 +455,5 @@
 
 // Zoom completely out
-void Edd_Plot::MenuZoomOut() {
+void EddPlot::MenuZoomOut() {
 
   Zoomer->zoom(0);
@@ -458,5 +462,5 @@
 
 // Remove all items except last
-void Edd_Plot::MenuSingleTrace() {
+void EddPlot::MenuSingleTrace() {
 
   // Lock before accessing Items list
@@ -472,5 +476,5 @@
 
 // Save data of plot as test 
-void Edd_Plot::MenuSaveASCII() {
+void EddPlot::MenuSaveASCII() {
   QString Filename = QFileDialog::getSaveFileName(this,
      "Filename", ".", "Text files (*.txt *.ascii *.asc);;All files (*)");
@@ -497,5 +501,5 @@
 
 // Print plot
-void Edd_Plot::MenuPrint() {
+void EddPlot::MenuPrint() {
 
   QPrinter *Printer = new QPrinter;
@@ -510,5 +514,5 @@
 
 // Save plot as image
-void Edd_Plot::MenuSave() {
+void EddPlot::MenuSave() {
 
   QString Filename = QFileDialog::getSaveFileName(this,
@@ -524,5 +528,5 @@
 
 // Add new service by pasting name
-void Edd_Plot::MenuPasteService() {
+void EddPlot::MenuPasteService() {
 
   const QMimeData *D = QApplication::clipboard()->mimeData();
@@ -541,6 +545,6 @@
 // Constructor
 //
-Edd_TextHist::Edd_TextHist(QString Name, bool Pure, QWidget *P):
-	QTextEdit(P), EvidenceHistory(), Name(Name), Pure(Pure) {
+EddText::EddText(QString Name, bool Pure, QWidget *P):
+	QTextEdit(P), Name(Name), Pure(Pure) {
   
   // Widget properties
@@ -561,6 +565,8 @@
 	void *Data;
 
-	if (GetHistory(Name.toAscii().data())) {
-	  while (Next(Time, Size, Data)) {
+	class EvidenceHistory *HistClass = Handler->GetHistory(Name);
+
+	if (HistClass->GetHistory()) {
+	  while (HistClass->Next(Time, Size, Data)) {
 		moveCursor (QTextCursor::Start);
 		insertPlainText(QString("(")+QDateTime::fromTime_t(Time).toString()+") ");	  
@@ -575,5 +581,5 @@
 
 // Destructor
-Edd_TextHist::~Edd_TextHist() {
+EddText::~EddText() {
 
   Handler->Unsubscribe(Name);
@@ -582,5 +588,5 @@
 
 // Update widget (must happen in GUI thread)
-void Edd_TextHist::Update(QString Name, int Time, QByteArray, QString Format, QString Text) {
+void EddText::Update(QString Name, int Time, QByteArray, QString Format, QString Text) {
 
   if (this->Name != Name) return;
@@ -617,5 +623,5 @@
 // Interface to Dim system //
 /////////////////////////////
-Edd_DIM::Edd_DIM() {
+EddDim::EddDim() {
 
   Mutex = new QMutex(QMutex::Recursive);
@@ -630,15 +636,16 @@
   // Connect to DIM handler
   if (connect(this, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), SLOT(Update(QString, int, QByteArray, QString, QString))) == false) {
-    printf("Failed connection in Edd_DIM()\n");
-  }
-}
-
-Edd_DIM::~Edd_DIM() {
-
+    printf("Failed connection in EddDim()\n");
+  }
+}
+
+EddDim::~EddDim() {
+
+  for (int i=0; i<HistoryList.size(); i++) delete HistoryList[i].HistClass;
   delete Mutex;
 }
 
 // Subscribe to DIM service
-void Edd_DIM::Subscribe(QString Name) {
+void EddDim::Subscribe(QString Name) {
 
   // Lock before accessing list
@@ -667,5 +674,5 @@
 
 // Unsubsribe from DIM service
-void Edd_DIM::Unsubscribe(QString Name) {
+void EddDim::Unsubscribe(QString Name) {
 
   // Lock before accessing list
@@ -682,6 +689,25 @@
 }
 
+// Get history buffer
+class EvidenceHistory *EddDim::GetHistory(QString Name) {
+
+  // If history already available, return this
+  for (int i=0; i<HistoryList.size(); i++) if (HistoryList[i].Name == Name) {
+	HistoryList[i].Count++;
+	return HistoryList[i].HistClass;
+  }
+
+  struct HistItem New;
+  New.Name = Name;
+  New.HistClass = new EvidenceHistory(Name.toStdString());
+  New.Count = 1;
+  HistoryList.append(New);
+
+  return New.HistClass;
+
+}
+
 // Update throughput statistics
-void Edd_DIM::UpdateStatistics() {
+void EddDim::UpdateStatistics() {
 
   // Lock before accessing internal variables
@@ -697,5 +723,5 @@
 
 // Store service information for usage by Subscribe() and update statistics
-void Edd_DIM::Update(QString Name, int Time, QByteArray Data, QString Format, QString Text) {
+void EddDim::Update(QString Name, int Time, QByteArray Data, QString Format, QString Text) {
 
   // Lock before accessing list
@@ -717,5 +743,5 @@
 
 // Handling of DIM service update
-void Edd_DIM::infoHandler() {
+void EddDim::infoHandler() {
 
   if (!EvidenceServer::ServiceOK(getInfo())) YEP(getInfo()->getName(), -1);
@@ -733,5 +759,5 @@
 GUI::GUI() {
  
-  Handler = new Edd_DIM();
+  Handler = new EddDim();
   
   // Set features of main window
@@ -742,13 +768,10 @@
   setWindowTitle("Edd - Evidence Data Display");
 
-  Edd_Indicator *Value;
-  Edd_Plot *Graph;
-  Edd_TextHist *Textout; 
+  EddLineDisplay *Value;
+  EddPlot *Graph;
+  EddText *Textout; 
   QString Text;
 
    // TextBox for value
-  //Value = new Edd_Indicator((char *) "SQM/NSB", Central);
-  //Graph = new Edd_Plot((char *) "SQM/NSB", Central);
-  //Graph->AddService("BIAS/VOLT/ID00/00-000");
   
 
@@ -768,12 +791,12 @@
   MainLayout = new QGridLayout(MainWidget);
 
-  Value = new Edd_Indicator("Alarm/Status");
+  Value = new EddLineDisplay("Alarm/Status");
   Value->setMaximumWidth(200);
   MainLayout->addWidget(Value, 0, 0, 1, 2);      
 
-  Value = new Edd_Indicator("Alarm/MasterAlarm");
+  Value = new EddLineDisplay("Alarm/MasterAlarm");
   MainLayout->addWidget(Value, 0, 1, 1, 1);
 
-  Textout = new Edd_TextHist("Alarm/Summary", true);
+  Textout = new EddText("Alarm/Summary", true);
   Textout->Accumulate = false;
   Textout->setMaximumWidth(200);
@@ -781,23 +804,23 @@
   MainLayout->addWidget(Textout, 1, 0, 1, 2);
 
-  Value = new Edd_Indicator("DColl/Status");
+  Value = new EddLineDisplay("DColl/Status");
   Value->setMaximumWidth(200);
   MainLayout->addWidget(Value, 3, 0, 1, 2);      
 
-  Value = new Edd_Indicator("DColl/DataSizekB");
+  Value = new EddLineDisplay("DColl/DataSizekB");
   MainLayout->addWidget(Value, 4, 0, 1, 1);
 
-  Value = new Edd_Indicator("DColl/LogSizekB");
+  Value = new EddLineDisplay("DColl/LogSizekB");
   MainLayout->addWidget(Value, 4, 1, 1, 1);
 
-  Value = new Edd_Indicator("DColl/CurrentFile");
+  Value = new EddLineDisplay("DColl/CurrentFile");
   Value->setMaximumWidth(400);
   MainLayout->addWidget(Value, 5, 0, 1, 3);
 
-  Value = new Edd_Indicator("Config/Status");
+  Value = new EddLineDisplay("Config/Status");
   Value->setMaximumWidth(200);
   MainLayout->addWidget(Value, 6, 0, 1, 2);      
 
-  Value = new Edd_Indicator("Config/ModifyTime");
+  Value = new EddLineDisplay("Config/ModifyTime");
   Value->setMaximumWidth(200);
   Value->ShowAsTime = true;
@@ -809,7 +832,7 @@
   MainLayout->addWidget(Button, 7, 1, 1, 1);
 
-  Value = new Edd_Indicator("Edd/Rate_kBMin");
+  Value = new EddLineDisplay("Edd/Rate_kBMin");
   MainLayout->addWidget(Value, 8, 0, 1, 1);
-  Value = new Edd_Indicator("Edd/Total_MB");
+  Value = new EddLineDisplay("Edd/Total_MB");
   MainLayout->addWidget(Value, 8, 1, 1, 1);
 
@@ -826,13 +849,13 @@
   FeedbackWidget = new QWidget();
   FeedbackLayout = new QGridLayout(FeedbackWidget);
-  Graph = new Edd_Plot();
+  Graph = new EddPlot();
   for (int i=0; i<36; i++) {
-    Value = new Edd_Indicator("Feedback/Average", i);
+    Value = new EddLineDisplay("Feedback/Average", i);
     FeedbackLayout->addWidget(Value, i%9+1, 0+i/9, 1, 1);
     Graph->AddService("Feedback/Average", i);
   }
-  FeedbackLayout->addWidget(Graph, 0, 4, 10, 3);
-
-  //Graph = new Edd_Plot();
+  FeedbackLayout->addWidget(Graph, 0, 4, 11, 3);
+
+  //Graph = new EddPlot();
   //for (int i=0; i<36; i++) {
     //Text = Text.sprintf("Feedback/Sigma/ID%.2d/%.2d-%.3d",i/16, (i%16)/8, i%8);
@@ -841,20 +864,25 @@
   //FeedbackLayout->addWidget(Graph, 10, 0, 10, 3);
 
-  Value = new Edd_Indicator("Feedback/Status");
+  Value = new EddLineDisplay("Feedback/Status");
   Value->setMaximumWidth(200);
   FeedbackLayout->addWidget(Value, 0, 0, 1, 3);      
-  Value = new Edd_Indicator("Feedback/Count");
+  Value = new EddLineDisplay("Feedback/Count");
   FeedbackLayout->addWidget(Value, 0, 3, 1, 1);      
+
+  QWidget *Value1 = new QPushButton("Details");
+  FeedbackLayout->addWidget(Value1, 10, 0, 1, 1);      
+  connect(Value1, SIGNAL(pressed()), this, SLOT(FeedbackDetails()));
+  
 
   // Bias voltage page
   BiasWidget = new QWidget();
   BiasLayout = new QGridLayout(BiasWidget);
-  Graph = new Edd_Plot();
+  Graph = new EddPlot();
   for (int i=0; i<18; i++) {
-    Value = new Edd_Indicator("Bias/VOLT/ID00", i);
+    Value = new EddLineDisplay("Bias/VOLT/ID00", i);
     BiasLayout->addWidget(Value, i%9+1, 0+i/9, 1, 1);
     Graph->AddService("Bias/VOLT/ID00", i);
 
-    Value = new Edd_Indicator("Bias/VOLT/ID00", i+32);
+    Value = new EddLineDisplay("Bias/VOLT/ID00", i+32);
     BiasLayout->addWidget(Value, i%9+1, 2+i/9, 1, 1);
     Graph->AddService("Bias/VOLT/ID00",i+32);
@@ -862,9 +890,9 @@
 
   BiasLayout->addWidget(Graph, 0, 4, 12, 3);
-  Value = new Edd_Indicator("Bias/Status");
+  Value = new EddLineDisplay("Bias/Status");
   Value->setMaximumWidth(200);
   BiasLayout->addWidget(Value, 0, 0, 1, 3);      
 
-  Textout = new Edd_TextHist("Bias/Textout", true);
+  Textout = new EddText("Bias/Textout", true);
   Textout->setFixedWidth(400);
   BiasLayout->addWidget(Textout, 10, 0, 4, 4);      
@@ -873,11 +901,11 @@
   EnvironmentWidget = new QWidget();
   EnvironmentLayout = new QGridLayout(EnvironmentWidget);
-  Value = new Edd_Indicator("ARDUINO/Status");
+  Value = new EddLineDisplay("ARDUINO/Status");
   Value->setMaximumWidth(200);
   EnvironmentLayout->addWidget(Value, 0, 0, 1, 3);      
 
-  Graph = new Edd_Plot();
+  Graph = new EddPlot();
   for (int i=0; i<10; i++) {
-    Value = new Edd_Indicator("ARDUINO/Data", i);
+    Value = new EddLineDisplay("ARDUINO/Data", i);
     EnvironmentLayout->addWidget(Value, i%5+1, i/5, 1, 1);
     Graph->AddService("ARDUINO/Data", i);
@@ -885,5 +913,5 @@
   EnvironmentLayout->addWidget(Graph, 0, 3, 6, 4);      
 
-  Value = new Edd_Indicator("SQM/NSB");
+  Value = new EddLineDisplay("SQM/NSB");
   EnvironmentLayout->addWidget(Value, 6, 0, 1, 1);      
 
@@ -951,4 +979,21 @@
 }
 
+// Feedback details page
+void GUI::FeedbackDetails() {
+
+  QWidget *Value;
+  QWidget *Widget = new QWidget();
+  QGridLayout *Layout = new QGridLayout(Widget);
+  EddPlot *Graph = new EddPlot();
+  for (int i=0; i<36; i++) {
+    Value = new EddLineDisplay("Feedback/Sigma", i);
+    Layout->addWidget(Value, i%9+1, 0+i/9, 1, 1);
+    Graph->AddService("Feedback/Sigma", i);
+  }
+  Layout->addWidget(Graph, 0, 4, 11, 3);
+  
+  Widget->show();
+}
+
 // Start DIM Browser
 void GUI::StartDIMBrowser() {
Index: Evidence/Edd/Edd.h
===================================================================
--- Evidence/Edd/Edd.h	(revision 171)
+++ Evidence/Edd/Edd.h	(revision 174)
@@ -39,5 +39,5 @@
 		  
 // General indicator for DIM service
-class Edd_Indicator: public QLineEdit {
+class EddLineDisplay: public QLineEdit {
     Q_OBJECT
 
@@ -54,6 +54,6 @@
 	
   public:
-    Edd_Indicator(QString, int=0, QWidget * = NULL);
-    ~Edd_Indicator();
+    EddLineDisplay(QString, int=0, QWidget * = NULL);
+    ~EddLineDisplay();
 
 	bool ShowAsTime;
@@ -68,5 +68,5 @@
 
 // Graph class for history display
-class Edd_Plot: public QwtPlot, public EvidenceHistory {
+class EddPlot: public QwtPlot {
     Q_OBJECT
 
@@ -99,6 +99,6 @@
 
   public:
-    Edd_Plot(QString = QString(), int = 0, QWidget * = NULL);
-    ~Edd_Plot();
+    EddPlot(QString = QString(), int = 0, QWidget * = NULL);
+    ~EddPlot();
     void AddService(QString, int = 0);
 
@@ -119,5 +119,5 @@
 
 // Text history and output class
-class Edd_TextHist: public QTextEdit, public EvidenceHistory {
+class EddText: public QTextEdit {
     Q_OBJECT
 
@@ -126,6 +126,6 @@
 	
   public:
-    Edd_TextHist(QString, bool = false, QWidget * = NULL);
-    ~Edd_TextHist();
+    EddText(QString, bool = false, QWidget * = NULL);
+    ~EddText();
 
 	bool Accumulate;
@@ -136,5 +136,5 @@
 
 // Interface to DIM system
-class Edd_DIM: public QObject, public DimInfo {
+class EddDim: public QObject, public DimInfo {
     Q_OBJECT
 
@@ -151,4 +151,11 @@
     QMutex *Mutex;
 
+	struct HistItem {
+	  QString Name;
+	  int Count;
+	  class EvidenceHistory *HistClass;
+	};
+    QList<HistItem> HistoryList;
+
 	long long TotalVolume;
 	long long MinuteVolume;
@@ -161,9 +168,10 @@
 
   public:
-    Edd_DIM();
-    ~Edd_DIM();
+    EddDim();
+    ~EddDim();
 
 	void Subscribe(QString);
 	void Unsubscribe (QString);
+	class EvidenceHistory *GetHistory(QString);
 
   signals:
@@ -178,6 +186,6 @@
     QwtAnalogClock *Clock;
 	
-    QWidget *Central, *MainWidget, *BiasWidget, *FeedbackWidget, *EnvironmentWidget;
-    QGridLayout *MainLayout, *BiasLayout, *FeedbackLayout, *EnvironmentLayout;
+    QWidget *Central, *MainWidget, *BiasWidget, *FeedbackWidget, *FeedbackDetailsWidget, *EnvironmentWidget;
+    QGridLayout *MainLayout, *BiasLayout, *FeedbackLayout, *FeedbackDetailsLayout, *EnvironmentLayout;
 
     QTabWidget *TabWidget;
@@ -193,4 +201,5 @@
     void MenuNewHistory();
 	void StartDIMBrowser();
+	void FeedbackDetails();
 };
 
