-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipcellwidget.cpp
43 lines (35 loc) · 1023 Bytes
/
ipcellwidget.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
42
43
#include "ipcellwidget.h"
#include "ui_ipcellwidget.h"
#include "rpcthread.h"
#include "blockchain.h"
#include <QDebug>
IpCellWidget::IpCellWidget(QString ip, bool flag, QWidget *parent) :
QWidget(parent),
blackOrNot(flag),
ui(new Ui::IpCellWidget)
{
ui->setupUi(this);
ui->nodeSetBtn->setStyleSheet("QToolButton{background-image:url(pic2/nodeSettingBtn.png);background-repeat: repeat-xy;background-position: center;background-attachment: fixed;background-clip: padding;border-style: flat;}");
if( blackOrNot)
{
ui->ipLabel->setStyleSheet("color:rgb(153,153,153);");
}
ui->ipLabel->setText( ip);
ui->ipLabel->adjustSize();
ui->nodeSetBtn->move( ui->ipLabel->x() + ui->ipLabel->width() + 10, 13);
}
IpCellWidget::~IpCellWidget()
{
delete ui;
}
void IpCellWidget::on_nodeSetBtn_clicked()
{
QString ip = ui->ipLabel->text();
emit blockSet(ip,!blackOrNot);
if( blackOrNot)
{
}
else
{
}
}