configlanguagedlg.cpp
880 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
#include "config.h"
#include "configlanguagedlg.h"
#include "ui_configlanguagedlg.h"
#include "soundplayer.h"
using namespace Define;
ConfigLanguageDlg::ConfigLanguageDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::ConfigLanguageDlg)
{
ui->setupUi(this);
this->setWindowFlags( Qt::FramelessWindowHint);
this->setAttribute( Qt::WA_DeleteOnClose);
foreach (QPushButton *button, findChildren<QPushButton *>())
connect(button, &QPushButton::pressed, SoundPlayer::playClick);
ui->pushButton_1->setText(tr(language_menu[0]));
ui->pushButton_2->setText(tr(language_menu[1]));
ui->pushButton_3->setText(tr(language_menu[2]));
}
ConfigLanguageDlg::~ConfigLanguageDlg()
{
delete ui;
}
void ConfigLanguageDlg::on_ctrBtnOk_clicked()
{
this->accept();
}
void ConfigLanguageDlg::on_ctrBtnCancel_clicked()
{
this->reject();
}