-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cfgdialog.cpp
42 lines (37 loc) · 969 Bytes
/
cfgdialog.cpp
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 "cfgdialog.h"
#include "ui_cfgdialog.h"
CfgDialog::CfgDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CfgDialog)
{
ui->setupUi(this);
}
void CfgDialog::showEvent(QShowEvent *event)
{
this->ui->EdChannelName->setText(ChannelName);
this->ui->ChkBxShowChannel->setChecked(ShowChannel);
ui->spinBoxNameX->setValue(ChannelX);
ui->spinBoxNameY->setValue(ChannelY);
ui->spinBoxOSDX->setValue(wOSDTopLeftX);
ui->spinBoxOSDY->setValue(wOSDTopLeftY);
}
CfgDialog::~CfgDialog()
{
delete ui;
}
void CfgDialog::on_buttonBox_accepted()
{
SaveParam=true;
ChannelName = ui->EdChannelName->text();
ShowChannel = ui->ChkBxShowChannel->isChecked();
ChannelX = ui->spinBoxNameX->value();
ChannelY = ui->spinBoxNameY->value();
wOSDTopLeftX = ui->spinBoxOSDX->value();
wOSDTopLeftY = ui->spinBoxOSDY->value();
close();
}
void CfgDialog::on_buttonBox_rejected()
{
SaveParam=false;
close();
}