summaryrefslogtreecommitdiffstats
path: root/juk/mediafiles.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /juk/mediafiles.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/mediafiles.cpp')
-rw-r--r--juk/mediafiles.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/juk/mediafiles.cpp b/juk/mediafiles.cpp
index b52c4be3..3752ec06 100644
--- a/juk/mediafiles.cpp
+++ b/juk/mediafiles.cpp
@@ -31,7 +31,7 @@
#endif
namespace MediaFiles {
- QStringList mimeTypes();
+ TQStringList mimeTypes();
static const char mp3Type[] = "audio/mpeg";
static const char oggType[] = "application/ogg";
@@ -45,9 +45,9 @@ namespace MediaFiles {
static const char playlistExtension[] = ".m3u";
}
-QStringList MediaFiles::openDialog(QWidget *parent)
+TQStringList MediaFiles::openDialog(TQWidget *parent)
{
- KFileDialog dialog(QString::null, QString::null, parent, "filedialog", true);
+ KFileDialog dialog(TQString::null, TQString::null, parent, "filedialog", true);
dialog.setOperationMode(KFileDialog::Opening);
dialog.setCaption(i18n("Open"));
@@ -60,10 +60,10 @@ QStringList MediaFiles::openDialog(QWidget *parent)
return convertURLsToLocal(dialog.selectedFiles());
}
-QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *parent)
+TQString MediaFiles::savePlaylistDialog(const TQString &playlistName, TQWidget *parent)
{
- QString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension,
- QString("*").append(playlistExtension),
+ TQString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension,
+ TQString("*").append(playlistExtension),
parent,
i18n("Playlists"));
if(!fileName.isEmpty() && !fileName.endsWith(playlistExtension))
@@ -72,7 +72,7 @@ QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *par
return fileName;
}
-bool MediaFiles::isMediaFile(const QString &fileName)
+bool MediaFiles::isMediaFile(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
@@ -83,51 +83,51 @@ bool MediaFiles::isMediaFile(const QString &fileName)
;
}
-bool MediaFiles::isPlaylistFile(const QString &fileName)
+bool MediaFiles::isPlaylistFile(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(m3uType);
}
-bool MediaFiles::isMP3(const QString &fileName)
+bool MediaFiles::isMP3(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(mp3Type);
}
-bool MediaFiles::isOgg(const QString &fileName)
+bool MediaFiles::isOgg(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(oggType);
}
-bool MediaFiles::isFLAC(const QString &fileName)
+bool MediaFiles::isFLAC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(flacType);
}
-bool MediaFiles::isMPC(const QString &fileName)
+bool MediaFiles::isMPC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(mpcType);
}
-bool MediaFiles::isVorbis(const QString &fileName)
+bool MediaFiles::isVorbis(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false);
return result->is(vorbisType);
}
-bool MediaFiles::isOggFLAC(const QString &fileName)
+bool MediaFiles::isOggFLAC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false);
return result->is(oggflacType);
}
-QStringList MediaFiles::mimeTypes()
+TQStringList MediaFiles::mimeTypes()
{
- QStringList l;
+ TQStringList l;
l << mp3Type << oggType << flacType << m3uType << vorbisType
#ifdef TAGLIB_1_2
@@ -140,12 +140,12 @@ QStringList MediaFiles::mimeTypes()
return l;
}
-QStringList MediaFiles::convertURLsToLocal(const QStringList &urlList, QWidget *w)
+TQStringList MediaFiles::convertURLsToLocal(const TQStringList &urlList, TQWidget *w)
{
- QStringList result;
+ TQStringList result;
KURL localUrl;
- for(QStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) {
+ for(TQStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) {
localUrl = KIO::NetAccess::mostLocalURL(KURL::fromPathOrURL(*it), w);
if(!localUrl.isLocalFile())