mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 16:31:58 +02:00
Move implementations out of the header
This commit is contained in:
parent
61bfe4e74d
commit
477f7d63ef
@ -140,6 +140,34 @@ PlayableModel::parent( const QModelIndex& child ) const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlayableModel::isReadOnly() const
|
||||
{
|
||||
return m_readOnly;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::setReadOnly( bool b )
|
||||
{
|
||||
m_readOnly = b;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlayableModel::isLoading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
PlayableModel::title() const
|
||||
{
|
||||
return m_title;
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
PlayableModel::artistData( const artist_ptr& artist, int role ) const
|
||||
{
|
||||
@ -400,6 +428,27 @@ PlayableModel::flags( const QModelIndex& index ) const
|
||||
}
|
||||
|
||||
|
||||
QPersistentModelIndex
|
||||
PlayableModel::currentItem()
|
||||
{
|
||||
return m_currentIndex;
|
||||
}
|
||||
|
||||
|
||||
QID
|
||||
PlayableModel::currentItemUuid()
|
||||
{
|
||||
return m_currentUuid;
|
||||
}
|
||||
|
||||
|
||||
PlaylistModes::RepeatMode
|
||||
PlayableModel::repeatMode() const
|
||||
{
|
||||
return Tomahawk::PlaylistModes::NoRepeat;
|
||||
}
|
||||
|
||||
|
||||
QStringList
|
||||
PlayableModel::mimeTypes() const
|
||||
{
|
||||
@ -693,6 +742,13 @@ PlayableModel::removeIndexes( const QList<QPersistentModelIndex>& indexes )
|
||||
}
|
||||
|
||||
|
||||
PlayableItem*
|
||||
PlayableModel::rootItem() const
|
||||
{
|
||||
return m_rootItem;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
@ -951,6 +1007,13 @@ PlayableModel::setTitle( const QString& title )
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
PlayableModel::description() const
|
||||
{
|
||||
return m_description;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::setDescription( const QString& description )
|
||||
{
|
||||
@ -959,6 +1022,13 @@ PlayableModel::setDescription( const QString& description )
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
PlayableModel::icon() const
|
||||
{
|
||||
return m_icon;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::setIcon( const QPixmap& pixmap )
|
||||
{
|
||||
@ -967,6 +1037,20 @@ PlayableModel::setIcon( const QPixmap& pixmap )
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlayableModel::trackCount() const
|
||||
{
|
||||
return rowCount( QModelIndex() );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
PlayableModel::itemCount() const
|
||||
{
|
||||
return rowCount( QModelIndex() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::onQueryBecamePlayable( bool playable )
|
||||
{
|
||||
|
@ -18,6 +18,7 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef PLAYABLEMODEL_H
|
||||
#define PLAYABLEMODEL_H
|
||||
|
||||
@ -82,19 +83,19 @@ public:
|
||||
virtual QModelIndex index( int row, int column, const QModelIndex& parent ) const;
|
||||
virtual QModelIndex parent( const QModelIndex& child ) const;
|
||||
|
||||
virtual bool isReadOnly() const { return m_readOnly; }
|
||||
virtual void setReadOnly( bool b ) { m_readOnly = b; }
|
||||
virtual bool isLoading() const { return m_loading; }
|
||||
virtual bool isReadOnly() const;
|
||||
virtual void setReadOnly( bool b );
|
||||
virtual bool isLoading() const;
|
||||
|
||||
virtual QString title() const { return m_title; }
|
||||
virtual QString title() const;
|
||||
virtual void setTitle( const QString& title );
|
||||
virtual QString description() const { return m_description; }
|
||||
virtual QString description() const;
|
||||
virtual void setDescription( const QString& description );
|
||||
virtual QPixmap icon() const { return m_icon; }
|
||||
virtual QPixmap icon() const;
|
||||
virtual void setIcon( const QPixmap& pixmap );
|
||||
|
||||
virtual int trackCount() const { return rowCount( QModelIndex() ); }
|
||||
virtual int itemCount() const { return rowCount( QModelIndex() ); }
|
||||
virtual int trackCount() const;
|
||||
virtual int itemCount() const;
|
||||
|
||||
virtual int rowCount( const QModelIndex& parent ) const;
|
||||
virtual int columnCount( const QModelIndex& parent = QModelIndex() ) const;
|
||||
@ -112,10 +113,10 @@ public:
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
virtual Qt::ItemFlags flags( const QModelIndex& index ) const;
|
||||
|
||||
virtual QPersistentModelIndex currentItem() { return m_currentIndex; }
|
||||
virtual Tomahawk::QID currentItemUuid() { return m_currentUuid; }
|
||||
virtual QPersistentModelIndex currentItem();
|
||||
virtual Tomahawk::QID currentItemUuid();
|
||||
|
||||
virtual Tomahawk::PlaylistModes::RepeatMode repeatMode() const { return Tomahawk::PlaylistModes::NoRepeat; }
|
||||
virtual Tomahawk::PlaylistModes::RepeatMode repeatMode() const;
|
||||
virtual bool shuffled() const { return false; }
|
||||
|
||||
virtual void ensureResolved();
|
||||
@ -174,7 +175,7 @@ public slots:
|
||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||
|
||||
protected:
|
||||
PlayableItem* rootItem() const { return m_rootItem; }
|
||||
PlayableItem* rootItem() const;
|
||||
QModelIndex createIndex( int row, int column, PlayableItem* item = 0 ) const;
|
||||
|
||||
private slots:
|
||||
|
@ -391,6 +391,13 @@ PlaylistModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int r
|
||||
}
|
||||
|
||||
|
||||
playlist_ptr
|
||||
PlaylistModel::playlist() const
|
||||
{
|
||||
return m_playlist;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistModel::parsedDroppedTracks( QList< query_ptr > tracks )
|
||||
{
|
||||
@ -561,8 +568,36 @@ PlaylistModel::removeIndex( const QModelIndex& index, bool moreToCome )
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlaylistModel::waitForRevision( const QString& revisionguid ) const
|
||||
{
|
||||
return m_waitForRevision.contains( revisionguid );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistModel::removeFromWaitList( const QString& revisionguid )
|
||||
{
|
||||
m_waitForRevision.removeAll( revisionguid );
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlaylistModel::isTemporary() const
|
||||
{
|
||||
return m_isTemporary;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlaylistModel::acceptPlayableQueriesOnly() const
|
||||
{
|
||||
return m_acceptPlayableQueriesOnly;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistModel::setAcceptPlayableQueriesOnly( bool b )
|
||||
{
|
||||
m_acceptPlayableQueriesOnly = b;
|
||||
}
|
||||
|
@ -52,13 +52,13 @@ public:
|
||||
virtual QMimeData* mimeData( const QModelIndexList& indexes ) const;
|
||||
virtual bool dropMimeData( const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent );
|
||||
|
||||
Tomahawk::playlist_ptr playlist() const { return m_playlist; }
|
||||
Tomahawk::playlist_ptr playlist() const;
|
||||
|
||||
virtual void loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEntries = true );
|
||||
bool isTemporary() const;
|
||||
|
||||
bool acceptPlayableQueriesOnly() const { return m_acceptPlayableQueriesOnly; }
|
||||
void setAcceptPlayableQueriesOnly( bool b ) { m_acceptPlayableQueriesOnly = b; }
|
||||
bool acceptPlayableQueriesOnly() const;
|
||||
void setAcceptPlayableQueriesOnly( bool b );
|
||||
|
||||
public slots:
|
||||
virtual void clear();
|
||||
@ -79,8 +79,8 @@ signals:
|
||||
void playlistChanged();
|
||||
|
||||
protected:
|
||||
bool waitForRevision( const QString& revisionguid ) const { return m_waitForRevision.contains( revisionguid ); }
|
||||
void removeFromWaitList( const QString& revisionguid ) { m_waitForRevision.removeAll( revisionguid ); }
|
||||
bool waitForRevision( const QString& revisionguid ) const;
|
||||
void removeFromWaitList( const QString& revisionguid );
|
||||
|
||||
QList<Tomahawk::plentry_ptr> playlistEntries() const;
|
||||
|
||||
|
@ -55,6 +55,20 @@ TopLovedTracksModel::~TopLovedTracksModel()
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
TopLovedTracksModel::limit() const
|
||||
{
|
||||
return m_limit;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TopLovedTracksModel::setLimit( unsigned int limit )
|
||||
{
|
||||
m_limit = limit;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TopLovedTracksModel::loadTracks()
|
||||
{
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
explicit TopLovedTracksModel( QObject* parent = 0 );
|
||||
~TopLovedTracksModel();
|
||||
|
||||
unsigned int limit() const { return m_limit; }
|
||||
void setLimit( unsigned int limit ) { m_limit = limit; }
|
||||
unsigned int limit() const;
|
||||
void setLimit( unsigned int limit );
|
||||
|
||||
bool isTemporary() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user