2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2019-04-21 12:43:04 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
|
|
|
* SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
|
|
|
|
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2019-04-21 12:43:04 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2019-04-21 12:43:04 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LICENSE_LICENSEWIDGET_H
|
|
|
|
#define LICENSE_LICENSEWIDGET_H
|
|
|
|
|
2019-04-21 13:36:28 +02:00
|
|
|
#include "LicensePage.h"
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2019-12-09 14:52:54 +01:00
|
|
|
class QPushButton;
|
2019-04-21 20:36:11 +02:00
|
|
|
|
2019-04-21 13:36:28 +02:00
|
|
|
class LicenseWidget : public QWidget
|
|
|
|
{
|
2021-09-08 13:23:20 +02:00
|
|
|
Q_OBJECT
|
2019-04-21 13:36:28 +02:00
|
|
|
public:
|
|
|
|
LicenseWidget( LicenseEntry e, QWidget* parent = nullptr );
|
2020-09-22 22:49:30 +02:00
|
|
|
~LicenseWidget() override;
|
2019-04-21 13:36:28 +02:00
|
|
|
|
2019-04-21 13:50:06 +02:00
|
|
|
void retranslateUi();
|
|
|
|
|
2019-04-21 13:36:28 +02:00
|
|
|
private:
|
2019-12-09 20:47:32 +01:00
|
|
|
void showLocalLicenseText(); // Display (or hide) the local license text
|
2019-04-23 10:10:43 +02:00
|
|
|
void expandClicked(); // "slot" to toggle show/hide of local license text
|
2019-08-03 14:52:38 +02:00
|
|
|
void viewClicked(); // "slot" to open link
|
2019-04-21 20:36:11 +02:00
|
|
|
void updateExpandToolTip();
|
|
|
|
|
2019-04-21 13:36:28 +02:00
|
|
|
LicenseEntry m_entry;
|
2019-04-21 20:36:11 +02:00
|
|
|
QLabel* m_label;
|
2019-12-09 14:52:54 +01:00
|
|
|
QPushButton* m_viewLicenseButton;
|
2019-12-09 16:49:43 +01:00
|
|
|
QLabel* m_licenceTextLabel;
|
|
|
|
QString m_fullTextContents;
|
2019-12-09 14:52:54 +01:00
|
|
|
bool m_isExpanded;
|
2019-08-03 14:52:38 +02:00
|
|
|
};
|
2019-04-21 12:43:04 +02:00
|
|
|
#endif
|