mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
social action stuff
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
#define DATABASECOMMAND_SOCIALACTION_H
|
#define DATABASECOMMAND_SOCIALACTION_H
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include "database/databasecommand.h"
|
#include "database/databasecommandloggable.h"
|
||||||
|
|
||||||
#include "sourcelist.h"
|
#include "sourcelist.h"
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
@@ -39,12 +39,14 @@
|
|||||||
*
|
*
|
||||||
* \see DatabaseCommand_LoadSocialActions
|
* \see DatabaseCommand_LoadSocialActions
|
||||||
*/
|
*/
|
||||||
class DLLEXPORT DatabaseCommand_SocialAction : public DatabaseCommand
|
class DLLEXPORT DatabaseCommand_SocialAction : public DatabaseCommandLoggable
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY( QString action READ action WRITE setAction )
|
Q_PROPERTY( QString action READ action WRITE setAction )
|
||||||
Q_PROPERTY( QString comment READ comment WRITE setComment )
|
Q_PROPERTY( QString comment READ comment WRITE setComment )
|
||||||
Q_PROPERTY( int timestamp READ timestamp WRITE setTimestamp )
|
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:
|
public:
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ public:
|
|||||||
* Constructs an empty database command for a social action.
|
* Constructs an empty database command for a social action.
|
||||||
*/
|
*/
|
||||||
explicit DatabaseCommand_SocialAction( QObject* parent = 0 )
|
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.
|
* 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 )
|
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() );
|
setSource( SourceList::instance()->getLocal() );
|
||||||
|
|
||||||
@@ -167,6 +169,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setTimestamp( const int ts ) { m_timestamp = ts; }
|
void setTimestamp( const int ts ) { m_timestamp = ts; }
|
||||||
|
|
||||||
|
virtual bool doesMutates() const { return true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Tomahawk::result_ptr m_result;
|
Tomahawk::result_ptr m_result;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user