mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Let GridView manage empty-tooltips, too.
This commit is contained in:
@@ -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( "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( "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( doubleClicked( QModelIndex ) ), SLOT( onItemActivated( QModelIndex ) ) );
|
||||||
connect( this, SIGNAL( customContextMenuRequested( QPoint ) ), SLOT( onCustomContextMenu( QPoint ) ) );
|
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
|
void
|
||||||
GridView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
GridView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
|
||||||
{
|
{
|
||||||
|
@@ -57,6 +57,8 @@ public:
|
|||||||
void setPlayableModel( PlayableModel* model );
|
void setPlayableModel( PlayableModel* model );
|
||||||
void setModel( QAbstractItemModel* model );
|
void setModel( QAbstractItemModel* model );
|
||||||
|
|
||||||
|
void setEmptyTip( const QString& tip );
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); }
|
virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); }
|
||||||
|
|
||||||
@@ -100,6 +102,7 @@ private:
|
|||||||
QModelIndex m_contextMenuIndex;
|
QModelIndex m_contextMenuIndex;
|
||||||
Tomahawk::ContextMenu* m_contextMenu;
|
Tomahawk::ContextMenu* m_contextMenu;
|
||||||
|
|
||||||
|
QString m_emptyTip;
|
||||||
bool m_inited;
|
bool m_inited;
|
||||||
bool m_autoFitItems;
|
bool m_autoFitItems;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user