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-07-02 16:06:54 +02:00
|
|
|
#include <PartitionViewStep.h>
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2014-07-02 16:06:54 +02:00
|
|
|
#include <PartitionPage.h>
|
|
|
|
#include <PartitionCoreModule.h>
|
|
|
|
#include <JobQueue.h>
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::PartitionViewStep( QObject* parent )
|
2014-06-27 18:14:39 +02:00
|
|
|
: Calamares::ViewStep( parent )
|
2014-07-02 16:06:54 +02:00
|
|
|
, m_core( new PartitionCoreModule( this ) )
|
|
|
|
, m_widget( new PartitionPage( m_core ) )
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
2014-07-07 16:26:56 +02:00
|
|
|
connect( m_core, SIGNAL( hasRootMountPointChanged( bool ) ),
|
|
|
|
SIGNAL( nextStatusChanged( bool ) ) );
|
2014-06-27 17:25:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::prettyName() const
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
2014-06-27 18:14:39 +02:00
|
|
|
return tr( "Partitions" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QWidget*
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::widget()
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
|
|
|
return m_widget;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::next()
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-07-02 16:06:54 +02:00
|
|
|
Calamares::JobQueue::instance()->enqueue( m_core->jobs() );
|
2014-06-27 18:14:39 +02:00
|
|
|
emit done();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::back()
|
2014-06-27 18:14:39 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isNextEnabled() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-07-07 16:26:56 +02:00
|
|
|
return m_core->hasRootMountPoint();
|
2014-06-27 18:14:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isAtBeginning() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isAtEnd() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
|
|
|
return true;
|
2014-06-27 17:25:39 +02:00
|
|
|
}
|
2014-07-08 14:02:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
QList< Calamares::job_ptr >
|
|
|
|
PartitionViewStep::jobs() const
|
|
|
|
{
|
|
|
|
return QList< Calamares::job_ptr >();
|
|
|
|
}
|