summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/jpeg
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/jpeg')
-rw-r--r--kfile-plugins/jpeg/exif.cpp20
-rw-r--r--kfile-plugins/jpeg/kfile_jpeg.cpp30
-rw-r--r--kfile-plugins/jpeg/kfile_jpeg.h5
3 files changed, 28 insertions, 27 deletions
diff --git a/kfile-plugins/jpeg/exif.cpp b/kfile-plugins/jpeg/exif.cpp
index b6a2f88b..dd93bd7e 100644
--- a/kfile-plugins/jpeg/exif.cpp
+++ b/kfile-plugins/jpeg/exif.cpp
@@ -116,7 +116,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
#define TAG_WHITEBALANCE 0x9208
#define TAG_METERING_MODE 0x9207
#define TAG_EXPOSURE_PROGRAM 0x8822
-#define TAG_ISO_EQUIVALENT 0x8827
+#define TAG_ISO_ETQUIVALENT 0x8827
#define TAG_COMPRESSION_LEVEL 0x9102
#define TAG_THUMBNAIL_OFFSET 0x0201
@@ -135,7 +135,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
{ 0x10F, "Make"},
{ 0x110, "Model"},
{ 0x111, "StripOffsets"},
- { 0x112, "Orientation"},
+ { 0x112, "Qt::Orientation"},
{ 0x115, "SamplesPerPixel"},
{ 0x116, "RowsPerStrip"},
{ 0x117, "StripByteCounts"},
@@ -282,7 +282,7 @@ int ExifData::ReadJpegSections (TQFile & infile, ReadMode_t ReadMode)
if (ReadMode & READ_IMAGE){
unsigned long size;
- size = kMax( 0ul, infile.size()-infile.at() );
+ size = kMax( 0ul, (unsigned long)(infile.size()-infile.at()) );
Data = (uchar *)malloc(size);
if (Data == NULL){
throw FatalError("could not allocate data for entire image");
@@ -525,11 +525,11 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
switch(Tag){
case TAG_MAKE:
- ExifData::CameraMake = TQString::fromLatin1((const char*)ValuePtr, 31);
+ ExifData::CameraMake = TQString::tqfromLatin1((const char*)ValuePtr, 31);
break;
case TAG_MODEL:
- ExifData::CameraModel = TQString::fromLatin1((const char*)ValuePtr, 39);
+ ExifData::CameraModel = TQString::tqfromLatin1((const char*)ValuePtr, 39);
break;
case TAG_ORIENTATION:
@@ -537,7 +537,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
break;
case TAG_DATETIME_ORIGINAL:
- DateTime = TQString::fromLatin1((const char*)ValuePtr, 19);
+ DateTime = TQString::tqfromLatin1((const char*)ValuePtr, 19);
break;
case TAG_USERCOMMENT:
@@ -558,12 +558,12 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
int c;
c = (ValuePtr)[a];
if (c != '\0' && c != ' '){
- UserComment = TQString::fromLatin1((const char*)(a+ValuePtr), 199);
+ UserComment = TQString::tqfromLatin1((const char*)(a+ValuePtr), 199);
break;
}
}
}else{
- UserComment = TQString::fromLatin1((const char*)ValuePtr, 199);
+ UserComment = TQString::tqfromLatin1((const char*)ValuePtr, 199);
}
break;
@@ -660,7 +660,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
ExifData::ExposureProgram = (int)ConvertAnyFormat(ValuePtr, Format);
break;
- case TAG_ISO_EQUIVALENT:
+ case TAG_ISO_ETQUIVALENT:
ExifData::ISOequivalent = (int)ConvertAnyFormat(ValuePtr, Format);
if ( ExifData::ISOequivalent < 50 ) ExifData::ISOequivalent *= 200;
break;
@@ -803,7 +803,7 @@ void ExifData::process_EXIF(unsigned char * CharBuf, unsigned int length)
// printf("Exif section in Motorola order\n");
MotorolaOrder = 1;
}else{
- throw FatalError("Invalid Exif alignment marker.");
+ throw FatalError("Invalid Exif tqalignment marker.");
}
}
diff --git a/kfile-plugins/jpeg/kfile_jpeg.cpp b/kfile-plugins/jpeg/kfile_jpeg.cpp
index 5c7e8076..86170b8b 100644
--- a/kfile-plugins/jpeg/kfile_jpeg.cpp
+++ b/kfile-plugins/jpeg/kfile_jpeg.cpp
@@ -44,9 +44,9 @@ typedef KGenericFactory<KJpegPlugin> JpegFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_jpeg, JpegFactory("kfile_jpeg"))
-KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name,
+KJpegPlugin::KJpegPlugin(TQObject *tqparent, const char *name,
const TQStringList &args )
- : KFilePlugin(parent, name, args)
+ : KFilePlugin(tqparent, name, args)
{
kdDebug(7034) << "jpeg plugin\n";
@@ -84,7 +84,7 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name,
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
- item = addItemInfo( exifGroup, "Orientation", i18n("Orientation"),
+ item = addItemInfo( exifGroup, "Qt::Orientation", i18n("Qt::Orientation"),
TQVariant::Int );
item = addItemInfo( exifGroup, "ColorMode", i18n("Color Mode"),
@@ -148,12 +148,12 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name,
}
TQValidator* KJpegPlugin::createValidator(const KFileMetaInfoItem& /*item*/,
- TQObject */*parent*/,
+ TQObject */*tqparent*/,
const char */*name*/ ) const
{
// no need to return a validator that validates everything as OK :)
// if (item.isEditable())
-// return new TQRegExpValidator(TQRegExp(".*"), parent, name);
+// return new TQRegExpValidator(TQRegExp(".*"), tqparent, name);
// else
return 0L;
}
@@ -178,7 +178,7 @@ bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const
*/
/*
The jpeg standard does not regulate the contents of the COM block.
- I'm assuming the best thing to do here is write as unicode utf-8,
+ I'm assuming the best thing to do here is write as tqunicode utf-8,
which is fully backwards compatible with readers expecting ascii.
Readers expecting a national character set are out of luck...
*/
@@ -242,7 +242,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
ImageInfo.getHeight() ) );
if ( ImageInfo.getOrientation() )
- appendItem( exifGroup, "Orientation", ImageInfo.getOrientation() );
+ appendItem( exifGroup, "Qt::Orientation", ImageInfo.getOrientation() );
appendItem( exifGroup, "ColorMode", ImageInfo.getIsColor() ?
i18n("Color") : i18n("Black and white") );
@@ -286,7 +286,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getFocalLength()){
appendItem( exifGroup, "Focal length",
- TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) );
+ TQString(TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) ));
if (ImageInfo.getCCDWidth()){
appendItem( exifGroup, "35mm equivalent",
@@ -296,7 +296,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getCCDWidth()){
appendItem( exifGroup, "CCD width",
- TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) );
+ TQString(TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) ));
}
if (ImageInfo.getExposureTime()){
@@ -310,8 +310,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getApertureFNumber()){
appendItem( exifGroup, "Aperture",
- TQString().sprintf("f/%3.1f",
- (double)ImageInfo.getApertureFNumber()));
+ TQString(TQString().sprintf("f/%3.1f",
+ (double)ImageInfo.getApertureFNumber())));
}
if (ImageInfo.getDistance()){
@@ -325,8 +325,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getExposureBias()){
appendItem( exifGroup, "Exposure bias",
- TQString().sprintf("%4.2f",
- (double)ImageInfo.getExposureBias()) );
+ TQString(TQString().sprintf("%4.2f",
+ (double)ImageInfo.getExposureBias()) ));
}
if (ImageInfo.getWhitebalance() != -1){
@@ -443,8 +443,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getISOequivalent()){
appendItem( exifGroup, "ISO equiv.",
- TQString().sprintf("%2d",
- (int)ImageInfo.getISOequivalent()) );
+ TQString(TQString().sprintf("%2d",
+ (int)ImageInfo.getISOequivalent()) ));
}
if (ImageInfo.getCompressionLevel()){
diff --git a/kfile-plugins/jpeg/kfile_jpeg.h b/kfile-plugins/jpeg/kfile_jpeg.h
index 70c14501..ec6861d8 100644
--- a/kfile-plugins/jpeg/kfile_jpeg.h
+++ b/kfile-plugins/jpeg/kfile_jpeg.h
@@ -26,15 +26,16 @@
class KJpegPlugin: public KFilePlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- KJpegPlugin( TQObject *parent, const char *name,
+ KJpegPlugin( TQObject *tqparent, const char *name,
const TQStringList& args );
virtual bool readInfo ( KFileMetaInfo& info, uint what );
virtual bool writeInfo( const KFileMetaInfo& info ) const;
virtual TQValidator* createValidator( const KFileMetaInfoItem& item,
- TQObject* parent, const char* name) const;
+ TQObject* tqparent, const char* name) const;
private:
TQDateTime parseDateTime( const TQString& string );