-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqnetworkwidget.cpp
More file actions
34 lines (31 loc) · 833 Bytes
/
qnetworkwidget.cpp
File metadata and controls
34 lines (31 loc) · 833 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
#include <iostream>
#include "qnetworkwidget.h"
#include "ui_qnetworkwidget.h"
QNetworkWidget::QNetworkWidget(QWidget *parent, QString id, QString name) :
QFrame(parent),
ui(new Ui::QNetworkWidget)
{
ui->setupUi(this);
this->id = id;
this->name = name;
idS = id.toStdString();
uiMan = new manager();
this->subnet = QString::fromStdString(uiMan->getNetSubnet(idS));
ui->labelId->setText(this->id);
ui->labelName->setText(this->name);
ui->labelSubnet->setText(subnet);
delete ui->labelSubnet;
connect(ui->deleteNet, SIGNAL (released()), this, SLOT (deleteN()));
}
QNetworkWidget::~QNetworkWidget()
{
delete ui;
}
void QNetworkWidget::deleteN() {
string res = uiMan->getDocker()->delNet(idS);
if(idS == res){
emit refresh();
return;
}
return;
}