@@ -1,38 +1,43 | |||||
1 | #ifndef SCIQLOP_SQPAPPLICATION_H |
|
1 | #ifndef SCIQLOP_SQPAPPLICATION_H | |
2 | #define SCIQLOP_SQPAPPLICATION_H |
|
2 | #define SCIQLOP_SQPAPPLICATION_H | |
3 |
|
3 | |||
4 | #include "SqpApplication.h" |
|
4 | #include "SqpApplication.h" | |
5 |
|
5 | |||
6 | #include <QApplication> |
|
6 | #include <QApplication> | |
7 | #include <QLoggingCategory> |
|
7 | #include <QLoggingCategory> | |
8 |
|
8 | |||
9 | #include <Common/spimpl.h> |
|
9 | #include <Common/spimpl.h> | |
10 |
|
10 | |||
11 | Q_DECLARE_LOGGING_CATEGORY(LOG_SqpApplication) |
|
11 | Q_DECLARE_LOGGING_CATEGORY(LOG_SqpApplication) | |
12 |
|
12 | |||
|
13 | #if defined(sqpApp) | |||
|
14 | #undef sqpApp | |||
|
15 | #endif | |||
|
16 | #define sqpApp (static_cast<SqpApplication *>(QCoreApplication::instance())) | |||
|
17 | ||||
13 | class DataSourceController; |
|
18 | class DataSourceController; | |
14 |
|
19 | |||
15 | /** |
|
20 | /** | |
16 | * @brief The SqpApplication class aims to make the link between SciQlop |
|
21 | * @brief The SqpApplication class aims to make the link between SciQlop | |
17 | * and its plugins. This is the intermediate class that SciQlop has to use |
|
22 | * and its plugins. This is the intermediate class that SciQlop has to use | |
18 | * in the way to connect a data source. Please first use load method to initialize |
|
23 | * in the way to connect a data source. Please first use load method to initialize | |
19 | * a plugin specified by its metadata name (JSON plugin source) then others specifics |
|
24 | * a plugin specified by its metadata name (JSON plugin source) then others specifics | |
20 | * method will be able to access it. |
|
25 | * method will be able to access it. | |
21 | * You can load a data source driver plugin then create a data source. |
|
26 | * You can load a data source driver plugin then create a data source. | |
22 | */ |
|
27 | */ | |
23 |
|
28 | |||
24 | class SqpApplication : public QApplication { |
|
29 | class SqpApplication : public QApplication { | |
25 | Q_OBJECT |
|
30 | Q_OBJECT | |
26 | public: |
|
31 | public: | |
27 | explicit SqpApplication(int &argc, char **argv); |
|
32 | explicit SqpApplication(int &argc, char **argv); | |
28 | virtual ~SqpApplication(); |
|
33 | virtual ~SqpApplication(); | |
29 | void initialize(); |
|
34 | void initialize(); | |
30 |
|
35 | |||
31 | DataSourceController &dataSourceController() const noexcept; |
|
36 | DataSourceController &dataSourceController() const noexcept; | |
32 |
|
37 | |||
33 | private: |
|
38 | private: | |
34 | class SqpApplicationPrivate; |
|
39 | class SqpApplicationPrivate; | |
35 | spimpl::unique_impl_ptr<SqpApplicationPrivate> impl; |
|
40 | spimpl::unique_impl_ptr<SqpApplicationPrivate> impl; | |
36 | }; |
|
41 | }; | |
37 |
|
42 | |||
38 | #endif // SCIQLOP_SQPAPPLICATION_H |
|
43 | #endif // SCIQLOP_SQPAPPLICATION_H |
General Comments 0
You need to be logged in to leave comments.
Login now