mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Added PlayableCover::setShowText( bool ) which allows to enable / disable the text overlay.
This commit is contained in:
parent
f014b5a3f2
commit
74b9f2594e
@ -29,6 +29,7 @@
|
||||
|
||||
PlayableCover::PlayableCover( QWidget* parent )
|
||||
: QLabel( parent )
|
||||
, m_showText( false )
|
||||
{
|
||||
setMouseTracking( true );
|
||||
|
||||
@ -80,6 +81,8 @@ void
|
||||
PlayableCover::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
QLabel::paintEvent( event );
|
||||
if ( !m_showText )
|
||||
return;
|
||||
|
||||
QRect r = contentsRect().adjusted( margin(), margin(), -margin(), -margin() );
|
||||
QPixmap buffer( r.size() );
|
||||
|
@ -40,6 +40,9 @@ public:
|
||||
PlayableCover( QWidget* parent = 0 );
|
||||
virtual ~PlayableCover();
|
||||
|
||||
bool showText() const { return m_showText; }
|
||||
void setShowText( bool b ) { m_showText = b; }
|
||||
|
||||
public slots:
|
||||
virtual void setArtist( const Tomahawk::artist_ptr& artist );
|
||||
virtual void setAlbum( const Tomahawk::album_ptr& album );
|
||||
@ -62,6 +65,8 @@ private:
|
||||
Tomahawk::artist_ptr m_artist;
|
||||
Tomahawk::album_ptr m_album;
|
||||
Tomahawk::query_ptr m_query;
|
||||
|
||||
bool m_showText;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user