Auto status change to "Under Review"
@@ -1,70 +1,72 | |||
|
1 | 1 | #ifndef SCIQLOP_IDATAPROVIDER_H |
|
2 | 2 | #define SCIQLOP_IDATAPROVIDER_H |
|
3 | 3 | |
|
4 | 4 | #include <memory> |
|
5 | 5 | |
|
6 | 6 | #include <QObject> |
|
7 | 7 | #include <QUuid> |
|
8 | 8 | |
|
9 | 9 | #include <Common/MetaTypes.h> |
|
10 | 10 | |
|
11 | 11 | #include <Data/SqpDateTime.h> |
|
12 | 12 | |
|
13 | #include <functional> | |
|
14 | ||
|
13 | 15 | class DataProviderParameters; |
|
14 | 16 | class IDataSeries; |
|
15 | 17 | class QNetworkReply; |
|
16 | 18 | class QNetworkRequest; |
|
17 | 19 | |
|
18 | 20 | /** |
|
19 | 21 | * @brief The IDataProvider interface aims to declare a data provider. |
|
20 | 22 | * |
|
21 | 23 | * A data provider is an entity that generates data and returns it according to various parameters |
|
22 | 24 | * (time interval, product to retrieve the data, etc.) |
|
23 | 25 | * |
|
24 | 26 | * @sa IDataSeries |
|
25 | 27 | */ |
|
26 | 28 | class IDataProvider : public QObject { |
|
27 | 29 | |
|
28 | 30 | Q_OBJECT |
|
29 | 31 | public: |
|
30 | 32 | virtual ~IDataProvider() noexcept = default; |
|
31 | 33 | |
|
32 | 34 | /** |
|
33 | 35 | * @brief requestDataLoading provide datas for the data identified by identifier and parameters |
|
34 | 36 | */ |
|
35 | 37 | virtual void requestDataLoading(QUuid identifier, const DataProviderParameters ¶meters) = 0; |
|
36 | 38 | |
|
37 | 39 | /** |
|
38 | 40 | * @brief requestDataAborting stop data loading of the data identified by identifier |
|
39 | 41 | */ |
|
40 | 42 | virtual void requestDataAborting(QUuid identifier) = 0; |
|
41 | 43 | |
|
42 | 44 | signals: |
|
43 | 45 | /** |
|
44 | 46 | * @brief dataProvided send dataSeries under dateTime and that corresponds of the data |
|
45 | 47 | * identified by identifier |
|
46 | 48 | */ |
|
47 | 49 | void dataProvided(QUuid identifier, std::shared_ptr<IDataSeries> dateSerie, |
|
48 | 50 | const SqpDateTime &dateTime); |
|
49 | 51 | |
|
50 | 52 | /** |
|
51 | 53 | * @brief dataProvided send dataSeries under dateTime and that corresponds of the data |
|
52 | 54 | * identified by identifier |
|
53 | 55 | */ |
|
54 | 56 | void dataProvidedProgress(QUuid identifier, double progress); |
|
55 | 57 | |
|
56 | 58 | |
|
57 | 59 | /** |
|
58 | 60 | * @brief requestConstructed send a request for the data identified by identifier |
|
59 | 61 | * @callback is the methode call by the reply of the request when it is finished. |
|
60 | 62 | */ |
|
61 | 63 | void requestConstructed(const QNetworkRequest &request, QUuid identifier, |
|
62 | 64 | std::function<void(QNetworkReply *, QUuid)> callback); |
|
63 | 65 | }; |
|
64 | 66 | |
|
65 | 67 | // Required for using shared_ptr in signals/slots |
|
66 | 68 | SCIQLOP_REGISTER_META_TYPE(IDATAPROVIDER_PTR_REGISTRY, std::shared_ptr<IDataProvider>) |
|
67 | 69 | SCIQLOP_REGISTER_META_TYPE(IDATAPROVIDER_FUNCTION_REGISTRY, |
|
68 | 70 | std::function<void(QNetworkReply *, QUuid)>) |
|
69 | 71 | |
|
70 | 72 | #endif // SCIQLOP_IDATAPROVIDER_H |
@@ -1,48 +1,50 | |||
|
1 | 1 | #ifndef SCIQLOP_DATASOURCEITEMACTION_H |
|
2 | 2 | #define SCIQLOP_DATASOURCEITEMACTION_H |
|
3 | 3 | |
|
4 | 4 | #include <Common/spimpl.h> |
|
5 | 5 | |
|
6 | 6 | #include <QLoggingCategory> |
|
7 | 7 | #include <QObject> |
|
8 | 8 | |
|
9 | #include <functional> | |
|
10 | ||
|
9 | 11 | Q_DECLARE_LOGGING_CATEGORY(LOG_DataSourceItemAction) |
|
10 | 12 | |
|
11 | 13 | class DataSourceItem; |
|
12 | 14 | |
|
13 | 15 | /** |
|
14 | 16 | * @brief The DataSourceItemAction class represents an action on a data source item. |
|
15 | 17 | * |
|
16 | 18 | * An action is a function that will be executed when the slot execute() is called. |
|
17 | 19 | */ |
|
18 | 20 | class DataSourceItemAction : public QObject { |
|
19 | 21 | |
|
20 | 22 | Q_OBJECT |
|
21 | 23 | |
|
22 | 24 | public: |
|
23 | 25 | /// Signature of the function associated to the action |
|
24 | 26 | using ExecuteFunction = std::function<void(DataSourceItem &dataSourceItem)>; |
|
25 | 27 | |
|
26 | 28 | /** |
|
27 | 29 | * Ctor |
|
28 | 30 | * @param name the name of the action |
|
29 | 31 | * @param fun the function that will be called when the action is executed |
|
30 | 32 | * @sa execute() |
|
31 | 33 | */ |
|
32 | 34 | explicit DataSourceItemAction(const QString &name, ExecuteFunction fun); |
|
33 | 35 | |
|
34 | 36 | QString name() const noexcept; |
|
35 | 37 | |
|
36 | 38 | /// Sets the data source item concerned by the action |
|
37 | 39 | void setDataSourceItem(DataSourceItem *dataSourceItem) noexcept; |
|
38 | 40 | |
|
39 | 41 | public slots: |
|
40 | 42 | /// Executes the action |
|
41 | 43 | void execute(); |
|
42 | 44 | |
|
43 | 45 | private: |
|
44 | 46 | class DataSourceItemActionPrivate; |
|
45 | 47 | spimpl::unique_impl_ptr<DataSourceItemActionPrivate> impl; |
|
46 | 48 | }; |
|
47 | 49 | |
|
48 | 50 | #endif // SCIQLOP_DATASOURCEITEMACTION_H |
General Comments 3
Pull request updated. Auto status change to "Under Review"
Changed commits: * 3 added * 0 removed Changed files: * A plugins/amda/tests-resources/TestAmdaResultParser/FileNotFound.txt * M gui/src/Visualization/operations/RescaleAxeOperation.cpp * M app/src/MainWindow.cpp * M core/include/Data/IDataProvider.h * M core/include/DataSource/DataSourceItemAction.h * M core/include/Variable/VariableController.h * M core/include/Variable/VariableModel.h * M core/include/Visualization/VisualizationController.h * M core/src/Network/NetworkController.cpp * M core/src/Variable/Variable.cpp * M core/src/Variable/VariableController.cpp * M core/src/Variable/VariableModel.cpp * M gui/include/Visualization/VisualizationGraphWidget.h * M gui/include/Visualization/VisualizationWidget.h * M gui/src/SqpApplication.cpp * M gui/src/Variable/VariableInspectorWidget.cpp * M gui/src/Visualization/VisualizationGraphHelper.cpp * M gui/src/Visualization/VisualizationGraphWidget.cpp * M gui/src/Visualization/VisualizationWidget.cpp * M gui/src/Visualization/VisualizationZoneWidget.cpp * M plugins/amda/include/AmdaProvider.h * M plugins/amda/src/AmdaProvider.cpp * M plugins/amda/src/AmdaResultParser.cpp * M plugins/amda/tests/TestAmdaResultParser.cpp * M plugins/mockplugin/include/CosinusProvider.h * M plugins/mockplugin/src/CosinusProvider.cpp * R COPYING * R app/ui/MainWindow.ui * R cmake/sciqlop_package_qt.cmake * R core/include/Common/MetaTypes.h * R core/include/Data/ArrayData.h * R core/include/Data/DataProviderParameters.h * R core/include/Data/DataSeries.h * R core/include/Data/IDataSeries.h * R core/include/Data/ScalarSeries.h * R core/include/Data/SqpDateTime.h * R core/include/Network/NetworkController.h * R core/include/Plugin/PluginManager.h * R core/include/Time/TimeController.h * R core/include/Variable/Variable.h * R core/include/Variable/VariableCacheController.h * R core/src/Data/ScalarSeries.cpp * R core/src/DataSource/DataSourceItemAction.cpp * R core/src/Plugin/PluginManager.cpp * R core/src/Time/TimeController.cpp * R core/src/Variable/VariableCacheController.cpp * R core/src/Visualization/VisualizationController.cpp * R core/tests/Variable/TestVariableCacheController.cpp * R gui/include/DataSource/DataSourceTreeWidgetItem.h * R gui/include/DataSource/DataSourceWidget.h * R gui/include/SidePane/SqpSidePane.h * R gui/include/TimeWidget/TimeWidget.h * R gui/include/Variable/VariableInspectorWidget.h * R gui/include/Variable/VariableMenuHeaderWidget.h * R gui/include/Visualization/IVariableContainer.h * R gui/include/Visualization/IVisualizationWidget.h * R gui/include/Visualization/IVisualizationWidgetVisitor.h * R gui/include/Visualization/VisualizationGraphHelper.h * R gui/include/Visualization/VisualizationTabWidget.h * R gui/include/Visualization/VisualizationZoneWidget.h * R gui/include/Visualization/operations/GenerateVariableMenuOperation.h * R gui/include/Visualization/operations/MenuBuilder.h * R gui/include/Visualization/operations/RemoveVariableOperation.h * R gui/include/Visualization/qcustomplot.h * R gui/resources/icones/dataSourceComponent.png * R gui/resources/icones/dataSourceNode.png * R gui/resources/icones/dataSourceProduct.png * R gui/resources/icones/dataSourceRoot.png * R gui/resources/icones/delete.png * R gui/resources/icones/next.png * R gui/resources/icones/openInspector.png * R gui/resources/icones/plot.png * R gui/resources/icones/previous.png * R gui/resources/icones/sciqlop2PNG_1024.png * R gui/resources/icones/unplot.png * R gui/resources/sqpguiresources.qrc * R gui/src/DataSource/DataSourceTreeWidgetItem.cpp * R gui/src/DataSource/DataSourceWidget.cpp * R gui/src/SidePane/SqpSidePane.cpp * R gui/src/TimeWidget/TimeWidget.cpp * R gui/src/Variable/VariableMenuHeaderWidget.cpp * R gui/src/Visualization/VisualizationTabWidget.cpp * R gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp * R gui/src/Visualization/operations/MenuBuilder.cpp * R gui/src/Visualization/operations/RemoveVariableOperation.cpp * R gui/src/Visualization/qcustomplot.cpp * R gui/ui/DataSource/DataSourceWidget.ui * R gui/ui/SidePane/SqpSidePane.ui * R gui/ui/TimeWidget/TimeWidget.ui * R gui/ui/Variable/VariableInspectorWidget.ui * R gui/ui/Variable/VariableMenuHeaderWidget.ui * R gui/ui/Visualization/VisualizationGraphWidget.ui * R gui/ui/Visualization/VisualizationTabWidget.ui * R gui/ui/Visualization/VisualizationWidget.ui * R gui/ui/Visualization/VisualizationZoneWidget.ui * R gui/vera-exclusions/exclusions.txt * R plugin/CMakeLists.txt * R plugin/cmake/Findsciqlop-plugin.cmake * R plugin/include/Plugin/IPlugin.h * R plugins/amda/CMakeLists.txt * R plugins/amda/cmake/Findsciqlop-amda.cmake * R plugins/amda/include/AmdaDefs.h * R plugins/amda/include/AmdaGlobal.h * R plugins/amda/include/AmdaParser.h * R plugins/amda/include/AmdaPlugin.h * R plugins/amda/include/AmdaResultParser.h * R plugins/amda/resources/amda.json * R plugins/amda/resources/amdaresources.qrc * R plugins/amda/resources/samples/AmdaSample.json * R plugins/amda/src/AmdaDefs.cpp * R plugins/amda/src/AmdaParser.cpp * R plugins/amda/src/AmdaPlugin.cpp * R plugins/amda/tests-resources/TestAmdaParser/TwoRootsFile.json * R plugins/amda/tests-resources/TestAmdaParser/ValidFile1.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootKey.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootType.json * R plugins/amda/tests-resources/TestAmdaResultParser/NaNValue.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NoUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/TooManyValues.txt * R plugins/amda/tests-resources/TestAmdaResultParser/ValidScalar1.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongDate.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongValue.txt * R plugins/amda/tests/TestAmdaParser.cpp * R plugins/mockplugin/CMakeLists.txt * R plugins/mockplugin/cmake/Findsciqlop-mockplugin.cmake * R plugins/mockplugin/include/MockPlugin.h * R plugins/mockplugin/include/MockPluginGlobal.h * R plugins/mockplugin/resources/mockplugin.json * R plugins/mockplugin/src/MockPlugin.cpp * R README.md * R app/CMakeLists.txt * R app/include/MainWindow.h * R app/src/Main.cpp * R app/vera-exclusions/exclusions.txt * R cmake/sciqlop.cmake * R cmake/sciqlop_applications.cmake * R cmake/sciqlop_package.cmake * R cmake/sciqlop_params.cmake * R core/CMakeLists.txt * R core/include/Common/spimpl.h * R core/include/DataSource/DataSourceController.h * R core/include/DataSource/DataSourceItem.h * R core/src/DataSource/DataSourceController.cpp * R core/src/DataSource/DataSourceItem.cpp * R core/tests/DataSource/TestDataSourceController.cpp * R core/vera-exclusions/exclusions.txt * R formatting/cmake/use_clangformat.cmake * R formatting/vera-exclusions/exclusions.txt * R gui/CMakeLists.txt * R gui/include/SqpApplication.h * R LICENSE * R app/src/mainwindow.cpp * R app/src/mainwindow.ui
Status change > Approved
You need to be logged in to leave comments.
Login now