更新代码

master
feiyangqingyun 2021-07-02 17:19:02 +08:00
parent f8f040eb5f
commit 0b00d34587
86 changed files with 76 additions and 309 deletions

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T09:21:04
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T09:46:02
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-08-19T20:24:03
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-19T22:25:56
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T09:21:04
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-15T14:34:50
#
#-------------------------------------------------
QT += core gui sql
QT += core gui sql
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -202,6 +202,10 @@ void DeviceButton::setButtonColor(const DeviceButton::ButtonColor &buttonColor)
imgName = QString(":/image/devicebutton/devicebutton_gray_%1.png").arg(type);
} else if (buttonColor == ButtonColor_Black) {
imgName = QString(":/image/devicebutton/devicebutton_black_%1.png").arg(type);
} else if (buttonColor == ButtonColor_Purple) {
imgName = QString(":/image/devicebutton/devicebutton_purple_%1.png").arg(type);
} else if (buttonColor == ButtonColor_Yellow) {
imgName = QString(":/image/devicebutton/devicebutton_yellow_%1.png").arg(type);
} else if (buttonColor == ButtonColor_Red) {
checkAlarm();
if (!timer->isActive()) {

View File

@ -43,11 +43,13 @@ public:
//设备按钮颜色
enum ButtonColor {
ButtonColor_Green = 0, //绿色 设备激活状态
ButtonColor_Blue = 1, //蓝色 设备在线状态
ButtonColor_Red = 2, //红色 设备报警状态
ButtonColor_Gray = 3, //灰色 设备离线状态
ButtonColor_Black = 4 //黑色 设备故障状态
ButtonColor_Green = 0, //绿色 激活状态
ButtonColor_Blue = 1, //蓝色 在线状态
ButtonColor_Red = 2, //红色 报警状态
ButtonColor_Gray = 3, //灰色 离线状态
ButtonColor_Black = 4, //黑色 故障状态
ButtonColor_Purple = 5, //紫色 其他状态
ButtonColor_Yellow = 6 //黄色 其他状态
};
explicit DeviceButton(QWidget *parent = 0);

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-07-04T09:39:27
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -36,7 +36,7 @@ void frmDeviceButton::initForm()
connect(btn, SIGNAL(clicked(bool)), this, SLOT(changeStyle()));
}
btnColor << ui->btnGreen << ui->btnBlue << ui->btnRed << ui->btnGray << ui->btnBlack;
btnColor << ui->btnGreen << ui->btnBlue << ui->btnRed << ui->btnGray << ui->btnBlack << ui->btnPurple << ui->btnYellow;
foreach (QPushButton *btn, btnColor) {
connect(btn, SIGNAL(clicked(bool)), this, SLOT(changeColor()));
}

View File

@ -129,6 +129,20 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnPurple">
<property name="text">
<string>紫色</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnYellow">
<property name="text">
<string>黄色</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="ckCanMove">
<property name="text">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -9,7 +9,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else

View File

@ -31,5 +31,17 @@
<file>image/devicebutton/devicebutton_red_msg.png</file>
<file>image/devicebutton/devicebutton_red_msg2.png</file>
<file>image/devicebutton/devicebutton_red_police.png</file>
<file>image/devicebutton/devicebutton_purple_bubble.png</file>
<file>image/devicebutton/devicebutton_purple_bubble2.png</file>
<file>image/devicebutton/devicebutton_purple_circle.png</file>
<file>image/devicebutton/devicebutton_purple_msg.png</file>
<file>image/devicebutton/devicebutton_purple_msg2.png</file>
<file>image/devicebutton/devicebutton_purple_police.png</file>
<file>image/devicebutton/devicebutton_yellow_bubble.png</file>
<file>image/devicebutton/devicebutton_yellow_bubble2.png</file>
<file>image/devicebutton/devicebutton_yellow_circle.png</file>
<file>image/devicebutton/devicebutton_yellow_msg.png</file>
<file>image/devicebutton/devicebutton_yellow_msg2.png</file>
<file>image/devicebutton/devicebutton_yellow_police.png</file>
</qresource>
</RCC>

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T10:02:20
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-29T13:23:25
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
android {QT += androidextras}

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-09T09:29:12
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-10-03T10:55:58
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T14:39:46
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-08-10T17:11:52
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T15:04:18
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-10-28T13:44:49
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-08-13T14:27:21
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-09-28T15:04:18
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T15:12:35
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-09-19T13:33:20
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-19T13:33:20
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4) {
QT += widgets
#判断是否有websocket模块

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-08T09:21:04
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-09T09:29:12
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,9 +1,3 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-19T12:55:42
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T22:11:54
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

View File

@ -1,11 +1,4 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-02-16T15:08:47
#
#-------------------------------------------------
QT += core gui
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat