diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index 59cc1a5..133c002 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index 63b6fa1..514a41a 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -509,17 +509,17 @@
是
-
+
否
-
+
确定
-
+
取消
@@ -1649,65 +1649,75 @@
用户
-
+
+
+ 信息
+
+
+
新建项目
-
+
账户管理
-
+
修改密码
-
+
导出
-
+
登出
-
+
-
+
退出
-
+
上传配置文件
-
+
刷新设备列表
-
+
查看日志
-
+
-
+
+
+
+
+ 关于...
+
账户在其他地方登录
@@ -1726,40 +1736,55 @@
-
-
-
-
+
+
+
+
提示
-
+
华高生产工具-烧录工位
-
+
华高生产工具-初检工位
-
+
华高生产工具-图像测试工位
-
+
华高生产工具-压力测试工位
-
-
+
+
测试中,请勿关闭!
+
+
+
+ 关于 %1
+
+
+
+
+ 华高生产工具
+
+
+
+
+ <p>版本号: %1</p>
+
警告
@@ -1778,8 +1803,8 @@
取消
-
-
+
+
不能创建更多项目
diff --git a/app/HGProductionTool/mainwindow.cpp b/app/HGProductionTool/mainwindow.cpp
index 4c044c8..4a243ce 100644
--- a/app/HGProductionTool/mainwindow.cpp
+++ b/app/HGProductionTool/mainwindow.cpp
@@ -3,6 +3,7 @@
#include
#include
#include "base/HGBase.h"
+#include "huagao/brand.h"
#include "HGUIGlobal.h"
#include "app_cfg.h"
#include "dialog_login.h"
@@ -741,3 +742,69 @@ void MainWindow::on_act_openLog_triggered()
QString strFilePath = "file:///" + pathDir;
QDesktopServices::openUrl(QUrl(strFilePath));
}
+
+static bool isLeap(int year)
+{
+ if ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0))
+ return true;
+ return false;
+}
+
+static int getDays(int year, int month)
+{
+ if (2 == month)
+ {
+ if (isLeap(year))
+ return 29;
+ else
+ return 28;
+ }
+
+ if (4 == month || 6 == month || 9 == month || 11 == month)
+ {
+ return 30;
+ }
+
+ return 31;
+}
+
+static int getPatchVersion()
+{
+ const char *buildDate = __DATE__;
+ HGBase_WriteInfo(HGBASE_INFOTYPE_ERROR, "buildDate: %s", buildDate);
+ QDate date = QLocale(QLocale::English).toDate(QString(buildDate).replace(" ", " 0"), "MMM dd yyyy");
+ int year = date.year();
+ int day = date.day();
+ int month = date.month();
+ HGBase_WriteInfo(HGBASE_INFOTYPE_ERROR, "buildDate: %d %d %d", year, month, day);
+
+ int ret = year % 100;
+ ret *= 1000;
+
+ for (int i = 1; i < month; ++i)
+ {
+ ret += getDays(year, i);
+ }
+
+ ret += day;
+ return ret;
+}
+
+void MainWindow::on_act_about_triggered()
+{
+ int mainVersion = VERSION_MAIN;
+ int subVersion = VERSION_SUB;
+ int buildVersion = 10000;
+ int patchVersion = 0;
+
+ patchVersion = getPatchVersion();
+
+ HGChar version[32] = { 0 };
+ sprintf(version, "%d.%d.%d.%d", mainVersion, subVersion, buildVersion, patchVersion);
+
+ QString title = tr("about %1").arg(tr("Production tool"));
+ QString content;
+ content += tr("DriverVer: %1
").arg(QString::fromLocal8Bit(version));
+
+ QMessageBox::about(this, title, content);
+}
diff --git a/app/HGProductionTool/mainwindow.h b/app/HGProductionTool/mainwindow.h
index 09f4298..5b82bb4 100644
--- a/app/HGProductionTool/mainwindow.h
+++ b/app/HGProductionTool/mainwindow.h
@@ -85,6 +85,8 @@ private slots:
void on_act_openLog_triggered();
+ void on_act_about_triggered();
+
private:
QSplitter *m_top_splitter;
QSplitter *m_bot_splitter;
diff --git a/app/HGProductionTool/mainwindow.ui b/app/HGProductionTool/mainwindow.ui
index 5bd2765..198b069 100644
--- a/app/HGProductionTool/mainwindow.ui
+++ b/app/HGProductionTool/mainwindow.ui
@@ -46,8 +46,15 @@
+
+
@@ -106,6 +113,11 @@
act_setLogPath
+
+
+ act_about
+
+