1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

* Fixed column weights and added guid() methods to PlayableModels.

This commit is contained in:
Christian Muehlhaeuser 2012-11-09 06:36:59 +01:00
parent dad52a1590
commit b71ba3d5aa
3 changed files with 17 additions and 1 deletions

View File

@ -57,6 +57,8 @@ public:
explicit PlayableModel( QObject* parent = 0, bool loading = true );
virtual ~PlayableModel();
virtual QString guid() const { return QString(); }
virtual QModelIndex index( int row, int column, const QModelIndex& parent ) const;
virtual QModelIndex parent( const QModelIndex& child ) const;

View File

@ -49,6 +49,18 @@ PlayableProxyModel::PlayableProxyModel( QObject* parent )
}
QString
PlayableProxyModel::guid() const
{
if ( m_model )
{
return m_model->guid();
}
else
return QString();
}
bool
PlayableProxyModel::isLoading() const
{
@ -554,7 +566,7 @@ PlayableProxyModel::columnWeights() const
case Detailed:
default:
w << 0.16 << 0.16 << 0.14 << 0.12 << 0.05 << 0.05 << 0.05 << 0.05 << 0.05 << 0.05 << 0.09; // << 0.03;
w << 0.15 << 0.15 << 0.12 << 0.12 << 0.05 << 0.05 << 0.05 << 0.05 << 0.05 << 0.05 << 0.09; // << 0.03;
break;
}

View File

@ -41,6 +41,8 @@ public:
explicit PlayableProxyModel ( QObject* parent = 0 );
virtual ~PlayableProxyModel() {}
virtual QString guid() const;
virtual PlayableModel* sourceModel() const { return m_model; }
virtual void setSourcePlayableModel( PlayableModel* sourceModel );
virtual void setSourceModel( QAbstractItemModel* model );