Compare commits

...

2 Commits

Author SHA1 Message Date
Lee
6ac3d8e7c4 ui创建 2022-01-20 18:06:11 +08:00
LYQ
80574ae8b6 删除pro.user 2022-01-20 18:03:21 +08:00
53 changed files with 1180 additions and 4410 deletions

266
.gitignore vendored Normal file
View File

@ -0,0 +1,266 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pro.user

41
SmartGreenhouse.pro Normal file
View File

@ -0,0 +1,41 @@
QT += core gui network sql
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainmenu.cpp \
sql.cpp \
submenu.cpp
HEADERS += \
mainmenu.h \
sql.h \
submenu.h
FORMS += \
mainmenu.ui \
submenu.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES +=
RESOURCES += \
img/img.qrc \
img/img.qrc

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>airconditurePage</class>
<widget class="QWidget" name="airconditurePage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,14 +0,0 @@
#include "camerapage.h"
#include "ui_camerapage.h"
cameraPage::cameraPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::cameraPage)
{
ui->setupUi(this);
}
cameraPage::~cameraPage()
{
delete ui;
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>cameraPage</class>
<widget class="QWidget" name="cameraPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,28 +0,0 @@
#include "client.h"
#include <QDebug>
client::client()
{
socket = new QTcpSocket(this);
}
//连接服务器
void client::connect()
{
socket->connectToHost("192.168.0.169", 8888);
}
//发送消息
void client::sendMessage()
{
QString strLine = "hello world!";
socket->write(strLine);
}
//接收消息
void client::recvMessage()
{
QByteArray arr = socket->readAll();
qDebug() << arr;
}

View File

@ -1,23 +0,0 @@
#ifndef CLIENT_H
#define CLIENT_H
#include <QTcpSocket>
class client
{
public:
client();
//连接服务器
void connect();
//发送消息
void sendMessage();
//接收消息
void recvMessage();
private:
QTcpSocket * socket;
};
#endif // CLIENT_H

View File

@ -1,188 +0,0 @@
#include "historydata.h"
#include "ui_historydata.h"
#include <QMessageBox>
#include <QPen>
historyData::historyData(QWidget *parent) :
QWidget(parent),
ui(new Ui::historyData)
{
ui->setupUi(this);
//设置窗口标题
this->setWindowTitle("历史数据");
this->setFixedSize(this->width(), this->height());
//实例化
chart = new QChart;
chart->setAnimationOptions(QChart::SeriesAnimations); //在缩放窗口大小时可以用动画进行美化
TemSeries = new QLineSeries();
HumSeries = new QLineSeries();
LightSeries = new QLineSeries();
SmokeSeries = new QLineSeries();
paintXY();
//创建套接字,和A9服务器取得连接
historyDataSocket = new QTcpSocket(this);
historyDataSocket->connectToHost("192.168.200.105", 7777);
connect(historyDataSocket, SIGNAL(readyRead()), this, SLOT(recvA9ServerSlot()));
}
historyData::~historyData()
{
delete ui;
historyDataSocket->close();
historyDataSocket = NULL;
}
void historyData::on_historyDataReturnBrn_clicked()
{
TemSeries->clear();
HumSeries->clear();
LightSeries->clear();
SmokeSeries->clear();
emit historyDataToWidgetSignal();
}
void historyData::on_searchHistoryDataBtn_clicked()
{
QString command = {"searchHistoryData"};
QByteArray arr;
arr.clear();
arr.append(command);
if(this->historyDataSocket->write(arr) == -1)
{
int ret = QMessageBox::question(this, "提交命令失败", "你提交的命令并没有上传到服务器!!!", QMessageBox::Yes);
}
else
{
int ret = QMessageBox::question(this, "提交成功", "恭喜你成功提交数据到服务器!!!", QMessageBox::Yes);
}
//清空坐标里的内容
TemSeries->clear();
HumSeries->clear();
LightSeries->clear();
SmokeSeries->clear();
paintTemSeries();
paintHumSeries();
paintLightSeries();
paintSmokeSeries();
}
void historyData::recvA9ServerSlot()
{
QByteArray recvServer = historyDataSocket->readAll();
qDebug() << "history recv " << recvServer;
}
//画坐标轴
void historyData::paintXY()
{
axisX = new QValueAxis;
//设置坐标轴的格式
axisX->setRange(0,12); //设置范围
axisX->setLabelFormat("%d"); //设置刻度的格式
axisX->setGridLineVisible(true); //网格线可见
axisX->setTickCount(12); //设置多少格
axisX->setMinorTickCount(5); //设置每格小刻度线的数目
chart->addAxis(axisX, Qt::AlignBottom); //为chart设置x轴,并把轴附加到线上
axisY = new QValueAxis;
axisY->setRange(0,100); //设置范围
axisY->setLabelFormat("%d"); //设置刻度的格式
axisY->setGridLineVisible(true); //网格线可见
axisY->setTickCount(11); //设置多少格
axisY->setMinorTickCount(5); //设置每格小刻度线的数目
chart->addAxis(axisY, Qt::AlignLeft); //为chart设置y轴,并把轴附加到线上
//用Qchart在QChartView上面
ui->canvas->setChart(chart);
ui->canvas->setRenderHint(QPainter::Antialiasing); //抗锯齿
}
//画温度的折线统计图
void historyData::paintTemSeries()
{
//设置一个pen给线
QPen TemPen;
TemPen.setWidth(2);
TemPen.setColor(Qt::red);
//把笔交给线
TemSeries->setPen(TemPen);
TemSeries->setName("温度");
*TemSeries << QPointF(0,24) << QPointF(1,23) << QPointF(2,25) << QPointF(3,27) << QPointF(4,29)<< QPointF(5,29) << QPointF(6,30) << QPointF(7,32) << QPointF(8,35)<< QPointF(9,37) << QPointF(10,35) << QPointF(11,33) << QPointF(12,30);
chart->addSeries(TemSeries);
//把线绑定到坐标轴上
TemSeries->attachAxis(axisX);
TemSeries->attachAxis(axisY);
}
//画湿度的折线统计图
void historyData::paintHumSeries()
{
//设置一个pen给线
QPen HumPen;
HumPen.setWidth(2);
HumPen.setColor(Qt::yellow);
//把笔交给线
HumSeries->setPen(HumPen);
HumSeries->setName("湿度");
*HumSeries << QPointF(0,65) << QPointF(1,67) << QPointF(2,64) << QPointF(3,64) << QPointF(4,62)<< QPointF(5,60) << QPointF(6,58) << QPointF(7,57) << QPointF(8,57)<< QPointF(9,55) << QPointF(10,56) << QPointF(11,58) << QPointF(12,62);
chart->addSeries(HumSeries);
//把线绑定到坐标轴上
HumSeries->attachAxis(axisX);
HumSeries->attachAxis(axisY);
}
//画光照强度的折线统计图
void historyData::paintLightSeries()
{
//设置一个pen给线
QPen LightPen;
LightPen.setWidth(2);
LightPen.setColor(Qt::green);
//把笔交给线
LightSeries->setPen(LightPen);
LightSeries->setName("光照强度");
*LightSeries << QPointF(0,48) << QPointF(1,53) << QPointF(2,52) << QPointF(3,51) << QPointF(4,53)<< QPointF(5,50) << QPointF(6,55) << QPointF(7,60) << QPointF(8,68)<< QPointF(9,69) << QPointF(10,75) << QPointF(11,62) << QPointF(12,55);
chart->addSeries(LightSeries);
//把线绑定到坐标轴上
LightSeries->attachAxis(axisX);
LightSeries->attachAxis(axisY);
}
//画烟雾浓度的折线统计图
void historyData::paintSmokeSeries()
{
//设置一个pen给线
QPen SmokePen;
SmokePen.setWidth(2);
SmokePen.setColor(Qt::blue);
//把笔交给线
SmokeSeries->setPen(SmokePen);
SmokeSeries->setName("烟雾浓度");
*SmokeSeries << QPointF(0,10) << QPointF(3,10) << QPointF(7,10) << QPointF(9,10) << QPointF(12,10);
chart->addSeries(SmokeSeries);
//把线绑定到坐标轴上
SmokeSeries->attachAxis(axisX);
SmokeSeries->attachAxis(axisY);
}

View File

@ -1,189 +0,0 @@
#include "historydata.h"
#include "ui_historydata.h"
#include <QMessageBox>
#include <QPen>
historyData::historyData(QWidget *parent) :
QWidget(parent),
ui(new Ui::historyData)
{
ui->setupUi(this);
//设置窗口标题
this->setWindowTitle("历史数据");
this->setFixedSize(this->width(), this->height());
//实例化
chart = new QChart;
chart->setAnimationOptions(QChart::SeriesAnimations); //在缩放窗口大小时可以用动画进行美化
TemSeries = new QLineSeries();
HumSeries = new QLineSeries();
LightSeries = new QLineSeries();
SmokeSeries = new QLineSeries();
paintXY();
//创建套接字,和A9服务器取得连接
historyDataSocket = new QTcpSocket(this);
historyDataSocket->connectToHost("192.168.200.105", 7777);
connect(historyDataSocket, SIGNAL(readyRead()), this, SLOT(recvA9ServerSlot()));
}
historyData::~historyData()
{
delete ui;
historyDataSocket->close();
historyDataSocket = NULL;
}
void historyData::on_historyDataReturnBrn_clicked()
{
TemSeries->clear();
HumSeries->clear();
LightSeries->clear();
SmokeSeries->clear();
emit historyDataToWidgetSignal();
}
void historyData::on_searchHistoryDataBtn_clicked()
{
QString command = {"searchHistoryData"};
QByteArray arr;
arr.clear();
arr.append(command);
if(this->historyDataSocket->write(arr) == -1)
{
int ret = QMessageBox::question(this, "提交命令失败", "你提交的命令并没有上传到服务器!!!", QMessageBox::Yes);
}
else
{
int ret = QMessageBox::question(this, "提交成功", "恭喜你成功提交数据到服务器!!!", QMessageBox::Yes);
}
//清空坐标里的内容
TemSeries->clear();
HumSeries->clear();
LightSeries->clear();
SmokeSeries->clear();
paintTemSeries();
paintHumSeries();
paintLightSeries();
paintSmokeSeries();
}
void historyData::recvA9ServerSlot()
{
QString recvServer = historyDataSocket->readAll();
qDebug() << "history recv " << recvServer;
}
//画坐标轴
void historyData::paintXY()
{
axisX = new QValueAxis;
//设置坐标轴的格式
axisX->setRange(0,12); //设置范围
axisX->setLabelFormat("%d"); //设置刻度的格式
axisX->setGridLineVisible(true); //网格线可见
axisX->setTickCount(12); //设置多少格
axisX->setMinorTickCount(5); //设置每格小刻度线的数目
chart->addAxis(axisX, Qt::AlignBottom); //为chart设置x轴,并把轴附加到线上
axisY = new QValueAxis;
axisY->setRange(0,100); //设置范围
axisY->setLabelFormat("%d"); //设置刻度的格式
axisY->setGridLineVisible(true); //网格线可见
axisY->setTickCount(11); //设置多少格
axisY->setMinorTickCount(5); //设置每格小刻度线的数目
chart->addAxis(axisY, Qt::AlignLeft); //为chart设置y轴,并把轴附加到线上
//用Qchart在QChartView上面
ui->canvas->setChart(chart);
ui->canvas->setRenderHint(QPainter::Antialiasing); //抗锯齿
}
//画温度的折线统计图
void historyData::paintTemSeries()
{
//设置一个pen给线
QPen TemPen;
TemPen.setWidth(2);
TemPen.setColor(Qt::red);
//把笔交给线
TemSeries->setPen(TemPen);
TemSeries->setName("温度");
*TemSeries << QPointF(0,24) << QPointF(1,23) << QPointF(2,25) << QPointF(3,27) << QPointF(4,29)<< QPointF(5,29) << QPointF(6,30) << QPointF(7,32) << QPointF(8,35)<< QPointF(9,37) << QPointF(10,35) << QPointF(11,33) << QPointF(12,30);
chart->addSeries(TemSeries);
//把线绑定到坐标轴上
TemSeries->attachAxis(axisX);
TemSeries->attachAxis(axisY);
}
//画湿度的折线统计图
void historyData::paintHumSeries()
{
//设置一个pen给线
QPen HumPen;
HumPen.setWidth(2);
HumPen.setColor(Qt::yellow);
//把笔交给线
HumSeries->setPen(HumPen);
HumSeries->setName("湿度");
*HumSeries << QPointF(0,65) << QPointF(1,67) << QPointF(2,64) << QPointF(3,64) << QPointF(4,62)<< QPointF(5,60) << QPointF(6,58) << QPointF(7,57) << QPointF(8,57)<< QPointF(9,55) << QPointF(10,56) << QPointF(11,58) << QPointF(12,62);
chart->addSeries(HumSeries);
//把线绑定到坐标轴上
HumSeries->attachAxis(axisX);
HumSeries->attachAxis(axisY);
}
//画光照强度的折线统计图
void historyData::paintLightSeries()
{
//设置一个pen给线
QPen LightPen;
LightPen.setWidth(2);
LightPen.setColor(Qt::green);
//把笔交给线
LightSeries->setPen(LightPen);
LightSeries->setName("光照强度");
*LightSeries << QPointF(0,48) << QPointF(1,53) << QPointF(2,52) << QPointF(3,51) << QPointF(4,53)<< QPointF(5,50) << QPointF(6,55) << QPointF(7,60) << QPointF(8,68)<< QPointF(9,69) << QPointF(10,75) << QPointF(11,62) << QPointF(12,55);
chart->addSeries(LightSeries);
//把线绑定到坐标轴上
LightSeries->attachAxis(axisX);
LightSeries->attachAxis(axisY);
}
//画烟雾浓度的折线统计图
void historyData::paintSmokeSeries()
{
//设置一个pen给线
QPen SmokePen;
SmokePen.setWidth(2);
SmokePen.setColor(Qt::blue);
//把笔交给线
SmokeSeries->setPen(SmokePen);
SmokeSeries->setName("烟雾浓度");
*SmokeSeries << QPointF(0,10) << QPointF(3,10) << QPointF(7,10) << QPointF(9,10) << QPointF(12,10);
chart->addSeries(SmokeSeries);
//把线绑定到坐标轴上
SmokeSeries->attachAxis(axisX);
SmokeSeries->attachAxis(axisY);
}

View File

@ -1,60 +0,0 @@
#ifndef HISTORYDATA_H
#define HISTORYDATA_H
#include <QWidget>
#include <QtNetwork/QTcpSocket>
#include <QtCharts/QChartView>
#include <QChart>
#include <QtCharts/QLineSeries>
#include <QValueAxis>
QT_CHARTS_USE_NAMESPACE
namespace Ui {
class historyData;
}
class historyData : public QWidget
{
Q_OBJECT
public:
explicit historyData(QWidget *parent = 0);
~historyData();
//画坐标轴
void paintXY();
//画温度的折线统计图
void paintTemSeries();
//画湿度的折线统计图
void paintHumSeries();
//画光照强度的折线统计图
void paintLightSeries();
//画烟雾浓度的折线统计图
void paintSmokeSeries();
signals:
void historyDataToWidgetSignal();
private slots:
void on_historyDataReturnBrn_clicked();
void on_searchHistoryDataBtn_clicked();
void recvA9ServerSlot();
private:
Ui::historyData *ui;
QTcpSocket * historyDataSocket;
QLineSeries * TemSeries; //创建画温度的线
QLineSeries * HumSeries; //创建画湿度的线
QLineSeries * LightSeries; //创建画光照强度的线
QLineSeries * SmokeSeries; //创建画烟感的线
QValueAxis * axisX; //X轴
QValueAxis * axisY; //Y轴
QChart * chart;
};
#endif // HISTORYDATA_H

View File

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>historyData</class>
<widget class="QWidget" name="historyData">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>992</width>
<height>612</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QLabel" name="historyDataTitleLabel">
<property name="geometry">
<rect>
<x>410</x>
<y>30</y>
<width>171</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>历史数据</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QPushButton" name="searchHistoryDataBtn">
<property name="geometry">
<rect>
<x>330</x>
<y>550</y>
<width>111</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>查询历史数据</string>
</property>
</widget>
<widget class="QPushButton" name="historyDataReturnBrn">
<property name="geometry">
<rect>
<x>580</x>
<y>550</y>
<width>111</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>返回</string>
</property>
</widget>
<widget class="QChartView" name="canvas" native="true">
<property name="geometry">
<rect>
<x>19</x>
<y>79</y>
<width>951</width>
<height>451</height>
</rect>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QChartView</class>
<extends>QWidget</extends>
<header>qchartview.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

BIN
img/OIP-C.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
img/OIP-C1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
img/OIP-C2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
img/OIP-C3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
img/R-C.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
img/hide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

BIN
img/ico.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

13
img/img.qrc Normal file
View File

@ -0,0 +1,13 @@
<RCC>
<qresource prefix="/">
<file>hide.png</file>
<file>ico.png</file>
<file>img.qrc</file>
<file>OIP-C.jpg</file>
<file>OIP-C1.jpg</file>
<file>OIP-C2.jpg</file>
<file>OIP-C3.jpg</file>
<file>R-C.jpg</file>
<file>show.png</file>
</qresource>
</RCC>

BIN
img/show.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

@ -1,26 +0,0 @@
#include "lightpage.h"
#include "ui_lightpage.h"
lightPage::lightPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::lightPage)
{
ui->setupUi(this);
}
lightPage::~lightPage()
{
delete ui;
}
void lightPage::on_livingLightONOFFBtn_clicked()
{
}
void lightPage::on_bedroomLightONOFFBtn_clicked()
{
}

View File

@ -1,30 +0,0 @@
#ifndef LIGHTPAGE_H
#define LIGHTPAGE_H
#include <QWidget>
#include <QPixmap>
namespace Ui {
class lightPage;
}
class lightPage : public QWidget
{
Q_OBJECT
public:
explicit lightPage(QWidget *parent = 0);
~lightPage();
private slots:
void on_livingLightONOFFBtn_clicked();
void on_bedroomLightONOFFBtn_clicked();
private:
Ui::lightPage *ui;
QPixmap lightONPix;
QPixmap lightOFFPix;
};
#endif // LIGHTPAGE_H

View File

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>lightPage</class>
<widget class="QWidget" name="lightPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>342</width>
<height>441</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QLabel" name="lightPageLabel">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>321</width>
<height>421</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="bedroomLightONOFFPictureLabel">
<property name="geometry">
<rect>
<x>200</x>
<y>280</y>
<width>101</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="bedroomLightONOFFBtn">
<property name="geometry">
<rect>
<x>40</x>
<y>280</y>
<width>121</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>卧室灯 ON</string>
</property>
</widget>
<widget class="QPushButton" name="livingLightONOFFBtn">
<property name="geometry">
<rect>
<x>40</x>
<y>90</y>
<width>121</width>
<height>71</height>
</rect>
</property>
<property name="text">
<string>客厅灯 ON</string>
</property>
</widget>
<widget class="QLabel" name="livingLightONOFFPictureLabel">
<property name="geometry">
<rect>
<x>200</x>
<y>90</y>
<width>101</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<zorder>lightPageLabel</zorder>
<zorder>bedroomLightONOFFBtn</zorder>
<zorder>bedroomLightONOFFPictureLabel</zorder>
<zorder>livingLightONOFFPictureLabel</zorder>
<zorder>livingLightONOFFBtn</zorder>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,11 +1,11 @@
#include "widget.h"
#include "mainmenu.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
MainMenu w;
w.show();
return a.exec();
}

121
mainmenu.cpp Normal file
View File

@ -0,0 +1,121 @@
#include "mainmenu.h"
#include "ui_mainmenu.h"
MainMenu::MainMenu(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainMenu)
{
ui->setupUi(this);
ui->lineEdit_2->setText("admin");
ui->lineEdit->setText("123456");
ui->lineEdit->setEchoMode(QLineEdit::Password);
this->setWindowIcon(QIcon(":/ico.png"));
this->setWindowTitle("快乐不起来啊");
this->setAutoFillBackground(true);
QPalette palette;
QPixmap pixmap(":/OIP-C3.jpg");
palette.setBrush(QPalette::Window, QBrush(pixmap));
this->setPalette(palette);
}
MainMenu::~MainMenu()
{
delete ui;
}
void MainMenu::on_pushButton_clicked()
{
tcpSocket = new QTcpSocket;
QString ip = ui->lineEdit_3->text();
tcpSocket->connectToHost(ip,7777);
connect(tcpSocket, SIGNAL(connected()), this, SLOT(show_connected()));
connect(tcpSocket, SIGNAL(disconnected()), this, SLOT(show_disconnected()));
}
void MainMenu::on_checkBox_stateChanged(int arg1)
{
if(arg1)
{
ui->lineEdit->setEchoMode(QLineEdit::Normal);
}
else if (!arg1)
{
ui->lineEdit->setEchoMode(QLineEdit::Password);
}
else {
qDebug("err: ui->lineEdit->setEchoMode(QLineEdit::Password);");
return;
}
return ;
}
void MainMenu::show_connected()
{
int ret = QMessageBox::information(this, tr("👨‍👩‍👦‍👦 登录成功"),tr("点击取消退出连接"),
QMessageBox::Ok,
QMessageBox::Cancel);
if(ret == QMessageBox::Cancel)
{
// tcpSocket->disconnected();
delete tcpSocket;
return;
}
else {
//跳转到子界面
SubWindow = new submenu;
connect(SubWindow,SIGNAL(widget_close()),this,SLOT(subWindowClosed() ));
SubWindow->show();
this->hide();
// this->close();
}
}
void MainMenu::show_disconnected()
{
if(SubWindow!=NULL)
{
SubWindow->close();
}
int ret = QMessageBox::information(this, tr("👨‍👩‍👦‍👦 连接断开"),tr("是否重新连接?"),
QMessageBox::Yes,QMessageBox::No,QMessageBox::Cancel);
if(ret == QMessageBox::Cancel)
{
return;
}
if(ret == QMessageBox::No)
{
// 退出处理?
// if(tcpSocket)
// {
// delete tcpSocket;
// }
// Sleep(20);
return;
}
else if(ret == QMessageBox::Yes)
{
ui->pushButton->click();
}
else{
qDebug("error:---");
return ;
}
}
void MainMenu::Sleep(int msec)
{
QTime dieTime = QTime::currentTime().addMSecs(msec);
while( QTime::currentTime() < dieTime )
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}
void MainMenu::subWindowClosed()
{
show();
tcpSocket->close();
}

39
mainmenu.h Normal file
View File

@ -0,0 +1,39 @@
#ifndef MAINMENU_H
#define MAINMENU_H
#include <QString>
#include <QMainWindow>
#include <QFile>
#include <QTcpSocket> //
#include <QHostAddress> //地址格式
#include <QMessageBox>
#include <QTime>
#include "submenu.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainMenu; }
QT_END_NAMESPACE
class MainMenu : public QMainWindow
{
Q_OBJECT
public:
MainMenu(QWidget *parent = nullptr);
~MainMenu();
private slots:
void on_pushButton_clicked();
void on_checkBox_stateChanged(int arg1);
void show_connected();
void show_disconnected();
void Sleep(int msec);
void subWindowClosed();
private:
QTcpSocket * tcpSocket;
submenu *SubWindow = NULL;
Ui::MainMenu *ui;
};
#endif // MAINMENU_H

163
mainmenu.ui Normal file
View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainMenu</class>
<widget class="QMainWindow" name="MainMenu">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainMenu</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>205</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>254</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="styleSheet">
<string notr="true">Lable {backgrond-color:qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(0, 0, 0, 255), stop:0.19397 rgba(0, 0, 0, 255), stop:0.202312 rgba(122, 97, 0, 255), stop:0.495514 rgba(76, 58, 0, 255), stop:0.504819 rgba(255, 255, 255, 255), stop:0.79 rgba(255, 255, 255, 255), stop:1 rgba(255, 158, 158, 255))}</string>
</property>
<property name="text">
<string>账户:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>密码:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>IP:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_3">
<property name="text">
<string>172.27.128.1</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item alignment="Qt::AlignRight">
<widget class="QCheckBox" name="checkBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>显示密码</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="styleSheet">
<string notr="true">QPushButton{ color : red; }</string>
</property>
<property name="text">
<string>登录</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>254</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>205</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,14 +0,0 @@
<RCC>
<qresource prefix="/">
<file>picture/light.png</file>
<file>picture/temperatureSymbol.png</file>
<file>picture/airconditioner.png</file>
<file>picture/camera.png</file>
<file>picture/humiditySymbol.png</file>
<file>picture/traycon.png</file>
<file>picture/lightON.png</file>
<file>picture/lightOFF.png</file>
<file>picture/airconditionerOFF.png</file>
<file>picture/airconditionerON.png</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,85 +0,0 @@
#include "setsecurevalue.h"
#include "ui_setsecurevalue.h"
#include <QDebug>
#include <QMessageBox>
setSecureValue::setSecureValue(QWidget *parent) :
QWidget(parent),
ui(new Ui::setSecureValue)
{
ui->setupUi(this);
//设置窗口标题
this->setWindowTitle("设置安全阈值");
//创建套接字,和A9服务器取得连接
setValueSocket = new QTcpSocket(this);
setValueSocket->connectToHost("192.168.200.105", 7777);
connect(setValueSocket,SIGNAL(readyRead()),this,SLOT(recvServerDataSlot()));
}
setSecureValue::~setSecureValue()
{
delete ui;
setValueSocket->close();
setValueSocket = NULL;
}
void setSecureValue::on_setSecureValueReturnBtn_clicked()
{
emit setSecureValueToWidgetSignal();
}
void setSecureValue::on_setSecureValueSubmitBtn_clicked()
{
QString cmd = "//";
QString MessageBuf = "SetSecureValue:";
MessageBuf.append(ui->temMinComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->temMaxComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->humMinComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->humMaxComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->lightIntensityMinComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->lightIntensityMaxComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->smokeconcentrationMinComboBox->currentText());
MessageBuf.append(cmd);
MessageBuf.append(ui->smokeconcentrationMaxComboBox->currentText());
QByteArray arr, recv;
arr.append(MessageBuf);
qDebug() << arr;
if(this->setValueSocket->write(arr) == -1)
{
int ret = QMessageBox::question(this, "提交失败", "你提交的数据并没有上传到服务器!!!", QMessageBox::Yes);
if(ret == QMessageBox::Yes)
{
emit setSecureValueToWidgetSignal();
}
}
else
{
int ret = QMessageBox::question(this, "提交成功", "恭喜你成功提交数据到服务器!!!", QMessageBox::Yes);
if(ret == QMessageBox::Yes)
{
emit setSecureValueToWidgetSignal();
}
}
}
//接收来自服务器的信息
void setSecureValue::recvServerDataSlot()
{
int i = 0;
QByteArray arr = setValueSocket->readAll();
for(i = 0; i < 11; i++)
{
qDebug() << "arr[i] = " << (int)arr[i];
}
//qDebug() << "setvalue recv = " << arr;
}

View File

@ -1,33 +0,0 @@
#ifndef SETSECUREVALUE_H
#define SETSECUREVALUE_H
#include <QWidget>
#include <QtNetwork/QTcpSocket>
namespace Ui {
class setSecureValue;
}
class setSecureValue : public QWidget
{
Q_OBJECT
public:
explicit setSecureValue(QWidget *parent = 0);
~setSecureValue();
signals:
void setSecureValueToWidgetSignal();
private slots:
void on_setSecureValueReturnBtn_clicked();
void on_setSecureValueSubmitBtn_clicked();
void recvServerDataSlot();
private:
Ui::setSecureValue *ui;
QTcpSocket * setValueSocket;
};
#endif // SETSECUREVALUE_H

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-08-27T13:31:18
#
#-------------------------------------------------
QT += core gui charts
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = smart_home
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
widget.cpp \
historydata.cpp \
setsecurevalue.cpp
HEADERS += \
widget.h \
historydata.h \
setsecurevalue.h
FORMS += \
widget.ui \
historydata.ui \
setsecurevalue.ui
RESOURCES += \
picture.qrc

View File

@ -1,319 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2022-01-20T16:08:27. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{24b86c58-28ab-4639-a69a-e65d01fa8313}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.14.2 MinGW 32-bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.14.2 MinGW 32-bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5142.win32_mingw73_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/sn70315/Desktop/smart_home-master/build-smart_home-Desktop_Qt_5_14_2_MinGW_32_bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/sn70315/Desktop/smart_home-master/build-smart_home-Desktop_Qt_5_14_2_MinGW_32_bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/sn70315/Desktop/smart_home-master/build-smart_home-Desktop_Qt_5_14_2_MinGW_32_bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.1, 2018-08-28T15:01:26. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{2bdcebe0-b828-44ab-aa41-e9b54419a45b}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.10.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.10.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5101.win32_mingw53_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">在本地部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">smart_home</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Administrator/Desktop/1/smart_home.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">smart_home.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Debug</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2022-01-20T16:08:13. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{2bdcebe0-b828-44ab-aa41-e9b54419a45b}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.10.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.10.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5101.win32_mingw53_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">在本地部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">smart_home</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">smart_home2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Administrator/Desktop/smart_home/smart_home.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">smart_home.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/Administrator/Desktop/build-smart_home-Desktop_Qt_5_10_1_MinGW_32bit-Debug</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.2, 2018-08-28T14:47:28. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{2fa79d37-8b3a-405c-bcf3-08028e95e509}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.11.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.11.1 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5111.win32_mingw53_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/ubuntuTest/courseDesign/build-smart_home-Desktop_Qt_5_11_1_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/ubuntuTest/courseDesign/build-smart_home-Desktop_Qt_5_11_1_MinGW_32bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/ubuntuTest/courseDesign/build-smart_home-Desktop_Qt_5_11_1_MinGW_32bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署设置</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">smart_home</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/ubuntuTest/courseDesign/smart_home/smart_home.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">smart_home.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">D:/ubuntuTest/courseDesign/build-smart_home-Desktop_Qt_5_11_1_MinGW_32bit-Debug</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

99
sql.cpp Normal file
View File

@ -0,0 +1,99 @@
#include "sql.h"
sql::sql()
{
//创建数据库
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); //添加驱动
db.setDatabaseName("SmartGreenhouse.db"); //设置库名
bool ok = db.open();
if(!ok){
qDebug("open failed");
return ;
}
else {
qDebug()<<"open success";
}
//通过db创建表
//db.exec("create table usr (name text, passwd text); ");
//通过query创建表
QSqlQuery query;
ok = query.exec("create table if not exists user (id text, name text);");
if(!ok){
qDebug("failed to create user table");
}
else {
// qDebug()<<"create table success";
qDebug()<<"Student table created successfully";
}
ok = query.exec("create table if not exists Data (temp text, hum text,light text,co2 text);");
if(!ok){
qDebug("failed to create Data table");
}
else {
qDebug()<<"Data table created successfully";
}
//插入数据库
/*QString id = ui->lineEdit->text();
QString name = ui->lineEdit_2->text();
QString sql = QString("insert into stu values ('%1','%2')").arg(id).arg(name);
qDebug()<<"sql:"<<sql;
QSqlQuery query;
bool ok;
ok = query.exec(sql);
if(!ok){
qDebug()<<"insert table failed";
}
else {
qDebug()<<"insert table success";
}*/
//删除一条记录 根据学号来删除
/*
QString id = ui->lineEdit->text();
QString sql = QString("delete from stu where id='%1'").arg(id);
qDebug()<<"sql:"<<sql;
QSqlQuery query;
bool ok;
ok = query.exec(sql);
if(!ok){
qDebug()<<"delete table failed";
}
else {
qDebug()<<"delete table success";
}*/
//查询数据库
/* QString sql = QString("select * from stu;");
qDebug()<<"sql:"<<sql;
QSqlQuery query;
bool ok;
ok = query.exec(sql);
if(!ok){
qDebug()<<"select table failed";
}
else {
qDebug()<<"select table success";
}
while(query.next()){
qDebug()<< query.value("name").toString();
}*/
}

15
sql.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef SQL_H
#define SQL_H
#include <QObject>
//#include <QSql>
#include <QDebug>
#include <QSqlQuery>
#include <QSqlDatabase>
class sql
{
public:
sql();
};
#endif // SQL_H

92
submenu.cpp Normal file
View File

@ -0,0 +1,92 @@
#include "submenu.h"
#include "ui_submenu.h"
submenu::submenu(QWidget *parent) :
QWidget(parent),
ui(new Ui::submenu)
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":/ico.png"));
this->setWindowTitle("风中有朵雨做的云");
/* 喷头状态 灯状态 风扇状态 温度值,湿度值,光照--勒克斯(Lux或Lx),被光均匀照射的物体,在1平方米面积上所得的光通量是1流明时,它的照度是1勒克斯
fan 风扇 opf打开风扇 off关闭风扇
led1 灯1 opl1打开灯1 ofl1关闭灯1
led2 灯2 opl2打开灯2 ofl2 关闭灯2
buzzer蜂鸣器 temp温度超过阈值 hum湿度超过阈值 light光照超过阈值 smoke烟雾浓度超过阈值
rfid模块
A9发命令到m0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
tag Id len date crc
对齐 fan led1 led2 buzzer rfid 对齐
opf off opl1 ofl1 opl2 ofl2 temp hum light smoke
dd 4 24 4 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
表 2
环境数据包
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
tag id len date crc
对齐 tem hum adc light smoke state rfid 对齐
1 h 1 h ch0 ch1 led fan buzz led2
bb 4 24 4 0 20 0 23 1f 0 0 0 23 0 0 0 70 0 0 0 80 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0
*/
ui->stackedWidget->setCurrentWidget(ui->lightPage);
ui->lightBtn->setEnabled(false);
}
submenu::~submenu()
{
delete ui;
}
void submenu::on_quitBtn_clicked()
{
this->hide();
emit widget_close();
this->close();
}
void submenu::on_lightBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->lightPage);
//按下灯光按钮后让灯光按钮变成不可选状态,喷淋和风扇按钮变为可选状态
ui->lightBtn->setEnabled(false);
ui->sprayBtn->setEnabled(true);
ui->fanBtn->setEnabled(true);
}
void submenu::on_fanBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->fanPage);
//按下空调按钮后让风扇按钮变成不可选状态,灯光按钮和喷淋按钮变为可选状态
ui->fanBtn->setEnabled(false);
ui->lightBtn->setEnabled(true);
ui->sprayBtn->setEnabled(true);
}
void submenu::on_sprayBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->sprayPage);
//按下空调按钮后让喷淋按钮变成不可选状态,灯光按钮和风扇按钮变为可选状态
ui->fanBtn->setEnabled(true);
ui->lightBtn->setEnabled(true);
ui->sprayBtn->setEnabled(false);
}

35
submenu.h Normal file
View File

@ -0,0 +1,35 @@
#ifndef SUBMENU_H
#define SUBMENU_H
#include <QWidget>
namespace Ui {
class submenu;
}
class submenu : public QWidget
{
Q_OBJECT
public:
explicit submenu(QWidget *parent = nullptr);
~submenu();
private slots:
void on_quitBtn_clicked();
void on_lightBtn_clicked();
void on_fanBtn_clicked();
void on_sprayBtn_clicked();
private:
Ui::submenu *ui;
signals:
void widget_close(void);
};
#endif // SUBMENU_H

View File

@ -1,140 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Widget</class>
<widget class="QWidget" name="Widget">
<class>submenu</class>
<widget class="QWidget" name="submenu">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>721</width>
<height>622</height>
<width>872</width>
<height>627</height>
</rect>
</property>
<property name="windowTitle">
<string>Widget</string>
<property name="minimumSize">
<size>
<width>872</width>
<height>627</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>872</width>
<height>627</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(170, 160, 84)</string>
</property>
<widget class="QPushButton" name="quitBtn">
<property name="geometry">
<rect>
<x>760</x>
<y>590</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>退出</string>
</property>
</widget>
<widget class="QListView" name="listView">
<property name="geometry">
<rect>
<x>10</x>
<x>30</x>
<y>90</y>
<width>701</width>
<height>461</height>
<width>811</width>
<height>491</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 20);
</string>
</property>
</widget>
<widget class="QLabel" name="lightPictureLabel">
<widget class="QLabel" name="label_1">
<property name="geometry">
<rect>
<x>30</x>
<y>110</y>
<width>91</width>
<height>81</height>
<x>300</x>
<y>30</y>
<width>281</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>20</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">color:rgb(0, 85, 0);</string>
</property>
<property name="text">
<string/>
<string>科技改变未来</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QPushButton" name="lightBtn">
<property name="geometry">
<rect>
<x>30</x>
<y>210</y>
<width>93</width>
<height>41</height>
<x>80</x>
<y>180</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>灯光</string>
<string>LED</string>
</property>
</widget>
<widget class="QLabel" name="airconditionPicyureLabel">
<widget class="QPushButton" name="fanBtn">
<property name="geometry">
<rect>
<x>140</x>
<y>110</y>
<width>91</width>
<height>81</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="airconditionBtn">
<property name="geometry">
<rect>
<x>140</x>
<y>210</y>
<width>93</width>
<height>41</height>
<y>180</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>空调</string>
<string>风扇</string>
</property>
</widget>
<widget class="QPushButton" name="cameraBtn">
<widget class="QPushButton" name="sprayBtn">
<property name="geometry">
<rect>
<x>250</x>
<y>210</y>
<width>93</width>
<height>41</height>
<x>200</x>
<y>180</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>摄像头</string>
<string>喷淋</string>
</property>
</widget>
<widget class="QLabel" name="cameraPictureLabel">
<widget class="QLabel" name="lightIntensityLabel">
<property name="geometry">
<rect>
<x>250</x>
<y>110</y>
<width>91</width>
<height>81</height>
<x>80</x>
<y>360</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string/>
<string>光照强度:</string>
</property>
</widget>
<widget class="QLabel" name="switchPictureLabel">
<widget class="QLabel" name="humidityLabel">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>331</width>
<height>161</height>
<x>80</x>
<y>310</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string/>
<string>湿 度:</string>
</property>
</widget>
<widget class="QLabel" name="temperationLabel">
<property name="geometry">
<rect>
<x>80</x>
<y>260</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>温 度:</string>
</property>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>350</x>
<y>100</y>
<x>430</x>
<y>110</y>
<width>20</width>
<height>441</height>
</rect>
@ -146,8 +197,8 @@
<widget class="Line" name="line_2">
<property name="geometry">
<rect>
<x>20</x>
<y>260</y>
<x>80</x>
<y>230</y>
<width>321</width>
<height>16</height>
</rect>
@ -156,94 +207,12 @@
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QLabel" name="humidityDisplayLabel">
<property name="geometry">
<rect>
<x>170</x>
<y>330</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="lightIntensityDisplayLabel">
<property name="geometry">
<rect>
<x>160</x>
<y>390</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="temperationSymbolLabel">
<property name="geometry">
<rect>
<x>280</x>
<y>280</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="humiditySymbolLabel">
<property name="geometry">
<rect>
<x>280</x>
<y>330</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="lightIntensitySymbolLabel">
<property name="geometry">
<rect>
<x>280</x>
<y>390</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Lux/lx</string>
</property>
</widget>
<widget class="Line" name="line_3">
<property name="geometry">
<rect>
<x>20</x>
<y>450</y>
<width>331</width>
<x>80</x>
<y>420</y>
<width>321</width>
<height>16</height>
</rect>
</property>
@ -251,50 +220,50 @@
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QPushButton" name="setSecureValueBtn">
<property name="geometry">
<rect>
<x>290</x>
<y>490</y>
<width>81</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>设置阈值</string>
</property>
</widget>
<widget class="QPushButton" name="historyDataBtn">
<property name="geometry">
<rect>
<x>40</x>
<y>470</y>
<width>121</width>
<height>61</height>
<x>100</x>
<y>490</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>历史数据</string>
</property>
</widget>
<widget class="QPushButton" name="setSecureValueBtn">
<property name="geometry">
<rect>
<x>220</x>
<y>470</y>
<width>121</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>设置安全阈值</string>
</property>
</widget>
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>370</x>
<y>100</y>
<x>470</x>
<y>110</y>
<width>331</width>
<height>441</height>
</rect>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="lightPage">
<widget class="QLabel" name="livingLightONOFFPictureLabel">
<widget class="QLabel" name="lampLightONOFFPictureLabel">
<property name="geometry">
<rect>
<x>190</x>
<y>150</y>
<x>180</x>
<y>160</y>
<width>101</width>
<height>61</height>
</rect>
@ -303,24 +272,24 @@
<string/>
</property>
</widget>
<widget class="QPushButton" name="livingLightONOFFBtn">
<widget class="QPushButton" name="lampLightONOFFBtn">
<property name="geometry">
<rect>
<x>30</x>
<y>150</y>
<width>121</width>
<height>71</height>
<x>40</x>
<y>170</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>客厅灯 ON</string>
<string>光照灯 ON</string>
</property>
</widget>
<widget class="QLabel" name="bedroomLightONOFFPictureLabel">
<widget class="QLabel" name="TemCtrlLightONOFFPictureLabel">
<property name="geometry">
<rect>
<x>190</x>
<y>350</y>
<x>180</x>
<y>280</y>
<width>101</width>
<height>61</height>
</rect>
@ -329,17 +298,17 @@
<string/>
</property>
</widget>
<widget class="QPushButton" name="bedroomLightONOFFBtn">
<widget class="QPushButton" name="TemCtrlLightONOFFBtn">
<property name="geometry">
<rect>
<x>30</x>
<y>350</y>
<width>121</width>
<height>61</height>
<x>40</x>
<y>290</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>卧室灯 ON</string>
<string>温控灯 ON</string>
</property>
</widget>
<widget class="QLabel" name="lightTitleLabel">
@ -368,8 +337,8 @@
</property>
</widget>
</widget>
<widget class="QWidget" name="airconditionPage">
<widget class="QLabel" name="airconditionTitleLabel">
<widget class="QWidget" name="fanPage">
<widget class="QLabel" name="fanTitleLabel">
<property name="geometry">
<rect>
<x>130</x>
@ -388,13 +357,13 @@
<string notr="true">color: rgb(0, 85, 255);</string>
</property>
<property name="text">
<string>空调</string>
<string>风扇</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QPushButton" name="airconditionONOFFBtn">
<widget class="QPushButton" name="fanONOFFBtn">
<property name="geometry">
<rect>
<x>100</x>
@ -404,10 +373,10 @@
</rect>
</property>
<property name="text">
<string>空调 ON</string>
<string>风扇 ON</string>
</property>
</widget>
<widget class="QLabel" name="airconditionONOFFPictureLabel">
<widget class="QLabel" name="fanONOFFPictureLabel">
<property name="geometry">
<rect>
<x>100</x>
@ -421,13 +390,39 @@
</property>
</widget>
</widget>
<widget class="QWidget" name="cameraPage">
<widget class="QLabel" name="cameraTitleLabel">
<widget class="QWidget" name="sprayPage">
<widget class="QLabel" name="sprayONOFFPictureLabel">
<property name="geometry">
<rect>
<x>130</x>
<y>10</y>
<width>72</width>
<x>110</x>
<y>210</y>
<width>131</width>
<height>81</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="sprayONOFFBtn">
<property name="geometry">
<rect>
<x>110</x>
<y>350</y>
<width>131</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>喷洒装置 ON</string>
</property>
</widget>
<widget class="QLabel" name="sprayTitleLabel">
<property name="geometry">
<rect>
<x>131</x>
<y>50</y>
<width>81</width>
<height>31</height>
</rect>
</property>
@ -441,140 +436,19 @@
<string notr="true">color: rgb(0, 85, 255);</string>
</property>
<property name="text">
<string>摄像头</string>
<string>喷洒装置</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="cameraShowPageLabel">
<property name="geometry">
<rect>
<x>0</x>
<y>40</y>
<width>331</width>
<height>401</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="cameraStartBtn">
<property name="geometry">
<rect>
<x>30</x>
<y>380</y>
<width>93</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>开始</string>
</property>
</widget>
<widget class="QPushButton" name="cameraStopBtn">
<property name="geometry">
<rect>
<x>220</x>
<y>380</y>
<width>93</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>暂停</string>
</property>
</widget>
</widget>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>220</x>
<y>20</y>
<width>281</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>20</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0);</string>
</property>
<property name="text">
<string> 智能家居控制平台</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="temperationLabel">
<property name="geometry">
<rect>
<x>30</x>
<y>280</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>温 度:</string>
</property>
</widget>
<widget class="QLabel" name="humidityLabel">
<property name="geometry">
<rect>
<x>30</x>
<y>330</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>湿 度:</string>
</property>
</widget>
<widget class="QLabel" name="lightIntensityLabel">
<property name="geometry">
<rect>
<x>30</x>
<y>390</y>
<width>121</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>光照强度:</string>
</property>
</widget>
<widget class="QLabel" name="TemDisplayLabel">
<property name="geometry">
<rect>
<x>170</x>
<y>280</y>
<x>190</x>
<y>260</y>
<width>101</width>
<height>31</height>
</rect>
@ -583,32 +457,110 @@
<string/>
</property>
</widget>
<zorder>switchPictureLabel</zorder>
<widget class="QLabel" name="humidityDisplayLabel">
<property name="geometry">
<rect>
<x>190</x>
<y>310</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="lightIntensityDisplayLabel">
<property name="geometry">
<rect>
<x>190</x>
<y>360</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<family>华文行楷</family>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="lightIntensitySymbolLabel">
<property name="geometry">
<rect>
<x>310</x>
<y>360</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Lux/lx</string>
</property>
</widget>
<widget class="QLabel" name="humiditySymbolLabel">
<property name="geometry">
<rect>
<x>310</x>
<y>310</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>0%</string>
</property>
</widget>
<widget class="QLabel" name="temperationSymbolLabel">
<property name="geometry">
<rect>
<x>310</x>
<y>260</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>℃</string>
</property>
</widget>
<zorder>listView</zorder>
<zorder>lightPictureLabel</zorder>
<zorder>quitBtn</zorder>
<zorder>label_1</zorder>
<zorder>lightBtn</zorder>
<zorder>airconditionPicyureLabel</zorder>
<zorder>airconditionBtn</zorder>
<zorder>cameraBtn</zorder>
<zorder>cameraPictureLabel</zorder>
<zorder>fanBtn</zorder>
<zorder>sprayBtn</zorder>
<zorder>lightIntensityLabel</zorder>
<zorder>humidityLabel</zorder>
<zorder>temperationLabel</zorder>
<zorder>line</zorder>
<zorder>line_2</zorder>
<zorder>line_3</zorder>
<zorder>setSecureValueBtn</zorder>
<zorder>historyDataBtn</zorder>
<zorder>stackedWidget</zorder>
<zorder>TemDisplayLabel</zorder>
<zorder>humidityDisplayLabel</zorder>
<zorder>lightIntensityDisplayLabel</zorder>
<zorder>temperationSymbolLabel</zorder>
<zorder>humiditySymbolLabel</zorder>
<zorder>lightIntensitySymbolLabel</zorder>
<zorder>line_3</zorder>
<zorder>historyDataBtn</zorder>
<zorder>setSecureValueBtn</zorder>
<zorder>stackedWidget</zorder>
<zorder>label_2</zorder>
<zorder>temperationLabel</zorder>
<zorder>humidityLabel</zorder>
<zorder>lightIntensityLabel</zorder>
<zorder>TemDisplayLabel</zorder>
<zorder>humiditySymbolLabel</zorder>
<zorder>temperationSymbolLabel</zorder>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

View File

@ -1,480 +0,0 @@
#include "widget.h"
#include "ui_widget.h"
#include <QMenu>
#include <QtGui>
#include <QtNetwork/QTcpSocket>
#include <QDebug>
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
//窗口名字
this->setWindowTitle("智能家居控制平台");
//开关窗口背景
//设置托盘
setWindowIcon(QIcon(":/picture/traycon.png"));
trayIcon = new QSystemTrayIcon(QIcon(":/picture/traycon.png"), this);
//设置系统托盘图标
trayIcon->setToolTip("智能家居控制平台");
QMenu * menu = new QMenu;
menu->addAction(tr("退出"), qApp, SLOT(quit()));
trayIcon->setContextMenu(menu);
//创建套接字,和A9服务器取得连接
parentSocket = new QTcpSocket(this);
parentSocket->connectToHost("192.168.200.105", 7777);
QByteArray ThisIsWidget;
ThisIsWidget.append("ThisIsWidget");
qDebug() << "ThisIsWidget " << ThisIsWidget;
this->parentSocket->write(ThisIsWidget);
//电灯图标
lightPix.load(":/picture/light.png");
ui->lightPictureLabel->setPixmap(lightPix);
ui->lightPictureLabel->setScaledContents(true);
//空调图标
airconditionPix.load(":/picture/airconditioner.png");
ui->airconditionPicyureLabel->setPixmap(airconditionPix);
ui->airconditionPicyureLabel->setScaledContents(true);
//摄像头图标
cameraPix = new QPixmap();
cameraPix->load(":/picture/camera.png");
ui->cameraPictureLabel->setPixmap(*cameraPix);
ui->cameraPictureLabel->setScaledContents(true);
//温度符号图标
temperatureSymbol.load(":/picture/temperatureSymbol.png");
ui->temperationSymbolLabel->setPixmap(temperatureSymbol);
ui->temperationSymbolLabel->setScaledContents(true);
//湿度符号图标
humiditySymbol.load(":/picture/humiditySymbol.png");
ui->humiditySymbolLabel->setPixmap(humiditySymbol);
ui->humiditySymbolLabel->setScaledContents(true);
//设置电灯打开图标
lightONPix.load(":/picture/lightON.png");
//设置电灯关闭图标
lightOFFPix.load(":/picture/lightOFF.png");
//设置空调打开图标
airconditionONPix.load(":/picture/airconditionerON.png");
//设置空调关闭图标
airconditionOFFPix.load(":/picture/airconditionerOFF.png");
//摄像头配置
cameraPix = new QPixmap();
this->childSocket = NULL;
ui->cameraStartBtn->setEnabled(true);//开启视频按钮的初值给true
ui->cameraStopBtn->setEnabled(false);//关闭视频按钮的初值给false
ui->cameraPage->setMinimumSize(640,480);
ui->cameraPage->setMaximumSize(640,480);
ui->cameraShowPageLabel->setMinimumSize(480,320);
ui->cameraShowPageLabel->setMaximumSize(480,320);
//接收到设置安全阈值页面发来的信号,并把页面从安全阈值设置页面切换成主页面
connect(&setValue, SIGNAL(setSecureValueToWidgetSignal()), this, SLOT(setSecureValueTurnWidgetSlot()));
//接收到历史数据页面发来的信号,并把页面从历史数据页面切换成主页面
connect(&historyData, SIGNAL(historyDataToWidgetSignal()), this, SLOT(historyDataTurnWidgetSlot()));
//接收来自服务器的信息
connect(parentSocket, SIGNAL(readyRead()), this, SLOT(recvServerDataSlot()));
}
Widget::~Widget()
{
delete ui;
parentSocket->close();
parentSocket = NULL;
}
void Widget::on_livingLightONOFFBtn_clicked()
{
if(ui->livingLightONOFFBtn->text() == "客厅灯 ON")
{
//显示电灯打开的图标
ui->livingLightONOFFPictureLabel->setPixmap(lightONPix);
ui->livingLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->livingLightONOFFBtn->setText("客厅灯 OFF");
//发送命令给A9服务器,打开客厅灯
QByteArray openlivingroomLight;
openlivingroomLight.append("Livingroom:ON");
qDebug() << "openlivingroomLight " << openlivingroomLight;
this->parentSocket->write(openlivingroomLight);
}
else if(ui->livingLightONOFFBtn->text() == "客厅灯 OFF")
{
//显示电灯关闭图标
ui->livingLightONOFFPictureLabel->setPixmap(lightOFFPix);
ui->livingLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->livingLightONOFFBtn->setText("客厅灯 ON");
//发送命令给A9服务器,关闭客厅灯
QByteArray closelivingroomLight;
closelivingroomLight.append("Livingroom:OFF");
qDebug() << "closelivingroomLight " << closelivingroomLight;
this->parentSocket->write(closelivingroomLight);
}
}
void Widget::on_bedroomLightONOFFBtn_clicked()
{
if(ui->bedroomLightONOFFBtn->text() == "卧室灯 ON")
{
//显示电灯打开的图标
ui->bedroomLightONOFFPictureLabel->setPixmap(lightONPix);
ui->bedroomLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->bedroomLightONOFFBtn->setText("卧室灯 OFF");
//发送命令给A9服务器,打开卧室灯
QByteArray openBedroomLight;
openBedroomLight.append("Bedroom:ON");
qDebug() << "openBedroomLight " << openBedroomLight;
this->parentSocket->write(openBedroomLight);
}
else if(ui->bedroomLightONOFFBtn->text() == "卧室灯 OFF")
{
//显示电灯关闭图标
ui->bedroomLightONOFFPictureLabel->setPixmap(lightOFFPix);
ui->bedroomLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->bedroomLightONOFFBtn->setText("卧室灯 ON");
//发送命令给A9服务器,关闭卧室灯
QByteArray closeBedroomLight;
closeBedroomLight.append("Bedroom:OFF");
qDebug() << "closeBedroomLight " << closeBedroomLight;
this->parentSocket->write(closeBedroomLight);
}
}
void Widget::on_lightBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->lightPage);
//按下灯光按钮后让灯光按钮变成不可选状态,空调和摄像头按钮变为可选状态
ui->lightBtn->setEnabled(false);
ui->airconditionBtn->setEnabled(true);
ui->cameraBtn->setEnabled(true);
}
void Widget::on_airconditionBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->airconditionPage);
//按下空调按钮后让空调按钮变成不可选状态,灯光按钮和摄像头按钮变为可选状态
ui->airconditionBtn->setEnabled(false);
ui->lightBtn->setEnabled(true);
ui->cameraBtn->setEnabled(true);
}
void Widget::on_cameraBtn_clicked()
{
ui->stackedWidget->setCurrentWidget(ui->cameraPage);
//按下摄像头按钮后摄像头按钮变为不可选状态,灯光和空调按钮变为可选状态
ui->cameraBtn->setEnabled(false);
ui->lightBtn->setEnabled(true);
ui->airconditionBtn->setEnabled(true);
}
void Widget::on_airconditionONOFFBtn_clicked()
{
if(ui->airconditionONOFFBtn->text() == "空调 ON")
{
//显示空调开的图标
ui->airconditionONOFFPictureLabel->setPixmap(airconditionONPix);
ui->airconditionONOFFPictureLabel->setScaledContents(true);
//改变按钮上的文本为空调关闭
ui->airconditionONOFFBtn->setText("空调 OFF");
//发送命令给A9服务器,打开空调
QByteArray openAirconditionLight;
openAirconditionLight.append("Aircondition:ON");
qDebug() << "openAirconditionLight " << openAirconditionLight;
this->parentSocket->write(openAirconditionLight);
}
else if(ui->airconditionONOFFBtn->text() == "空调 OFF")
{
//显示空调关闭的图标
ui->airconditionONOFFPictureLabel->setPixmap(airconditionOFFPix);
ui->airconditionONOFFPictureLabel->setScaledContents(true);
//改变按钮上的字
ui->airconditionONOFFBtn->setText("空调 ON");
//发送命令给A9服务器,打开空调
QByteArray closeAirconditionLight;
closeAirconditionLight.append("Aircondition:OFF");
qDebug() << "closeAirconditionLight " << closeAirconditionLight;
this->parentSocket->write(closeAirconditionLight);
}
}
//摄像头页面开始按钮
void Widget::on_cameraStartBtn_clicked()
{
if(NULL == this->childSocket)
{
this->childSocket = new QTcpSocket();
this->childSocket->connectToHost("192.168.200.105",8888);
//发送信号者为socket这个实例,发送的信号是connected(),接收者为Form,槽函数为msconnected()
connect(this->childSocket,SIGNAL(connected()),this,SLOT(msconnected()));
connect(this->childSocket,SIGNAL(disconnected()),this,SLOT(msdisconnected()));
ui->cameraStartBtn->setEnabled(false);//开启视频后让此按钮不可选择
ui->cameraStopBtn->setEnabled(true);//已经开启视频后让关闭视频按钮可选择(true)
}
else
{
ui->cameraStartBtn->setEnabled(false);
ui->cameraStopBtn->setEnabled(true);
timer->start(100);
}
}
void Widget::msconnected()
{
qDebug() << "connected";
timer = new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(updatepic()));
timer->start(100);
}
//发送不连接请求
void Widget::msdisconnected()
{
if(timer->isActive())
timer->stop();
ui->cameraStartBtn->setEnabled(true);//按下关闭视频按钮后让开启视频按钮可选择(true)
ui->cameraStopBtn->setEnabled(false);//按下关闭视频按钮后让关闭按钮不可选择(false)
this->childSocket->close();
this->childSocket = NULL;
}
//连续读取视频信息
void Widget::updatepic()
{
unsigned int ret;
const char *request = "pic"; //请求命令
char response[20]; //服务器发给QT的回复
char *len; //
unsigned int piclen; //图片长度
char picbuf[1024 * 1024]; //存放图片
ret = this->childSocket->write(request, strlen(request)); //发送请求图片命令
if (ret != strlen(request)) {
qDebug() << "send request failed";
timer->stop();
this->childSocket->close();
}
this->childSocket->flush(); //刷新socket
this->childSocket->waitForReadyRead(30000);
memset(response, 0, sizeof(response));
ret = this->childSocket->read(response, sizeof(response));
if (ret != sizeof(response)) {
qDebug() << "recv response failed";
timer->stop();
this->childSocket->close();
this->childSocket = NULL;
}
len = strstr(response, "len");
if (len == NULL) {
qDebug() << "response header is error";
timer->stop();
this->childSocket->close();
this->childSocket = NULL;
}
*len = '\0';
//从response中读取图片长度
piclen = atoi(response);
unsigned int total = 0;
//循环读取pic信息
while (total < piclen) {
ret = this->childSocket->read(picbuf+total, piclen-total);
if (ret < 0) {
qDebug() << "recv pic failed" << ret;
timer->stop();
this->childSocket->close();
this->childSocket = NULL;
return;
} else if (ret == 0) {
this->childSocket->waitForReadyRead(30000);
continue;
} else
total += ret;
}
cameraPix->loadFromData((const uchar *)picbuf,piclen,"JPEG");
ui->cameraShowPageLabel->setPixmap(*cameraPix);
}
//暂停显示图像
void Widget::on_cameraStopBtn_clicked()
{
qDebug() << "total:----11--------------- ";
if(timer->isActive())
timer->stop();
qDebug() << "total:------------------- ";
ui->cameraStartBtn->setEnabled(true);//按下关闭视频按钮后让开启视频按钮变黑(true)
ui->cameraStopBtn->setEnabled(false);//按下关闭视频按钮后让关闭按钮变灰(false)
}
//接收到设置安全阈值页面发来的信号,并把页面从安全阈值设置页面切换成主页面
void Widget::setSecureValueTurnWidgetSlot()
{
//隐藏设置安全阈值界面,显示主页面
this->show();
setValue.hide();
}
//设置安全阈值按钮,切换界面到设置安全阈值界面
void Widget::on_setSecureValueBtn_clicked()
{
//隐藏主页面,显示设置安全阈值界面
this->hide();
setValue.show();
}
//历史数据按钮,切换界面到历史数据界面
void Widget::on_historyDataBtn_clicked()
{
//隐藏主界面,显示历史数据界面
this->hide();
historyData.show();
}
//接收到历史数据页面发来的信号,并把页面从历史数据页面切换成主页面
void Widget::historyDataTurnWidgetSlot()
{
//隐藏历史数据页面,显示主页面
this->show();
historyData.hide();
}
//接收来自服务器的信息
void Widget::recvServerDataSlot()
{
int i = 0;
QByteArray arr = parentSocket->readAll();
qDebug() << "widget recv = " << arr;
for(i = 0; i < 11; i++)
{
if(i == 0)
{
if((int)arr[i] == 1)
{
//显示电灯打开的图标
ui->livingLightONOFFPictureLabel->setPixmap(lightONPix);
ui->livingLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->livingLightONOFFBtn->setText("客厅灯 OFF");
}
else if((int)arr[i] == 0)
{
//显示电灯关闭图标
ui->livingLightONOFFPictureLabel->setPixmap(lightOFFPix);
ui->livingLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->livingLightONOFFBtn->setText("客厅灯 ON");
}
}
else if(i == 1)
{
if((int)arr[i] == 1)
{
//显示电灯打开的图标
ui->bedroomLightONOFFPictureLabel->setPixmap(lightONPix);
ui->bedroomLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->bedroomLightONOFFBtn->setText("卧室灯 OFF");
}
else if((int)arr[i] == 0)
{
//显示电灯关闭图标
ui->bedroomLightONOFFPictureLabel->setPixmap(lightOFFPix);
ui->bedroomLightONOFFPictureLabel->setScaledContents(true);
//改变电灯开关上的文本
ui->bedroomLightONOFFBtn->setText("卧室灯 ON");
}
}
else if(i == 2)
{
if((int)arr[i] == 1)
{
//显示空调开的图标
ui->airconditionONOFFPictureLabel->setPixmap(airconditionONPix);
ui->airconditionONOFFPictureLabel->setScaledContents(true);
//改变按钮上的文本为空调关闭
ui->airconditionONOFFBtn->setText("空调 OFF");
}
else if((int)arr[i] == 0)
{
//显示空调关闭的图标
ui->airconditionONOFFPictureLabel->setPixmap(airconditionOFFPix);
ui->airconditionONOFFPictureLabel->setScaledContents(true);
//改变按钮上的字
ui->airconditionONOFFBtn->setText("空调 ON");
}
}
else if(i == 3)
{
ui->TemDisplayLabel->setText(tr("%1").arg((float)(((int)arr[i] * 10 + (int)arr[i + 1]) / 10)));
}
else if(i == 5)
{
ui->humidityDisplayLabel->setText(tr("%1").arg((float)(((int)arr[i] * 10 + (int)arr[i + 1]) / 10)));
}
else if(i == 7)
{
ui->lightIntensityDisplayLabel->setText(tr("%1").arg((int)(((int)arr[i + 3] << 24) + ((int)arr[i + 2]) << 16) + ((int)arr[i + 1] << 8) + (int)arr[i]));
}
}
}
/*void Widget::on_realtimeDataBtn_clicked()
{
//给服务器发命令,显示告诉这是主页面,然后显示实时数据
QByteArray ThisIsWidget;
ThisIsWidget.append("ThisIsWidget");
qDebug() << "ThisIsWidget " << ThisIsWidget;
this->parentSocket->write(ThisIsWidget);
}*/

View File

@ -1,82 +0,0 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QPixmap>
#include <QSystemTrayIcon>
#include <QTimer>
#include <QtNetwork/QTcpSocket>
#include "setsecurevalue.h"
#include "historydata.h"
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
private slots:
void on_livingLightONOFFBtn_clicked();
void on_bedroomLightONOFFBtn_clicked();
void on_lightBtn_clicked();
void on_airconditionBtn_clicked();
void on_cameraBtn_clicked();
void on_airconditionONOFFBtn_clicked();
void msconnected();
void msdisconnected();
void updatepic();
void on_cameraStartBtn_clicked();
void on_cameraStopBtn_clicked();
//接收到设置安全阈值页面发来的信号,并把页面从安全阈值设置页面切换成主页面
void setSecureValueTurnWidgetSlot();
void on_setSecureValueBtn_clicked();
void on_historyDataBtn_clicked();
//接收到历史数据页面发来的信号,并把页面从历史数据页面切换成主页面
void historyDataTurnWidgetSlot();
//接收来自服务器的信息
void recvServerDataSlot();
//void on_realtimeDataBtn_clicked();
private:
Ui::Widget *ui;
QPixmap lightPix;
QPixmap airconditionPix;
QPixmap *cameraPix;
QTcpSocket * parentSocket;
QTcpSocket * childSocket;
QTimer *timer;
QPixmap temperatureSymbol;
QPixmap humiditySymbol;
QSystemTrayIcon *trayIcon;
QPixmap lightONPix;
QPixmap lightOFFPix;
QPixmap airconditionONPix;
QPixmap airconditionOFFPix;
setSecureValue setValue;
historyData historyData;
};
#endif // WIDGET_H