aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playlistitem.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-03-11 18:36:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-03-11 18:36:54 +0000
commit8308415095dfcbff8d5b7c27045c47f310d6d755 (patch)
tree49b16ff894769eff1f0f22f7d881837acd364c54 /src/qmmpui/playlistitem.h
parent29bbc0a8278591fa2cc0bf97ebd3e59c1940dbf4 (diff)
downloadqmmp-8308415095dfcbff8d5b7c27045c47f310d6d755.tar.gz
qmmp-8308415095dfcbff8d5b7c27045c47f310d6d755.tar.bz2
qmmp-8308415095dfcbff8d5b7c27045c47f310d6d755.zip
PlayListModel class documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@839 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistitem.h')
-rw-r--r--src/qmmpui/playlistitem.h70
1 files changed, 58 insertions, 12 deletions
diff --git a/src/qmmpui/playlistitem.h b/src/qmmpui/playlistitem.h
index 6f7a6755d..85241a70e 100644
--- a/src/qmmpui/playlistitem.h
+++ b/src/qmmpui/playlistitem.h
@@ -25,36 +25,82 @@
class FileInfo;
class QSettings;
-/**
- @author Ilya Kotov <forkotov02@hotmail.ru>
-*/
+
+/** @brief The QTableWidgetItem class provides an item for use with the PlayListModel class.
+ * @author Ilya Kotov <forkotov02@hotmail.ru>
+ */
class PlayListItem : public AbstractPlaylistItem
{
public:
/*!
- * Current state of media file.
+ * Current state of playlist item.
* FREE - instance is free and may be deleted
* EDITING - instance is currently busy in some kind of operation(tags editing etc.)
- * and can't be deleted at the moment. Set flag SCHEDULED_FOR_DELETION for it
+ * and can't be deleted at the moment. Set flag SCHEDULED_FOR_DELETION for it
* instead of delete operator call.
*/
- enum FLAGS{FREE = 0,EDITING,SCHEDULED_FOR_DELETION};
+ enum FLAGS
+ {
+ FREE = 0, /*!< instance is free and may be deleted */
+ EDITING, /*!< instance is currently busy */
+ SCHEDULED_FOR_DELETION /*!< instance is sheduled for deletion */
+ };
+ /*!
+ * Constructs an empty plalist item.
+ */
PlayListItem();
+ /*!
+ * Constructs plalist item with given metadata.
+ * @param info Media file information.
+ */
PlayListItem(FileInfo *info);
-
+ /*!
+ * Object destructor.
+ */
~PlayListItem();
-
- //playlist support
- void setSelected(bool yes);
+ /*!
+ * Sets item selection flag to \b select
+ * @param select State of selection (\b true select, \b false unselect)
+ */
+ void setSelected(bool select);
+ /*!
+ * Return \b true if item is selected, otherwise \b false.
+ * @param yes State of current (\b true - set flag, \b false - unset flag)
+ */
bool isSelected() const;
+ /*!
+ * It is used by PlayListModel class.
+ */
void setCurrent(bool yes);
+ /*!
+ * Returns \b true if the item is the current item; otherwise returns \b false.
+ */
bool isCurrent() const;
- FLAGS flag()const;
+ /*!
+ * Returns current state of the playlist item.
+ */
+ FLAGS flag() const;
+ /*!
+ * Sets state of the playlist item.
+ */
void setFlag(FLAGS);
+ /*!
+ * Returns item short title.
+ */
const QString text() const;
+ /*!
+ * Direct access to the item short title.
+ * @param title New short title.
+ */
void setText(const QString &title);
- //modify functions
+ /*!
+ * Updates current metadata.
+ * @param metaData Map with metadata values.
+ */
void updateMetaData(const QMap <Qmmp::MetaData, QString> &metaData);
+ /*!
+ * Gets new metadata from file (works for local files only).
+ */
void updateTags();
private: