#include "ADCIntelligentVehicle.h" #include #include "ivversion.h" #include "ivbacktrace.h" #include "ivlog.h" iv::Ivlog * gIvlog; #include "xmlparam.h" #include "ivexit.h" #include #include QApplication * gApp; std::string gstrmemgps; std::string gstrmemradar; std::string gstrmemdecition; std::string gstrmembrainstate; std::string gstrmemchassis; std::string gstrvehtype; void ExitFunc() { gApp->quit(); std::this_thread::sleep_for(std::chrono::milliseconds(900)); } int main(int argc, char *argv[]) { RegisterIVBackTrace(); showversion("ui_ads_hmi"); QApplication a(argc, argv); QTranslator ts; if(ts.load("./ui_ads_hmi_language.qm")) { a.installTranslator(&ts); } gApp = &a; QString strpath = QCoreApplication::applicationDirPath(); if(argc < 2) strpath = strpath + "/ui_ads_hmi.xml"; else strpath = argv[1]; std::cout<info("brain."); gstrmemradar = xp.GetParam("radar","radar"); gstrmemgps = xp.GetParam("gps","hcp2_gpsimu"); gstrmemdecition = xp.GetParam("dection","deciton"); gstrmembrainstate = xp.GetParam("brainstate","brainstate"); gstrmemchassis = xp.GetParam("chassismsgname","chassis"); gstrvehtype = xp.GetParam("VehType","ShenLan"); #if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) //apollo_fu 20200413 添加对QT4版本的中文字体支持 //QT5版本以上默认就是采用UTF-8编码 QTextCodec *codec = QTextCodec::codecForName("UTF-8"); QTextCodec::setCodecForLocale(codec); QTextCodec::setCodecForCStrings(codec); QTextCodec::setCodecForTr(codec); #endif gIvlog = new iv::Ivlog("ui_ads_hmi"); gIvlog->info("ui_ads_hmi start"); ADCIntelligentVehicle w; //w.show(); //w.showMaximized(); //apollo_fu 20200409 w.setWindowTitle("ADS-UI-Ver2.0 "); // w.showMinimized(); //apollo_fu 20200413 w.showMaximized(); iv::ivexit::RegIVExitCall(ExitFunc); return a.exec(); }