aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/songinfo.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-04-04 19:46:17 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-04-04 19:46:17 +0000
commitb02f09d54e9e492090cce54c9ce908b0c4a00145 (patch)
tree4c628a0b02764ca49d47e02f56dd202e789f9db8 /src/qmmpui/songinfo.cpp
parent95d26324afe30cab21c2e79e8618e538ab9c6dde (diff)
downloadqmmp-b02f09d54e9e492090cce54c9ce908b0c4a00145.tar.gz
qmmp-b02f09d54e9e492090cce54c9ce908b0c4a00145.tar.bz2
qmmp-b02f09d54e9e492090cce54c9ce908b0c4a00145.zip
make file path accessible by general plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@330 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/songinfo.cpp')
-rw-r--r--src/qmmpui/songinfo.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/qmmpui/songinfo.cpp b/src/qmmpui/songinfo.cpp
index 6fa1e831e..178f6eee6 100644
--- a/src/qmmpui/songinfo.cpp
+++ b/src/qmmpui/songinfo.cpp
@@ -41,6 +41,7 @@ void SongInfo::operator=(const SongInfo &info)
setValue(TRACK,info.track ());
setValue(LENGTH,info.length ());
setValue(STREAM,info.isStream());
+ setValue(PATH,info.path());
}
bool SongInfo::operator==(const SongInfo &info)
@@ -52,7 +53,8 @@ bool SongInfo::operator==(const SongInfo &info)
genre() == info.genre() &&
track() == info.track() &&
year() == info.year() &&
- isStream() == info.isStream();
+ isStream() == info.isStream() &&
+ path() == info.path();
}
bool SongInfo::operator!=(const SongInfo &info)
@@ -60,21 +62,26 @@ bool SongInfo::operator!=(const SongInfo &info)
return !operator==(info);
}
-void SongInfo::setValue(uint name, const QString &value)
+void SongInfo::setValue(uint key, const QString &value)
{
if (!value.isEmpty())
- m_strValues.insert (name, value);
+ {
+ if (key == PATH)
+ m_path = value;
+ else
+ m_strValues.insert (key, value);
+ }
}
-void SongInfo::setValue(uint name, const uint &value)
+void SongInfo::setValue(uint key, const uint &value)
{
if (value > 0)
- m_numValues.insert (name, value);
+ m_numValues.insert (key, value);
}
-void SongInfo::setValue(uint name, const bool &value)
+void SongInfo::setValue(uint key, const bool &value)
{
- if(name == STREAM)
+ if(key == STREAM)
m_stream = value;
}
@@ -103,6 +110,11 @@ const QString SongInfo::genre () const
return m_strValues[GENRE];
}
+const QString SongInfo::path () const
+{
+ return m_path;
+}
+
const uint SongInfo::year () const
{
return m_numValues[YEAR];