Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
DlgSettingsTerminal.cpp
1#include "DlgSettingsTerminal.h"
2#include "ui_DlgSettingsTerminal.h"
3
4#include <QLoggingCategory>
5#include <qtermwidget.h>
6
7Q_DECLARE_LOGGING_CATEGORY(Terminal)
8
9CDlgSettingsTerminal::CDlgSettingsTerminal(CParameterTerminal *pPara, QWidget *parent) :
10 QDialog(parent),
11 ui(new Ui::CDlgSettingsTerminal),
12 m_pPara(pPara)
13{
14 ui->setupUi(this);
15
16 m_pFrmParaAppearnce =
18 if(m_pFrmParaAppearnce)
19 ui->tabWidget->addTab(m_pFrmParaAppearnce,
20 m_pFrmParaAppearnce->windowTitle());
21 m_pFrmParaBehavior = new CFrmParameterTerminalBehavior(m_pPara, this);
22 if(m_pFrmParaBehavior)
23 ui->tabWidget->addTab(m_pFrmParaBehavior,
24 m_pFrmParaBehavior->windowTitle());
25}
26
27CDlgSettingsTerminal::~CDlgSettingsTerminal()
28{
29 qDebug(Terminal) << "CDlgSettingsTerminal::~CDlgSettingsTerminal()";
30 delete ui;
31}
32
33void CDlgSettingsTerminal::on_pbOk_clicked()
34{
35 if(m_pFrmParaAppearnce)
36 m_pFrmParaAppearnce->AcceptSettings();
37 if(m_pFrmParaBehavior)
38 m_pFrmParaBehavior->AcceptSettings();
39 this->accept();
40}
41
42void CDlgSettingsTerminal::on_pbCancel_clicked()
43{
44 this->reject();
45}