Main cycle init
This commit is contained in:
parent
97d561ce57
commit
2c72beab6a
2 changed files with 17 additions and 8 deletions
|
|
@ -1,11 +1,19 @@
|
||||||
#include "authwindow.h"
|
#include "authwindow.h"
|
||||||
|
|
||||||
|
#include "system/apparatus.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[]) {
|
||||||
{
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
AuthWindow w;
|
|
||||||
|
bool fr = apparatus::isFirstRun();
|
||||||
|
|
||||||
|
apparatus::init();
|
||||||
|
AuthWindow w(nullptr, fr);
|
||||||
w.show();
|
w.show();
|
||||||
return a.exec();
|
int ecode = a.exec();
|
||||||
|
apparatus::shutdown();
|
||||||
|
|
||||||
|
return ecode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,19 @@ private:
|
||||||
void writeGIDS();
|
void writeGIDS();
|
||||||
void loadGIDS();
|
void loadGIDS();
|
||||||
|
|
||||||
void serialize_data();
|
|
||||||
void deserialize_data();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
apparatus();
|
apparatus();
|
||||||
~apparatus();
|
~apparatus();
|
||||||
|
|
||||||
bool isFirstRun();
|
|
||||||
void generate_empty_data();
|
void generate_empty_data();
|
||||||
const auth_system& get_auth_subsystem();
|
const auth_system& get_auth_subsystem();
|
||||||
const object_system& get_object_subsystem();
|
const object_system& get_object_subsystem();
|
||||||
|
|
||||||
|
|
||||||
|
void serialize_data();
|
||||||
|
void deserialize_data();
|
||||||
|
|
||||||
|
static bool isFirstRun();
|
||||||
static apparatus* instance();
|
static apparatus* instance();
|
||||||
static void init();
|
static void init();
|
||||||
static void shutdown();
|
static void shutdown();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue