#include <QApplication>
#include <QFile>

#include "framelesswindow.h"
#include "global.h"
#include "databasestruct.h"

int main(int argc, char *argv[])
{

    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QApplication app(argc, argv);

    Global::Instance()->setRootDirPath(qApp->applicationDirPath());

    qRegisterMetaType<QList<Entity>>("QList<Entity>");
    qRegisterMetaType<QList<MoveEntity>>("QList<MoveEntity>");
    qRegisterMetaType<MoveEntity>("MoveEntity");

    QFile styleFile(":/style/stylesheet.css");
    if(styleFile.open(QIODevice::ReadOnly))
    {
        qApp->setStyleSheet(styleFile.readAll());
        styleFile.close();
    }

    FramelessWindow w;
    w.show();

    return app.exec();
}
