本文整理汇总了C++中Partition::children方法的典型用法代码示例。如果您正苦于以下问题:C++ Partition::children方法的具体用法?C++ Partition::children怎么用?C++ Partition::children使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Partition
的用法示例。
在下文中一共展示了Partition::children方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: partitionForIndex
int
PartitionModel::rowCount( const QModelIndex& parent ) const
{
Partition* parentPartition = partitionForIndex( parent );
if ( parentPartition )
return parentPartition->children().count();
PartitionTable* table = m_device->partitionTable();
return table ? table->children().count() : 0;
}
示例2: Partition
/** @param other Partition to copy
*/
Partition::Partition(const Partition& other) :
PartitionNode(),
m_Children(),
m_Parent(other.m_Parent),
m_FileSystem(FileSystemFactory::create(other.fileSystem())),
m_Roles(other.m_Roles),
m_FirstSector(other.m_FirstSector),
m_LastSector(other.m_LastSector),
m_DevicePath(other.m_DevicePath),
m_MountPoint(other.m_MountPoint),
m_AvailableFlags(other.m_AvailableFlags),
m_ActiveFlags(other.m_ActiveFlags),
m_IsMounted(other.m_IsMounted),
m_SectorSize(other.m_SectorSize),
m_State(other.m_State)
{
setPartitionPath(other.m_PartitionPath);
foreach(const Partition* child, other.children())
{
Partition* p = new Partition(*child);
p->setParent(this);
m_Children.append(p);
}
}