1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Let TreeView manage empty-tooltips, too.

This commit is contained in:
Christian Muehlhaeuser 2012-06-01 09:04:21 +02:00
parent 4efafaede1
commit 707c2a93d0
2 changed files with 11 additions and 1 deletions

View File

@ -168,6 +168,14 @@ TreeView::setTreeModel( TreeModel* model )
}
void
TreeView::setEmptyTip( const QString& tip )
{
m_emptyTip = tip;
m_overlay->setText( tip );
}
void
TreeView::onViewChanged()
{

View File

@ -57,11 +57,12 @@ public:
TreeModel* model() const { return m_model; }
TreeProxyModel* proxyModel() const { return m_proxyModel; }
OverlayWidget* overlay() const { return m_overlay; }
// PlaylistItemDelegate* delegate() { return m_delegate; }
void setModel( QAbstractItemModel* model );
void setTreeModel( TreeModel* model );
void setEmptyTip( const QString& tip );
virtual QWidget* widget() { return this; }
virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); }
@ -117,6 +118,7 @@ private:
QModelIndex m_contextMenuIndex;
Tomahawk::ContextMenu* m_contextMenu;
QString m_emptyTip;
bool m_showModes;
QTimer m_timer;
mutable QString m_guid;