-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowresp.cpp
More file actions
42 lines (31 loc) · 741 Bytes
/
showresp.cpp
File metadata and controls
42 lines (31 loc) · 741 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
38
39
40
41
42
#include "showresp.h"
#include "ui_showresp.h"
#include "servermanager.h"
CShowResp::CShowResp(QWidget *parent) :
QDialog(parent),
ui(new Ui::CShowResp)
{
ui->setupUi(this);
}
CShowResp::~CShowResp()
{
delete ui;
}
void CShowResp::showFullResp(const QString& respName, const QString& resp, const QString& cmd)
{
//create string list from resp
auto respLst(resp.split(CServerManager::RESP_SEPERATOR));
auto lable(respName + " For: " + cmd);
ui->label->setText(std::move(lable));
ui->listWidget->addItems(respLst);
QDialog::show();
}
void CShowResp::on_buttonBox_accepted()
{
ui->listWidget->clear();
hide();
}
void CShowResp::on_buttonBox_rejected()
{
on_buttonBox_accepted();
}