File indexing completed on 2024-04-28 05:46:31
0001 /* 0002 SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com> 0003 SPDX-FileCopyrightText: 2017 Andrius Štikonas <andrius@stikonas.eu> 0004 SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-3.0-or-later 0007 */ 0008 0009 0010 #ifndef CREATEVOLUMEGROUPDIALOG_H 0011 #define CREATEVOLUMEGROUPDIALOG_H 0012 0013 #include <core/device.h> 0014 #include <fs/lvm2_pv.h> 0015 0016 #include "gui/volumegroupdialog.h" 0017 0018 class Device; 0019 class Operation; 0020 0021 class CreateVolumeGroupDialog : public VolumeGroupDialog 0022 { 0023 Q_DISABLE_COPY(CreateVolumeGroupDialog) 0024 0025 public: 0026 CreateVolumeGroupDialog(QWidget* parent, QString& vgName, QVector<const Partition*>& pvList, qint32& peSize, QList<Device*> devices, QList<Operation*> pendingOps = QList<Operation *>()); 0027 0028 protected: 0029 void accept() override; 0030 void setupDialog() override; 0031 void setupConnections() override; 0032 0033 protected: 0034 virtual void updateOkButtonStatus() override; 0035 void onVGNameChanged(const QString& vgname); 0036 void onSpinPESizeChanged(int newsize); 0037 0038 qint32& peSize() { 0039 return m_PESize; 0040 } 0041 0042 qint32& m_PESize; 0043 0044 private: 0045 const QList<Device*> m_Devices; // List of all devices found on the system 0046 const QList<Operation*> m_PendingOps; // List of pending operations in KPM 0047 }; 0048 0049 #endif