2016-07-21 12:46:05 +03:00
|
|
|
#include <QApplication>
|
|
|
|
#include <LimeReport>
|
2017-12-10 16:06:56 +03:00
|
|
|
#include <QTranslator>
|
2016-07-21 12:46:05 +03:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
2017-12-10 16:06:56 +03:00
|
|
|
|
|
|
|
QTranslator limeReportTranslator;
|
|
|
|
QString translationPath = QApplication::applicationDirPath();
|
|
|
|
translationPath.append("/languages");
|
|
|
|
limeReportTranslator.load("limereport_"+QLocale::system().name(),translationPath);
|
|
|
|
a.installTranslator(&limeReportTranslator);
|
|
|
|
|
|
|
|
QTranslator qtTranslator;
|
|
|
|
qtTranslator.load("qt_" + QLocale::system().name(),translationPath);
|
|
|
|
a.installTranslator(&qtTranslator);
|
|
|
|
|
2016-07-21 12:46:05 +03:00
|
|
|
LimeReport::ReportEngine report;
|
2017-01-31 17:31:28 +03:00
|
|
|
if (a.arguments().count()>1){
|
|
|
|
report.loadFromFile(a.arguments().at(1));
|
|
|
|
}
|
2016-07-21 12:46:05 +03:00
|
|
|
report.designReport();
|
|
|
|
return a.exec();
|
|
|
|
}
|