2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2018-06-04 21:31:58 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2018-06-04 21:31:58 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2018-06-04 21:31:58 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VOLUMEGROUPBASEDIALOG_H
|
|
|
|
#define VOLUMEGROUPBASEDIALOG_H
|
|
|
|
|
|
|
|
#include <kpmcore/core/partition.h>
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
2020-08-22 01:19:58 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
2018-06-04 21:31:58 +02:00
|
|
|
class VolumeGroupBaseDialog;
|
|
|
|
}
|
|
|
|
|
2018-06-07 22:22:22 +02:00
|
|
|
class QComboBox;
|
|
|
|
class QLineEdit;
|
|
|
|
class QListWidget;
|
|
|
|
class QSpinBox;
|
|
|
|
|
2018-06-04 21:31:58 +02:00
|
|
|
class VolumeGroupBaseDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-08-22 01:19:58 +02:00
|
|
|
explicit VolumeGroupBaseDialog( QString& vgName, QVector< const Partition* > pvList, QWidget* parent = nullptr );
|
2018-06-04 21:31:58 +02:00
|
|
|
~VolumeGroupBaseDialog();
|
|
|
|
|
2018-06-07 22:22:22 +02:00
|
|
|
protected:
|
|
|
|
virtual void updateOkButton();
|
|
|
|
|
2018-06-26 05:38:52 +02:00
|
|
|
void setUsedSizeValue( qint64 usedSize );
|
|
|
|
|
|
|
|
void setLVQuantity( qint32 lvQuantity );
|
|
|
|
|
2018-06-07 22:22:22 +02:00
|
|
|
void updateTotalSize();
|
|
|
|
|
|
|
|
void updateTotalSectors();
|
|
|
|
|
|
|
|
QVector< const Partition* > checkedItems() const;
|
|
|
|
|
|
|
|
bool isSizeValid() const;
|
|
|
|
|
|
|
|
QString& vgNameValue() const;
|
|
|
|
|
|
|
|
QLineEdit* vgName() const;
|
|
|
|
|
|
|
|
QComboBox* vgType() const;
|
|
|
|
|
|
|
|
QSpinBox* peSize() const;
|
|
|
|
|
|
|
|
QListWidget* pvList() const;
|
|
|
|
|
|
|
|
QPushButton* okButton() const;
|
|
|
|
|
2018-06-04 21:31:58 +02:00
|
|
|
private:
|
2018-06-07 22:22:22 +02:00
|
|
|
Ui::VolumeGroupBaseDialog* ui;
|
|
|
|
|
|
|
|
QString& m_vgNameValue;
|
2018-06-04 21:31:58 +02:00
|
|
|
|
2018-06-07 22:22:22 +02:00
|
|
|
qint64 m_totalSizeValue;
|
|
|
|
qint64 m_usedSizeValue;
|
2018-06-04 21:31:58 +02:00
|
|
|
};
|
|
|
|
|
2020-08-22 01:19:58 +02:00
|
|
|
#endif // VOLUMEGROUPBASEDIALOG_H
|