]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Show wavelengths in signal view when resource is DAD.
authorMichal Malý <madcatxster@prifuk.cz>
Sun, 17 Nov 2013 02:26:25 +0000 (03:26 +0100)
committerMichal Malý <madcatxster@prifuk.cz>
Sun, 17 Nov 2013 02:26:25 +0000 (03:26 +0100)
datamanager.cpp
signal.cpp
signal.h

index 43b304754142a01c7182ef0cf29221c4dbd2c586..2240594923b72d9dd4a7b9cc10cc1e1feb9ac727 100644 (file)
@@ -255,7 +255,13 @@ void DataManager::showOneSignal(std::shared_ptr<SignalController> ctrl)
 
   swp->setDataTableModel(ctrl->dataTableModel());
   swp->setIntegrationTableModel(ctrl->integrationTableModel());
-  swp->setTypeText(ctrl->signal()->resourceToString());
+  if (ctrl->signal()->resource() == Signal::Resource::CE_DAD) {
+    qDebug() << "absorbance";
+    swp->setTypeText(ctrl->signal()->resourceToString() + QString(" Sig: ") + QString::number(ctrl->signal()->wavelengthAbsorbed()) + " nm, Ref: " +
+                     QString::number(ctrl->signal()->wavelengthReference()) + " nm");
+  }
+  else
+    swp->setTypeText(ctrl->signal()->resourceToString());
   swp->setXUnits(ctrl->signal()->xunitToString());
   swp->setYUnits(ctrl->signal()->yunitToString());
   connect(swp, SIGNAL(crosshairErased()), ctrl.get(), SLOT(onViewCrosshairErased()));
index 4262ee25cf12701b43961e838cd167c6ba75df78..e6f99ac3c88ee2d4383af76baa5fe41bee41dcf4 100644 (file)
@@ -23,7 +23,6 @@
 #include "signal.h"
 #include <cfloat>
 
-const QString Signal::RES_ABSORBANCE("Absorbance");
 const QString Signal::RES_CCD("CCD");
 const QString Signal::RES_CURRENT("Current");
 const QString Signal::RES_DAD("Absorbance");
@@ -70,8 +69,6 @@ Signal::TimeValuePair Signal::pairAt(const size_t idx) const
 
 QString Signal::resourceToString() const {
   switch (m_resource) {
-    case Resource::CE_ABSORBANCE:
-      return RES_ABSORBANCE;
     case Resource::CE_CCD:
       return RES_CCD;
     case Resource::CE_CURRENT:
index 42840298055e6f057b4097ba64304ae91cf64970..dded6ce61bd27e8b4a588909427dc1e58495ed8c 100644 (file)
--- a/signal.h
+++ b/signal.h
@@ -35,7 +35,6 @@ public:
     CE
   };
   enum class Resource {
-    CE_ABSORBANCE,
     CE_CCD,
     CE_CURRENT,
     CE_DAD,