2014-06-27 17:25:39 +02:00
|
|
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
|
|
|
*
|
|
|
|
* Copyright 2014, Aurélien Gâteau <agateau@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/>.
|
|
|
|
*/
|
|
|
|
|
2014-06-30 13:24:59 +02:00
|
|
|
#ifndef PARTITIONVIEWSTEP_H
|
|
|
|
#define PARTITIONVIEWSTEP_H
|
2014-06-27 17:25:39 +02:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
2014-06-27 18:14:39 +02:00
|
|
|
#include "viewpages/ViewStep.h"
|
2014-06-27 17:25:39 +02:00
|
|
|
#include "PluginDllMacro.h"
|
|
|
|
|
2014-09-03 18:09:37 +02:00
|
|
|
class ChoicePage;
|
2014-06-27 18:14:39 +02:00
|
|
|
class PartitionPage;
|
2014-07-02 16:06:54 +02:00
|
|
|
class PartitionCoreModule;
|
2014-09-03 18:09:37 +02:00
|
|
|
class QStackedWidget;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2014-08-08 11:46:43 +02:00
|
|
|
/**
|
|
|
|
* The starting point of the module. Instantiates PartitionCoreModule and
|
|
|
|
* PartitionPage, then connect them.
|
|
|
|
*/
|
2014-06-30 13:24:59 +02:00
|
|
|
class PLUGINDLLEXPORT PartitionViewStep : public Calamares::ViewStep
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-06-27 18:14:39 +02:00
|
|
|
Q_PLUGIN_METADATA( IID "calamares.ViewModule/1.0" )
|
|
|
|
Q_INTERFACES( Calamares::ViewStep )
|
2014-06-27 17:25:39 +02:00
|
|
|
|
|
|
|
public:
|
2014-06-30 13:24:59 +02:00
|
|
|
explicit PartitionViewStep( QObject* parent = 0 );
|
2014-09-03 18:09:37 +02:00
|
|
|
virtual ~PartitionViewStep();
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
QString prettyName() const override;
|
2014-07-30 14:15:29 +02:00
|
|
|
QWidget* createSummaryWidget() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
|
|
|
QWidget* widget() override;
|
|
|
|
|
|
|
|
void next() override;
|
|
|
|
void back() override;
|
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
bool isNextEnabled() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
bool isAtBeginning() const override;
|
|
|
|
bool isAtEnd() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2014-07-08 14:02:21 +02:00
|
|
|
QList< Calamares::job_ptr > jobs() const override;
|
|
|
|
|
2014-06-27 18:14:39 +02:00
|
|
|
private:
|
2014-07-02 16:06:54 +02:00
|
|
|
PartitionCoreModule* m_core;
|
2014-09-03 18:09:37 +02:00
|
|
|
QStackedWidget* m_widget;
|
|
|
|
ChoicePage* m_choicePage;
|
|
|
|
PartitionPage* m_manualPartitionPage;
|
2014-06-27 17:25:39 +02:00
|
|
|
};
|
|
|
|
|
2014-06-30 13:24:59 +02:00
|
|
|
#endif // PARTITIONVIEWSTEP_H
|