blob: 1c1d983b8532350afbfe6ccd55f448f48a58e6ba (
plain)
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
|
#include "onetimedialog.h"
#include "ui_onetimedialog.h"
#include "main.h"
OneTimeDialog::OneTimeDialog(QWidget *parent,const char *propName,const QString &title,const QString &message) :
QDialog(parent),
ui(new Ui::OneTimeDialog)
{
ui->setupUi(this);
ui->label->setText(message);
this->setWindowTitle(title);
_propName = propName;
#ifdef __WINDOWS__
QWidgetList widgets = this->findChildren<QWidget*>();
foreach(QWidget *widget, widgets) {
QFont font(widget->font());
font.setPointSizeF(font.pointSizeF() * 0.75);
widget->setFont(font);
}
#endif
}
OneTimeDialog::~OneTimeDialog()
{
delete ui;
}
void OneTimeDialog::on_pushButton_clicked()
{
if (_propName) {
settings->setValue(_propName,ui->checkBox->isChecked());
settings->sync();
}
this->close();
}
|