summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/mpc
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 /kfile-plugins/mpc
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 'kfile-plugins/mpc')
-rw-r--r--kfile-plugins/mpc/kfile_mpc.cpp68
-rw-r--r--kfile-plugins/mpc/kfile_mpc.h10
2 files changed, 39 insertions, 39 deletions
diff --git a/kfile-plugins/mpc/kfile_mpc.cpp b/kfile-plugins/mpc/kfile_mpc.cpp
index d575e71f..4b6800df 100644
--- a/kfile-plugins/mpc/kfile_mpc.cpp
+++ b/kfile-plugins/mpc/kfile_mpc.cpp
@@ -23,12 +23,12 @@
#include "kfile_mpc.h"
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qfileinfo.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kurl.h>
@@ -48,8 +48,8 @@
K_EXPORT_COMPONENT_FACTORY(kfile_mpc, KGenericFactory<KMpcPlugin>("kfile_mpc"))
-KMpcPlugin::KMpcPlugin( QObject *parent, const char *name,
- const QStringList &args )
+KMpcPlugin::KMpcPlugin( TQObject *parent, const char *name,
+ const TQStringList &args )
: KFilePlugin( parent, name, args )
{
kdDebug(7034) << "mpc plugin\n";
@@ -65,40 +65,40 @@ KMpcPlugin::KMpcPlugin( QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item = 0;
- item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String);
+ item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Author);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Title", i18n("Title"), QVariant::String);
+ item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Name);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Album", i18n("Album"), QVariant::String);
+ item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String);
+ item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Tracknumber", i18n("Track Number"), QVariant::String);
+ item = addItemInfo(group, "Tracknumber", i18n("Track Number"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Date", i18n("Date"), QVariant::String);
+ item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Description", i18n("Description"), QVariant::String);
+ item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Organization", i18n("Organization"), QVariant::String);
+ item = addItemInfo(group, "Organization", i18n("Organization"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Location", i18n("Location"), QVariant::String);
+ item = addItemInfo(group, "Location", i18n("Location"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String);
+ item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- addVariableInfo(group, QVariant::String, KFileMimeTypeInfo::Addable |
+ addVariableInfo(group, TQVariant::String, KFileMimeTypeInfo::Addable |
KFileMimeTypeInfo::Removable |
KFileMimeTypeInfo::Modifiable);
@@ -106,20 +106,20 @@ KMpcPlugin::KMpcPlugin( QObject *parent, const char *name,
group = addGroupInfo(info, "Technical", i18n("Technical Details"));
setAttributes(group, 0);
- addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int);
+ addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int);
- addItemInfo(group, "Version", i18n("Version"), QVariant::Int);
+ addItemInfo(group, "Version", i18n("Version"), TQVariant::Int);
- item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int);
+ item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int);
setSuffix(item, i18n(" Hz"));
item = addItemInfo(group, "Bitrate", i18n("Average Bitrate"),
- QVariant::Int);
+ TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
setHint(item, KFileMimeTypeInfo::Bitrate);
setSuffix(item, i18n( " kbps"));
- item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int);
+ item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Cummulative);
setHint(item, KFileMimeTypeInfo::Length);
setUnit(item, KFileMimeTypeInfo::Seconds);
@@ -141,7 +141,7 @@ bool KMpcPlugin::readInfo( KFileMetaInfo& info, uint what )
if ( info.path().isEmpty() ) // remote file
return false;
- TagLib::File *file = new TagLib::MPC::File(QFile::encodeName(info.path()).data(), readTech);
+ TagLib::File *file = new TagLib::MPC::File(TQFile::encodeName(info.path()).data(), readTech);
if (!file->isOpen())
{
@@ -154,8 +154,8 @@ bool KMpcPlugin::readInfo( KFileMetaInfo& info, uint what )
{
KFileMetaInfoGroup commentgroup = appendGroup(info, "Comment");
- QString date = file->tag()->year() > 0 ? QString::number(file->tag()->year()) : QString::null;
- QString track = file->tag()->track() > 0 ? QString::number(file->tag()->track()) : QString::null;
+ TQString date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString::null;
+ TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString::null;
appendItem(commentgroup, "Title", TStringToQString(file->tag()->title()).stripWhiteSpace());
appendItem(commentgroup, "Artist", TStringToQString(file->tag()->artist()).stripWhiteSpace());
@@ -208,12 +208,12 @@ bool KMpcPlugin::writeInfo(const KFileMetaInfo& info) const
{
TagLib::File *file;
- if (!TagLib::File::isWritable(QFile::encodeName(info.path()).data())) {
+ if (!TagLib::File::isWritable(TQFile::encodeName(info.path()).data())) {
kdDebug(7034) << "can't write to " << info.path() << endl;
return false;
}
- file = new TagLib::MPC::File(QFile::encodeName(info.path()).data(), false);
+ file = new TagLib::MPC::File(TQFile::encodeName(info.path()).data(), false);
if(!file->isOpen())
{
@@ -238,16 +238,16 @@ bool KMpcPlugin::writeInfo(const KFileMetaInfo& info) const
return true;
}
-QValidator* KMpcPlugin::createValidator( const QString&,
- const QString &group, const QString &key,
- QObject* parent, const char* name) const
+TQValidator* KMpcPlugin::createValidator( const TQString&,
+ const TQString &group, const TQString &key,
+ TQObject* parent, const char* name) const
{
if(key == "Tracknumber" || key == "Date")
{
- return new QIntValidator(0, 9999, parent, name);
+ return new TQIntValidator(0, 9999, parent, name);
}
else
- return new QRegExpValidator(QRegExp(".*"), parent, name);
+ return new TQRegExpValidator(TQRegExp(".*"), parent, name);
}
#include "kfile_mpc.moc"
diff --git a/kfile-plugins/mpc/kfile_mpc.h b/kfile-plugins/mpc/kfile_mpc.h
index 10875365..576cc5cc 100644
--- a/kfile-plugins/mpc/kfile_mpc.h
+++ b/kfile-plugins/mpc/kfile_mpc.h
@@ -34,14 +34,14 @@ class KMpcPlugin: public KFilePlugin
Q_OBJECT
public:
- KMpcPlugin( QObject *parent, const char *name, const QStringList& args );
+ KMpcPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
virtual bool writeInfo( const KFileMetaInfo& info ) const;
- virtual QValidator* createValidator( const QString& mimetype,
- const QString &group,
- const QString &key,
- QObject* parent, const char* name) const;
+ virtual TQValidator* createValidator( const TQString& mimetype,
+ const TQString &group,
+ const TQString &key,
+ TQObject* parent, const char* name) const;
};