diff --git a/QWidgetDemo.pro b/QWidgetDemo.pro index 1dd4eb0..66ac2d6 100644 --- a/QWidgetDemo.pro +++ b/QWidgetDemo.pro @@ -25,7 +25,7 @@ SUBDIRS += battery #电池电量控件 SUBDIRS += lineeditnext #文本框回车焦点下移 SUBDIRS += zhtopy #汉字转拼音 SUBDIRS += qwtdemo #qwt的源码版本,无需插件,直接源码集成到你的项目即可 -SUBDIRS += buttondefence #通用按钮地图效果 +SUBDIRS += devicebutton #设备按钮地图效果 SUBDIRS += mouseline #鼠标定位十字线 SUBDIRS += emailtool #邮件发送工具 SUBDIRS += ntpclient #NTP服务器时间同步 diff --git a/core_qui/core_qui.pri b/core_qui/core_qui.pri index 2c87a9d..17db33f 100644 --- a/core_qui/core_qui.pri +++ b/core_qui/core_qui.pri @@ -22,3 +22,11 @@ SOURCES += \ $$PWD/quistyle.cpp \ $$PWD/quitipbox.cpp \ $$PWD/quiwidget.cpp + +!contains(DEFINES, no_qui_qm) { +RESOURCES += $$PWD/source/qm.qrc +} + +!contains(DEFINES, no_qui_ttf) { +RESOURCES += $$PWD/source/ttf.qrc +} diff --git a/core_qui/quiconfig.h b/core_qui/quiconfig.h index dd31ff1..b581e7f 100644 --- a/core_qui/quiconfig.h +++ b/core_qui/quiconfig.h @@ -14,6 +14,7 @@ public: static QChar IconNormal; //还原图标 static QChar IconClose; //关闭图标 + //全局字体 static QString FontName; //全局字体名称 static int FontSize; //全局字体大小 diff --git a/core_qui/quidateselect.cpp b/core_qui/quidateselect.cpp index f3f5b24..515eb47 100644 --- a/core_qui/quidateselect.cpp +++ b/core_qui/quidateselect.cpp @@ -194,8 +194,8 @@ void QUIDateSelect::initControl() labTitle->setText("日期时间选择"); labStart->setText("开始时间"); labEnd->setText("结束时间"); - btnOk->setText("确定"); - btnClose->setText("关闭"); + btnOk->setText("确 定"); + btnClose->setText("关 闭"); dateStart->setDate(QDate::currentDate()); dateEnd->setDate(QDate::currentDate().addDays(1)); diff --git a/core_qui/quihelper.cpp b/core_qui/quihelper.cpp index 94b3832..f0c346f 100644 --- a/core_qui/quihelper.cpp +++ b/core_qui/quihelper.cpp @@ -1076,7 +1076,11 @@ void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) QUIMessageBox::Instance()->show(); } } else { - QMessageBox::information(0, "提示", info, QMessageBox::Ok); + QMessageBox box(QMessageBox::Information, "提示", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::information(0, "提示", info, QMessageBox::Yes); } } @@ -1092,7 +1096,11 @@ void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec QUIMessageBox::Instance()->show(); } } else { - QMessageBox::critical(0, "错误", info, QMessageBox::Ok); + QMessageBox box(QMessageBox::Critical, "错误", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); } } @@ -1103,7 +1111,12 @@ int QUIHelper::showMessageBoxQuestion(const QString &info) msg.setMessage(info, 1); return msg.exec(); } else { - return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); + QMessageBox box(QMessageBox::Question, "询问", info); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.setButtonText(QMessageBox::No, QString("取 消")); + return box.exec(); + //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); } } diff --git a/core_qui/quiinputbox.cpp b/core_qui/quiinputbox.cpp index bd5ecab..8a9ccd5 100644 --- a/core_qui/quiinputbox.cpp +++ b/core_qui/quiinputbox.cpp @@ -160,8 +160,8 @@ void QUIInputBox::initControl() QWidget::setTabOrder(btnOk, btnCancel); labTitle->setText("输入框"); - btnOk->setText("确定"); - btnCancel->setText("取消"); + btnOk->setText("确 定"); + btnCancel->setText("取 消"); connect(btnOk, SIGNAL(clicked()), this, SLOT(on_btnOk_clicked())); connect(btnCancel, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); diff --git a/core_qui/quimessagebox.cpp b/core_qui/quimessagebox.cpp index ce7c87f..cb6e971 100644 --- a/core_qui/quimessagebox.cpp +++ b/core_qui/quimessagebox.cpp @@ -202,8 +202,8 @@ void QUIMessageBox::initControl() widgetMain->raise(); frame->raise(); - btnOk->setText("确定"); - btnCancel->setText("取消"); + btnOk->setText("确 定"); + btnCancel->setText("取 消"); connect(btnOk, SIGNAL(clicked()), this, SLOT(on_btnOk_clicked())); connect(btnCancel, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); diff --git a/core_qui/source/image/fontawesome-webfont.ttf b/core_qui/source/image/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/core_qui/source/image/fontawesome-webfont.ttf differ diff --git a/core_qui/source/image/iconfont.ttf b/core_qui/source/image/iconfont.ttf new file mode 100644 index 0000000..ba15da8 Binary files /dev/null and b/core_qui/source/image/iconfont.ttf differ diff --git a/netserver/other/qt_zh_CN.qm b/core_qui/source/image/qt_zh_CN.qm similarity index 88% rename from netserver/other/qt_zh_CN.qm rename to core_qui/source/image/qt_zh_CN.qm index d6f3648..623b8e3 100644 Binary files a/netserver/other/qt_zh_CN.qm and b/core_qui/source/image/qt_zh_CN.qm differ diff --git a/netserver/other/widgets.qm b/core_qui/source/image/widgets.qm similarity index 100% rename from netserver/other/widgets.qm rename to core_qui/source/image/widgets.qm diff --git a/core_qui/source/qm.qrc b/core_qui/source/qm.qrc new file mode 100644 index 0000000..c5b158d --- /dev/null +++ b/core_qui/source/qm.qrc @@ -0,0 +1,6 @@ + + + image/qt_zh_CN.qm + image/widgets.qm + + diff --git a/core_qui/source/ttf.qrc b/core_qui/source/ttf.qrc new file mode 100644 index 0000000..2ee28b1 --- /dev/null +++ b/core_qui/source/ttf.qrc @@ -0,0 +1,6 @@ + + + image/fontawesome-webfont.ttf + image/iconfont.ttf + + diff --git a/netserver/other/main.qrc b/netserver/other/main.qrc index 4e13808..91c2747 100644 --- a/netserver/other/main.qrc +++ b/netserver/other/main.qrc @@ -1,7 +1,5 @@ main.ico - qt_zh_CN.qm - widgets.qm diff --git a/nettool/other/main.qrc b/nettool/other/main.qrc index 4e13808..91c2747 100644 --- a/nettool/other/main.qrc +++ b/nettool/other/main.qrc @@ -1,7 +1,5 @@ main.ico - qt_zh_CN.qm - widgets.qm diff --git a/nettool/other/qt_zh_CN.qm b/nettool/other/qt_zh_CN.qm deleted file mode 100644 index d6f3648..0000000 Binary files a/nettool/other/qt_zh_CN.qm and /dev/null differ diff --git a/nettool/other/widgets.qm b/nettool/other/widgets.qm deleted file mode 100644 index 244bf0d..0000000 Binary files a/nettool/other/widgets.qm and /dev/null differ