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

30 lines
590 B
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-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
*
*/
#include "PartitionJob.h"
2014-07-18 14:29:27 +02:00
PartitionJob::PartitionJob( Partition* partition )
: m_partition( partition )
2020-04-07 11:36:40 +02:00
{
}
2020-04-07 11:36:40 +02:00
void
PartitionJob::iprogress( int percent )
{
if ( percent < 0 )
2020-04-07 11:36:40 +02:00
{
percent = 0;
2020-04-07 11:36:40 +02:00
}
if ( percent > 100 )
2020-04-07 11:36:40 +02:00
{
percent = 100;
2020-04-07 11:36:40 +02:00
}
emit progress( qreal( percent / 100.0 ) );
}