@@ -17,10 +17,11 namespace { | |||||
17 | const auto NAME_COLUMN = 0; |
|
17 | const auto NAME_COLUMN = 0; | |
18 | const auto TSTART_COLUMN = 1; |
|
18 | const auto TSTART_COLUMN = 1; | |
19 | const auto TEND_COLUMN = 2; |
|
19 | const auto TEND_COLUMN = 2; | |
20 |
const auto |
|
20 | const auto NBPOINTS_COLUMN = 3; | |
21 |
const auto |
|
21 | const auto UNIT_COLUMN = 4; | |
22 |
const auto |
|
22 | const auto MISSION_COLUMN = 5; | |
23 |
const auto N |
|
23 | const auto PLUGIN_COLUMN = 6; | |
|
24 | const auto NB_COLUMNS = 7; | |||
24 |
|
25 | |||
25 | // Column properties |
|
26 | // Column properties | |
26 | const auto DEFAULT_HEIGHT = 25; |
|
27 | const auto DEFAULT_HEIGHT = 25; | |
@@ -39,9 +40,10 struct ColumnProperties { | |||||
39 | }; |
|
40 | }; | |
40 |
|
41 | |||
41 | const auto COLUMN_PROPERTIES = QHash<int, ColumnProperties>{ |
|
42 | const auto COLUMN_PROPERTIES = QHash<int, ColumnProperties>{ | |
42 |
{NAME_COLUMN, {QObject::tr("Name")}}, |
|
43 | {NAME_COLUMN, {QObject::tr("Name")}}, {TSTART_COLUMN, {QObject::tr("tStart"), 180}}, | |
43 |
{TEND_COLUMN, {QObject::tr("tEnd"), 180}}, |
|
44 | {TEND_COLUMN, {QObject::tr("tEnd"), 180}}, {NBPOINTS_COLUMN, {QObject::tr("Nb points")}}, | |
44 | {MISSION_COLUMN, {QObject::tr("Mission")}}, {PLUGIN_COLUMN, {QObject::tr("Plugin")}}}; |
|
45 | {UNIT_COLUMN, {QObject::tr("Unit")}}, {MISSION_COLUMN, {QObject::tr("Mission")}}, | |
|
46 | {PLUGIN_COLUMN, {QObject::tr("Plugin")}}}; | |||
45 |
|
47 | |||
46 | /// Format for datetimes |
|
48 | /// Format for datetimes | |
47 | const auto DATETIME_FORMAT = QStringLiteral("dd/MM/yyyy \nhh:mm:ss:zzz"); |
|
49 | const auto DATETIME_FORMAT = QStringLiteral("dd/MM/yyyy \nhh:mm:ss:zzz"); | |
@@ -198,6 +200,8 QVariant VariableModel::data(const QModelIndex &index, int role) const | |||||
198 | ? DateUtils::dateTime(range.m_TEnd).toString(DATETIME_FORMAT) |
|
200 | ? DateUtils::dateTime(range.m_TEnd).toString(DATETIME_FORMAT) | |
199 | : QVariant{}; |
|
201 | : QVariant{}; | |
200 | } |
|
202 | } | |
|
203 | case NBPOINTS_COLUMN: | |||
|
204 | return variable->nbPoints(); | |||
201 | case UNIT_COLUMN: |
|
205 | case UNIT_COLUMN: | |
202 | return variable->metadata().value(QStringLiteral("units")); |
|
206 | return variable->metadata().value(QStringLiteral("units")); | |
203 | case MISSION_COLUMN: |
|
207 | case MISSION_COLUMN: |
General Comments 0
You need to be logged in to leave comments.
Login now