aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/abstractplaylistitem.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-28 21:19:59 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-28 21:19:59 +0000
commit910c5067e8d7ae22b3fde6bd483391314de1ba16 (patch)
treeaf57d00445efa54a4992ad1609cf71f59cdf9494 /src/qmmpui/abstractplaylistitem.cpp
parent26724c66d4764a77ca653ce6c0a1573e9e97e97c (diff)
downloadqmmp-910c5067e8d7ae22b3fde6bd483391314de1ba16.tar.gz
qmmp-910c5067e8d7ae22b3fde6bd483391314de1ba16.tar.bz2
qmmp-910c5067e8d7ae22b3fde6bd483391314de1ba16.zip
general api changes, removed unused code
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@647 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/abstractplaylistitem.cpp')
-rw-r--r--src/qmmpui/abstractplaylistitem.cpp101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/qmmpui/abstractplaylistitem.cpp b/src/qmmpui/abstractplaylistitem.cpp
new file mode 100644
index 000000000..164d7c500
--- /dev/null
+++ b/src/qmmpui/abstractplaylistitem.cpp
@@ -0,0 +1,101 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "abstractplaylistitem.h"
+
+AbstractPlaylistItem::AbstractPlaylistItem()
+{
+ m_length = 0;
+}
+
+
+AbstractPlaylistItem::~AbstractPlaylistItem()
+{
+}
+
+const QString AbstractPlaylistItem::title () const
+{
+ return m_metaData.value(Qmmp::TITLE);
+}
+
+const QString AbstractPlaylistItem::artist () const
+{
+ return m_metaData.value(Qmmp::ARTIST);
+}
+
+const QString AbstractPlaylistItem::album () const
+{
+ return m_metaData.value(Qmmp::ALBUM);
+}
+
+const QString AbstractPlaylistItem::comment () const
+{
+ return m_metaData.value(Qmmp::COMMENT);
+}
+
+const QString AbstractPlaylistItem::genre () const
+{
+ return m_metaData.value(Qmmp::GENRE);
+}
+
+const QString AbstractPlaylistItem::track () const
+{
+ return m_metaData.value(Qmmp::TRACK);
+}
+
+const QString AbstractPlaylistItem::year () const
+{
+ return m_metaData.value(Qmmp::YEAR);
+}
+
+const QString AbstractPlaylistItem::url () const
+{
+ return m_metaData.value(Qmmp::URL);
+}
+
+qint64 AbstractPlaylistItem::length ()
+{
+ return m_length;
+}
+
+bool AbstractPlaylistItem::isEmpty()
+{
+ return m_metaData.isEmpty();
+}
+
+void AbstractPlaylistItem::clear()
+{
+ m_metaData.clear();
+ m_length = 0;
+}
+
+void AbstractPlaylistItem::setMetaData(const QMap <Qmmp::MetaData, QString> &metaData)
+{
+ m_metaData = metaData;
+}
+
+void AbstractPlaylistItem::setMetaData(Qmmp::MetaData key, const QString &value)
+{
+ m_metaData.insert(key, value);
+}
+
+void AbstractPlaylistItem::setLength(qint64 length)
+{
+ m_length = length;
+}