configlanguagedlg.cpp 880 Bytes
#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();
}