Auto status change to "Under Review"
@@ -27,6 +27,8 public: | |||
|
27 | 27 | static const QString NAME_DATA_KEY; |
|
28 | 28 | /// Key associated with the plugin of the item |
|
29 | 29 | static const QString PLUGIN_DATA_KEY; |
|
30 | /// Key associated with a unique id of the plugin | |
|
31 | static const QString ID_DATA_KEY; | |
|
30 | 32 | |
|
31 | 33 | explicit DataSourceItem(DataSourceItemType type, const QString &name); |
|
32 | 34 | explicit DataSourceItem(DataSourceItemType type, QVariantHash data = {}); |
@@ -6,6 +6,7 | |||
|
6 | 6 | |
|
7 | 7 | const QString DataSourceItem::NAME_DATA_KEY = QStringLiteral("name"); |
|
8 | 8 | const QString DataSourceItem::PLUGIN_DATA_KEY = QStringLiteral("plugin"); |
|
9 | const QString DataSourceItem::ID_DATA_KEY = QStringLiteral("uuid"); | |
|
9 | 10 | |
|
10 | 11 | struct DataSourceItem::DataSourceItemPrivate { |
|
11 | 12 | explicit DataSourceItemPrivate(DataSourceItemType type, QVariantHash data) |
@@ -2,6 +2,7 | |||
|
2 | 2 | |
|
3 | 3 | #include <Actions/ActionsGuiController.h> |
|
4 | 4 | #include <Catalogue/CatalogueController.h> |
|
5 | #include <DataSource/DataSourceItem.h> | |
|
5 | 6 | #include <SqpApplication.h> |
|
6 | 7 | #include <Variable/Variable.h> |
|
7 | 8 | #include <Visualization/VisualizationGraphWidget.h> |
@@ -50,7 +51,8 struct CatalogueActionManager::CatalogueActionManagerPrivate { | |||
|
50 | 51 | eventProduct->setTStart(zoneRange.m_TStart); |
|
51 | 52 | eventProduct->setTEnd(zoneRange.m_TEnd); |
|
52 | 53 | |
|
53 |
eventProduct->setProductId( |
|
|
54 | eventProduct->setProductId( | |
|
55 | var->metadata().value(DataSourceItem::ID_DATA_KEY, "UnknownID").toString()); | |
|
54 | 56 | |
|
55 | 57 | productList.push_back(*eventProduct); |
|
56 | 58 | } |
@@ -37,6 +37,7 void associateActions(DataSourceItem &item, const QUuid &dataSourceUid) | |||
|
37 | 37 | auto actionLabel = QObject::tr( |
|
38 | 38 | itemType == DataSourceItemType::PRODUCT ? "Load %1 product" : "Load %1 component"); |
|
39 | 39 | addLoadAction(actionLabel.arg(item.name())); |
|
40 | item.setData(DataSourceItem::ID_DATA_KEY, item.data(AMDA_XML_ID_KEY)); | |
|
40 | 41 | } |
|
41 | 42 | |
|
42 | 43 | auto count = item.childCount(); |
@@ -28,6 +28,7 std::unique_ptr<DataSourceItem> createProductItem(const QVariantHash &data, | |||
|
28 | 28 | |
|
29 | 29 | // Adds plugin name to product metadata |
|
30 | 30 | result->setData(DataSourceItem::PLUGIN_DATA_KEY, DATA_SOURCE_NAME); |
|
31 | result->setData(DataSourceItem::ID_DATA_KEY, data.value(DataSourceItem::NAME_DATA_KEY)); | |
|
31 | 32 | |
|
32 | 33 | auto productName = data.value(DataSourceItem::NAME_DATA_KEY).toString(); |
|
33 | 34 |
General Comments 3
Status change > Approved
You need to be logged in to leave comments.
Login now