Code style.

main
Teo Mrnjavac 10 years ago
parent af3fc3f07f
commit 1ad1a64161

@ -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 )
{

@ -33,10 +33,7 @@ public:
explicit PartitionPreview( QWidget* parent = 0 );
~PartitionPreview();
QSize minimumSizeHint() const override
{
return sizeHint();
}
QSize minimumSizeHint() const override;
QSize sizeHint() const override;

Loading…
Cancel
Save