source: calamares/trunk/fuentes/src/modules/partition/core/PartitionInfo.h @ 7538

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

sync with github

File size: 2.0 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 *
5 *   Calamares is free software: you can redistribute it and/or modify
6 *   it under the terms of the GNU General Public License as published by
7 *   the Free Software Foundation, either version 3 of the License, or
8 *   (at your option) any later version.
9 *
10 *   Calamares is distributed in the hope that it will be useful,
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *   GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef PARTITIONINFO_H
19#define PARTITIONINFO_H
20
21#include <QHash>
22#include <QString>
23
24#include <kpmcore/core/partitiontable.h>
25
26class Partition;
27
28/**
29 * Functions to store Calamares-specific information in the Qt properties of a
30 * Partition object.
31 *
32 * See README.md for the rational behind this design.
33 *
34 * Properties:
35 * - mountPoint: which directory will a partition be mounted on the installed
36 *   system. This is different from Partition::mountPoint, which is the
37 *   directory on which a partition is *currently* mounted while the installer
38 *   is running.
39 * - format: whether this partition should be formatted at install time.
40 */
41namespace PartitionInfo
42{
43
44QString mountPoint( Partition* partition );
45void setMountPoint( Partition* partition, const QString& value );
46
47bool format( Partition* partition );
48void setFormat( Partition* partition, bool value );
49
50PartitionTable::Flags flags( const Partition* partition );
51void setFlags( Partition* partition, PartitionTable::Flags f );
52
53void reset( Partition* partition );
54
55/**
56 * Returns true if one of the property has been set. This information is used
57 * by the UI to decide whether the "Revert" button should be enabled or
58 * disabled.
59 */
60bool isDirty( Partition* partition );
61
62};
63
64#endif /* PARTITIONINFO_H */
Note: See TracBrowser for help on using the repository browser.