calamares/src/modules/partition/jobs/PartitionJob.h

44 lines
1.0 KiB
C
Raw Normal View History

/* === This file is part of Calamares - <https://calamares.io> ===
2014-07-18 14:29:27 +02:00
*
2020-08-22 01:19:58 +02:00
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
2014-07-18 14:29:27 +02:00
*
* Calamares is Free Software: see the License-Identifier above.
2014-07-18 14:29:27 +02:00
*
*/
#ifndef PARTITIONJOB_H
#define PARTITIONJOB_H
#include "Job.h"
#include "partition/KPMManager.h"
2014-07-18 14:29:27 +02:00
class Partition;
/**
* Base class for jobs which affect a partition and which use KPMCore.
2014-07-18 14:29:27 +02:00
*/
class PartitionJob : public Calamares::Job
{
Q_OBJECT
public:
PartitionJob( Partition* partition );
2020-04-07 11:36:40 +02:00
Partition* partition() const { return m_partition; }
2014-07-18 14:29:27 +02:00
public slots:
/** @brief Translate from KPMCore to Calamares progress.
*
* KPMCore presents progress as an integer percent from 0 .. 100,
* while Calamares uses a qreal from 0 .. 1.00 .
*/
void iprogress( int percent );
2014-07-18 14:29:27 +02:00
protected:
CalamaresUtils::Partition::KPMManager m_kpmcore;
2014-07-18 14:29:27 +02:00
Partition* m_partition;
};
#endif /* PARTITIONJOB_H */