File indexing completed on 2024-04-28 05:45:54

0001 /*
0002     SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
0003     SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
0004 
0005     SPDX-License-Identifier: GPL-3.0-or-later
0006 */
0007 
0008 #ifndef KPMCORE_SETFILESYSTEMLABELJOB_H
0009 #define KPMCORE_SETFILESYSTEMLABELJOB_H
0010 
0011 #include "jobs/job.h"
0012 
0013 #include <QString>
0014 
0015 class Partition;
0016 class Report;
0017 class OperationStack;
0018 
0019 /** Set a FileSystem label.
0020     @author Volker Lanz <vl@fidra.de>
0021 */
0022 class SetFileSystemLabelJob : public Job
0023 {
0024     friend class OperationStack;
0025 
0026 public:
0027     SetFileSystemLabelJob(Partition& p, const QString& newlabel);
0028 
0029 public:
0030     bool run(Report& parent) override;
0031     QString description() const override;
0032 
0033 protected:
0034     Partition& partition() {
0035         return m_Partition;
0036     }
0037     const Partition& partition() const {
0038         return m_Partition;
0039     }
0040 
0041     const QString& label() const {
0042         return m_Label;
0043     }
0044     void setLabel(const QString& l) {
0045         m_Label = l;
0046     }
0047 
0048 private:
0049     Partition& m_Partition;
0050     QString m_Label;
0051 };
0052 
0053 #endif