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

Last change on this file since 7538 was 7538, checked in by kbut, 13 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 CREATEPARTITIONTABLEJOB_H
21#define CREATEPARTITIONTABLEJOB_H
22
23#include <Job.h>
24
25// KPMcore
26#include <kpmcore/core/partitiontable.h>
27
28class Device;
29
30/**
31 * Creates a partition table on a device. It supports MBR and GPT partition
32 * tables.
33 *
34 * This wipes all the data from the device.
35 */
36class CreatePartitionTableJob : public Calamares::Job
37{
38    Q_OBJECT
39public:
40    CreatePartitionTableJob( Device* device, PartitionTable::TableType type );
41    QString prettyName() const override;
42    QString prettyDescription() const override;
43    QString prettyStatusMessage() const override;
44    Calamares::JobResult exec() override;
45
46    void updatePreview();
47    Device* device() const
48    {
49        return m_device;
50    }
51
52private:
53    Device* m_device;
54    PartitionTable::TableType m_type;
55    PartitionTable* createTable();
56};
57
58#endif /* CREATEPARTITIONTABLEJOB_H */
Note: See TracBrowser for help on using the repository browser.