diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kfile-plugins/ogg | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-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/ogg')
-rw-r--r-- | kfile-plugins/ogg/kfile_ogg.cpp | 92 | ||||
-rw-r--r-- | kfile-plugins/ogg/kfile_ogg.h | 10 |
2 files changed, 51 insertions, 51 deletions
diff --git a/kfile-plugins/ogg/kfile_ogg.cpp b/kfile-plugins/ogg/kfile_ogg.cpp index 0f131154..dc4a8f3e 100644 --- a/kfile-plugins/ogg/kfile_ogg.cpp +++ b/kfile-plugins/ogg/kfile_ogg.cpp @@ -21,12 +21,12 @@ #include "kfile_ogg.h" #include "vcedit.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> @@ -61,8 +61,8 @@ static const char* const knownTranslations[] = { K_EXPORT_COMPONENT_FACTORY(kfile_ogg, KGenericFactory<KOggPlugin>("kfile_ogg")) -KOggPlugin::KOggPlugin( QObject *parent, const char *name, - const QStringList &args ) +KOggPlugin::KOggPlugin( TQObject *parent, const char *name, + const TQStringList &args ) : KFilePlugin( parent, name, args ) { kdDebug(7034) << "ogg plugin\n"; @@ -78,40 +78,40 @@ KOggPlugin::KOggPlugin( 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); @@ -120,31 +120,31 @@ KOggPlugin::KOggPlugin( QObject *parent, const char *name, group = addGroupInfo(info, "Technical", i18n("Technical Details")); setAttributes(group, 0); - addItemInfo(group, "Version", i18n("Version"), QVariant::Int); - addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); + addItemInfo(group, "Channels", i18n("Channels"), 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, "UpperBitrate", i18n("Upper Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); item = addItemInfo(group, "LowerBitrate", i18n("Lower Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); item = addItemInfo(group, "NominalBitrate", i18n("Nominal Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); 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); setUnit(item, KFileMimeTypeInfo::Seconds); } @@ -173,10 +173,10 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) if ( info.path().isEmpty() ) // remote file return false; - fp = fopen(QFile::encodeName(info.path()),"rb"); + fp = fopen(TQFile::encodeName(info.path()),"rb"); if (!fp) { - kdDebug(7034) << "Unable to open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Unable to open " << TQFile::encodeName(info.path()) << endl; return false; } @@ -184,13 +184,13 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) if (rc < 0) { - kdDebug(7034) << "Unable to understand " << QFile::encodeName(info.path()) + kdDebug(7034) << "Unable to understand " << TQFile::encodeName(info.path()) << ", errorcode=" << rc << endl; return false; } // info.insert(KFileMetaInfoItem("Vendor", i18n("Vendor"), -// QVariant(QString(vi->vendor)))); +// TQVariant(TQString(vi->vendor)))); // get the vorbis comments if (readComment) @@ -202,7 +202,7 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) for (i=0; i < vc->comments; i++) { kdDebug(7034) << vc->user_comments[i] << endl; - QStringList split = QStringList::split("=", QString::fromUtf8(vc->user_comments[i])); + TQStringList split = TQStringList::split("=", TQString::fromUtf8(vc->user_comments[i])); split[0] = split[0].lower(); split[0][0] = split[0][0].upper(); @@ -252,7 +252,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const // todo: add writing support FILE* infile; - infile = fopen(QFile::encodeName(info.path()), "r"); + infile = fopen(TQFile::encodeName(info.path()), "r"); if (!infile) { @@ -284,19 +284,19 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const KFileMetaInfoGroup group = info["Comment"]; - QStringList keys = group.keys(); - QStringList::Iterator it; + TQStringList keys = group.keys(); + TQStringList::Iterator it; for (it = keys.begin(); it!=keys.end(); ++it) { KFileMetaInfoItem item = group[*it]; - if (!item.isEditable() || !(item.type()==QVariant::String) ) + if (!item.isEditable() || !(item.type()==TQVariant::String) ) continue; - QCString key = item.key().upper().utf8(); - if (item.value().canCast(QVariant::String)) + TQCString key = item.key().upper().utf8(); + if (item.value().canCast(TQVariant::String)) { - QCString value = item.value().toString().utf8(); + TQCString value = item.value().toString().utf8(); kdDebug(7034) << " writing tag " << key << "=" << value << endl; @@ -309,9 +309,9 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const } - QString filename; + TQString filename; - QFileInfo fileinfo(info.path()); + TQFileInfo fileinfo(info.path()); // follow symlinks if (fileinfo.isSymLink()) @@ -321,7 +321,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const // nothing in Qt or KDE to get the mode as an int? struct stat s; - stat(QFile::encodeName(filename), &s); + stat(TQFile::encodeName(filename), &s); KSaveFile sf(filename, s.st_mode); FILE* outfile = sf.fstream(); @@ -348,10 +348,10 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const return true; } -QValidator* KOggPlugin::createValidator( const QString&, - const QString &, const QString &, - QObject* parent, const char* name) const { - return new QRegExpValidator(QRegExp(".*"), parent, name); +TQValidator* KOggPlugin::createValidator( const TQString&, + const TQString &, const TQString &, + TQObject* parent, const char* name) const { + return new TQRegExpValidator(TQRegExp(".*"), parent, name); } #include "kfile_ogg.moc" diff --git a/kfile-plugins/ogg/kfile_ogg.h b/kfile-plugins/ogg/kfile_ogg.h index 52b5f833..ed511ec4 100644 --- a/kfile-plugins/ogg/kfile_ogg.h +++ b/kfile-plugins/ogg/kfile_ogg.h @@ -31,14 +31,14 @@ class KOggPlugin: public KFilePlugin Q_OBJECT public: - KOggPlugin( QObject *parent, const char *name, const QStringList& args ); + KOggPlugin( 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; }; |