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
|
|
|
|
2021-02-03 17:14:49 +01:00
|
|
|
#include "Config.h"
|
2015-01-29 22:45:39 +01:00
|
|
|
|
2021-02-03 17:14:49 +01:00
|
|
|
#include "DllMacro.h"
|
2019-05-06 10:04:28 +02:00
|
|
|
#include "utils/PluginFactory.h"
|
|
|
|
#include "viewpages/ViewStep.h"
|
2015-09-09 18:45:52 +02:00
|
|
|
|
2021-02-03 17:14:49 +01:00
|
|
|
|
|
|
|
#include <QObject>
|
2015-01-29 22:45:39 +01:00
|
|
|
|
|
|
|
class FinishedPage;
|
|
|
|
|
|
|
|
class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit FinishedViewStep( QObject* parent = nullptr );
|
2020-09-22 22:49:30 +02:00
|
|
|
~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:
|
2017-08-21 23:48:27 +02:00
|
|
|
/**
|
2021-02-23 12:50:52 +01:00
|
|
|
* @brief Send notification at the end via DBus
|
|
|
|
*
|
|
|
|
* At the end of installation (when this step is activated),
|
|
|
|
* send a desktop notification via DBus that the install is done.
|
|
|
|
* If the installation failed, no notification is sent.
|
2017-08-21 23:48:27 +02:00
|
|
|
*/
|
|
|
|
void sendNotification();
|
2017-08-23 11:25:07 +02:00
|
|
|
|
2021-02-23 12:50:52 +01:00
|
|
|
Config* m_config;
|
|
|
|
FinishedPage* m_widget;
|
|
|
|
bool m_installFailed; // Track if onInstallationFailed() was called
|
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
|