From 9c1acc7dc26d62a7214fa7a80cf4ec212e6d4567 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 16 Jul 2013 13:24:02 +0200 Subject: [PATCH] Move implementations out of the header --- src/libtomahawk/Album.cpp | 35 +++++++++++++++++++++++++++++++++++ src/libtomahawk/Album.h | 17 +++++++---------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/libtomahawk/Album.cpp b/src/libtomahawk/Album.cpp index afc8b57b0..84aa05e2d 100644 --- a/src/libtomahawk/Album.cpp +++ b/src/libtomahawk/Album.cpp @@ -237,6 +237,20 @@ Album::id() const } +QString +Album::name() const +{ + return m_name; +} + + +QString +Album::sortname() const +{ + return m_sortname; +} + + #ifndef ENABLE_HEADLESS QPixmap Album::cover( const QSize& size, bool forceLoad ) const @@ -303,6 +317,13 @@ Album::cover( const QSize& size, bool forceLoad ) const else return QPixmap(); } + +bool +Album::coverLoaded() const +{ + return m_coverLoaded; +} + #endif @@ -369,6 +390,20 @@ Album::playlistInterface( ModelMode mode, const Tomahawk::collection_ptr& collec } +QWeakPointer +Album::weakRef() +{ + return m_ownRef; +} + + +void +Album::setWeakRef( QWeakPointer weakRef ) +{ + m_ownRef = weakRef; +} + + QList Album::tracks( ModelMode mode, const Tomahawk::collection_ptr& collection ) { diff --git a/src/libtomahawk/Album.h b/src/libtomahawk/Album.h index e1837a89b..392c35ec5 100644 --- a/src/libtomahawk/Album.h +++ b/src/libtomahawk/Album.h @@ -2,6 +2,7 @@ * * Copyright 2010-2011, Christian Muehlhaeuser * Copyright 2010-2012, Jeff Mitchell + * Copyright 2013, Uwe L. Korn * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,11 +21,7 @@ #ifndef TOMAHAWKALBUM_H #define TOMAHAWKALBUM_H -#include -#include -#ifndef ENABLE_HEADLESS - #include -#endif +#include #include #include "Typedefs.h" @@ -51,20 +48,20 @@ public: virtual ~Album(); unsigned int id() const; - QString name() const { return m_name; } - QString sortname() const { return m_sortname; } + QString name() const; + QString sortname() const; artist_ptr artist() const; #ifndef ENABLE_HEADLESS QPixmap cover( const QSize& size, bool forceLoad = true ) const; #endif - bool coverLoaded() const { return m_coverLoaded; } + bool coverLoaded() const; QList tracks( ModelMode mode = Mixed, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() ); Tomahawk::playlistinterface_ptr playlistInterface( ModelMode mode, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() ); - QWeakPointer< Tomahawk::Album > weakRef() { return m_ownRef; } - void setWeakRef( QWeakPointer< Tomahawk::Album > weakRef ) { m_ownRef = weakRef; } + QWeakPointer< Tomahawk::Album > weakRef(); + void setWeakRef( QWeakPointer< Tomahawk::Album > weakRef ); void loadId( bool autoCreate );