1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02:00

social action stuff

This commit is contained in:
Leo Franchi
2011-08-06 12:40:29 -04:00
parent 1759d1ea19
commit 4cfd039c40

View File

@@ -20,7 +20,7 @@
#define DATABASECOMMAND_SOCIALACTION_H
#include <QDateTime>
#include "database/databasecommand.h"
#include "database/databasecommandloggable.h"
#include "sourcelist.h"
#include "typedefs.h"
@@ -39,12 +39,14 @@
*
* \see DatabaseCommand_LoadSocialActions
*/
class DLLEXPORT DatabaseCommand_SocialAction : public DatabaseCommand
class DLLEXPORT DatabaseCommand_SocialAction : public DatabaseCommandLoggable
{
Q_OBJECT
Q_PROPERTY( QString action READ action WRITE setAction )
Q_PROPERTY( QString comment READ comment WRITE setComment )
Q_PROPERTY( int timestamp READ timestamp WRITE setTimestamp )
Q_OBJECT
Q_PROPERTY( QString action READ action WRITE setAction )
Q_PROPERTY( QString comment READ comment WRITE setComment )
Q_PROPERTY( int timestamp READ timestamp WRITE setTimestamp )
Q_PROPERTY( QString artist READ artist WRITE setArtist )
Q_PROPERTY( QString track READ track WRITE setTrack )
public:
@@ -54,7 +56,7 @@ public:
* Constructs an empty database command for a social action.
*/
explicit DatabaseCommand_SocialAction( QObject* parent = 0 )
: DatabaseCommand( parent )
: DatabaseCommandLoggable( parent )
{}
/**
@@ -67,7 +69,7 @@ public:
* Constructor which creates a new database command for the specified social action.
*/
explicit DatabaseCommand_SocialAction( const Tomahawk::result_ptr& result, QString action, QString comment="", QObject* parent = 0 )
: DatabaseCommand( parent ), m_result( result ), m_action( action )
: DatabaseCommandLoggable( parent ), m_result( result ), m_action( action )
{
setSource( SourceList::instance()->getLocal() );
@@ -167,6 +169,8 @@ public:
*/
void setTimestamp( const int ts ) { m_timestamp = ts; }
virtual bool doesMutates() const { return true; }
private:
Tomahawk::result_ptr m_result;