diff options
Diffstat (limited to 'kfile-plugins/mp3')
-rw-r--r-- | kfile-plugins/mp3/kfile_mp3.cpp | 88 | ||||
-rw-r--r-- | kfile-plugins/mp3/kfile_mp3.h | 10 |
2 files changed, 49 insertions, 49 deletions
diff --git a/kfile-plugins/mp3/kfile_mp3.cpp b/kfile-plugins/mp3/kfile_mp3.cpp index 38adce70..c6317946 100644 --- a/kfile-plugins/mp3/kfile_mp3.cpp +++ b/kfile-plugins/mp3/kfile_mp3.cpp @@ -28,11 +28,11 @@ #include <kstringvalidator.h> #include <kdebug.h> -#include <qdict.h> -#include <qvalidator.h> -#include <qcstring.h> -#include <qfile.h> -#include <qdatetime.h> +#include <tqdict.h> +#include <tqvalidator.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqdatetime.h> #include <tstring.h> #include <tag.h> @@ -44,7 +44,7 @@ typedef KGenericFactory<KMp3Plugin> Mp3Factory; K_EXPORT_COMPONENT_FACTORY(kfile_mp3, Mp3Factory( "kfile_mp3" )) -KMp3Plugin::KMp3Plugin(QObject *parent, const char *name, const QStringList &args) +KMp3Plugin::KMp3Plugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args) { kdDebug(7034) << "mp3 plugin\n"; @@ -60,54 +60,54 @@ KMp3Plugin::KMp3Plugin(QObject *parent, const char *name, const QStringList &arg KFileMimeTypeInfo::ItemInfo *item; - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Name); - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Author); - item = addItemInfo(group, "Album", i18n("Album"), QVariant::String); + item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Date", i18n("Year"), QVariant::String); + item = addItemInfo(group, "Date", i18n("Year"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::String); + item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Description); - item = addItemInfo(group, "Tracknumber", i18n("Track"), QVariant::Int); + item = addItemInfo(group, "Tracknumber", i18n("Track"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String); + item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); // technical group group = addGroupInfo(info, "Technical", i18n("Technical Details")); - item = addItemInfo(group, "Version", i18n("Version"), QVariant::Int); + item = addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); setPrefix(item, i18n("MPEG ")); - item = addItemInfo(group, "Layer", i18n("Layer"), QVariant::Int); - item = addItemInfo(group, "CRC", i18n("CRC"), QVariant::Bool); - item = addItemInfo(group, "Bitrate", i18n("Bitrate"), QVariant::Int); + item = addItemInfo(group, "Layer", i18n("Layer"), TQVariant::Int); + item = addItemInfo(group, "CRC", i18n("CRC"), TQVariant::Bool); + item = addItemInfo(group, "Bitrate", i18n("Bitrate"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); setHint(item, KFileMimeTypeInfo::Bitrate); setSuffix(item, i18n(" kbps")); - 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, "Channels", i18n("Channels"), QVariant::Int); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::Bool); - item = addItemInfo(group, "Original", i18n("Original"), QVariant::Bool); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::Bool); + item = addItemInfo(group, "Original", i18n("Original"), TQVariant::Bool); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setUnit(item, KFileMimeTypeInfo::Seconds); - item = addItemInfo(group, "Emphasis", i18n("Emphasis"), QVariant::String); + item = addItemInfo(group, "Emphasis", i18n("Emphasis"), TQVariant::String); } bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) @@ -139,7 +139,7 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) if ( info.path().isEmpty() ) // remote file return false; - TagLib::MPEG::File file(QFile::encodeName(info.path()).data(), readTech); + TagLib::MPEG::File file(TQFile::encodeName(info.path()).data(), readTech); if(!file.isOpen()) { @@ -151,24 +151,24 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) { KFileMetaInfoGroup id3group = appendGroup(info, "id3"); - 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; - QString title = TStringToQString(file.tag()->title()).stripWhiteSpace(); + TQString title = TStringToQString(file.tag()->title()).stripWhiteSpace(); if (!title.isEmpty()) appendItem(id3group, "Title", title); - QString artist = TStringToQString(file.tag()->artist()).stripWhiteSpace(); + TQString artist = TStringToQString(file.tag()->artist()).stripWhiteSpace(); if (!artist.isEmpty()) appendItem(id3group, "Artist", artist); - QString album = TStringToQString(file.tag()->album()).stripWhiteSpace(); + TQString album = TStringToQString(file.tag()->album()).stripWhiteSpace(); if (!album.isEmpty()) appendItem(id3group, "Album", album); appendItem(id3group, "Date", date); - QString comment = TStringToQString(file.tag()->comment()).stripWhiteSpace(); + TQString comment = TStringToQString(file.tag()->comment()).stripWhiteSpace(); if (!comment.isEmpty()) appendItem(id3group, "Comment", comment); appendItem(id3group, "Tracknumber", track); - QString genre = TStringToQString(file.tag()->genre()).stripWhiteSpace(); + TQString genre = TStringToQString(file.tag()->genre()).stripWhiteSpace(); if (!genre.isEmpty()) appendItem(id3group, "Genre", genre); } @@ -177,7 +177,7 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) { KFileMetaInfoGroup techgroup = appendGroup(info, "Technical"); - QString version; + TQString version; switch(file.audioProperties()->version()) { case TagLib::MPEG::Header::Version1: @@ -201,8 +201,8 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) appendItem(techgroup, "Bitrate", file.audioProperties()->bitrate()); appendItem(techgroup, "Sample Rate", file.audioProperties()->sampleRate()); appendItem(techgroup, "Channels", file.audioProperties()->channels()); - appendItem(techgroup, "Copyright", QVariant(file.audioProperties()->isCopyrighted(), dummy)); - appendItem(techgroup, "Original", QVariant(file.audioProperties()->isOriginal(), dummy)); + appendItem(techgroup, "Copyright", TQVariant(file.audioProperties()->isCopyrighted(), dummy)); + appendItem(techgroup, "Original", TQVariant(file.audioProperties()->isOriginal(), dummy)); appendItem(techgroup, "Length", file.audioProperties()->length()); // appendItem(techgroup, "Emphasis", file.audioProperties()->empahsis()); } @@ -235,7 +235,7 @@ private: bool KMp3Plugin::writeInfo(const KFileMetaInfo &info) const { TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8); - TagLib::MPEG::File file(QFile::encodeName(info.path()).data(), false); + TagLib::MPEG::File file(TQFile::encodeName(info.path()).data(), false); if(!file.isOpen() || !TagLib::File::isWritable(file.name())) { @@ -266,33 +266,33 @@ bool KMp3Plugin::writeInfo(const KFileMetaInfo &info) const class ComboValidator : public KStringListValidator { public: - ComboValidator(const QStringList &list, bool rejecting, - bool fixupEnabled, QObject *parent, const char *name) : + ComboValidator(const TQStringList &list, bool rejecting, + bool fixupEnabled, TQObject *parent, const char *name) : KStringListValidator(list, rejecting, fixupEnabled, parent, name) { } - virtual QValidator::State validate(QString &, int &) const + virtual TQValidator::State validate(TQString &, int &) const { - return QValidator::Acceptable; + return TQValidator::Acceptable; } }; -QValidator *KMp3Plugin::createValidator(const QString & /* mimetype */, - const QString &group, const QString &key, - QObject *parent, const char *name) const +TQValidator *KMp3Plugin::createValidator(const TQString & /* mimetype */, + const TQString &group, const TQString &key, + TQObject *parent, const char *name) const { kdDebug(7034) << "making a validator for " << group << "/" << key << endl; if(key == "Tracknumber" || key == "Date") { - return new QIntValidator(0, 9999, parent, name); + return new TQIntValidator(0, 9999, parent, name); } if(key == "Genre") { - QStringList l; + TQStringList l; TagLib::StringList genres = TagLib::ID3v1::genreList(); for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) { diff --git a/kfile-plugins/mp3/kfile_mp3.h b/kfile-plugins/mp3/kfile_mp3.h index e5736d0c..e1923bad 100644 --- a/kfile-plugins/mp3/kfile_mp3.h +++ b/kfile-plugins/mp3/kfile_mp3.h @@ -28,14 +28,14 @@ class KMp3Plugin: public KFilePlugin Q_OBJECT public: - KMp3Plugin(QObject *parent, const char *name, const QStringList &args); + KMp3Plugin(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; }; #endif |