28 QAbstractTableModel(parent)
41 return periodicTaskList.size();
51 const unsigned int& row =
index.row();
52 const unsigned int& column =
index.column();
53 std::unique_lock lock(taskListsMutex);
55 if (row >= periodicTaskList.size())
60 const PeriodicTaskIceBase& entry = periodicTaskList.at(row);
69 return QString::fromStdString(entry.name);
85 return entry.intervalMs;
89 return *entry.workloadList.rbegin() * 100.0f;
93 return QString::number(0.001 * entry.lastCycleDuration,
'f', 1);
98 QString date = QString::fromStdString(IceUtil::Time::microSeconds(entry.startTime).toDateTime());
99 return date.remove(0, date.indexOf(
' ') + 1);
105 QString date = QString::fromStdString(IceUtil::Time::microSeconds(entry.lastCycleStartTime).toDateTime());
106 return date.remove(0, date.indexOf(
' ') + 1);
112 return QString::number(entry.threadId);
136 case Qt::DisplayRole:
137 case Qt::ToolTipRole:
138 if (orientation == Qt::Horizontal)
149 return "Interval (ms)";
155 return "Last cycle duration (ms)";
161 return "Last cycle start";
172 return QAbstractTableModel::headerData(section, orientation, role);
179 std::unique_lock lock(taskListsMutex);
180 this->periodicTaskList = periodicTaskList;