diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-11 19:16:16 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-11 19:16:16 +0000 |
| commit | 53693eaf4b75b5aa6767989a1e2d3ebfc2f443aa (patch) | |
| tree | a0b71f45a18af1e3e17e09d3492cbf2e3c8762cb | |
| parent | 8308415095dfcbff8d5b7c27045c47f310d6d755 (diff) | |
| download | qmmp-53693eaf4b75b5aa6767989a1e2d3ebfc2f443aa.tar.gz qmmp-53693eaf4b75b5aa6767989a1e2d3ebfc2f443aa.tar.bz2 qmmp-53693eaf4b75b5aa6767989a1e2d3ebfc2f443aa.zip | |
command line api documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@840 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmpui/abstractplaylistitem.h | 63 | ||||
| -rw-r--r-- | src/qmmpui/commandlinemanager.h | 36 | ||||
| -rw-r--r-- | src/qmmpui/commandlineoption.h | 13 |
3 files changed, 83 insertions, 29 deletions
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 <QString> #include <qmmp/qmmp.h> -/** - @author Ilya Kotov <forkotov02@hotmail.ru> -*/ +/** @brief The AbstractPlaylistItem class provides the basic functionality for the playlist items. + * @author Ilya Kotov <forkotov02@hotmail.ru> + */ 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 <Qmmp::MetaData, QString> &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 <forkotov02@hotmail.ru> -*/ +/*! @brief Helper class used for handle command line plugins + * @author Ilya Kotov <forkotov02@hotmail.ru> + */ 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 <vovanec@gmail.ru> +/*! @brief Abstract base class of the command line plugins. + * @author Vladimir Kuznetsov <vovanec@gmail.ru> */ 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() {} }; |
