aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-04-29 11:11:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-04-29 11:11:54 +0000
commitb44d843f24cd7c2f8dd4cd76b5385507dc7b02b8 (patch)
treed8a1d0b7ebaa52c70bc570d75f5e48517c5ceba2 /src
parentba0f4e2d0e07d46229335e4b06a6c14d252a9bcd (diff)
downloadqmmp-b44d843f24cd7c2f8dd4cd76b5385507dc7b02b8.tar.gz
qmmp-b44d843f24cd7c2f8dd4cd76b5385507dc7b02b8.tar.bz2
qmmp-b44d843f24cd7c2f8dd4cd76b5385507dc7b02b8.zip
fixed api documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4270 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/qmmp/abstractengine.h2
-rw-r--r--src/qmmp/soundcore.h4
-rw-r--r--src/qmmpui/playlistgroup.cpp7
-rw-r--r--src/qmmpui/playlistgroup.h62
-rw-r--r--src/qmmpui/playlistitem.h5
-rw-r--r--src/qmmpui/playlistmodel.h46
-rw-r--r--src/qmmpui/playlisttrack.h15
-rw-r--r--src/qmmpui/qmmpuisettings.h2
8 files changed, 112 insertions, 31 deletions
diff --git a/src/qmmp/abstractengine.h b/src/qmmp/abstractengine.h
index d98446e47..2722b0743 100644
--- a/src/qmmp/abstractengine.h
+++ b/src/qmmp/abstractengine.h
@@ -72,7 +72,7 @@ public:
virtual void pause() = 0;
/*!
* Mutes/Restores volume. Subclass should reimplement this function.
- * @param mute - state of volume (\b true - mute, \b false - restore)
+ * @param muted - state of volume (\b true - mute, \b false - restore)
*/
virtual void setMuted(bool muted) = 0;
/*!
diff --git a/src/qmmp/soundcore.h b/src/qmmp/soundcore.h
index 245fd9518..bb71fcfee 100644
--- a/src/qmmp/soundcore.h
+++ b/src/qmmp/soundcore.h
@@ -148,7 +148,7 @@ public slots:
void changeVolume(int delta);
/*!
* Sets the volume of the left and right channels with keeping of the balance.
- * @param volume volume of the left and right channels \b[0..100].
+ * @param volume volume of the left and right channels \b [0..100].
*/
void setVolume(int volume);
/*!
@@ -244,7 +244,7 @@ signals:
void volumeChanged(int volume);
/*!
* Emitted when the balance between left and right channels has changed.
- * @param volume new balance value.
+ * @param balance new balance value.
*/
void balanceChanged(int balance);
/*!
diff --git a/src/qmmpui/playlistgroup.cpp b/src/qmmpui/playlistgroup.cpp
index 3951fd035..1278b200a 100644
--- a/src/qmmpui/playlistgroup.cpp
+++ b/src/qmmpui/playlistgroup.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -89,6 +89,11 @@ int PlayListGroup::count() const
return m_tracks.count();
}
+bool PlayListGroup::isGroup() const
+{
+ return true;
+}
+
void PlayListGroup::move(int from, int to)
{
m_tracks.move(from, to);
diff --git a/src/qmmpui/playlistgroup.h b/src/qmmpui/playlistgroup.h
index dbd21b806..8146b5aff 100644
--- a/src/qmmpui/playlistgroup.h
+++ b/src/qmmpui/playlistgroup.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -24,32 +24,82 @@
#include "playlisttrack.h"
#include "playlistitem.h"
+/** @brief The PlayListTrack class provides a group for use with the PlayListModel class.
+ * @author Ilya Kotov <forkotov02@hotmail.ru>
+ */
class PlayListGroup : public PlayListItem
{
public:
+ /*!
+ * Constructor.
+ * @param formattedTitle Title of the group.
+ */
PlayListGroup(const QString &formattedTitle);
-
+ /*!
+ * Object destructor.
+ */
virtual ~PlayListGroup();
-
+ /*!
+ * First index of the group.
+ */
int firstIndex;
+ /*!
+ * Last index of the group.
+ */
int lastIndex;
-
+ /*!
+ * Returns formatted title of the group.
+ */
const QString formattedTitle();
+ /*!
+ * Adds track \b track to the the group.
+ */
void addTrack(PlayListTrack *track);
+ /*!
+ * Adds a list of tracks \b tracks to the the group.
+ */
void addTracks(QList<PlayListTrack *> tracks);
+ /*!
+ * Inserts a track \b tracks to the the group at the position \b pos.
+ */
void insertTrack(int pos, PlayListTrack *track);
+ /*!
+ * Returns \b true if the group contains track \b track.
+ * Otherwise returns \b false.
+ */
bool contains(PlayListTrack *track) const;
+ /*!
+ * Returns \b true if the group is empty.
+ * Otherwise returns \b false.
+ */
bool isEmpty() const;
+ /*!
+ * Returns track \b track from the group.
+ */
void remove(PlayListTrack *track);
+ /*!
+ * Returns a list of tracks if the group.
+ */
QList<PlayListTrack *> tracks();
+ /*!
+ * Returns number of tracks if the group.
+ */
int count() const;
/*!
* Returns formatted length of the item.
*/
const QString formattedLength() { return QString(); }
- virtual bool isGroup() const { return true; }
+ /*!
+ * Returns \b true.
+ */
+ bool isGroup() const;
+ /*!
+ * Moves the track from position \b from to position \b to.
+ */
void move(int from, int to);
-
+ /*!
+ * Removes all tracks from the group and returns a list of them.
+ */
QList<PlayListTrack *> takeAll();
private:
diff --git a/src/qmmpui/playlistitem.h b/src/qmmpui/playlistitem.h
index 8708b9d69..5739db5be 100644
--- a/src/qmmpui/playlistitem.h
+++ b/src/qmmpui/playlistitem.h
@@ -31,7 +31,6 @@
class PlayListItem
{
public:
-
/*!
* Constructs an empty plalist item.
*/
@@ -57,7 +56,9 @@ public:
* Returns formatted length of the item.
*/
virtual const QString formattedLength() = 0;
-
+ /*!
+ * Returns \b true if the \b PlayListItem is group separator. Otherwise returns \b false.
+ */
virtual bool isGroup() const = 0;
private:
diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h
index d73f5f441..63eb9fc77 100644
--- a/src/qmmpui/playlistmodel.h
+++ b/src/qmmpui/playlistmodel.h
@@ -127,7 +127,13 @@ public:
* Returns the item with the index \b index or 0 if item doesn't exist.
*/
PlayListItem* item(int index) const;
+ /*!
+ * Returns the track with the index \b index or 0 if track doesn't exist.
+ */
PlayListTrack* track(int index) const;
+ /*!
+ * Returns the group with the index \b index or 0 if group doesn't exist.
+ */
PlayListGroup* group(int index) const;
/*!
* Returns index of the current item.
@@ -144,12 +150,16 @@ public:
* Returns \b true if success, otherwise returns \b false
*/
bool setCurrent(PlayListTrack *item);
-
-
+ /*!
+ * Returns \b true if a playlist contains track with the index \b index.
+ * Otherwise returns \b false.
+ */
bool isTrack(int index) const;
-
+ /*!
+ * Returns \b true if a playlist contains group separator with the index \b index.
+ * Otherwise returns \b false.
+ */
bool isGroup(int index) const;
-
/*!
* Returns \b true if item with \b index is selected, otherwise returns \b false
*/
@@ -160,10 +170,17 @@ public:
* @param selected Selection state (\b true - select, \b false - unselect)
*/
void setSelected(int index, bool selected = true);
-
-
+ /*!
+ * Sets the selected state of the list of tracks to \b select
+ * @param tracks List of tracks.
+ * @param selected Selection state (\b true - select, \b false - unselect)
+ */
void setSelected(QList<PlayListTrack *> tracks, bool selected = true);
-
+ /*!
+ * Sets the selected state of the list of items to \b select
+ * @param items List of items.
+ * @param selected Selection state (\b true - select, \b false - unselect)
+ */
void setSelected(QList<PlayListItem *> items, bool selected = true);
/*!
* Advances to the next item. Returns \b false if next iten doesn't exist,
@@ -271,7 +288,10 @@ public:
FILE_MODIFICATION_DATE, /*!< by file modification date */
GROUP /*!< by group name */
};
-
+ /*!
+ * Returns number of track with index \b index.
+ * Returns \b -1 if track with index \b index does not exist.
+ */
int numberOfTrack(int index) const;
signals:
@@ -308,8 +328,8 @@ public slots:
*/
void add(PlayListTrack *track);
/*!
- * Adds a list of items to the playlist.
- * @param items List of items.
+ * Adds a list of tracks to the playlist.
+ * @param tracks List of tracks.
*/
void add(QList <PlayListTrack *> tracks);
/*!
@@ -326,7 +346,9 @@ public slots:
* Inserts \b track at index position \b index in the playlist.
*/
void insert(int index, PlayListTrack *track);
-
+ /*!
+ * Inserts \b track after playlist item \b before.
+ */
void insert(PlayListItem *before, PlayListTrack *track);
/*!
* Inserts \b tracks at index position \b index in the playlist.
@@ -346,7 +368,7 @@ public slots:
void insert(int index, const QStringList &paths);
/*!
* Adds a list of URLs at index position \b index in the playlist.
- * @param paths urls a list of URLs.
+ * @param urls A list of URLs.
* @param index Position in the playlist.
*/
void insert(int index, const QList<QUrl> &urls);
diff --git a/src/qmmpui/playlisttrack.h b/src/qmmpui/playlisttrack.h
index 7d4a14ce8..e21b8f286 100644
--- a/src/qmmpui/playlisttrack.h
+++ b/src/qmmpui/playlisttrack.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -27,7 +27,7 @@
class QmmpUiSettings;
-/** @brief The PlayListTrack class provides an item for use with the PlayListModel class.
+/** @brief The PlayListTrack class provides a track for use with the PlayListModel class.
* @author Ilya Kotov <forkotov02@hotmail.ru>
*/
class PlayListTrack : public QMap <Qmmp::MetaData, QString>, public PlayListItem
@@ -62,7 +62,7 @@ public:
/*!
* Object destructor.
*/
- ~PlayListTrack();
+ virtual ~PlayListTrack();
/*!
* Returns formatted title of the item.
*/
@@ -92,11 +92,14 @@ public:
* Gets new metadata from file (works for local files only).
*/
void updateMetaData();
-
+ /*!
+ * Returns name of the parent group.
+ */
const QString groupName();
-
+ /*!
+ * Returns \b false.
+ */
bool isGroup() const;
-
/*!
* Returns current state of the playlist item.
*/
diff --git a/src/qmmpui/qmmpuisettings.h b/src/qmmpui/qmmpuisettings.h
index a070dc348..26c939d10 100644
--- a/src/qmmpui/qmmpuisettings.h
+++ b/src/qmmpui/qmmpuisettings.h
@@ -95,7 +95,7 @@ public:
void setConvertTwenty(bool enabled);
/*!
* Sets short title template.
- * @param format title template. \sa MetaDataFormatter
+ * @param titleFormat title template. \sa MetaDataFormatter
*/
void setTitleFormat(const QString &titleFormat);
/*!