From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/mpeg/kfile_mpeg.cpp | 42 +++++++++++++++++++-------------------- kfile-plugins/mpeg/kfile_mpeg.h | 8 ++++---- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'kfile-plugins/mpeg') diff --git a/kfile-plugins/mpeg/kfile_mpeg.cpp b/kfile-plugins/mpeg/kfile_mpeg.cpp index b0696d40..f532318e 100644 --- a/kfile-plugins/mpeg/kfile_mpeg.cpp +++ b/kfile-plugins/mpeg/kfile_mpeg.cpp @@ -30,11 +30,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // #include @@ -46,8 +46,8 @@ typedef KGenericFactory MpegFactory; K_EXPORT_COMPONENT_FACTORY(kfile_mpeg, MpegFactory( "kfile_mpeg" )) -KMpegPlugin::KMpegPlugin(QObject *parent, const char *name, - const QStringList &args) +KMpegPlugin::KMpegPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -59,18 +59,18 @@ KMpegPlugin::KMpegPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Seconds); - item = addItemInfo(group, "Resolution", i18n("Resolution"), QVariant::Size); + item = addItemInfo(group, "Resolution", i18n("Resolution"), TQVariant::Size); - item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), QVariant::Double); + item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), TQVariant::Double); setSuffix(item, i18n("fps")); - item = addItemInfo(group, "Video codec", i18n("Video Codec"), QVariant::String); - item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), QVariant::String); + item = addItemInfo(group, "Video codec", i18n("Video Codec"), TQVariant::String); + item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), TQVariant::String); - item = addItemInfo(group, "Aspect ratio", i18n("Aspect ratio"), QVariant::String); + item = addItemInfo(group, "Aspect ratio", i18n("Aspect ratio"), TQVariant::String); } // Frame-rate table from libmpeg3 @@ -216,12 +216,12 @@ int KMpegPlugin::skip_packet() { } int KMpegPlugin::skip_riff_chunk() { - dstream.setByteOrder(QDataStream::LittleEndian); + dstream.setByteOrder(TQDataStream::LittleEndian); uint32_t len; dstream >> len; // std::cerr << "Length of skipped chunk: " << len << std::endl; - dstream.setByteOrder(QDataStream::BigEndian); + dstream.setByteOrder(TQDataStream::BigEndian); return len; } @@ -358,7 +358,7 @@ bool KMpegPlugin::read_mpeg() // kdDebug(7034) << "Bytes skimmed:" << skimmed << endl; skimmed = 0; } -// kdDebug(7034) << "Packet of type:" << QString::number(byte,16) << endl; +// kdDebug(7034) << "Packet of type:" << TQString::number(byte,16) << endl; switch (byte) { case 0xb3: if (video_found) break; @@ -415,7 +415,7 @@ bool KMpegPlugin::read_mpeg() audio_found = true; break; default: -// kdDebug(7034) << "Unhandled packet of type:" << QString::number(byte,16) << endl; +// kdDebug(7034) << "Unhandled packet of type:" << TQString::number(byte,16) << endl; break; } state = 0; @@ -454,7 +454,7 @@ void KMpegPlugin::read_length() file.at(file.size()-1024); for(int j=1; j<64; j++) { // dstream.setDevice(&file); -// dstream.setByteOrder(QDataStream::BigEndian); +// dstream.setByteOrder(TQDataStream::BigEndian); for(int i=0; i<1024; i++) { dstream >> byte; switch (state) { @@ -502,12 +502,12 @@ bool KMpegPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // open file, set up stream and set endianness if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; return false; } dstream.setDevice(&file); - dstream.setByteOrder(QDataStream::BigEndian); + dstream.setByteOrder(TQDataStream::BigEndian); start_time = end_time = 0L; @@ -519,7 +519,7 @@ bool KMpegPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) appendItem(group, "Frame rate", double(frame_rate)); - appendItem(group, "Resolution", QSize(horizontal_size, vertical_size)); + appendItem(group, "Resolution", TQSize(horizontal_size, vertical_size)); /* The GOP timings are completely bogus read_length(); if (end_time != 0) { diff --git a/kfile-plugins/mpeg/kfile_mpeg.h b/kfile-plugins/mpeg/kfile_mpeg.h index 754dc5d0..5fcba670 100644 --- a/kfile-plugins/mpeg/kfile_mpeg.h +++ b/kfile-plugins/mpeg/kfile_mpeg.h @@ -21,7 +21,7 @@ #define __KFILE_MPEG_H__ #include -#include +#include class QStringList; @@ -30,7 +30,7 @@ class KMpegPlugin: public KFilePlugin Q_OBJECT public: - KMpegPlugin( QObject *parent, const char *name, const QStringList& args ); + KMpegPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); @@ -47,8 +47,8 @@ private: bool read_mpeg(); void read_length(); - QFile file; - QDataStream dstream; + TQFile file; + TQDataStream dstream; // MPEG information int horizontal_size; -- cgit v1.2.1