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:
parent
4efafaede1
commit
707c2a93d0
@ -168,6 +168,14 @@ TreeView::setTreeModel( TreeModel* model )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TreeView::setEmptyTip( const QString& tip )
|
||||
{
|
||||
m_emptyTip = tip;
|
||||
m_overlay->setText( tip );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TreeView::onViewChanged()
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user