|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
global::global() {}
|
|
|
|
|
|
|
|
|
|
QString g_SoftwareVersion = "版本号:V1.00.00";
|
|
|
|
|
QString g_SoftwareVersion = "版本号:V1.0.0.0919";
|
|
|
|
|
|
|
|
|
|
QColor g_themeColor(51, 51, 51);
|
|
|
|
|
QString g_PushBtnStyle = /**正常情况下样式**/
|
|
|
|
@ -27,7 +27,8 @@ QString g_PushBtnStyle = /**正常情况下样式**/
|
|
|
|
|
/**鼠标按压下去的样式**/
|
|
|
|
|
"QPushButton::pressed,QPushButton::checked{"
|
|
|
|
|
"color: #FFFFFF;"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, "
|
|
|
|
|
"stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
|
|
/**按钮失能情况下样式**/
|
|
|
|
@ -37,7 +38,6 @@ QString g_PushBtnStyle = /**正常情况下样式**/
|
|
|
|
|
"border-color: #dcdde1;"
|
|
|
|
|
"}";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString g_PushBtnSelStyle = /**选中情况下样式**/
|
|
|
|
|
"QPushButton{"
|
|
|
|
|
"font: 12pt '微软雅黑';"
|
|
|
|
@ -60,7 +60,8 @@ QString g_PushBtnSelStyle = /**选中情况下样式**/
|
|
|
|
|
/**鼠标按压下去的样式**/
|
|
|
|
|
"QPushButton::pressed,QPushButton::checked{"
|
|
|
|
|
"color: #FFFFFF;"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, "
|
|
|
|
|
"stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
|
|
/**按钮失能情况下样式**/
|
|
|
|
@ -92,7 +93,8 @@ QString g_ToolBtnStyle = /**正常情况下样式**/
|
|
|
|
|
/**鼠标按压下去的样式**/
|
|
|
|
|
"QToolButton::pressed,QToolButton::checked{"
|
|
|
|
|
"color: #FFFFFF;"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, "
|
|
|
|
|
"stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
|
|
/**按钮失能情况下样式**/
|
|
|
|
@ -123,7 +125,8 @@ QString g_ToolBtnSelStyle = /**选中情况下样式**/
|
|
|
|
|
/**鼠标按压下去的样式**/
|
|
|
|
|
"QToolButton::pressed,QToolButton::checked{"
|
|
|
|
|
"color: #FFFFFF;"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, "
|
|
|
|
|
"stop:0 #273c75, stop:1 #487eb0);"
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
|
|
/**按钮失能情况下样式**/
|
|
|
|
@ -139,18 +142,15 @@ QString g_ToolBtnSelStyle = /**选中情况下样式**/
|
|
|
|
|
* @param u16Len
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
uint16_t calCRC16(const uint8_t *cpu8Data, uint16_t u16Len)
|
|
|
|
|
{
|
|
|
|
|
uint16_t calCRC16(const uint8_t *cpu8Data, uint16_t u16Len) {
|
|
|
|
|
uint8_t u8X;
|
|
|
|
|
uint16_t u16CRC = 0X8848;
|
|
|
|
|
|
|
|
|
|
while (u16Len--)
|
|
|
|
|
{
|
|
|
|
|
while (u16Len--) {
|
|
|
|
|
u8X = u16CRC >> 8 ^ *cpu8Data++;
|
|
|
|
|
u8X ^= u8X >> 4;
|
|
|
|
|
u16CRC = (u16CRC << 8) ^ ((uint16_t)(u8X << 12)) ^ ((uint16_t)(u8X << 5)) ^ ((uint16_t)u8X);
|
|
|
|
|
u16CRC = (u16CRC << 8) ^ ((uint16_t)(u8X << 12)) ^ ((uint16_t)(u8X << 5)) ^
|
|
|
|
|
((uint16_t)u8X);
|
|
|
|
|
}
|
|
|
|
|
return u16CRC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|