-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrolwidget.cpp
More file actions
37 lines (32 loc) · 834 Bytes
/
controlwidget.cpp
File metadata and controls
37 lines (32 loc) · 834 Bytes
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
#include "controlwidget.h"
#include "ui_controlwidget.h"
#include "switchcontrol.h"
#include <QDebug>
#include <QColor>
controlwidget::controlwidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::controlwidget)
{
ui->setupUi(this);
ui->label_name->setAlignment(Qt::AlignCenter);
QSwitchButton*q=new QSwitchButton(ui->frame_control);
q->SetBackgroundColor(QColor(71,146,230),QColor(213,213,213));
q->setGeometry(20,100,100,50);
connect(q,SIGNAL(clicked(bool)),this,SLOT(on_bottomc(bool)));
}
controlwidget::~controlwidget()
{
delete ui;
}
void controlwidget::setname(const QString &name)
{
ui->label_name->setText(name);
}
void controlwidget::setid(const QString &id)
{
this->id=id;
}
void controlwidget::on_bottomc(bool isc)
{
qDebug()<<isc;
}