std::shared_ptr<SingleRunData> srdata = m_activeSequence->selectedRun();
emit cleanDashboard();
- for (const std::string& s : srdata->allKeys())
- showOneSignal(srdata->controllerAt(s));
+ 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++;
+ }
emit setSingleRunInfo(srdata->methodName(), srdata->operatorName(), srdata->sampleInfo(), srdata->date().toString() +" "+ srdata->time().toString());
Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, "Single run changed.");
std::shared_ptr<SingleRunData> Sequence::at(const std::string& key)
{
- std::unordered_map<std::string, std::shared_ptr<SingleRunData>>::iterator it = m_singleRuns.find(key);
+ std::map<std::string, std::shared_ptr<SingleRunData>>::iterator it = m_singleRuns.find(key);
if (it == m_singleRuns.end())
return nullptr;
else
bool Sequence::setSelectedRun(const std::string& key)
{
- std::unordered_map<std::string, std::shared_ptr<SingleRunData>>::iterator sr = m_singleRuns.find(key);
+ std::map<std::string, std::shared_ptr<SingleRunData>>::iterator sr = m_singleRuns.find(key);
if (sr == m_singleRuns.end())
return false;
#include <vector>
#include <QtCore/QObject>
-typedef std::unordered_map<std::string, std::shared_ptr<SingleRunData>> SingleRunsMap;
+typedef std::map<std::string, std::shared_ptr<SingleRunData>> SingleRunsMap;
class Sequence : public QObject
{
private:
std::string m_selectedRunKey;
- std::unordered_map<std::string, std::shared_ptr<SingleRunData>> m_singleRuns;
+ std::map<std::string, std::shared_ptr<SingleRunData>> m_singleRuns;
signals: