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