mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
Bring back tree view headers
This commit is contained in:
parent
bf72672cce
commit
fb6d80ccb6
3 changed files with 23 additions and 3 deletions
|
@ -110,6 +110,28 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
|||
}
|
||||
}
|
||||
|
||||
QVariant
|
||||
PartitionModel::headerData( int section, Qt::Orientation orientation, int role ) const
|
||||
{
|
||||
if ( role != Qt::DisplayRole )
|
||||
return QVariant();
|
||||
|
||||
switch ( section )
|
||||
{
|
||||
case NameColumn:
|
||||
return tr( "Name" );
|
||||
case FileSystemColumn:
|
||||
return tr( "File System" );
|
||||
case MountPointColumn:
|
||||
return tr(" Mount Point" );
|
||||
case SizeColumn:
|
||||
return tr(" Size" );
|
||||
default:
|
||||
cDebug() << "Unknown column" << section;
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PartitionModel::fillPartitionList( PartitionNode* parent )
|
||||
{
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
int columnCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
||||
|
||||
Partition* partitionForIndex( const QModelIndex& index ) const;
|
||||
|
||||
|
|
|
@ -72,9 +72,6 @@
|
|||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
|
|
Loading…
Add table
Reference in a new issue