From 53693eaf4b75b5aa6767989a1e2d3ebfc2f443aa Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 11 Mar 2009 19:16:16 +0000 Subject: command line api documentation git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@840 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/abstractplaylistitem.h | 63 ++++++++++++++++++++++++++++++++++----- src/qmmpui/commandlinemanager.h | 36 +++++++++++++--------- src/qmmpui/commandlineoption.h | 13 ++++---- 3 files changed, 83 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/qmmpui/abstractplaylistitem.h b/src/qmmpui/abstractplaylistitem.h index cea50739c..cf594e6e3 100644 --- a/src/qmmpui/abstractplaylistitem.h +++ b/src/qmmpui/abstractplaylistitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,31 +24,78 @@ #include #include -/** - @author Ilya Kotov -*/ +/** @brief The AbstractPlaylistItem class provides the basic functionality for the playlist items. + * @author Ilya Kotov + */ class AbstractPlaylistItem { public: + /*! + * Constructs empty AbstractPlaylistItem object. + */ AbstractPlaylistItem(); - + /*! + * Object destructor + */ ~AbstractPlaylistItem(); - + /*! + * Returns song title. + */ const QString title () const; + /*! + * Returns song artist. + */ const QString artist () const; + /*! + * Returns song album. + */ const QString album () const; + /*! + * Returns comment. + */ const QString comment () const; + /*! + * Returns gnere. + */ const QString genre () const; + /*! + * Returns track number. + */ const QString track () const; + /*! + * Returns year. + */ const QString year () const; + /*! + * Returns stream url or local file path. + */ const QString url () const; - + /*! + * Returns song length in seconds. + */ qint64 length (); + /*! + * Returns \b true if item has no metadata. + */ bool isEmpty(); + /*! + * Removes all metadata from item. + */ void clear(); - + /*! + * Loads metadata. + * @param metaData A map with metadata. + */ virtual void setMetaData(const QMap &metaData); + /*! + * Loads one metadata value. + * @param key Metadata key. + * @param key Metadata vlaue. + */ virtual void setMetaData(Qmmp::MetaData key, const QString &value); + /*! + * Sets length in seconds. + */ virtual void setLength(qint64 length); private: diff --git a/src/qmmpui/commandlinemanager.h b/src/qmmpui/commandlinemanager.h index a6039c7c3..8f0660fb6 100644 --- a/src/qmmpui/commandlinemanager.h +++ b/src/qmmpui/commandlinemanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,26 +24,34 @@ #include "commandlineoption.h" -/** - @author Ilya Kotov -*/ +/*! @brief Helper class used for handle command line plugins + * @author Ilya Kotov + */ class CommandLineManager : public General { -Q_OBJECT + Q_OBJECT public: + /*! + * Constructs a command line manager. + * @param parent QObject parent + */ CommandLineManager(QObject *parent = 0); - + /*! + * Object destructor. + */ ~CommandLineManager(); - - //general - - //properties - - //command line + /*! + * Executes command \b opt_str + * @param opt_str Command line option string + */ void executeCommand(const QString& opt_str); - - //static methods + /*! + * Return \b true if command \b opt_str is supported, otherwise \b false + */ static bool hasOption(const QString &opt_str); + /*! + * Prints usage to stdout + */ static void printUsage(); private: diff --git a/src/qmmpui/commandlineoption.h b/src/qmmpui/commandlineoption.h index 0ea172547..9799d063e 100644 --- a/src/qmmpui/commandlineoption.h +++ b/src/qmmpui/commandlineoption.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -26,8 +26,8 @@ class QTranslator; class QString; class QObject; -/** - @author Vladimir Kuznetsov +/*! @brief Abstract base class of the command line plugins. + * @author Vladimir Kuznetsov */ class CommandLineOption { @@ -37,17 +37,14 @@ public: * otherise \b false */ virtual bool identify(const QString& opt_str)const = 0; - /*! * Command line option name */ virtual const QString name()const = 0; - /*! * Help string. */ virtual const QString helpString()const = 0; - /*! * Parses \b opt_str args(if needed), executes command. */ @@ -56,7 +53,9 @@ public: * Creates translator with parent object \b parent */ virtual QTranslator *createTranslator(QObject *parent) = 0; - + /*! + * Object destructor + */ virtual ~CommandLineOption() {} }; -- cgit v1.2.3-13-gbd6f