#include "pagepartitioning.h" #include #include #include #include PagePartitioning::PagePartitioning(const QString& title) : InstallerPage(title) { // widgets m_ButExistPartition = new QRadioButton( tr("Use existing partition") ); m_ButAllDisk = new QRadioButton( tr("Use automatical partitioning") ); m_ButPartitioning = new QPushButton( tr("Manualy partitioning") ); m_Partitions = new QComboBox; m_Disks = new QComboBox; // layouts QHBoxLayout* hbox_1 = new QHBoxLayout; hbox_1->addWidget( m_ButExistPartition ); hbox_1->addWidget( m_Partitions ); QHBoxLayout* hbox_2 = new QHBoxLayout; hbox_2->addWidget( m_ButAllDisk ); hbox_2->addWidget( m_Disks ); QHBoxLayout* hbox_3 = new QHBoxLayout; hbox_3->addWidget( m_ButPartitioning ); hbox_3->addStretch(); QVBoxLayout* vbox_1 = new QVBoxLayout; vbox_1->addLayout(hbox_1); vbox_1->addLayout(hbox_2); vbox_1->addLayout(hbox_3); vbox_1->addStretch(); m_Widget->setLayout(vbox_1); m_ButExistPartition->setChecked(true); m_Disks->setEnabled(false); connect(m_ButExistPartition, SIGNAL(toggled(bool)), m_Partitions, SLOT(setEnabled(bool))); connect(m_ButAllDisk, SIGNAL(toggled(bool)), m_Disks, SLOT(setEnabled(bool))); connect( m_ButPartitioning, SIGNAL(clicked()), this, SIGNAL(manualyPartitioning()) ); // TODO: replace code and get data from libparted m_Partitions->addItem( "/dev/sda1 (100G)" ); m_Partitions->addItem( "/dev/sda2 (100G)" ); m_Partitions->addItem( "/dev/sdb1 (80G)" ); m_Disks->addItem( "/dev/sda" ); m_Disks->addItem( "/dev/sdb" ); } bool PagePartitioning::validate() { return true; } void PagePartitioning::show() { }