source: calamares/trunk/fuentes/src/modules/partition/jobs/ResizePartitionJob.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 17 months ago

sync with github

File size: 1.7 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014, Aurélien Gâteau <agateau@kde.org>
4 *   Copyright 2015, Teo Mrnjavac <teo@kde.org>
5 *
6 *   Calamares is free software: you can redistribute it and/or modify
7 *   it under the terms of the GNU General Public License as published by
8 *   the Free Software Foundation, either version 3 of the License, or
9 *   (at your option) any later version.
10 *
11 *   Calamares is distributed in the hope that it will be useful,
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 *   GNU General Public License for more details.
15 *
16 *   You should have received a copy of the GNU General Public License
17 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef RESIZEPARTITIONJOB_H
21#define RESIZEPARTITIONJOB_H
22
23#include <jobs/PartitionJob.h>
24
25class Device;
26class Partition;
27class FileSystem;
28
29/**
30 * This job resizes an existing partition.
31 *
32 * It can grow, shrink and/or move a partition while preserving its content.
33 */
34class ResizePartitionJob : public PartitionJob
35{
36    Q_OBJECT
37public:
38    ResizePartitionJob( Device* device, Partition* partition, qint64 firstSector, qint64 lastSector );
39    QString prettyName() const override;
40    QString prettyDescription() const override;
41    QString prettyStatusMessage() const override;
42    Calamares::JobResult exec() override;
43
44    void updatePreview();
45
46    Device* device() const;
47
48private:
49    Device* m_device;
50    qint64 m_oldFirstSector;
51    qint64 m_oldLastSector;
52    qint64 m_newFirstSector;
53    qint64 m_newLastSector;
54};
55
56#endif /* RESIZEPARTITIONJOB_H */
Note: See TracBrowser for help on using the repository browser.