1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-14 01:54:07 +02:00

Set GenericItem type depenending on if a page is deletable

This commit is contained in:
Uwe L. Korn
2014-06-18 17:43:52 +01:00
parent 2a9ef2cad6
commit 67eeeffa0d
2 changed files with 15 additions and 0 deletions

View File

@@ -116,6 +116,20 @@ GenericPageItem::isBeingPlayed() const
}
void
GenericPageItem::setDeletable( bool deletable )
{
if ( deletable )
{
setRowType( SourcesModel::TemporaryPage );
}
else
{
setRowType( SourcesModel::GenericPage );
}
}
int
GenericPageItem::peerSortValue() const
{

View File

@@ -41,6 +41,7 @@ public:
virtual int peerSortValue() const; // How to sort relative to peers in the tree.
virtual bool isBeingPlayed() const;
void setDeletable( bool deletable );
void setText( const QString& text );
void setSortValue( int value );