blob: 4551181bd4ef32e07852a3e3f773b17ef95965b8 [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Edric Milaret4bba46d2015-04-29 16:33:38 -04002 * Copyright (C) 2015 by Savoir-Faire Linux *
Edric Milaret627500d2015-03-27 16:41:40 -04003 * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
19#include "aboutdialog.h"
20#include "ui_aboutdialog.h"
21
22AboutDialog::AboutDialog(QWidget *parent) :
23 QDialog(parent),
24 ui(new Ui::AboutDialog)
25{
26 ui->setupUi(this);
27
28 this->setWindowFlags(Qt::CustomizeWindowHint);
29 this->setWindowFlags(Qt::FramelessWindowHint);
30
31 this->setFixedSize(this->width(),this->height());
32 ui->creditsWidget->hide();
33 ui->clientVersionLabel->setText(
34 QString("<html><head/><body><p><span style=\" font-weight:600;\">Windows Ring v")
35 + VERSION
36 + "</span></p></body></html>");
Edric Milaret7af18792015-05-21 16:03:03 -040037 ui->gitVersionLabel->setText(QString("version: ") + GIT_VERSION);
Edric Milaret627500d2015-03-27 16:41:40 -040038}
39
40AboutDialog::~AboutDialog()
41{
42 delete ui;
43}
44
45void
46AboutDialog::on_aboutButton_toggled(bool checked)
47{
48 ui->creditsButton->setChecked(!checked);
49 ui->aboutWidget->setVisible(checked);
50 ui->creditsWidget->setVisible(!checked);
51}
52
53void
54AboutDialog::on_creditsButton_clicked(bool checked)
55{
56 ui->aboutButton->setChecked(!checked);
57 ui->creditsWidget->setVisible(checked);
58 ui->aboutWidget->setVisible(!checked);
59}
60
61void
62AboutDialog::on_toolButton_clicked()
63{
64 this->close();
65}