From 96f28f53ce30654fc998a39b3aa16097c7fa5e82 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 16 Jun 2013 12:56:38 +0200 Subject: [PATCH] Move implementations out of the header --- src/libtomahawk/Result.cpp | 119 +++++++++++++++++++++++++++++++++++++ src/libtomahawk/Result.h | 40 ++++++------- 2 files changed, 139 insertions(+), 20 deletions(-) diff --git a/src/libtomahawk/Result.cpp b/src/libtomahawk/Result.cpp index 32691a3aa..e99c81524 100644 --- a/src/libtomahawk/Result.cpp +++ b/src/libtomahawk/Result.cpp @@ -140,6 +140,24 @@ Result::collection() const return m_collection; } +QString +Result::url() const +{ + return m_url; +} + +bool +Result::checked() const +{ + return m_checked; +} + +QString +Result::mimetype() const +{ + return m_mimetype; +} + float Result::score() const @@ -271,6 +289,66 @@ Result::setCollection( const Tomahawk::collection_ptr& collection ) connect( m_collection->source().data(), SIGNAL( offline() ), SLOT( onOffline() ), Qt::QueuedConnection ); } +void +Result::setFriendlySource(const QString &s) +{ + m_friendlySource = s; +} + +void +Result::setPurchaseUrl(const QString &u) +{ + m_purchaseUrl = u; +} + +void +Result::setLinkUrl(const QString &u) +{ + m_linkUrl = u; +} + +void +Result::setChecked( bool checked ) +{ + m_checked = checked; +} + +void +Result::setMimetype( const QString &mimetype ) +{ + m_mimetype = mimetype; +} + +void +Result::setBitrate( unsigned int bitrate ) +{ + m_bitrate = bitrate; +} + +void +Result::setSize( unsigned int size ) +{ + m_size = size; +} + +void +Result::setModificationTime( unsigned int modtime ) +{ + m_modtime = modtime; +} + +void +Result::setTrack(const track_ptr &track) +{ + m_track = track; +} + +unsigned int +Result::fileId() const +{ + return m_fileId; +} + QString Result::friendlySource() const @@ -283,6 +361,18 @@ Result::friendlySource() const return collection()->source()->friendlyName(); } +QString +Result::purchaseUrl() const +{ + return m_purchaseUrl; +} + +QString +Result::linkUrl() const +{ + return m_linkUrl; +} + QPixmap Result::sourceIcon( TomahawkUtils::ImageMode style, const QSize& desiredSize ) const @@ -339,6 +429,35 @@ Result::sourceIcon( TomahawkUtils::ImageMode style, const QSize& desiredSize ) c } } +unsigned int +Result::bitrate() const +{ + return m_bitrate; +} + +unsigned int +Result::size() const +{ + return m_size; +} + +unsigned int +Result::modificationTime() const +{ + return m_modtime; +} + +void +Result::setScore( float score ) +{ + m_score = score; +} + +void +Result::setFileId(unsigned int id) +{ + m_fileId = id; +} Tomahawk::Resolver* Result::resolvedBy() const diff --git a/src/libtomahawk/Result.h b/src/libtomahawk/Result.h index ffabfaaba..8860b713f 100644 --- a/src/libtomahawk/Result.h +++ b/src/libtomahawk/Result.h @@ -71,40 +71,40 @@ public: bool playable() const; collection_ptr collection() const; - QString url() const { return m_url; } + QString url() const; /** * Has the given url been checked that it is accessible/valid. * * Results marked as true will bypass the ResultUrlChecker. */ - bool checked() const { return m_checked; } - QString mimetype() const { return m_mimetype; } + bool checked() const; + QString mimetype() const; QString friendlySource() const; - QString purchaseUrl() const { return m_purchaseUrl; } - QString linkUrl() const { return m_linkUrl; } + QString purchaseUrl() const; + QString linkUrl() const; QPixmap sourceIcon( TomahawkUtils::ImageMode style, const QSize& desiredSize = QSize() ) const; - unsigned int bitrate() const { return m_bitrate; } - unsigned int size() const { return m_size; } - unsigned int modificationTime() const { return m_modtime; } + unsigned int bitrate() const; + unsigned int size() const; + unsigned int modificationTime() const; - void setScore( float score ) { m_score = score; } - void setFileId( unsigned int id ) { m_fileId = id; } + void setScore( float score ); + void setFileId( unsigned int id ); void setRID( RID id ) { m_rid = id; } void setCollection( const Tomahawk::collection_ptr& collection ); - void setFriendlySource( const QString& s ) { m_friendlySource = s; } - void setPurchaseUrl( const QString& u ) { m_purchaseUrl = u; } - void setLinkUrl( const QString& u ) { m_linkUrl = u; } - void setChecked( bool checked ) { m_checked = checked; } - void setMimetype( const QString& mimetype ) { m_mimetype = mimetype; } - void setBitrate( unsigned int bitrate ) { m_bitrate = bitrate; } - void setSize( unsigned int size ) { m_size = size; } - void setModificationTime( unsigned int modtime ) { m_modtime = modtime; } + void setFriendlySource( const QString& s ); + void setPurchaseUrl( const QString& u ); + void setLinkUrl( const QString& u ); + void setChecked( bool checked ); + void setMimetype( const QString& mimetype ); + void setBitrate( unsigned int bitrate ); + void setSize( unsigned int size ); + void setModificationTime( unsigned int modtime ); - void setTrack( const track_ptr& track ) { m_track = track; } + void setTrack( const track_ptr& track ); - unsigned int fileId() const { return m_fileId; } + unsigned int fileId() const; track_ptr track() const;