##// END OF EJS Templates
Changes data source item icons (1)...
Alexandre Leroux -
r344:93d5f7162981
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
@@ -11,7 +11,7 class DataSourceItemAction;
11 11 /**
12 12 * Possible types of an item
13 13 */
14 enum class DataSourceItemType { NODE, PRODUCT };
14 enum class DataSourceItemType { NODE, PRODUCT, COMPONENT };
15 15
16 16 /**
17 17 * @brief The DataSourceItem class aims to represent a structure element of a data source.
@@ -1,5 +1,8
1 1 <RCC>
2 2 <qresource prefix="/">
3 <file>icones/dataSourceComponent.png</file>
4 <file>icones/dataSourceNode.png</file>
5 <file>icones/dataSourceProduct.png</file>
3 6 <file>icones/delete.png</file>
4 7 <file>icones/openInspector.png</file>
5 8 <file>icones/next.png</file>
@@ -2,8 +2,6
2 2 #include <DataSource/DataSourceItemAction.h>
3 3 #include <DataSource/DataSourceTreeWidgetItem.h>
4 4
5 #include <SqpApplication.h>
6
7 5 #include <QAction>
8 6
9 7 Q_LOGGING_CATEGORY(LOG_DataSourceTreeWidgetItem, "DataSourceTreeWidgetItem")
@@ -19,9 +17,11 QIcon itemIcon(const DataSourceItem *dataSource)
19 17 auto dataSourceType = dataSource->type();
20 18 switch (dataSourceType) {
21 19 case DataSourceItemType::NODE:
22 return sqpApp->style()->standardIcon(QStyle::SP_DirIcon);
20 return QIcon{":/icones/dataSourceNode.png"};
23 21 case DataSourceItemType::PRODUCT:
24 return sqpApp->style()->standardIcon(QStyle::SP_FileIcon);
22 return QIcon{":/icones/dataSourceProduct.png"};
23 case DataSourceItemType::COMPONENT:
24 return QIcon{":/icones/dataSourceComponent.png"};
25 25 default:
26 26 // No action
27 27 break;
General Comments 0
You need to be logged in to leave comments. Login now