blob: dbdec635292392d691128a95ee7b2ca4d363ba6e [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Edric Milaretbab169d2016-01-07 15:13:33 -05002 * Copyright (C) 2015-2016 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
Edric Milaret627500d2015-03-27 16:41:40 -040028 this->setFixedSize(this->width(),this->height());
29 ui->creditsWidget->hide();
30 ui->clientVersionLabel->setText(
Edric Milaret53ac6e52015-09-14 13:37:06 -040031 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 Milaret1a9495d2015-09-18 10:11:32 -040034
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 Roguez5edddaf2015-11-13 10:06:13 -050047 "<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 Milaret1a9495d2015-09-18 10:11:32 -040050 "<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 Milaret627500d2015-03-27 16:41:40 -040058}
59
60AboutDialog::~AboutDialog()
61{
62 delete ui;
63}
64
65void
66AboutDialog::on_aboutButton_toggled(bool checked)
67{
68 ui->creditsButton->setChecked(!checked);
69 ui->aboutWidget->setVisible(checked);
70 ui->creditsWidget->setVisible(!checked);
71}
72
73void
74AboutDialog::on_creditsButton_clicked(bool checked)
75{
76 ui->aboutButton->setChecked(!checked);
77 ui->creditsWidget->setVisible(checked);
78 ui->aboutWidget->setVisible(!checked);
79}