-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapplication.h
More file actions
42 lines (31 loc) · 899 Bytes
/
Copy pathapplication.h
File metadata and controls
42 lines (31 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2024 Adesh Singh
#ifndef APPLICATION_H
#define APPLICATION_H
#include <QObject>
#include <QQmlEngine>
#include <QQmlApplicationEngine>
#include "themeinfo.h"
class ThemeInfo;
class Application : public QObject
{
Q_OBJECT
public:
explicit Application(QQmlApplicationEngine *engine,QObject *parent = nullptr);
static Application *getInstance(QQmlApplicationEngine *engine = nullptr){
if(_application== nullptr){
qDebug()<<"Application instance created ...";
_application = new Application(engine);
}
return _application;
}
ThemeInfo *getThemeInfo();
public slots:
signals:
private:
void initComponent();
void registerQML();
QQmlApplicationEngine *m_engine;
static Application * _application;
ThemeInfo * _themeInfo;
};
#endif // APPLICATION_H