aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qmmpui/abstractplaylistitem.h63
-rw-r--r--src/qmmpui/commandlinemanager.h36
-rw-r--r--src/qmmpui/commandlineoption.h13
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() {}
};