|
|
|
@ -36,16 +36,26 @@ PartitionPreview::PartitionPreview( QWidget* parent )
|
|
|
|
|
setFrameStyle( QFrame::NoFrame );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PartitionPreview::~PartitionPreview()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QSize
|
|
|
|
|
PartitionPreview::minimumSizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return sizeHint();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QSize
|
|
|
|
|
PartitionPreview::sizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return QSize( -1, VIEW_HEIGHT );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
PartitionPreview::paintEvent( QPaintEvent* event )
|
|
|
|
|
{
|
|
|
|
@ -55,6 +65,7 @@ PartitionPreview::paintEvent( QPaintEvent* event )
|
|
|
|
|
drawPartitions( &painter, rect(), QModelIndex() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
drawSection( QPainter* painter, const QRect& rect_, int x, int width, const QModelIndex& index )
|
|
|
|
|
{
|
|
|
|
@ -91,6 +102,7 @@ drawSection( QPainter* painter, const QRect& rect_, int x, int width, const QMod
|
|
|
|
|
painter->translate( -0.5, -0.5 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
PartitionPreview::drawPartitions( QPainter* painter, const QRect& rect, const QModelIndex& parent )
|
|
|
|
|
{
|
|
|
|
@ -140,53 +152,62 @@ PartitionPreview::drawPartitions( QPainter* painter, const QRect& rect, const QM
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QModelIndex
|
|
|
|
|
PartitionPreview::indexAt( const QPoint& point ) const
|
|
|
|
|
{
|
|
|
|
|
return QModelIndex();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QRect
|
|
|
|
|
PartitionPreview::visualRect( const QModelIndex& index ) const
|
|
|
|
|
{
|
|
|
|
|
return QRect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QRegion
|
|
|
|
|
PartitionPreview::visualRegionForSelection( const QItemSelection& selection ) const
|
|
|
|
|
{
|
|
|
|
|
return QRegion();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
PartitionPreview::horizontalOffset() const
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
PartitionPreview::verticalOffset() const
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
PartitionPreview::scrollTo( const QModelIndex& index, ScrollHint hint )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QModelIndex
|
|
|
|
|
PartitionPreview::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
|
|
|
|
{
|
|
|
|
|
return QModelIndex();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
PartitionPreview::isIndexHidden( const QModelIndex& index ) const
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
PartitionPreview::setSelection( const QRect& rect, QItemSelectionModel::SelectionFlags flags )
|
|
|
|
|
{
|
|
|
|
|