Auto status change to "Under Review"
@@ -64,8 +64,8 MainWindow::MainWindow(QWidget *parent) : QMainWindow{parent}, m_Ui{new Ui::Main | |||
|
64 | 64 | mainToolBar->addAction("A1"); |
|
65 | 65 | |
|
66 | 66 | // Widgets / controllers connections |
|
67 |
connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem |
|
|
68 |
m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem |
|
|
67 | connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)), | |
|
68 | m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem *))); | |
|
69 | 69 | |
|
70 | 70 | /* QLopGUI::registerMenuBar(menuBar()); |
|
71 | 71 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); |
@@ -49,7 +49,7 public slots: | |||
|
49 | 49 | |
|
50 | 50 | signals: |
|
51 | 51 | /// Signal emitted when a structure has been set for a data source |
|
52 |
void dataSourceItemSet(DataSourceItem |
|
|
52 | void dataSourceItemSet(DataSourceItem *dataSourceItem); | |
|
53 | 53 | |
|
54 | 54 | private: |
|
55 | 55 | void waitForFinish(); |
@@ -49,7 +49,7 void DataSourceController::setDataSourceItem( | |||
|
49 | 49 | // Retrieves the data source item to emit the signal with it |
|
50 | 50 | auto it = impl->m_DataSourceItems.find(dataSourceUid); |
|
51 | 51 | if (it != impl->m_DataSourceItems.end()) { |
|
52 |
emit dataSourceItemSet( |
|
|
52 | emit dataSourceItemSet(it->second.get()); | |
|
53 | 53 | } |
|
54 | 54 | } |
|
55 | 55 | else { |
@@ -26,7 +26,7 void TestDataSourceController::testSetDataSourceItem() | |||
|
26 | 26 | DataSourceController dataSourceController{}; |
|
27 | 27 | |
|
28 | 28 | // Spy to test controllers' signals |
|
29 |
QSignalSpy signalSpy{&dataSourceController, SIGNAL(dataSourceItemSet( |
|
|
29 | QSignalSpy signalSpy{&dataSourceController, SIGNAL(dataSourceItemSet(DataSourceItem *))}; | |
|
30 | 30 | |
|
31 | 31 | // Create a data source item |
|
32 | 32 | auto source1Name = QStringLiteral("Source1"); |
@@ -21,9 +21,9 public slots: | |||
|
21 | 21 | /** |
|
22 | 22 | * Adds a data source. An item associated to the data source is created and then added to the |
|
23 | 23 | * representation tree |
|
24 | * @param dataSource the data source to add | |
|
24 | * @param dataSource the data source to add. The pointer has to be not null | |
|
25 | 25 | */ |
|
26 |
void addDataSource(DataSourceItem |
|
|
26 | void addDataSource(DataSourceItem *dataSource) noexcept; | |
|
27 | 27 | |
|
28 | 28 | private: |
|
29 | 29 | class DataSourceWidgetPrivate; |
@@ -20,6 +20,13 QIcon itemIcon(const DataSourceItem *dataSource) | |||
|
20 | 20 | // No action |
|
21 | 21 | break; |
|
22 | 22 | } |
|
23 | ||
|
24 | qCWarning(LOG_DataSourceTreeWidgetItem()) | |
|
25 | << QObject::tr("Can't set data source icon : unknown data source type"); | |
|
26 | } | |
|
27 | else { | |
|
28 | qCWarning(LOG_DataSourceTreeWidgetItem()) | |
|
29 | << QObject::tr("Can't set data source icon : the data source is null"); | |
|
23 | 30 | } |
|
24 | 31 | |
|
25 | 32 | // Default cases |
@@ -53,9 +53,11 DataSourceWidget::DataSourceWidget(QWidget *parent) | |||
|
53 | 53 | { |
|
54 | 54 | } |
|
55 | 55 | |
|
56 |
void DataSourceWidget::addDataSource(DataSourceItem |
|
|
56 | void DataSourceWidget::addDataSource(DataSourceItem *dataSource) noexcept | |
|
57 | 57 | { |
|
58 | 58 | // Creates the item associated to the source and adds it to the tree widget. The tree widget |
|
59 | 59 | // takes the ownership of the item |
|
60 | impl->m_Ui->treeWidget->addTopLevelItem(createTreeWidgetItem(&dataSource)); | |
|
60 | if (dataSource) { | |
|
61 | impl->m_Ui->treeWidget->addTopLevelItem(createTreeWidgetItem(dataSource)); | |
|
62 | } | |
|
61 | 63 | } |
General Comments 3
Pull request updated. Auto status change to "Under Review"
Changed commits: * 6 added * 3 removed Changed files: * A gui/src/Visualization/VisualizationWidget.cpp * A gui/include/SidePane/SqpSidePane.h * A gui/include/Visualization/VisualizationGraphWidget.h * A gui/include/Visualization/VisualizationTabWidget.h * A gui/include/Visualization/VisualizationWidget.h * A gui/include/Visualization/VisualizationZoneWidget.h * A gui/include/Visualization/qcustomplot.h * A gui/src/SidePane/SqpSidePane.cpp * A gui/src/Visualization/VisualizationGraphWidget.cpp * A gui/src/Visualization/VisualizationTabWidget.cpp * A gui/src/Visualization/VisualizationZoneWidget.cpp * A gui/src/Visualization/qcustomplot.cpp * M gui/include/DataSource/DataSourceWidget.h * M gui/src/DataSource/DataSourceTreeWidgetItem.cpp * M gui/src/DataSource/DataSourceWidget.cpp * M app/src/Main.cpp * M app/src/MainWindow.cpp * M app/ui/MainWindow.ui * M core/include/DataSource/DataSourceController.h * M core/src/DataSource/DataSourceController.cpp * M core/tests/DataSource/TestDataSourceController.cpp * M gui/ui/visualization/VisualizationWidget.ui * M gui/vera-exclusions/exclusions.txt * M gui/src/visualization/VisualizationWidget.cpp * R cmake/sciqlop_package_qt.cmake * R core/include/Plugin/PluginManager.h * R core/include/Visualization/VisualizationController.h * R core/src/Plugin/PluginManager.cpp * R core/src/Visualization/VisualizationController.cpp * R gui/include/sidepane/SqpSidePane.h * R gui/include/visualization/VisualizationGraphWidget.h * R gui/include/visualization/VisualizationTabWidget.h * R gui/include/visualization/VisualizationWidget.h * R gui/include/visualization/VisualizationZoneWidget.h * R gui/include/visualization/qcustomplot.h * R gui/src/sidepane/SqpSidePane.cpp * R gui/src/visualization/VisualizationGraphWidget.cpp * R gui/src/visualization/VisualizationTabWidget.cpp * R gui/src/visualization/VisualizationZoneWidget.cpp * R gui/src/visualization/qcustomplot.cpp * R gui/ui/sidepane/SqpSidePane.ui * R gui/ui/visualization/VisualizationGraphWidget.ui * R gui/ui/visualization/VisualizationTabWidget.ui * R gui/ui/visualization/VisualizationZoneWidget.ui * R plugin/CMakeLists.txt * R plugin/cmake/Findsciqlop-plugin.cmake * R plugin/include/Plugin/IPlugin.h * R app/CMakeLists.txt * R app/include/MainWindow.h * R app/vera-exclusions/exclusions.txt * R cmake/sciqlop_applications.cmake * R core/CMakeLists.txt * R core/include/Common/spimpl.h * R gui/CMakeLists.txt * R gui/include/SqpApplication.h * R gui/src/SqpApplication.cpp * R app/src/mainwindow.ui
Status change > Approved
You need to be logged in to leave comments.
Login now