-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathset.cpp
43 lines (34 loc) · 959 Bytes
/
set.cpp
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
36
37
38
39
40
41
#include "set.h"
#include "ui_set.h"
#include "dialog.h"
#include "ui_dialog.h"
#include <QDebug>
#include <QButtonGroup>
QString Dialog::setdata;
set::set(QWidget *parent) :
QDialog(parent),
ui(new Ui::set)
{
ui->setupUi(this);
QButtonGroup *group1 = new QButtonGroup(this);
QButtonGroup *group2 = new QButtonGroup(this);
// 将UI中创建好的选择框全部加入按钮组
group1->addButton(ui->ifbroadcast_y);
group1->addButton(ui->ifbroadcast_n);
group2->addButton(ui->if_setsleepmode_n);
group2->addButton(ui->if_setsleepmode_y);
}
set::~set()
{
delete ui;
}
void set::on_sure_button_clicked()
{ emit sendConfigText("相关参数配置完成");
set::close();
if(ui->ifbroadcast_y->isChecked()) Dialog::setdata="10";
else{
if(ui->if_setsleepmode_y->isChecked()) Dialog::setdata="00";
else Dialog::setdata="01";
}
qDebug()<<"setdata="<<Dialog::setdata;
}