#include #include #include #include #include #include #include #include #include #include "InkJetPrinter.h" #include "logo_form.h" #include "MyInputMethod.h" #include "mainwindow.h" #include #include #include #include #include "myinclude.h" #include "Public.h" #include "Log/filelogger.h" //#define SYS_CN /* 1. WenQuanYiMH_12_50.qpf2 是由 Zfull-GB_12_50(Zpix.ttf)在PCMAKEQPF软件下生成的,它包含较完整的字体库 nono 20160302 2. 基于WenQuanYiCN编越南语,中文通用字库 3. 基于WenQuanYiMicroHei编 普通版本字库 #git commit -am "测试提交新数据" #git push #git clone xiongnie@119.23.201.56:/var/repo_dir/QtUI.git #git pull xiongnie@119.23.201.56:/var/repo_dir/QtUI.git #git remote add origin git@github.com:username/Hello-World.git #git push origin master 将本地项目给提交到服务器中 #----------------------------------------------------------- #git pull 本地与服务器端同步 #----------------------------------------------------------------- #git push (远程仓库名) (分支名) 将本地分支推送到服务器上去。 #git push origin serverfix:awesomebranch git remote add origin xiongnie@119.23.201.56:/var/repo_dir/QRUIV53.git ### */ InkJetPrinter *pInkJectPrinter; MyInputMethod *myInputMethod; //#include //#include //#include int main(int argc, char *argv[]) { // QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);//控制图片缩放质量 // // Open a display. // Display *d = XOpenDisplay(NULL); // // Get width and height of the display // //int windowHeight = XDisplayHeight (d, 0); // qreal windowWidth = XDisplayWidth(d, 0); // qreal windowWidth = 800; // qreal scale = windowWidth / 640; // //qputenv("QT_SCALE_FACTOR", QString::number(scale).toLatin1()); //qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1.5"); // qputenv("QT_SCALE_FACTOR", QByteArray("1.25")); // qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); // QByteArray byte = qgetenv("QT_SCALE_FACTOR"); // qDebug() << "qgutenv byte=============================" << byte; // QByteArray byteModule = qgetenv("QT_IM_MODULE"); // qDebug() << "qgutenv byteModule=============================" << byteModule; // QLocale::setDefault(QLocale(QLocale::Vietnamese, QLocale::VietNam)); QApplication a(argc, argv,QApplication::GuiServer); // QDesktopWidget *desktop = a.desktop(); // int screen_number = desktop->primaryScreen(); // QRect rect = desktop->screenGeometry(screen_number); //qDebug() << QStyleFactory::keys(); QApplication::setStyle(QStyleFactory::create("Windows")); QFont f = a.font(); QString langurageFile; QFile file(SYS_ROOT_DIR"UseEn"); if(file.exists()) { #ifdef VNLG QString langurageType = Public::ReadLanguageName();//"";// //qDebug()<<"La:"<load(langurageFile)==false){ translator->deleteLater(); QMessageBox::critical(0,("错误"),("无法加载中文翻译文件") + langurageFile); } else { QApplication::installTranslator(translator); } #ifndef Q_OS_WIN32 //QWSServer::setCurrentInputMethod(new MyInputMethod()); myInputMethod = new MyInputMethod(); QWSServer::setCurrentInputMethod(myInputMethod); #endif // 配置日志 //QString configFileName = QCoreApplication::applicationDirPath() + "/config.ini"; QString configFileName = ":/conf/config.ini"; QSettings* logSettings = new QSettings(configFileName, QSettings::IniFormat, &a); logSettings->beginGroup("logging"); FileLogger* logger = new FileLogger(logSettings, 10000, &a); logger->installMsgHandler(); InkJetPrinter w; #ifndef Q_OS_WIN32 w.setWindowTitle(("比洋喷码")); #if 0 w.setStyleSheet("QTabBar::tab {height:70px;} QTabBar::scroller{ width:40px;} QRadioButton::indicator{ width: 50px; height: 50px; } \ QCheckBox::indicator { width: 18px; height: 18px; } "); #endif //edit@11-28 const QString style_main2="QTabBar::tab {height:55px;border-top-left-radius: 6px;border-top-right-radius: 6px;padding-left: 11px;padding-right: 11px;border: 2px solid #C4C4C3;} \ QTabBar::tab:selected {background-color: rgb(255, 170, 127);height:57px;}\ QTabBar::tab:!selected {margin-top: 2px;}\ QTabBar::scroller{ width:40px;} \ QRadioButton::indicator{ width: 45px; height: 45px; } \ QCheckBox::indicator { width: 18px; height: 18px; } "; w.setStyleSheet(style_main2); w.showFullScreen(); /*保证全屏,看不到系统标题*/ #endif w.show(); pInkJectPrinter = &w; return a.exec(); }