YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
aboutdlg.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#include "aboutdlg.h"
7#include "ui_aboutdlg.h"
8#include "genericinfodlg.h"
9
10AboutDlg::AboutDlg(QString appName,QString version,QString copyright,QString webSite,QWidget *parent) :
11 QDialog(parent),
12 ui(new Ui::AboutDlg)
13{
14 ui->setupUi(this);
15 setWindowTitle("About");
16
17 ui->lblName->setText(appName);
18 ui->lblVersion->setText(version);
19 ui->copyright->setText(copyright);
20
21 QString auxWebSite = "<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> \
22 <a href=\""+ webSite + R"("><span style=" text-decoration: underline; color:#0000ff;">)"+ webSite +"</span></a></p>";
23 ui->website->setHtml(auxWebSite);
24
25 connect(ui->btnLicence,SIGNAL(clicked()),this,SLOT(onLicence()));
26 connect(ui->btnClose,SIGNAL(clicked()),this,SLOT(accept()));
27}
28
30{
31 delete ui;
32}
33
34void AboutDlg::onLicence()
35{
36 QString text = "\
37BSD-3-Clause<br />\
38<pre>\
39 Redistribution and use in source and binary forms, with or without\n\
40 modification, are permitted provided that the following conditions are met:\n\
41\n\
42 1. Redistributions of source code must retain the above copyright notice,\n\
43 this list of conditions and the following disclaimer.\n\
44 2. Redistributions in binary form must reproduce the above copyright\n\
45 notice, this list of conditions and the following disclaimer in the\n\
46 documentation and/or other materials provided with the distribution.\n\
47 3. Neither the name of the copyright holder nor the names of its\n\
48 contributors may be used to endorse or promote products derived from\n\
49 this software without specific prior written permission.\n\
50\n\
51 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\
52 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\
53 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\
54 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n\
55 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n\
56 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n\
57 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
58 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n\
59 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\
60 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\
61</pre>\
62<br />\
63<br />\
64LGPL-2.1+<br />\
65<pre>\
66 This library is free software; you can redistribute it and/or modify it under\n\
67 the terms of the GNU Lesser General Public License as published by the Free\n\
68 Software Foundation; either version 2.1 of the License, or (at your option) any\n\
69 later version.\n\
70\n\
71 This library is distributed in the hope that it will be useful, but WITHOUT ANY\n\
72 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n\
73 PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\n\
74 details.\n\
75\n\
76 You should have received a copy of the GNU Lesser General Public License along\n\
77 with this library; if not, write to the Free Software Foundation, Inc., 51\n\
78 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\
79</pre>\
80";
81 GenericInfoDlg dlg("Licence","Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)",text);
82 dlg.exec();
83}
int SIGNAL(int pid, int signum)
AboutDlg(QString appName, QString version, QString copyright, QString website, QWidget *parent=0)
Definition aboutdlg.cpp:10
Definition aboutdlg.h:11