Commit 0900cd7c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: simplify SpeedLabel constructor

Ref #3368
parent 937fb9bc
...@@ -412,9 +412,8 @@ void VisualSelector::next() ...@@ -412,9 +412,8 @@ void VisualSelector::next()
} }
#endif #endif
SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString& text, SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
QWidget *parent ) : QLabel( parent ), p_intf( _p_intf )
: QLabel( text, parent ), p_intf( _p_intf )
{ {
setToolTip( qtr( "Current playback speed.\nClick to adjust" ) ); setToolTip( qtr( "Current playback speed.\nClick to adjust" ) );
...@@ -431,6 +430,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString& text, ...@@ -431,6 +430,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString& text,
DCONNECT( THEMIM, inputChanged( input_thread_t * ), DCONNECT( THEMIM, inputChanged( input_thread_t * ),
speedControl, activateOnState() ); speedControl, activateOnState() );
setRate( INPUT_RATE_DEFAULT );
} }
SpeedLabel::~SpeedLabel() SpeedLabel::~SpeedLabel()
......
...@@ -162,7 +162,7 @@ class SpeedLabel : public QLabel ...@@ -162,7 +162,7 @@ class SpeedLabel : public QLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
SpeedLabel( intf_thread_t *, const QString&, QWidget * ); SpeedLabel( intf_thread_t *, QWidget * );
virtual ~SpeedLabel(); virtual ~SpeedLabel();
protected: protected:
......
...@@ -498,7 +498,7 @@ inline void MainInterface::createStatusBar() ...@@ -498,7 +498,7 @@ inline void MainInterface::createStatusBar()
nameLabel = new QLabel( this ); nameLabel = new QLabel( this );
nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
| Qt::TextSelectableByKeyboard ); | Qt::TextSelectableByKeyboard );
SpeedLabel *speedLabel = new SpeedLabel( p_intf, "1.00x", this ); SpeedLabel *speedLabel = new SpeedLabel( p_intf, this );
/* Styling those labels */ /* Styling those labels */
timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel ); timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment