/** Sets the PartitionTable this widget shows. @param ptable pointer to the PartitionTable to show. Must not be NULL. */ void PartTableWidget::setPartitionTable(const PartitionTable* ptable) { clear(); m_PartitionTable = ptable; if (partitionTable() != NULL) { foreach(const Partition* p, partitionTable()->children()) { QWidget* w = new PartWidget(this, p); w->setVisible(true); }
bool CreatePartitionTableOperation::execute(Report& parent) { targetDevice().setPartitionTable(partitionTable()); return Operation::execute(parent); }
QString CreatePartitionTableOperation::description() const { return xi18nc("@info:status", "Create a new partition table (type: %1) on <filename>%2</filename>", partitionTable()->typeName(), targetDevice().deviceNode()); }
void CreatePartitionTableOperation::preview() { targetDevice().setPartitionTable(partitionTable()); targetDevice().partitionTable()->updateUnallocated(targetDevice()); }