[libcalamaresui] Apply coding style to widgets/

main
Adriaan de Groot 5 years ago
parent 27c3a5a11d
commit 6224d6605b

@ -23,16 +23,17 @@
ClickableLabel::ClickableLabel( QWidget* parent )
: QLabel( parent )
{}
{
}
ClickableLabel::ClickableLabel( const QString& text, QWidget* parent )
: QLabel( text, parent )
{}
{
}
ClickableLabel::~ClickableLabel()
{}
ClickableLabel::~ClickableLabel() {}
void
@ -48,5 +49,7 @@ ClickableLabel::mouseReleaseEvent( QMouseEvent* event )
{
QLabel::mouseReleaseEvent( event );
if ( m_time.elapsed() < qApp->doubleClickInterval() )
{
emit clicked();
}
}

@ -42,4 +42,4 @@ private:
QTime m_time;
};
#endif // CLICKABLELABEL_H
#endif // CLICKABLELABEL_H

@ -22,21 +22,18 @@
FixedAspectRatioLabel::FixedAspectRatioLabel( QWidget* parent )
: QLabel( parent )
{}
{
}
FixedAspectRatioLabel::~FixedAspectRatioLabel()
{}
FixedAspectRatioLabel::~FixedAspectRatioLabel() {}
void
FixedAspectRatioLabel::setPixmap( const QPixmap& pixmap )
{
m_pixmap = pixmap;
QLabel::setPixmap( pixmap.scaled(
contentsRect().size(),
Qt::KeepAspectRatio,
Qt::SmoothTransformation ) );
QLabel::setPixmap( pixmap.scaled( contentsRect().size(), Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
}
@ -44,9 +41,5 @@ void
FixedAspectRatioLabel::resizeEvent( QResizeEvent* event )
{
Q_UNUSED( event )
QLabel::setPixmap( m_pixmap.scaled(
contentsRect().size(),
Qt::KeepAspectRatio,
Qt::SmoothTransformation ) );
QLabel::setPixmap( m_pixmap.scaled( contentsRect().size(), Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
}

@ -31,11 +31,11 @@ public:
virtual ~FixedAspectRatioLabel() override;
public slots:
void setPixmap( const QPixmap &pixmap );
void setPixmap( const QPixmap& pixmap );
void resizeEvent( QResizeEvent* event ) override;
private:
QPixmap m_pixmap;
};
#endif // FIXEDASPECTRATIOLABEL_H
#endif // FIXEDASPECTRATIOLABEL_H

@ -35,4 +35,4 @@ private:
QLabel* m_waitingLabel;
};
#endif // WAITINGWIDGET_H
#endif // WAITINGWIDGET_H

Loading…
Cancel
Save