2023-03-17 13:58:38 +00:00
|
|
|
#include "xapp.h"
|
2023-02-26 14:44:00 +00:00
|
|
|
#include <QDebug>
|
|
|
|
#include <iostream>
|
2023-08-27 14:09:46 +00:00
|
|
|
#include <xmlconfig.h>
|
2023-02-26 14:44:00 +00:00
|
|
|
|
2023-03-17 13:58:38 +00:00
|
|
|
using namespace Schedule;
|
2023-08-27 14:09:46 +00:00
|
|
|
using namespace Config;
|
2023-02-26 14:44:00 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
XApp::XApp(int argc, char **argv) : QApplication(argc, argv) { global_configration->loadFile("./software.config"); }
|
2023-02-26 14:44:00 +00:00
|
|
|
|
2023-03-17 13:58:38 +00:00
|
|
|
bool XApp::notify(QObject *receiver, QEvent *event) {
|
2023-02-26 14:44:00 +00:00
|
|
|
try {
|
|
|
|
return QApplication::notify(receiver, event);
|
|
|
|
} catch (std::exception *x) {
|
|
|
|
std::cout << QString("XApplication::").toLocal8Bit().toStdString() << x->what() << std::endl;
|
|
|
|
delete x;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2023-03-17 13:58:38 +00:00
|
|
|
|
|
|
|
CommandsDispatcher *const XApp::disp_core = new CommandsDispatcher(QDir::home(), true);
|
2023-08-27 14:09:46 +00:00
|
|
|
Configration *const XApp::global_configration = new XMLConfig();
|