mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Let GridView manage empty-tooltips, too.
This commit is contained in:
parent
2aa71d130f
commit
11e1a410e8
@ -78,7 +78,6 @@ GridView::GridView( QWidget* parent )
|
||||
|
||||
/* m_overlay->setText( tr( "After you have scanned your music collection you will find your latest album additions right here." ) );
|
||||
m_overlay->setText( tr( "This collection doesn't have any recent albums." ) );*/
|
||||
m_overlay->setText( tr( "Nothing found." ) );
|
||||
|
||||
connect( this, SIGNAL( doubleClicked( QModelIndex ) ), SLOT( onItemActivated( QModelIndex ) ) );
|
||||
connect( this, SIGNAL( customContextMenuRequested( QPoint ) ), SLOT( onCustomContextMenu( QPoint ) ) );
|
||||
@ -133,6 +132,14 @@ GridView::setPlayableModel( PlayableModel* model )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GridView::setEmptyTip( const QString& tip )
|
||||
{
|
||||
m_emptyTip = tip;
|
||||
m_overlay->setText( tip );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GridView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
||||
{
|
||||
|
@ -57,6 +57,8 @@ public:
|
||||
void setPlayableModel( PlayableModel* model );
|
||||
void setModel( QAbstractItemModel* model );
|
||||
|
||||
void setEmptyTip( const QString& tip );
|
||||
|
||||
virtual QWidget* widget() { return this; }
|
||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); }
|
||||
|
||||
@ -100,6 +102,7 @@ private:
|
||||
QModelIndex m_contextMenuIndex;
|
||||
Tomahawk::ContextMenu* m_contextMenu;
|
||||
|
||||
QString m_emptyTip;
|
||||
bool m_inited;
|
||||
bool m_autoFitItems;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user