2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2015-01-29 22:45:39 +01:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2015-01-29 22:45:39 +01:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2015-01-29 22:45:39 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-05-06 10:04:28 +02:00
|
|
|
#ifndef FINISHEDVIEWSTEP_H
|
|
|
|
#define FINISHEDVIEWSTEP_H
|
2015-01-29 22:45:39 +01:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
2019-05-06 10:04:28 +02:00
|
|
|
#include "utils/PluginFactory.h"
|
|
|
|
#include "viewpages/ViewStep.h"
|
2015-09-09 18:45:52 +02:00
|
|
|
|
2020-02-17 11:37:35 +01:00
|
|
|
#include "DllMacro.h"
|
2015-01-29 22:45:39 +01:00
|
|
|
|
|
|
|
class FinishedPage;
|
|
|
|
|
|
|
|
class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-05-06 10:35:09 +02:00
|
|
|
enum class RestartMode
|
|
|
|
{
|
2020-05-04 12:47:18 +02:00
|
|
|
Never = 0, ///< @brief Don't show button, just exit
|
|
|
|
UserUnchecked, ///< @brief Show button, starts unchecked
|
|
|
|
UserChecked, ///< @brief Show button, starts checked
|
|
|
|
Always ///< @brief Show button, can't change, checked
|
2019-05-06 10:35:09 +02:00
|
|
|
};
|
2019-05-28 13:27:21 +02:00
|
|
|
/// @brief Returns the config-name of the given restart-mode @p m
|
|
|
|
static QString modeName( RestartMode m );
|
2019-05-06 10:35:09 +02:00
|
|
|
|
2015-01-29 22:45:39 +01:00
|
|
|
explicit FinishedViewStep( QObject* parent = nullptr );
|
2017-09-20 14:24:28 +02:00
|
|
|
virtual ~FinishedViewStep() override;
|
2015-01-29 22:45:39 +01:00
|
|
|
|
|
|
|
QString prettyName() const override;
|
|
|
|
|
|
|
|
QWidget* widget() override;
|
|
|
|
|
|
|
|
bool isNextEnabled() const override;
|
|
|
|
bool isBackEnabled() const override;
|
|
|
|
|
|
|
|
bool isAtBeginning() const override;
|
|
|
|
bool isAtEnd() const override;
|
|
|
|
|
|
|
|
void onActivate() override;
|
|
|
|
|
2019-05-28 13:20:19 +02:00
|
|
|
Calamares::JobList jobs() const override;
|
2015-01-29 22:45:39 +01:00
|
|
|
|
|
|
|
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
|
|
|
|
2017-08-23 11:25:07 +02:00
|
|
|
public slots:
|
|
|
|
void onInstallationFailed( const QString& message, const QString& details );
|
|
|
|
|
2015-01-29 22:45:39 +01:00
|
|
|
private:
|
|
|
|
FinishedPage* m_widget;
|
2017-08-21 23:48:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief At the end of installation (when this step is activated),
|
|
|
|
* send a desktop notification via DBus that the install is done.
|
|
|
|
*/
|
|
|
|
void sendNotification();
|
2017-08-23 11:25:07 +02:00
|
|
|
|
|
|
|
bool installFailed;
|
2017-09-25 16:22:03 +02:00
|
|
|
bool m_notifyOnFinished;
|
2015-01-29 22:45:39 +01:00
|
|
|
};
|
|
|
|
|
2015-09-09 18:45:52 +02:00
|
|
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory )
|
|
|
|
|
2019-05-06 10:04:28 +02:00
|
|
|
#endif
|