Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Edric Milaret | bab169d | 2016-01-07 15:13:33 -0500 | [diff] [blame^] | 2 | * Copyright (C) 2015-2016 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 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 28 | this->setFixedSize(this->width(),this->height()); |
| 29 | ui->creditsWidget->hide(); |
| 30 | ui->clientVersionLabel->setText( |
Edric Milaret | 53ac6e5 | 2015-09-14 13:37:06 -0400 | [diff] [blame] | 31 | QString("<html><head/><body><p><span style=\" font-weight:600;\">" |
| 32 | "%1 v%2</span></p></body></html>").arg(tr("Windows Ring"), VERSION)); |
| 33 | ui->gitVersionLabel->setText(QString("%1: %2").arg(tr("version"), GIT_VERSION)); |
Edric Milaret | 1a9495d | 2015-09-18 10:11:32 -0400 | [diff] [blame] | 34 | |
| 35 | ui->creditsBrowser->setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">" |
| 36 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">" |
| 37 | "p, li { white-space: pre-wrap; }" |
| 38 | "</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">" |
| 39 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">" |
| 40 | + tr("Created by:") + "</span></p>" |
| 41 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Adrien Béraud</p>" |
| 42 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Alexandre Lision</p>" |
| 43 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Édric Milaret</p>" |
| 44 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Éloi Bail</p>" |
| 45 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Emmanuel Lepage-Vallée</p>" |
| 46 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Guillaume Roguez</p>" |
Guillaume Roguez | 5edddaf | 2015-11-13 10:06:13 -0500 | [diff] [blame] | 47 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Julien Grossholtz</p>" |
| 48 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nicolas Jäger</p>" |
| 49 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Simon Désaulniers</p>" |
Edric Milaret | 1a9495d | 2015-09-18 10:11:32 -0400 | [diff] [blame] | 50 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Stepan Salenikovich</p>" |
| 51 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">" |
| 52 | + tr("Artwork by:") + "</span></p>" |
| 53 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Marianne Forget</p>" |
| 54 | "<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>" |
| 55 | "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">" |
| 56 | + tr("Based on the SFLPhone project") + "</p>" |
| 57 | "<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | AboutDialog::~AboutDialog() |
| 61 | { |
| 62 | delete ui; |
| 63 | } |
| 64 | |
| 65 | void |
| 66 | AboutDialog::on_aboutButton_toggled(bool checked) |
| 67 | { |
| 68 | ui->creditsButton->setChecked(!checked); |
| 69 | ui->aboutWidget->setVisible(checked); |
| 70 | ui->creditsWidget->setVisible(!checked); |
| 71 | } |
| 72 | |
| 73 | void |
| 74 | AboutDialog::on_creditsButton_clicked(bool checked) |
| 75 | { |
| 76 | ui->aboutButton->setChecked(!checked); |
| 77 | ui->creditsWidget->setVisible(checked); |
| 78 | ui->aboutWidget->setVisible(!checked); |
| 79 | } |