Debian Codegraph @

Dekko/app/Dekko.h

raw symbols SCIP
1 /* Copyright (C) 2016 - 2017 Dan Chapman <[email protected]>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef DEKKO_H
19 #define DEKKO_H
20
21 #include <QObject>
22 #include <QLoggingCategory>
23 //#include <QGuiApplication>
24 #include <QApplication>
25 #include <QPointer>
26 #include <QProcess>
27 #include <QtQuick/QQuickView>
28 #include <QQmlApplicationEngine>
29 #include <MsgPartQNAMFactory.h>
30 #include <QCommandLineParser>
31 #include <QQmlApplicationEngine>
32 #include <ServiceRegistry.h>
33
34 #ifdef SERVER_AS_QTHREAD
35 #include <messageserver.h>
36 #endif
37
38 Q_DECLARE_LOGGING_CATEGORY(DEKKO_MAIN)
39
40 class Dekko : public QApplication
41 {
42 Q_OBJECT
43 public:
44 Dekko(int &argc, char **argv);
45 ~Dekko();
46 /** @short should be run before call to exec() */
47 bool setup();
48 bool isServerRunning();
49 bool startServer();
50
51 bool isWorkerRunning();
52 bool startWorker();
53
54 Q_INVOKABLE void trimCache();
55
56 signals:
57
58 public slots:
59
60 private slots:
61 void serverProcessError(QProcess::ProcessError error);
62 void workerProcessError(QProcess::ProcessError error);
63
64 protected:
65 void loadPlugins();
66
67 private:
68 ServiceRegistry *m_serviceRegistry;
69 #ifdef SERVER_AS_QTHREAD
70 MessageServerThread *m_serverThread;
71 #else
72 QProcess *m_server;
73 QProcess *m_worker;
74 #endif
75 MsgPartQNAMFactory m_partqnam;
76 bool devMode;
77 bool m_verboseLogging;
78 QCommandLineParser parser;
79 QQmlApplicationEngine m_engine;
80
81 };
82
83 #endif // DEKKO_H