mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
Apply SelectionFilter in Partition{Labels,Bars}View.
This commit is contained in:
parent
f7f19eb617
commit
ddf4878ec7
4 changed files with 31 additions and 2 deletions
|
@ -19,8 +19,11 @@
|
|||
#ifndef PARTITIONPREVIEW_H
|
||||
#define PARTITIONPREVIEW_H
|
||||
|
||||
#include "PartitionViewSelectionFilter.h"
|
||||
|
||||
#include <QAbstractItemView>
|
||||
|
||||
|
||||
/**
|
||||
* A Qt model view which displays the partitions inside a device as a colored bar.
|
||||
*
|
||||
|
@ -48,6 +51,8 @@ public:
|
|||
|
||||
void setSelectionModel( QItemSelectionModel* selectionModel ) override;
|
||||
|
||||
void setSelectionFilter( SelectionFilter canBeSelected );
|
||||
|
||||
protected:
|
||||
// QAbstractItemView API
|
||||
QRegion visualRegionForSelection( const QItemSelection& selection ) const override;
|
||||
|
@ -69,6 +74,8 @@ private:
|
|||
QModelIndex indexAt( const QPoint& point, const QRect& rect, const QModelIndex& parent ) const;
|
||||
QRect visualRect( const QModelIndex& index, const QRect& rect, const QModelIndex& parent ) const;
|
||||
|
||||
SelectionFilter canBeSelected;
|
||||
|
||||
struct Item
|
||||
{
|
||||
qreal size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue