mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
36 lines
715 B
C
36 lines
715 B
C
|
#ifndef NEXUS_H
|
||
|
#define NEXUS_H
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
class QThread;
|
||
|
class Core;
|
||
|
class Widget;
|
||
|
class AndroidGUI;
|
||
|
|
||
|
/// This class is in charge of connecting various systems together
|
||
|
/// and forwarding signals appropriately to the right objects
|
||
|
/// It is in charge of starting the GUI and the Core
|
||
|
class Nexus : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
void start(); ///< Will initialise the systems (GUI, Core, ...)
|
||
|
|
||
|
static Nexus& getInstance();
|
||
|
static Core* getCore(); ///< Will return 0 if not started
|
||
|
|
||
|
private:
|
||
|
explicit Nexus(QObject *parent = 0);
|
||
|
~Nexus();
|
||
|
|
||
|
private:
|
||
|
Core* core;
|
||
|
QThread* coreThread;
|
||
|
Widget* widget;
|
||
|
AndroidGUI* androidgui;
|
||
|
bool started;
|
||
|
};
|
||
|
|
||
|
#endif // NEXUS_H
|