You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <QTranslator>
|
|
|
|
|
#include "widget/logindialog.h"
|
|
|
|
|
#include "quihelper.h"
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
QUIHelper::initMain();
|
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
QUIHelper::setFont();
|
|
|
|
|
QUIHelper::setCode();
|
|
|
|
|
|
|
|
|
|
QString appDir = QApplication::applicationDirPath();
|
|
|
|
|
QTranslator translator;
|
|
|
|
|
|
|
|
|
|
QString transPath = appDir + QLatin1String("/languages/") + "treasurefinder_zh_CN.qm";
|
|
|
|
|
|
|
|
|
|
if (translator.load(transPath))
|
|
|
|
|
{
|
|
|
|
|
app.installTranslator(&translator);
|
|
|
|
|
}
|
|
|
|
|
LoginDialog login;
|
|
|
|
|
if(login.exec() == QDialog::Accepted)
|
|
|
|
|
{
|
|
|
|
|
MainWindow w;
|
|
|
|
|
w.SetUserInfo(login.GetUserInfo());
|
|
|
|
|
w.LoadTrendsData();
|
|
|
|
|
QUIHelper::setFormInCenter(&login);
|
|
|
|
|
w.show();
|
|
|
|
|
return app.exec();
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|