forked from xcj2012/Configuration-61850
-
Notifications
You must be signed in to change notification settings - Fork 0
/
comm_check.cpp.bak
56 lines (49 loc) · 1.07 KB
/
comm_check.cpp.bak
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
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "comm_check.h"
#include "ui_comm_check.h"
Comm_check::Comm_check(QWidget *parent) :
QDialog(parent),
ui(new Ui::Comm_check)
{
ui->setupUi(this);
Init();
connect(ui->pushButton_Check,SIGNAL(clicked()),this,SLOT(onPushbutton_Check()));
}
Comm_check::~Comm_check()
{
delete ui;
}
void Comm_check::Init()
{
ui->label->setText(tr("Verify the legitimacy of communication include the uniqueness test of MAC and IP ,The setting of VLAN"));
ui->pushButton_Check->setText(tr("Check"));
ui->textEdit->clear();
}
void Comm_check::AddOneErrToArea(QString str)
{
ui->textEdit->append(str);
}
void Comm_check::Checkfile()
{
Point->Comunication_Check(ErrList);
}
void Comm_check::onPushbutton_Check()
{
ui->textEdit->clear();
Checkfile();
if(ErrList.size()==0)
{
ui->textEdit->append(tr("Checking finish"));
}
for (int i = 0; i < ErrList.size(); i++)
{
AddOneErrToArea(ErrList[i]);
}
if(ErrList.size()==0)
{
ui->textEdit->append(tr("There is no error"));
}
}
void Comm_check::SetPoint(ScdTree *sPoint)
{
Point = sPoint;
}