2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2018-06-07 22:22:22 +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-07 22:22:22 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2018-06-07 22:22:22 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "CreateVolumeGroupDialog.h"
|
|
|
|
|
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
#include <kpmcore/core/lvmdevice.h>
|
|
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QSpinBox>
|
|
|
|
|
|
|
|
CreateVolumeGroupDialog::CreateVolumeGroupDialog( QString& vgName,
|
|
|
|
QVector< const Partition* >& selectedPVs,
|
|
|
|
QVector< const Partition* > pvList,
|
2018-06-26 05:38:52 +02:00
|
|
|
qint64& pSize,
|
2018-06-07 22:22:22 +02:00
|
|
|
QWidget* parent )
|
2018-06-26 05:38:52 +02:00
|
|
|
: VolumeGroupBaseDialog( vgName, pvList, parent )
|
2018-06-07 22:22:22 +02:00
|
|
|
, m_selectedPVs( selectedPVs )
|
2018-06-26 05:38:52 +02:00
|
|
|
, m_peSize( pSize )
|
2018-06-07 22:22:22 +02:00
|
|
|
{
|
2019-02-22 13:03:38 +01:00
|
|
|
setWindowTitle( tr( "Create Volume Group" ) );
|
2018-06-07 22:22:22 +02:00
|
|
|
|
2018-06-26 05:38:52 +02:00
|
|
|
peSize()->setValue( pSize );
|
|
|
|
|
2018-06-07 22:22:22 +02:00
|
|
|
vgType()->setEnabled( false );
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CreateVolumeGroupDialog::accept()
|
|
|
|
{
|
|
|
|
QString& name = vgNameValue();
|
|
|
|
name = vgName()->text();
|
|
|
|
|
|
|
|
m_selectedPVs << checkedItems();
|
|
|
|
|
2018-06-26 05:38:52 +02:00
|
|
|
qint64& pe = m_peSize;
|
2018-06-07 22:22:22 +02:00
|
|
|
pe = peSize()->value();
|
|
|
|
|
|
|
|
QDialog::accept();
|
|
|
|
}
|