std::shared_ptr<SingleRunData> srdata = m_activeSequence->selectedRun();
emit cleanDashboard();
- std::vector<std::string> allKeys = srdata->allKeys();
- std::vector<std::string>::const_reverse_iterator rit = allKeys.crbegin();
- qDebug() << QString::fromStdString(*rit);
- while (rit != allKeys.crend()) {
- showOneSignal(srdata->controllerAt(*rit));
- rit++;
+ SignalControllersMap::iterator it = srdata->ctrls_begin();
+ while (it != srdata->ctrls_end()) {
+ showOneSignal(it->second);
+ it++;
}
emit setSingleRunInfo(srdata->methodName(), srdata->operatorName(), srdata->sampleInfo(), srdata->date().toString() +" "+ srdata->time().toString());
#include <QtCore/QObject>
#include <QtCore/QTime>
-typedef std::unordered_map<std::string, std::shared_ptr<SignalController>> SignalControllersMap;
-typedef std::unordered_map<std::string, std::shared_ptr<Signal>> SignalsMap;
+typedef std::map<std::string, std::shared_ptr<SignalController>> SignalControllersMap;
+typedef std::map<std::string, std::shared_ptr<Signal>> SignalsMap;
class SingleRunData : public QObject
{
const SignalControllersMap& allControllers() const { return m_ctrls; }
std::vector<std::string> allKeys() const;
const SignalsMap& allSignals() const { return m_signals; }
+ SignalControllersMap::iterator ctrls_begin() { return m_ctrls.begin(); }
std::shared_ptr<SignalController> controllerAt(const std::string& key);
QDate date() const { return m_date; }
QString dirName() const { return m_dirName; }
+ SignalControllersMap::iterator ctrls_end() { return m_ctrls.end(); }
QString methodName() const { return m_methodName; }
QString operatorName() const { return m_operatorName; }
void readUserDataFromJSON();