#include "mainobject.h"
#include "global.h"
#include <QApplication>
#include <QFile>

#include "simplelog.h"

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

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

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


    SimpleLog::Instance()->setShowTime(true);
    addLogStr("program start---------------------------------------------------------------------------------------");

    MainObject o;
    o.showInitWidget();

    return a.exec();
}
