diff options
Diffstat (limited to 'kfile-plugins/tiff/kfile_tiff.cpp')
-rw-r--r-- | kfile-plugins/tiff/kfile_tiff.cpp | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/kfile-plugins/tiff/kfile_tiff.cpp b/kfile-plugins/tiff/kfile_tiff.cpp index 1e844d0d..ce55e5b3 100644 --- a/kfile-plugins/tiff/kfile_tiff.cpp +++ b/kfile-plugins/tiff/kfile_tiff.cpp @@ -22,10 +22,10 @@ #include <kgenericfactory.h> #include <kdebug.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qdatetime.h> -#include <qregexp.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqdatetime.h> +#include <tqregexp.h> #include <tiff.h> #include <tiffio.h> @@ -34,8 +34,8 @@ typedef KGenericFactory<KTiffPlugin> TiffFactory; K_EXPORT_COMPONENT_FACTORY(kfile_tiff, TiffFactory("kfile_tiff")) -KTiffPlugin::KTiffPlugin(QObject *parent, const char *name, - const QStringList &args) : KFilePlugin(parent, name, args) +KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { kdDebug(7034) << "TIFF file meta info plugin" << endl; KFileMimeTypeInfo* info = addMimeTypeInfo( "image/tiff" ); @@ -45,121 +45,121 @@ KTiffPlugin::KTiffPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; item = addItemInfo(group, "Description", i18n("Description"), - QVariant::String); + TQVariant::String); setHint(item, KFileMimeTypeInfo::Description); item = addItemInfo(group, "Copyright", i18n("Copyright"), - QVariant::String); + TQVariant::String); item = addItemInfo(group, "ColorMode", i18n("Color Mode"), - QVariant::String); + TQVariant::String); item = addItemInfo(group, "Dimensions", i18n("Dimensions"), - QVariant::Size); + TQVariant::Size); setHint(item, KFileMimeTypeInfo::Size); setUnit(item, KFileMimeTypeInfo::Pixels); item = addItemInfo(group, "Resolution", i18n("Resolution"), - QVariant::Size); + TQVariant::Size); setUnit(item, KFileMimeTypeInfo::DotsPerInch); item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), - QVariant::Int); + TQVariant::Int); setUnit(item, KFileMimeTypeInfo::BitsPerPixel); item = addItemInfo(group, "Compression", i18n("Compression"), - QVariant::String); + TQVariant::String); item = addItemInfo(group, "Software", i18n("Software"), - QVariant::String); + TQVariant::String); item = addItemInfo(group, "DateTime", i18n("Date/Time"), - QVariant::DateTime); + TQVariant::DateTime); item = addItemInfo(group, "Artist", i18n("Artist"), - QVariant::String); + TQVariant::String); setHint(item, KFileMimeTypeInfo::Author); item = addItemInfo(group, "FaxPages", i18n("Fax Pages"), - QVariant::Int); + TQVariant::Int); group = addGroupInfo(info, "Scanner", i18n("Scanner")); - item = addItemInfo(group, "Make", i18n("Make"), QVariant::String); - item = addItemInfo(group, "Model", i18n("Model"), QVariant::String); + item = addItemInfo(group, "Make", i18n("Make"), TQVariant::String); + item = addItemInfo(group, "Model", i18n("Model"), TQVariant::String); m_colorMode.setAutoDelete(true); m_imageCompression.setAutoDelete(true); m_colorMode.insert(PHOTOMETRIC_MINISWHITE, - new QString(I18N_NOOP("Monochrome"))); + new TQString(I18N_NOOP("Monochrome"))); m_colorMode.insert(PHOTOMETRIC_MINISBLACK, - new QString(I18N_NOOP("Monochrome"))); + new TQString(I18N_NOOP("Monochrome"))); m_colorMode.insert(PHOTOMETRIC_RGB, - new QString(I18N_NOOP("RGB"))); + new TQString(I18N_NOOP("RGB"))); m_colorMode.insert(PHOTOMETRIC_PALETTE, - new QString(I18N_NOOP("Palette color"))); + new TQString(I18N_NOOP("Palette color"))); m_colorMode.insert(PHOTOMETRIC_MASK, - new QString(I18N_NOOP("Transparency mask"))); + new TQString(I18N_NOOP("Transparency mask"))); m_colorMode.insert(PHOTOMETRIC_SEPARATED, - new QString(I18N_NOOP("Color separations"))); + new TQString(I18N_NOOP("Color separations"))); m_colorMode.insert(PHOTOMETRIC_YCBCR, - new QString(I18N_NOOP("YCbCr"))); + new TQString(I18N_NOOP("YCbCr"))); m_colorMode.insert(PHOTOMETRIC_CIELAB, - new QString(I18N_NOOP("CIE Lab"))); + new TQString(I18N_NOOP("CIE Lab"))); #ifdef PHOTOMETRIC_ITULAB m_colorMode.insert(PHOTOMETRIC_ITULAB, - new QString(I18N_NOOP("ITU Lab"))); + new TQString(I18N_NOOP("ITU Lab"))); #endif m_colorMode.insert(PHOTOMETRIC_LOGL, - new QString(I18N_NOOP("LOGL"))); + new TQString(I18N_NOOP("LOGL"))); m_colorMode.insert(PHOTOMETRIC_LOGLUV, - new QString(I18N_NOOP("LOGLUV"))); + new TQString(I18N_NOOP("LOGLUV"))); m_imageCompression.insert(COMPRESSION_NONE, - new QString(I18N_NOOP("None"))); + new TQString(I18N_NOOP("None"))); m_imageCompression.insert(COMPRESSION_CCITTRLE, - new QString(I18N_NOOP("RLE"))); + new TQString(I18N_NOOP("RLE"))); m_imageCompression.insert(COMPRESSION_CCITTFAX3, - new QString(I18N_NOOP("G3 Fax"))); + new TQString(I18N_NOOP("G3 Fax"))); m_imageCompression.insert(COMPRESSION_CCITTFAX4, - new QString(I18N_NOOP("G4 Fax"))); + new TQString(I18N_NOOP("G4 Fax"))); m_imageCompression.insert(COMPRESSION_LZW, - new QString(I18N_NOOP("LZW"))); + new TQString(I18N_NOOP("LZW"))); m_imageCompression.insert(COMPRESSION_OJPEG, - new QString(I18N_NOOP("JPEG"))); + new TQString(I18N_NOOP("JPEG"))); m_imageCompression.insert(COMPRESSION_JPEG, - new QString(I18N_NOOP("JPEG DCT"))); + new TQString(I18N_NOOP("JPEG DCT"))); #ifdef COMPRESSION_ADOBE_DEFLATE m_imageCompression.insert(COMPRESSION_ADOBE_DEFLATE, - new QString(I18N_NOOP("Adobe Deflate"))); + new TQString(I18N_NOOP("Adobe Deflate"))); #endif m_imageCompression.insert(COMPRESSION_NEXT, - new QString(I18N_NOOP("NeXT 2-bit RLE"))); + new TQString(I18N_NOOP("NeXT 2-bit RLE"))); m_imageCompression.insert(COMPRESSION_CCITTRLEW, - new QString(I18N_NOOP("RLE Word"))); + new TQString(I18N_NOOP("RLE Word"))); m_imageCompression.insert(COMPRESSION_PACKBITS, - new QString(I18N_NOOP("Packbits"))); + new TQString(I18N_NOOP("Packbits"))); m_imageCompression.insert(COMPRESSION_THUNDERSCAN, - new QString(I18N_NOOP("Thunderscan RLE"))); + new TQString(I18N_NOOP("Thunderscan RLE"))); m_imageCompression.insert(COMPRESSION_IT8CTPAD, - new QString(I18N_NOOP("IT8 CT w/padding"))); + new TQString(I18N_NOOP("IT8 CT w/padding"))); m_imageCompression.insert(COMPRESSION_IT8LW, - new QString(I18N_NOOP("IT8 linework RLE"))); + new TQString(I18N_NOOP("IT8 linework RLE"))); m_imageCompression.insert(COMPRESSION_IT8MP, - new QString(I18N_NOOP("IT8 monochrome"))); + new TQString(I18N_NOOP("IT8 monochrome"))); m_imageCompression.insert(COMPRESSION_IT8BL, - new QString(I18N_NOOP("IT8 binary lineart"))); + new TQString(I18N_NOOP("IT8 binary lineart"))); m_imageCompression.insert(COMPRESSION_PIXARFILM, - new QString(I18N_NOOP("Pixar 10-bit LZW"))); + new TQString(I18N_NOOP("Pixar 10-bit LZW"))); m_imageCompression.insert(COMPRESSION_PIXARLOG, - new QString(I18N_NOOP("Pixar 11-bit ZIP"))); + new TQString(I18N_NOOP("Pixar 11-bit ZIP"))); m_imageCompression.insert(COMPRESSION_DEFLATE, - new QString(I18N_NOOP("Pixar deflate"))); + new TQString(I18N_NOOP("Pixar deflate"))); m_imageCompression.insert(COMPRESSION_DCS, - new QString(I18N_NOOP("Kodak DCS"))); + new TQString(I18N_NOOP("Kodak DCS"))); m_imageCompression.insert(COMPRESSION_JBIG, - new QString(I18N_NOOP("ISO JBIG"))); + new TQString(I18N_NOOP("ISO JBIG"))); m_imageCompression.insert(COMPRESSION_SGILOG, - new QString(I18N_NOOP("SGI log luminance RLE"))); + new TQString(I18N_NOOP("SGI log luminance RLE"))); m_imageCompression.insert(COMPRESSION_SGILOG24, - new QString(I18N_NOOP("SGI log 24-bit packed"))); + new TQString(I18N_NOOP("SGI log 24-bit packed"))); } -QDateTime KTiffPlugin::tiffDate(const QString& s) const +TQDateTime KTiffPlugin::tiffDate(const TQString& s) const { - QDateTime dt; - QRegExp rxDate("^([0-9]{4}):([0-9]{2}):([0-9]{2})\\s" + TQDateTime dt; + TQRegExp rxDate("^([0-9]{4}):([0-9]{2}):([0-9]{2})\\s" "([0-9]{2}):([0-9]{2}):([0-9]{2})$"); if (rxDate.search(s) != -1) @@ -171,8 +171,8 @@ QDateTime KTiffPlugin::tiffDate(const QString& s) const int min = rxDate.cap(5).toInt(); int sec = rxDate.cap(6).toInt(); - QDate d = QDate(year, month, day); - QTime t = QTime(hour, min, sec); + TQDate d = TQDate(year, month, day); + TQTime t = TQTime(hour, min, sec); if (d.isValid() && t.isValid()) { @@ -186,7 +186,7 @@ QDateTime KTiffPlugin::tiffDate(const QString& s) const bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) { - TIFF *tiff = TIFFOpen(QFile::encodeName(info.path()), "r"); + TIFF *tiff = TIFFOpen(TQFile::encodeName(info.path()), "r"); if (!tiff) return false; @@ -248,15 +248,15 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) int imageBpp = bitsPerSample*samplesPerPixel; if (imageAlpha && colorMode==PHOTOMETRIC_RGB) - m_colorMode.replace(PHOTOMETRIC_RGB, new QString(I18N_NOOP("RGBA"))); + m_colorMode.replace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); KFileMetaInfoGroup group = appendGroup(info, "General"); if (description) - appendItem(group, "Description", QString(description)); - appendItem(group, "Dimensions", QSize(imageWidth, imageLength)); + appendItem(group, "Description", TQString(description)); + appendItem(group, "Dimensions", TQSize(imageWidth, imageLength)); appendItem(group, "BitDepth", imageBpp); if (imageXResolution>0 && imageYResolution>0) - appendItem(group, "Resolution", QSize( + appendItem(group, "Resolution", TQSize( static_cast<int>(imageXResolution), static_cast<int>(imageYResolution))); if (m_colorMode[colorMode]) @@ -265,16 +265,16 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) appendItem(group, "Compression", *m_imageCompression[imageCompression]); if (datetime) { - QDateTime dt = tiffDate(QString(datetime)); + TQDateTime dt = tiffDate(TQString(datetime)); if (dt.isValid()) appendItem(group, "DateTime", dt); } if (copyright) - appendItem(group, "Copyright", QString(copyright)); + appendItem(group, "Copyright", TQString(copyright)); if (software) - appendItem(group, "Software", QString(software)); + appendItem(group, "Software", TQString(software)); if (artist) - appendItem(group, "Artist", QString(artist)); + appendItem(group, "Artist", TQString(artist)); if (faxPages>0 && (imageCompression==COMPRESSION_CCITTFAX3 || imageCompression==COMPRESSION_CCITTFAX4)) @@ -286,9 +286,9 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) { group = appendGroup(info, "Scanner"); if (scannerMake) - appendItem(group, "Make", QString(scannerMake)); + appendItem(group, "Make", TQString(scannerMake)); if (scannerModel) - appendItem(group, "Model", QString(scannerModel)); + appendItem(group, "Model", TQString(scannerModel)); } TIFFClose(tiff); |