-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathportmappingdetails.cpp
More file actions
21 lines (18 loc) · 954 Bytes
/
portmappingdetails.cpp
File metadata and controls
21 lines (18 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "portmappingdetails.h"
#include "igddevice.h"
PortMappingDetailsDialog::PortMappingDetailsDialog(QWidget *parent, QStandardItem *q) : QDialog(parent) {
uint proto;
setupUi(this);
descriptionLineEdit->setText(q->data(IGDDevice::DescriptionRole).toString());
externalPortLineEdit->setText(q->data(IGDDevice::ExternalPortRole).toString());
proto = q->data(IGDDevice::ProtocolRole).toUInt();
if(proto == IGDDevice::ProtoTcp)
protocolLineEdit->setText("TCP");
else if(proto == IGDDevice::ProtoUdp)
protocolLineEdit->setText("UDP");
internalIPAddressLineEdit->setText(q->data(IGDDevice::InternalIpRole).toString());
internalPortLineEdit->setText(q->data(IGDDevice::InternalPortRole).toString());
durationLineEdit->setText(q->data(IGDDevice::DurationRole).toString());
remoteHostLineEdit->setText(q->data(IGDDevice::RemoteHostRole).toString());
enabledLineEdit->setText(q->data(IGDDevice::EnabledRole).toString());
}