2017-12-20 14:39:09 +01:00
|
|
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
2015-01-29 22:45:39 +01:00
|
|
|
*
|
|
|
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
2019-05-06 10:04:28 +02:00
|
|
|
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
2015-01-29 22:45:39 +01: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/>.
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
2019-05-06 10:04:28 +02:00
|
|
|
#include "PluginDllMacro.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
|
|
|
|
{
|
|
|
|
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-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
|