資源簡(jiǎn)介
本界面是基于QT編寫的一個(gè)界面,采用qss進(jìn)行渲染。

代碼片段和文件信息
#include?“bedroomwidget.h“
#include?“ui_bedroomwidget.h“
BedRoomWidget::BedRoomWidget(QWidget?*parent)?:
????QWidget(parent)
????ui(new?Ui::BedRoomWidget)
{
????ui->setupUi(this);
????m_styleOn?=?“QLabel{border-image:url(:/images/module/light_on.png);border:0px;}“;
????m_styleOff?=?“QLabel{border-image:url(:/images/module/light_off.png);border:0px;}“;
????ui->label_light_top->setstyleSheet(m_styleOff);
????ui->pbn_light_left->setText(“打開(kāi)“);
????ui->label_light_help->setstyleSheet(m_styleOff);
????ui->pbn_light_right->setText(“打開(kāi)“);
}
BedRoomWidget::~BedRoomWidget()
{
????delete?ui;
}
void?BedRoomWidget::on_pbn_light_left_clicked()
{
????a++;
????Flag?=?!Flag;
????if(Flag)
????{???ui->label_light_top->setstyleSheet(m_styleOn);
????????ui->pbn_light_left->setText(“關(guān)閉“);
????}
????else
????{
????????ui->label_light_top->setstyleSheet(m_styleOff);
????????ui->pbn_light_left->setText(“打開(kāi)“);
????}
}
void?BedRoomWidget::on_pbn_light_right_clicked()
{
????a++;
????Flag1?=?!Flag1;
????if(Flag1)
????{???ui->label_light_help->setstyleSheet(m_styleOn);
????????ui->pbn_light_right->setText(“關(guān)閉“);
????}
????else
????{
????????ui->label_light_help->setstyleSheet(m_styleOff);
????????ui->pbn_light_right->setText(“打開(kāi)“);
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-08-30?10:24??smartHome\
?????文件????????1314??2016-08-29?16:42??smartHome\bedroomwidget.cpp
?????文件?????????570??2016-08-29?16:31??smartHome\bedroomwidget.h
?????文件???????10160??2016-08-29?16:41??smartHome\bedroomwidget.ui
?????文件?????????602??2016-08-28?22:41??smartHome\curtainwidget.cpp
?????文件?????????469??2016-08-28?22:41??smartHome\curtainwidget.h
?????文件???????15005??2016-08-28?22:44??smartHome\curtainwidget.ui
?????目錄???????????0??2016-08-28?22:11??smartHome\images\
?????文件??????159776??2016-08-26?15:25??smartHome\images\2.png
?????文件??????122428??2016-08-26?15:35??smartHome\images\3.jpg
?????文件???????24573??2016-08-26?15:27??smartHome\images\4.jpg
?????文件??????131506??2016-08-26?15:29??smartHome\images\5.jpg
?????文件???????29997??2016-08-26?15:31??smartHome\images\6.jpg
?????文件???????47811??2016-08-26?15:31??smartHome\images\7.jpg
?????文件????????5614??2016-08-26?15:32??smartHome\images\8.jpg
?????文件???????22552??2016-08-26?15:36??smartHome\images\anfang.jpg
?????目錄???????????0??2016-08-26?23:12??smartHome\images\bottom\
?????文件????????2516??2016-01-21?21:43??smartHome\images\bottom\add.png
?????文件????????3262??2016-01-21?21:43??smartHome\images\bottom\control.png
?????文件????????1883??2016-01-21?21:43??smartHome\images\bottom\music.png
?????文件????????3559??2016-01-21?21:43??smartHome\images\bottom\night.png
?????文件????????2405??2016-01-21?21:43??smartHome\images\bottom\reset.png
?????文件????????4147??2016-01-21?21:43??smartHome\images\bottom\statistics.png
?????文件????????3438??2016-01-21?21:43??smartHome\images\bottom\video.png
?????文件???????50014??2016-08-26?15:36??smartHome\images\chufang.jpg
?????目錄???????????0??2016-08-29?15:46??smartHome\images\css\
?????文件????????5275??2016-08-29?15:46??smartHome\images\css\st
?????目錄???????????0??2016-08-28?22:11??smartHome\images\curtain\
?????文件????????7090??2016-01-21?21:43??smartHome\images\curtain\curtain_close.png
?????文件????????5425??2016-01-21?21:43??smartHome\images\curtain\curtain_open.png
?????文件????????6218??2016-01-21?21:43??smartHome\images\curtain\curtain_stop.png
............此處省略56個(gè)文件信息
評(píng)論
共有 條評(píng)論