Simplify TrackLabelButton
Remove the dependency to `Instrument` and `InstrumentTrack` from `TrackLabelButton`. The icon of an `InstrumentTrackView` is now determined in the class `InstrumentTrackView` itself using the new method `determinePixmap`. This enables the removal of the overridden `paintEvent` method from `TrackLabelButton`.
This commit is contained in:
@@ -93,6 +93,8 @@ private slots:
|
||||
|
||||
void handleConfigChange(QString cls, QString attr, QString value);
|
||||
|
||||
private:
|
||||
QPixmap determinePixmap(InstrumentTrack * instrumentTrack);
|
||||
|
||||
private:
|
||||
InstrumentTrackWindow * m_window;
|
||||
|
||||
@@ -55,7 +55,6 @@ protected:
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
void resizeEvent( QResizeEvent * _re ) override;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user