/** 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);
		}
Пример #2
0
bool CreatePartitionTableOperation::execute(Report& parent)
{
    targetDevice().setPartitionTable(partitionTable());
    return Operation::execute(parent);
}
Пример #3
0
QString CreatePartitionTableOperation::description() const
{
    return xi18nc("@info:status", "Create a new partition table (type: %1) on <filename>%2</filename>", partitionTable()->typeName(), targetDevice().deviceNode());
}
Пример #4
0
void CreatePartitionTableOperation::preview()
{
    targetDevice().setPartitionTable(partitionTable());
    targetDevice().partitionTable()->updateUnallocated(targetDevice());
}