Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Edric Milaret | 4bba46d | 2015-04-29 16:33:38 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015 by Savoir-Faire Linux * |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 3 | * 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 | |
| 22 | AboutDialog::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 Milaret | 7af1879 | 2015-05-21 16:03:03 -0400 | [diff] [blame] | 37 | ui->gitVersionLabel->setText(QString("version: ") + GIT_VERSION); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | AboutDialog::~AboutDialog() |
| 41 | { |
| 42 | delete ui; |
| 43 | } |
| 44 | |
| 45 | void |
| 46 | AboutDialog::on_aboutButton_toggled(bool checked) |
| 47 | { |
| 48 | ui->creditsButton->setChecked(!checked); |
| 49 | ui->aboutWidget->setVisible(checked); |
| 50 | ui->creditsWidget->setVisible(!checked); |
| 51 | } |
| 52 | |
| 53 | void |
| 54 | AboutDialog::on_creditsButton_clicked(bool checked) |
| 55 | { |
| 56 | ui->aboutButton->setChecked(!checked); |
| 57 | ui->creditsWidget->setVisible(checked); |
| 58 | ui->aboutWidget->setVisible(!checked); |
| 59 | } |
| 60 | |
| 61 | void |
| 62 | AboutDialog::on_toolButton_clicked() |
| 63 | { |
| 64 | this->close(); |
| 65 | } |