File: dialogshowupdatemsg.cpp

package info (click to toggle)
converseen 0.9.5.2-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,108 kB
  • ctags: 458
  • sloc: cpp: 2,976; xml: 59; makefile: 16; ansic: 9
file content (46 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download | duplicates (3)
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
43
44
45
46
#include "dialogshowupdatemsg.h"
#include "ui_dialogshowupdatemsg.h"

#include "inisettings.h"

DialogShowUpdateMsg::DialogShowUpdateMsg(QWidget *parent, const QString &caption, const QString &message) :
    QDialog(parent),
    ui(new Ui::DialogShowUpdateMsg)
{
    ui->setupUi(this);

    this->setWindowTitle(caption);
    ui->labelMsg->setText(message);
}

DialogShowUpdateMsg::~DialogShowUpdateMsg()
{
    delete ui;
}

void DialogShowUpdateMsg::setAutoUpdates(int arg1)
{
    bool enabled;

    if (arg1 == Qt::Checked)
        enabled = false;
    else
        enabled = true;

    IniSettings::setAutoChechUpdates(enabled);
}

void DialogShowUpdateMsg::on_pushOk_clicked()
{
    accept();
}

void DialogShowUpdateMsg::on_checkBoxDisable_stateChanged(int arg1)
{
    setAutoUpdates(arg1);
}

void DialogShowUpdateMsg::on_pushCancel_clicked()
{
    reject();
}