From d7ea7e3eeedf51ef48fa2dd9c90fd7e37553823f Mon Sep 17 00:00:00 2001 From: Christopher Reichert Date: Fri, 8 Jul 2011 13:26:28 -0500 Subject: [PATCH] Doxygen documentation for DatabaseCommand_LoadSocialAction. --- .../databasecommand_loadsocialactions.h | 68 ++++++++++++++++++- .../database/databasecommand_socialaction.h | 2 +- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/database/databasecommand_loadsocialactions.h b/src/libtomahawk/database/databasecommand_loadsocialactions.h index 7d80bcd89..fddea0dfd 100644 --- a/src/libtomahawk/database/databasecommand_loadsocialactions.h +++ b/src/libtomahawk/database/databasecommand_loadsocialactions.h @@ -30,18 +30,38 @@ #include "dllmacro.h" - +/** + * \class DatabaseCommand_LoadSocialActions + * \brief Database command used to load social actions from the database. + * + * This Database command allows Tomahawk to load social actions from + * the local database. The loaded social actions can be used to create + * dynamic playlists, generate statistics and provide data to share with + * friends on tomahawk. + * + * \see DatabaseCommand_SocialAction + */ class DLLEXPORT DatabaseCommand_LoadSocialActions : public DatabaseCommand { Q_OBJECT public: - + /** + * \brief Default constructor for DatabaseCommand_LoadSocialActions. + * + * Constructs an empty database command for loading social actions. + */ explicit DatabaseCommand_LoadSocialActions( QObject* parent = 0 ) : DatabaseCommand( parent ) {} - + /** + * \brief Overloaded constructor for DatabaseCommand_LoadSocialAction. + * \param result Pointer to a Tomahawk::Result. + * \param parent Parent class. + * + * Constructor which creates a new database command for loading all social actions. + */ explicit DatabaseCommand_LoadSocialActions( Tomahawk::Result* result, QObject* parent = 0 ) : DatabaseCommand( parent ), m_result( result ) { @@ -50,17 +70,59 @@ public: setTrack( result->track() ); } + /** + * \brief Returns the name of this database command. + * \return QString containing the database command name 'loadsocialaction'. + */ virtual QString commandname() const { return "loadsocialactions"; } + /** + * \brief Executes the database command. + * \param dbi Database instance. + * + * This method prepares an sql query to load the social actions + * from the database into a list of all social actions. + * + * \see Result::setAllSocialActions() + */ virtual void exec( DatabaseImpl* ); + /** + * \brief Returns the artist associated with this database command. + * \return Name of the artist. + * \see setArtist() + */ QString artist() const { return m_artist; } + + /** + * \brief Sets the artist name for this database command. + * \param s QString containing the artist name. + * \see artist() + */ void setArtist( const QString& s ) { m_artist = s; } + /** + * \brief Returns the track name associated with this social action. + * \return QString containing the track name. + * \see setTrack() + */ QString track() const { return m_track; } + + /** + * \brief Sets the track name associated with this database command. + * \param track QString containing the track name. + * \see track() + */ void setTrack( const QString& s ) { m_track = s; } signals: + + /** + * \brief Emitted when the database command has finished the Query successfully + * + * \param QList of all social actions + * \see QList + */ void done( QList< Tomahawk::SocialAction >& allSocialActions ); private: diff --git a/src/libtomahawk/database/databasecommand_socialaction.h b/src/libtomahawk/database/databasecommand_socialaction.h index 20188a95c..578075189 100644 --- a/src/libtomahawk/database/databasecommand_socialaction.h +++ b/src/libtomahawk/database/databasecommand_socialaction.h @@ -37,7 +37,7 @@ * networking API's such as LastFm, Facebook, or Twitter to allow the user * to sync these actions with their accounts on these sites. * - * \see DatabaseCommand_LoadSocialAction + * \see DatabaseCommand_LoadSocialActions */ class DLLEXPORT DatabaseCommand_SocialAction : public DatabaseCommand {