@@ -0,0 +1,12 | |||||
|
1 | #ifndef SCIQLOP_MOCKPLUGINGLOBAL_H | |||
|
2 | #define SCIQLOP_MOCKPLUGINGLOBAL_H | |||
|
3 | ||||
|
4 | #include <QtCore/QtGlobal> | |||
|
5 | ||||
|
6 | #if defined(MOCKPLUGIN_LIB) | |||
|
7 | #define SCIQLOP_MOCKPLUGIN_EXPORT Q_DECL_EXPORT | |||
|
8 | #else | |||
|
9 | #define SCIQLOP_MOCKPLUGIN_EXPORT Q_DECL_IMPORT | |||
|
10 | #endif | |||
|
11 | ||||
|
12 | #endif // SCIQLOP_MOCKPLUGINGLOBAL_H |
@@ -38,6 +38,9 FILE (GLOB_RECURSE PLUGIN_FILE ${RESOURCES_DIR}/mockplugin.json) | |||||
38 | # |
|
38 | # | |
39 | # Compile the library |
|
39 | # Compile the library | |
40 | # |
|
40 | # | |
|
41 | ||||
|
42 | ADD_DEFINITIONS(-DMOCKPLUGIN_LIB) | |||
|
43 | ||||
41 | FILE (GLOB_RECURSE MODULE_SOURCES |
|
44 | FILE (GLOB_RECURSE MODULE_SOURCES | |
42 | ${INCLUDES_DIR}/*.h |
|
45 | ${INCLUDES_DIR}/*.h | |
43 | ${SOURCES_DIR}/*.c |
|
46 | ${SOURCES_DIR}/*.c |
@@ -1,6 +1,8 | |||||
1 | #ifndef SCIQLOP_COSINUSPROVIDER_H |
|
1 | #ifndef SCIQLOP_COSINUSPROVIDER_H | |
2 | #define SCIQLOP_COSINUSPROVIDER_H |
|
2 | #define SCIQLOP_COSINUSPROVIDER_H | |
3 |
|
3 | |||
|
4 | #include "MockPluginGlobal.h" | |||
|
5 | ||||
4 | #include <Data/IDataProvider.h> |
|
6 | #include <Data/IDataProvider.h> | |
5 |
|
7 | |||
6 | #include <QLoggingCategory> |
|
8 | #include <QLoggingCategory> | |
@@ -10,7 +12,7 Q_DECLARE_LOGGING_CATEGORY(LOG_CosinusProvider) | |||||
10 | /** |
|
12 | /** | |
11 | * @brief The CosinusProvider class is an example of how a data provider can generate data |
|
13 | * @brief The CosinusProvider class is an example of how a data provider can generate data | |
12 | */ |
|
14 | */ | |
13 | class CosinusProvider : public IDataProvider { |
|
15 | class SCIQLOP_MOCKPLUGIN_EXPORT CosinusProvider : public IDataProvider { | |
14 | public: |
|
16 | public: | |
15 | /// @sa IDataProvider::retrieveData() |
|
17 | /// @sa IDataProvider::retrieveData() | |
16 | std::shared_ptr<IDataSeries> |
|
18 | std::shared_ptr<IDataSeries> |
@@ -1,6 +1,8 | |||||
1 | #ifndef SCIQLOP_MOCKPLUGIN_H |
|
1 | #ifndef SCIQLOP_MOCKPLUGIN_H | |
2 | #define SCIQLOP_MOCKPLUGIN_H |
|
2 | #define SCIQLOP_MOCKPLUGIN_H | |
3 |
|
3 | |||
|
4 | #include "MockPluginGlobal.h" | |||
|
5 | ||||
4 | #include <Plugin/IPlugin.h> |
|
6 | #include <Plugin/IPlugin.h> | |
5 |
|
7 | |||
6 | #include <QLoggingCategory> |
|
8 | #include <QLoggingCategory> | |
@@ -11,7 +13,7 Q_DECLARE_LOGGING_CATEGORY(LOG_MockPlugin) | |||||
11 |
|
13 | |||
12 | class DataSourceItem; |
|
14 | class DataSourceItem; | |
13 |
|
15 | |||
14 | class MockPlugin : public QObject, public IPlugin { |
|
16 | class SCIQLOP_MOCKPLUGIN_EXPORT MockPlugin : public QObject, public IPlugin { | |
15 | Q_OBJECT |
|
17 | Q_OBJECT | |
16 | Q_INTERFACES(IPlugin) |
|
18 | Q_INTERFACES(IPlugin) | |
17 | Q_PLUGIN_METADATA(IID "sciqlop.plugin.IPlugin" FILE "mockplugin.json") |
|
19 | Q_PLUGIN_METADATA(IID "sciqlop.plugin.IPlugin" FILE "mockplugin.json") |
General Comments 0
You need to be logged in to leave comments.
Login now