2016-06-30 00:17:05 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* Copyright (C) 2016 by Chantara Tith <tith.chantara@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 3 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
|
|
|
*************************************************************************/
|
|
|
|
|
2018-07-16 00:20:00 +01:00
|
|
|
#ifndef CREATEVOLUMEGROUPDIALOG_H
|
2017-09-11 16:27:51 +01:00
|
|
|
#define CREATEVOLUMEGROUPDIALOG_H
|
2016-06-30 00:17:05 +01:00
|
|
|
|
2016-09-11 02:54:16 +01:00
|
|
|
#include <core/device.h>
|
2016-09-10 22:10:11 +01:00
|
|
|
#include <fs/lvm2_pv.h>
|
|
|
|
|
2016-09-04 12:25:43 +01:00
|
|
|
#include "gui/volumegroupdialog.h"
|
2016-06-30 00:17:05 +01:00
|
|
|
|
2016-09-07 14:36:59 +01:00
|
|
|
class Device;
|
2018-07-16 00:20:00 +01:00
|
|
|
class Operation;
|
2016-09-07 14:36:59 +01:00
|
|
|
|
2016-09-04 12:25:43 +01:00
|
|
|
class CreateVolumeGroupDialog : public VolumeGroupDialog
|
2016-06-30 00:17:05 +01:00
|
|
|
{
|
2016-09-04 12:25:43 +01:00
|
|
|
Q_DISABLE_COPY(CreateVolumeGroupDialog)
|
2016-06-30 00:17:05 +01:00
|
|
|
|
|
|
|
public:
|
2018-05-04 00:50:42 +01:00
|
|
|
CreateVolumeGroupDialog(QWidget* parent, QString& vgName, QVector<const Partition*>& pvList, qint32& peSize, QList<Device*> devices, QList<Operation*> pendingOps = QList<Operation *>());
|
2016-06-30 00:17:05 +01:00
|
|
|
|
|
|
|
protected:
|
2016-07-02 09:27:20 +01:00
|
|
|
void accept() override;
|
2016-06-30 18:39:47 +01:00
|
|
|
void setupDialog() override;
|
|
|
|
void setupConnections() override;
|
2016-07-02 09:27:20 +01:00
|
|
|
|
|
|
|
protected:
|
2018-05-04 00:50:42 +01:00
|
|
|
virtual void updateOkButtonStatus() override;
|
2016-07-02 09:27:20 +01:00
|
|
|
void onVGNameChanged(const QString& vgname);
|
|
|
|
void onSpinPESizeChanged(int newsize);
|
2016-07-18 01:07:53 +01:00
|
|
|
|
|
|
|
qint32& peSize() {
|
|
|
|
return m_PESize;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32& m_PESize;
|
2016-09-07 14:36:59 +01:00
|
|
|
|
2016-08-08 04:49:41 +01:00
|
|
|
private:
|
2016-09-11 02:54:16 +01:00
|
|
|
const QList<Device*> m_Devices; // List of all devices found on the system
|
2018-05-04 00:50:42 +01:00
|
|
|
const QList<Operation*> m_PendingOps; // List of pending operations in KPM
|
2016-06-30 00:17:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|