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