From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/modules/winskin/fileInfo.cpp | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 noatun/modules/winskin/fileInfo.cpp (limited to 'noatun/modules/winskin/fileInfo.cpp') diff --git a/noatun/modules/winskin/fileInfo.cpp b/noatun/modules/winskin/fileInfo.cpp new file mode 100644 index 00000000..69f93215 --- /dev/null +++ b/noatun/modules/winskin/fileInfo.cpp @@ -0,0 +1,50 @@ +#include +#include + +#include +#include + +#include "fileInfo.h" + +fileInfo::fileInfo(const PlaylistItem &item) +{ + QString prop; + + prop = item.property("bitrate"); + if (prop.isNull()) + _bps = 0; + else + _bps = prop.toInt(); + + prop = item.property("samplerate"); + if (prop.isNull()) + _KHz = 44100; + else + _KHz = prop.toInt(); + + prop = item.property("channels"); + if (prop.isNull()) + _channelCount = 2; + else + _channelCount = prop.toInt(); +} + +fileInfo::~fileInfo() +{ +} + +unsigned int fileInfo::bps() +{ + return _bps; +} + +unsigned int fileInfo::KHz() +{ + return _KHz; +} + +unsigned int fileInfo::channelCount() +{ + return _channelCount; +} + -- cgit v1.2.1