calamares/src/modules/partition/core/PartitionInfo.h
Adriaan de Groot 1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00

57 lines
1.6 KiB
C++

/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef PARTITIONINFO_H
#define PARTITIONINFO_H
#include <QHash>
#include <QString>
#include <kpmcore/core/partitiontable.h>
class Partition;
/**
* Functions to store Calamares-specific information in the Qt properties of a
* Partition object.
*
* See README.md for the rational behind this design.
*
* Properties:
* - mountPoint: which directory will a partition be mounted on the installed
* system. This is different from Partition::mountPoint, which is the
* directory on which a partition is *currently* mounted while the installer
* is running.
* - format: whether this partition should be formatted at install time.
*/
namespace PartitionInfo
{
QString mountPoint( Partition* partition );
void setMountPoint( Partition* partition, const QString& value );
bool format( Partition* partition );
void setFormat( Partition* partition, bool value );
PartitionTable::Flags flags( const Partition* partition );
void setFlags( Partition* partition, PartitionTable::Flags f );
void reset( Partition* partition );
/**
* Returns true if one of the property has been set. This information is used
* by the UI to decide whether the "Revert" button should be enabled or
* disabled.
*/
bool isDirty( Partition* partition );
}; // namespace PartitionInfo
#endif /* PARTITIONINFO_H */