mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Let TreeView manage empty-tooltips, too.
This commit is contained in:
@@ -168,6 +168,14 @@ TreeView::setTreeModel( TreeModel* model )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TreeView::setEmptyTip( const QString& tip )
|
||||||
|
{
|
||||||
|
m_emptyTip = tip;
|
||||||
|
m_overlay->setText( tip );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TreeView::onViewChanged()
|
TreeView::onViewChanged()
|
||||||
{
|
{
|
||||||
|
@@ -57,11 +57,12 @@ public:
|
|||||||
TreeModel* model() const { return m_model; }
|
TreeModel* model() const { return m_model; }
|
||||||
TreeProxyModel* proxyModel() const { return m_proxyModel; }
|
TreeProxyModel* proxyModel() const { return m_proxyModel; }
|
||||||
OverlayWidget* overlay() const { return m_overlay; }
|
OverlayWidget* overlay() const { return m_overlay; }
|
||||||
// PlaylistItemDelegate* delegate() { return m_delegate; }
|
|
||||||
|
|
||||||
void setModel( QAbstractItemModel* model );
|
void setModel( QAbstractItemModel* model );
|
||||||
void setTreeModel( TreeModel* model );
|
void setTreeModel( TreeModel* 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(); }
|
||||||
|
|
||||||
@@ -117,6 +118,7 @@ private:
|
|||||||
QModelIndex m_contextMenuIndex;
|
QModelIndex m_contextMenuIndex;
|
||||||
Tomahawk::ContextMenu* m_contextMenu;
|
Tomahawk::ContextMenu* m_contextMenu;
|
||||||
|
|
||||||
|
QString m_emptyTip;
|
||||||
bool m_showModes;
|
bool m_showModes;
|
||||||
QTimer m_timer;
|
QTimer m_timer;
|
||||||
mutable QString m_guid;
|
mutable QString m_guid;
|
||||||
|
Reference in New Issue
Block a user