calamares/src/modules/welcome/checker/ResultsListWidget.h
Adriaan de Groot 38d58e5b16 [welcome] Hoist explanatory-label code
- Create the label once, and it's ok for it to respond to links
   even if there's none in the code.
 - Turn into a member variable in preparation for retranslation-refactor.
2020-01-28 13:32:53 +01:00

45 lines
1.4 KiB
C++

/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2019, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHECKER_RESULTSLISTWIDGET_H
#define CHECKER_RESULTSLISTWIDGET_H
#include "modulesystem/Requirement.h"
#include <QWidget>
class QLabel;
class ResultsListWidget : public QWidget
{
Q_OBJECT
public:
explicit ResultsListWidget( QWidget* parent, const Calamares::RequirementsList& checkEntries );
private:
/// @brief A link in the explanatory text has been clicked
void linkClicked( const QString& link );
void retranslate();
QLabel* m_explanation = nullptr; ///< Explanatory text above the list, with link
const Calamares::RequirementsList& m_entries;
};
#endif // CHECKER_RESULTSLISTWIDGET_H