选题为智能家居系统,由上位机(PC)、下位机(主机和从机)构成,上位机使用QT编写,下位机为CC2540增强型8051内核单片机,使用IAR开发环境,C语言编程,开发板搭载了DH11温湿度模块、光敏电阻传感器,以及按键和LED。上位机和下位机主机之间使用USB串口连接,下位机主机从机之间使用蓝牙通信 /******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** ** Created: Fri Jul 6 11:24:03 2018 ** by: Qt User Interface Compiler version 4.7.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/
#ifndef UI_MAINWINDOW_H #define UI_MAINWINDOW_H
#include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QCheckBox> #include <QtGui/QComboBox> #include <QtGui/QCommandLinkButton> #include <QtGui/QDial> #include <QtGui/QGroupBox> #include <QtGui/QHeaderView> #include <QtGui/QLCDNumber> #include <QtGui/QLabel> #include <QtGui/QMainWindow> #include <QtGui/QMenuBar> #include <QtGui/QPushButton> #include <QtGui/QSlider> #include <QtGui/QStatusBar> #include <QtGui/QTabWidget> #include <QtGui/QTimeEdit> #include <QtGui/QToolBar> #include <QtGui/QToolButton> #include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_MainWindow { public: QWidget *centralWidget; QGroupBox *groupBox; QDial *TempSet; QCheckBox *TempCtrlEN; QLabel *TempSetVAL; QCheckBox *CurtainEN; QCheckBox *checkBox_2; QTimeEdit *SleepTime; QLabel *SleepLabel; QTabWidget *Tab; QWidget *tab; QLCDNumber *TempVal; QLabel *label; QLabel *LightState; QLabel *label_3; QLabel *label_4; QLCDNumber *HumiVal; QGroupBox *groupBox_3; QLabel *label_5; QLabel *AirMode; QLabel *AirSetTemp; QGroupBox *groupBox_4; QLabel *label_6; QLabel *label_7; QLabel *CurState; QLabel *LightOnOff; QGroupBox *groupBox_5; QLabel *LockState; QGroupBox *groupBox_6; QLabel *MasterState; QLabel *SlaveState; QWidget *tab_2; QGroupBox *groupBox_2; QCommandLinkButton *AlertConfirm; QCommandLinkButton *CurtainExt; QCommandLinkButton *LightExt; QGroupBox *groupBox_7; QComboBox *AirModeSel; QSlider *horizontalSlider; QLabel *label_2; QCommandLinkButton *AirExt; QLabel *label1; QComboBox *comList; QPushButton *comSearch; QPushButton *comLink; QGroupBox *groupBox_8; QLabel *label_8; QLabel *label_9; QLabel *label_10; QLabel *label_11; QLabel *label_12; QToolButton *toolButton; QMenuBar *menuBar; QToolBar *mainToolBar; QStatusBar *statusBar;
void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) MainWindow->setObjectName(QString::fromUtf8("MainWindow")); MainWindow->resize(710, 548); QIcon icon; icon.addFile(QString::fromUtf8(":/logo/pic/logo.png"), QSize(), QIcon::Normal, QIcon::Off); MainWindow->setWindowIcon(icon); centralWidget = new QWidget(MainWindow); centralWidget->setObjectName(QString::fromUtf8("centralWidget")); groupBox = new QGroupBox(centralWidget); groupBox->setObjectName(QString::fromUtf8("groupBox")); groupBox->setGeometry(QRect(10, 330, 291, 161)); TempSet = new QDial(groupBox); TempSet->setObjectName(QString::fromUtf8("TempSet")); TempSet->setGeometry(QRect(30, 20, 71, 81)); TempSet->setMinimum(16); TempSet->setMaximum(35); TempSet->setValue(25); TempCtrlEN = new QCheckBox(groupBox); TempCtrlEN->setObjectName(QString::fromUtf8("TempCtrlEN")); TempCtrlEN->setGeometry(QRect(10, 140, 121, 16)); TempCtrlEN->setChecked(true); TempSetVAL = new QLabel(groupBox); TempSetVAL->setObjectName(QString::fromUtf8("TempSetVAL")); TempSetVAL->setGeometry(QRect(10, 110, 111, 21)); QFont font; font.setFamily(QString::fromUtf8("\345\276\256\350\275\257\351\233\205\351\273\221")); font.setPointSize(12); TempSetVAL->setFont(font); CurtainEN = new QCheckBox(groupBox); CurtainEN->setObjectName(QString::fromUtf8("CurtainEN")); CurtainEN->setGeometry(QRect(160, 30, 111, 16)); QFont font1; font1.setFamily(QString::fromUtf8("\345\276\256\350\275\257\351\233\205\351\273\221")); font1.setPointSize(11); CurtainEN->setFont(font1); checkBox_2 = new QCheckBox(groupBox); checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); checkBox_2->setGeometry(QRect(160, 60, 111, 16)); checkBox_2->setFont(font1); SleepTime = new QTimeEdit(groupBox); SleepTime->setObjectName(QString::fromUtf8("SleepTime")); SleepTime->setEnabled(false); SleepTime->setGeometry(QRect(160, 130, 118, 22)); SleepTime->setFont(font); SleepTime->setMaximumTime(QTime(23, 59, 59)); SleepTime->setMinimumTime(QTime(20, 0, 0)); SleepLabel = new QLabel(groupBox); SleepLabel->setObjectName(QString::fromUtf8("SleepLabel")); SleepLabel->setEnabled(false); SleepLabel->setGeometry(QRect(160, 100, 111, 21)); SleepLabel->setFont(font); Tab = new QTabWidget(centralWidget); Tab->setObjectName(QString::fromUtf8("Tab")); Tab->setGeometry(QRect(10, 10, 501, 301)); tab = new QWidget(); tab->setObjectName(QString::fromUtf8("tab")); TempVal = new QLCDNumber(tab); TempVal->setObjectName(QString::fromUtf8("TempVal")); TempVal->setGeometry(QRect(10, 40, 121, 51)); TempVal->setSmallDecimalPoint(false); TempVal->setDigitCount(6); TempVal->setProperty("value", QVariant(25.5)); label = new QLabel(tab); label->setObjectName(QString::fromUtf8("label")); label->setGeometry(QRect(10, 10, 101, 21)); label->setFont(font); LightState = new QLabel(tab); LightState->setObjectName(QString::fromUtf8("LightState")); LightState->setGeometry(QRect(310, 40, 51, 51)); LightState->setPixmap(QPixmap(QString::fromUtf8(":/icon/pic/sun.png"))); label_3 = new QLabel(tab); label_3->setObjectName(QString::fromUtf8("label_3")); label_3->setGeometry(QRect(160, 10, 101, 21)); label_3->setFont(font); label_4 = new QLabel(tab); label_4->setObjectName(QString::fromUtf8("label_4")); label_4->setGeometry(QRect(310, 10, 51, 21)); label_4->setFont(font); HumiVal = new QLCDNumber(tab); HumiVal->setObjectName(QString::fromUtf8("HumiVal")); HumiVal->setGeometry(QRect(160, 40, 121, 51)); HumiVal->setDigitCount(6); HumiVal->setProperty("value", QVariant(45.5)); groupBox_3 = new QGroupBox(tab); groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); groupBox_3->setGeometry(QRect(10, 120, 161, 151)); groupBox_3->setFont(font); label_5 = new QLabel(groupBox_3); label_5->setObjectName(QString::fromUtf8("label_5")); label_5->setGeometry(QRect(20, 50, 41, 21)); label_5->setFont(font1); AirMode = new QLabel(groupBox_3); AirMode->setObjectName(QString::fromUtf8("AirMode")); AirMode->setGeometry(QRect(80, 30, 51, 61)); AirMode->setPixmap(QPixmap(QString::fromUtf8(":/icon/pic/mode0.png"))); AirSetTemp = new QLabel(groupBox_3); AirSetTemp->setObjectName(QString::fromUtf8("AirSetTemp")); AirSetTemp->setGeometry(QRect(20, 110, 121, 21)); AirSetTemp->setFont(font1); groupBox_4 = new QGroupBox(tab); groupBox_4->setObjectName(QString::fromUtf8("groupBox_4")); groupBox_4->setGeometry(QRect(190, 120, 161, 151)); groupBox_4->setFont(font); label_6 = new QLabel(groupBox_4); label_6->setObjectName(QString::fromUtf8("label_6")); label_6->setGeometry(QRect(20, 50, 41, 21)); label_6->setFont(font1); label_7 = new QLabel(groupBox_4); label_7->setObjectName(QString::fromUtf8("label_7")); label_7->setGeometry(QRect(20, 110, 41, 21)); label_7->setFont(font1); CurState = new QLabel(groupBox_4); CurState->setObjectName(QString::fromUtf8("CurState")); CurState->setGeometry(QRect(90, 90, 51, 51)); CurState->setPixmap(QPixmap(QString::fromUtf8(":/icon/pic/close.png"))); LightOnOff = new QLabel(groupBox_4); LightOnOff->setObjectName(QString::fromUtf8("LightOnOff")); LightOnOff->setGeometry(QRect(90, 30, 51, 51)); LightOnOff->setPixmap(QPixmap(QString::fromUtf8(":/icon/pic/lighton.png"))); groupBox_5 = new QGroupBox(tab); groupBox_5->setObjectName(QString::fromUtf8("groupBox_5")); groupBox_5->setGeometry(QRect(370, 180, 111, 91)); groupBox_5->setFont(font); LockState = new QLabel(groupBox_5); LockState->setObjectName(QString::fromUtf8("LockState")); LockState->setGeometry(QRect(30, 30, 61, 51)); LockState->setPixmap(QPixmap(QString::fromUtf8(":/icon/pic/unlock.png"))); groupBox_6 = new QGroupBox(tab); groupBox_6->setObjectName(QString::fromUtf8("groupBox_6")); groupBox_6->setGeometry(QRect(370, 10, 111, 161)); groupBox_6->setFont(font); MasterState = new QLabel(groupBox_6); MasterState->setObjectName(QString::fromUtf8("MasterState")); MasterState->setGeometry(QRect(10, 50, 91, 21)); SlaveState = new QLabel(groupBox_6); SlaveState->setObjectName(QString::fromUtf8("SlaveState")); SlaveState->setGeometry(QRect(10, 100, 91, 21)); Tab->addTab(tab, QString()); tab_2 = new QWidget(); tab_2->setObjectName(QString::fromUtf8("tab_2")); Tab->addTab(tab_2, QString()); groupBox_2 = new QGroupBox(centralWidget); groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); groupBox_2->setGeometry(QRect(520, 100, 181, 391)); AlertConfirm = new QCommandLinkButton(groupBox_2); AlertConfirm->setObjectName(QString::fromUtf8("AlertConfirm")); AlertConfirm->setGeometry(QRect(10, 340, 161, 41)); QFont font2; font2.setFamily(QString::fromUtf8("Segoe UI")); font2.setPointSize(12); font2.setBold(true); font2.setWeight(75); AlertConfirm->setFont(font2); AlertConfirm->setIconSize(QSize(32, 32)); CurtainExt = new QCommandLinkButton(groupBox_2); CurtainExt->setObjectName(QString::fromUtf8("CurtainExt")); CurtainExt->setGeometry(QRect(10, 290, 161, 41)); CurtainExt->setFont(font2); CurtainExt->setIconSize(QSize(32, 32)); LightExt = new QCommandLinkButton(groupBox_2); LightExt->setObjectName(QString::fromUtf8("LightExt")); LightExt->setGeometry(QRect(10, 240, 161, 41)); LightExt->setFont(font2); LightExt->setIconSize(QSize(32, 32)); groupBox_7 = new QGroupBox(groupBox_2); groupBox_7->setObjectName(QString::fromUtf8("groupBox_7")); groupBox_7->setGeometry(QRect(10, 30, 161, 181)); AirModeSel = new QComboBox(groupBox_7); AirModeSel->setObjectName(QString::fromUtf8("AirModeSel")); AirModeSel->setGeometry(QRect(20, 30, 131, 31)); AirModeSel->setFont(font); horizontalSlider = new QSlider(groupBox_7); horizontalSlider->setObjectName(QString::fromUtf8("horizontalSlider")); horizontalSlider->setGeometry(QRect(20, 80, 131, 16)); horizontalSlider->setMinimum(16); horizontalSlider->setMaximum(35); horizontalSlider->setValue(25); horizontalSlider->setOrientation(Qt::Horizontal); label_2 = new QLabel(groupBox_7); label_2->setObjectName(QString::fromUtf8("label_2")); label_2->setGeometry(QRect(70, 100, 31, 16)); AirExt = new QCommandLinkButton(groupBox_7); AirExt->setObjectName(QString::fromUtf8("AirExt")); AirExt->setGeometry(QRect(10, 130, 141, 41)); AirExt->setFont(font2); AirExt->setIconSize(QSize(32, 32)); label1 = new QLabel(centralWidget); label1->setObjectName(QString::fromUtf8("label1")); label1->setGeometry(QRect(529, 15, 80, 21)); label1->setFont(font); comList = new QComboBox(centralWidget); comList->setObjectName(QString::fromUtf8("comList")); comList->setGeometry(QRect(613, 15, 71, 21)); comSearch = new QPushButton(centralWidget); comSearch->setObjectName(QString::fromUtf8("comSearch")); comSearch->setGeometry(QRect(523, 50, 81, 31)); QIcon icon1; icon1.addFile(QString::fromUtf8(":/icon/pic/search.png"), QSize(), QIcon::Normal, QIcon::Off); comSearch->setIcon(icon1); comSearch->setIconSize(QSize(30, 30)); comLink = new QPushButton(centralWidget); comLink->setObjectName(QString::fromUtf8("comLink")); comLink->setGeometry(QRect(610, 50, 81, 31)); QIcon icon2; icon2.addFile(QString::fromUtf8(":/icon/pic/link.png"), QSize(), QIcon::Normal, QIcon::Off); comLink->setIcon(icon2); comLink->setIconSize(QSize(30, 30)); groupBox_8 = new QGroupBox(centralWidget); groupBox_8->setObjectName(QString::fromUtf8("groupBox_8")); groupBox_8->setGeometry(QRect(320, 330, 181, 161)); label_8 = new QLabel(groupBox_8); label_8->setObjectName(QString::fromUtf8("label_8")); label_8->setGeometry(QRect(60, 10, 61, 71)); label_8->setPixmap(QPixmap(QString::fromUtf8(":/logo/pic/logo.png"))); label_9 = new QLabel(groupBox_8); label_9->setObjectName(QString::fromUtf8("label_9")); label_9->setGeometry(QRect(10, 80, 161, 16)); QFont font3; font3.setFamily(QString::fromUtf8("SimSun-ExtB")); font3.setPointSize(10); font3.setBold(true); font3.setWeight(75); label_9->setFont(font3); label_10 = new QLabel(groupBox_8); label_10->setObjectName(QString::fromUtf8("label_10")); label_10->setGeometry(QRect(60, 140, 54, 12)); label_11 = new QLabel(groupBox_8); label_11->setObjectName(QString::fromUtf8("label_11")); label_11->setGeometry(QRect(30, 120, 121, 16)); QFont font4; font4.setFamily(QString::fromUtf8("Gabriola")); font4.setPointSize(12); label_11->setFont(font4); label_12 = new QLabel(groupBox_8); label_12->setObjectName(QString::fromUtf8("label_12")); label_12->setGeometry(QRect(70, 100, 31, 16)); toolButton = new QToolButton(groupBox_8); toolButton->setObjectName(QString::fromUtf8("toolButton")); toolButton->setGeometry(QRect(160, 140, 16, 18)); MainWindow->setCentralWidget(centralWidget); menuBar = new QMenuBar(MainWindow); menuBar->setObjectName(QString::fromUtf8("menuBar")); menuBar->setGeometry(QRect(0, 0, 710, 23)); MainWindow->setMenuBar(menuBar); mainToolBar = new QToolBar(MainWindow); mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar); statusBar = new QStatusBar(MainWindow); statusBar->setObjectName(QString::fromUtf8("statusBar")); MainWindow->setStatusBar(statusBar);
retranslateUi(MainWindow);
Tab->setCurrentIndex(0); AirModeSel->setCurrentIndex(-1);
QMetaObject::connectSlotsByName(MainWindow); } // setupUi
void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate("MainWindow", "HomeAutomation", 0, QApplication::UnicodeUTF8)); groupBox->setTitle(QApplication::translate("MainWindow", "\350\207\252\345\212\250\346\216\247\345\210\266\350\256\276\347\275\256", 0, QApplication::UnicodeUTF8)); TempCtrlEN->setText(QApplication::translate("MainWindow", "\345\205\201\350\256\270\346\270\251\345\272\246\350\207\252\345\212\250\346\216\247\345\210\266", 0, QApplication::UnicodeUTF8)); TempSetVAL->setText(QApplication::translate("MainWindow", "\350\256\276\345\256\232\346\270\251\345\272\246\357\274\23225\342\204\203", 0, QApplication::UnicodeUTF8)); CurtainEN->setText(QApplication::translate("MainWindow", "\345\205\201\350\256\270\346\216\247\345\210\266\347\252\227\345\270\230", 0, QApplication::UnicodeUTF8)); checkBox_2->setText(QApplication::translate("MainWindow", "\345\205\201\350\256\270\346\216\247\345\210\266\347\205\247\346\230\216", 0, QApplication::UnicodeUTF8)); SleepLabel->setText(QApplication::translate("MainWindow", "\350\256\276\347\275\256\347\235\241\347\234\240\346\227\266\351\227\264\357\274\232", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("MainWindow", "\346\270\251\345\272\246\357\274\232\357\274\210\342\204\203\357\274\211", 0, QApplication::UnicodeUTF8)); LightState->setText(QString()); label_3->setText(QApplication::translate("MainWindow", "\346\271\277\345\272\246\357\274\232\357\274\210%\357\274\211", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("MainWindow", "\345\205\211\347\205\247\357\274\232", 0, QApplication::UnicodeUTF8)); groupBox_3->setTitle(QApplication::translate("MainWindow", "\347\251\272\350\260\203", 0, QApplication::UnicodeUTF8)); label_5->setText(QApplication::translate("MainWindow", "\346\250\241\345\274\217\357\274\232", 0, QApplication::UnicodeUTF8)); AirMode->setText(QString()); AirSetTemp->setText(QApplication::translate("MainWindow", "\350\256\276\345\256\232\346\270\251\345\272\246\357\274\23225\342\204\203", 0, QApplication::UnicodeUTF8)); groupBox_4->setTitle(QApplication::translate("MainWindow", "\345\205\211\347\205\247", 0, QApplication::UnicodeUTF8)); label_6->setText(QApplication::translate("MainWindow", "\347\201\257\345\205\211\357\274\232", 0, QApplication::UnicodeUTF8)); label_7->setText(QApplication::translate("MainWindow", "\347\252\227\345\270\230\357\274\232", 0, QApplication::UnicodeUTF8)); CurState->setText(QString()); LightOnOff->setText(QString()); groupBox_5->setTitle(QApplication::translate("MainWindow", "\351\227\250\347\246\201", 0, QApplication::UnicodeUTF8)); LockState->setText(QString()); groupBox_6->setTitle(QApplication::translate("MainWindow", "\350\256\276\345\244\207\347\212\266\346\200\201", 0, QApplication::UnicodeUTF8)); MasterState->setText(QApplication::translate("MainWindow", "\344\270\273\346\234\272\346\234\252\350\277\236\346\216\245", 0, QApplication::UnicodeUTF8)); SlaveState->setText(QApplication::translate("MainWindow", "\344\273\216\346\234\272\346\234\252\350\277\236\346\216\245", 0, QApplication::UnicodeUTF8)); Tab->setTabText(Tab->indexOf(tab), QApplication::translate("MainWindow", "\347\233\221\346\216\247", 0, QApplication::UnicodeUTF8)); Tab->setTabText(Tab->indexOf(tab_2), QApplication::translate("MainWindow", "\346\227\245\345\277\227", 0, QApplication::UnicodeUTF8)); groupBox_2->setTitle(QApplication::translate("MainWindow", "\350\256\276\345\244\207\351\201\245\346\216\247", 0, QApplication::UnicodeUTF8)); AlertConfirm->setText(QApplication::translate("MainWindow", " \350\247\243\351\231\244\346\212\245\350\255\246", 0, QApplication::UnicodeUTF8)); CurtainExt->setText(QApplication::translate("MainWindow", " \346\211\223\345\274\200\347\252\227\345\270\230", 0, QApplication::UnicodeUTF8)); LightExt->setText(QApplication::translate("MainWindow", " \346\211\223\345\274\200\347\205\247\346\230\216", 0, QApplication::UnicodeUTF8)); groupBox_7->setTitle(QApplication::translate("MainWindow", "\347\251\272\350\260\203\346\216\247\345\210\266", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("MainWindow", "25\342\204\203", 0, QApplication::UnicodeUTF8)); AirExt->setText(QApplication::translate("MainWindow", " \346\211\223\345\274\200\347\251\272\350\260\203", 0, QApplication::UnicodeUTF8)); label1->setText(QApplication::translate("MainWindow", "\347\253\257\345\217\243\345\210\227\350\241\250\357\274\232", 0, QApplication::UnicodeUTF8)); comSearch->setText(QApplication::translate("MainWindow", "\346\220\234\347\264\242", 0, QApplication::UnicodeUTF8)); comLink->setText(QApplication::translate("MainWindow", "\350\277\236\346\216\245", 0, QApplication::UnicodeUTF8)); groupBox_8->setTitle(QApplication::translate("MainWindow", "\345\205\263\344\272\216", 0, QApplication::UnicodeUTF8)); label_8->setText(QString()); label_9->setText(QApplication::translate("MainWindow", "HomeAutomoation Tool", 0, QApplication::UnicodeUTF8)); label_10->setText(QApplication::translate("MainWindow", "2018.7.6", 0, QApplication::UnicodeUTF8)); label_11->setText(QApplication::translate("MainWindow", "by ZBT BXY ZJK QGL", 0, QApplication::UnicodeUTF8)); label_12->setText(QApplication::translate("MainWindow", "v0.80", 0, QApplication::UnicodeUTF8)); toolButton->setText(QApplication::translate("MainWindow", "...", 0, QApplication::UnicodeUTF8)); } // retranslateUi
};
namespace Ui { class MainWindow: public Ui_MainWindow {}; } // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAINWINDOW_H
|