2016-06-26 00:26:08 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2016, Luca Giambonini <almack@chakraos.org>
|
2016-06-28 00:00:47 +02:00
|
|
|
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org>
|
2017-01-25 09:34:18 +01:00
|
|
|
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com>
|
2020-02-18 17:40:15 +01:00
|
|
|
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org>
|
2016-06-28 00:00:47 +02:00
|
|
|
*
|
2016-06-26 00:26:08 +02:00
|
|
|
* 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 NETINSTALLPAGE_H
|
|
|
|
#define NETINSTALLPAGE_H
|
|
|
|
|
2020-03-27 16:12:48 +01:00
|
|
|
#include "Config.h"
|
2017-01-23 13:42:40 +01:00
|
|
|
#include "PackageModel.h"
|
2017-01-25 09:34:18 +01:00
|
|
|
#include "PackageTreeItem.h"
|
|
|
|
|
2020-02-19 09:29:23 +01:00
|
|
|
#include "locale/TranslatableConfiguration.h"
|
|
|
|
|
2019-09-02 14:10:36 +02:00
|
|
|
#include <QString>
|
2018-05-21 16:58:57 +02:00
|
|
|
#include <QWidget>
|
2016-06-26 00:26:08 +02:00
|
|
|
|
2020-02-19 09:29:23 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2016-07-15 14:27:10 +02:00
|
|
|
class QNetworkReply;
|
2016-06-26 00:26:08 +02:00
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class Page_NetInst;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NetInstallPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-03-27 16:12:48 +01:00
|
|
|
NetInstallPage( Config* config, QWidget* parent = nullptr );
|
2020-02-18 17:37:16 +01:00
|
|
|
virtual ~NetInstallPage();
|
2016-07-15 14:27:10 +02:00
|
|
|
|
2020-02-19 09:29:23 +01:00
|
|
|
/** @brief Sets the page title
|
|
|
|
*
|
|
|
|
* In situations where there is more than one netinstall page,
|
|
|
|
* or you want some explanatory title above the treeview,
|
|
|
|
* set the page title. This page takes ownership of the
|
|
|
|
* TranslatedString object.
|
|
|
|
*
|
|
|
|
* Set to nullptr to remove the title.
|
|
|
|
*/
|
|
|
|
void setPageTitle( CalamaresUtils::Locale::TranslatedString* );
|
|
|
|
|
2020-03-27 15:51:03 +01:00
|
|
|
void onActivate();
|
2016-06-26 00:26:08 +02:00
|
|
|
|
|
|
|
public slots:
|
2020-02-18 23:17:18 +01:00
|
|
|
void retranslate();
|
2020-03-27 16:12:48 +01:00
|
|
|
void setStatus( QString s );
|
2020-02-18 23:17:18 +01:00
|
|
|
|
2020-03-27 16:12:48 +01:00
|
|
|
/** @brief Expand entries that should be pre-expanded.
|
|
|
|
*
|
|
|
|
* Follows the *expanded* key / the startExpanded field in the
|
|
|
|
* group entries of the model. Call this after filling up the model.
|
|
|
|
*/
|
|
|
|
void expandGroups();
|
2016-06-26 00:26:08 +02:00
|
|
|
|
|
|
|
private:
|
2020-03-27 16:12:48 +01:00
|
|
|
Config* m_config;
|
2016-06-26 00:26:08 +02:00
|
|
|
Ui::Page_NetInst* ui;
|
|
|
|
|
2020-02-19 09:29:23 +01:00
|
|
|
std::unique_ptr< CalamaresUtils::Locale::TranslatedString > m_title; // Above the treeview
|
2016-06-26 00:26:08 +02:00
|
|
|
};
|
|
|
|
|
2019-09-02 14:10:36 +02:00
|
|
|
#endif // NETINSTALLPAGE_H
|