diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 00:32:22 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 00:32:22 +0000 |
commit | 79b23e8d19372121f15ee966d16770a850d1e875 (patch) | |
tree | a34cd446a2d6e1d65f9a2b72ef8fcc3c87218bda | |
parent | 7131a938889b7893cea982d74246f11d11160374 (diff) | |
download | libkdcraw-79b23e8d19372121f15ee966d16770a850d1e875.tar.gz libkdcraw-79b23e8d19372121f15ee966d16770a850d1e875.zip |
TQt4 port libkdcraw
This enables compilation under Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/libkdcraw@1232482 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
23 files changed, 513 insertions, 507 deletions
diff --git a/libkdcraw/dcraw/dcraw.c b/libkdcraw/dcraw/dcraw.c index 3953574..3d3addb 100644 --- a/libkdcraw/dcraw/dcraw.c +++ b/libkdcraw/dcraw/dcraw.c @@ -1597,12 +1597,12 @@ void CLASS phase_one_correct() void CLASS phase_one_load_raw() { int row, col, a, b; - ushort *pixel, akey, bkey, mask; + ushort *pixel, akey, bkey, tqmask; fseek (ifp, ph1.key_off, SEEK_SET); akey = get2(); bkey = get2(); - mask = ph1.format == 1 ? 0x5555:0x1354; + tqmask = ph1.format == 1 ? 0x5555:0x1354; fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "phase_one_load_raw()"); @@ -1611,8 +1611,8 @@ void CLASS phase_one_load_raw() for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); + pixel[col+0] = (a & tqmask) | (b & ~tqmask); + pixel[col+1] = (b & tqmask) | (a & ~tqmask); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col+left_margin]; @@ -3001,7 +3001,7 @@ void CLASS foveon_interpolate() foveon_fixed (chroma_dq, 3, "ChromaDQ"); foveon_fixed (color_dq, 3, foveon_camf_param ("IncludeBlocks", "ColorDQ") ? - "ColorDQ" : "ColorDQCamRGB"); + "ColorDQ" : "ColorDTQCamRGB"); if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) foveon_fixed (&cfilt, 1, "ColumnFilter"); @@ -4498,7 +4498,7 @@ void CLASS parse_makernote (int base, int uptag) !strcmp (buf,"EPSON")) fseek (ifp, -2, SEEK_CUR); else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) + !strcmp (buf,"TQVC")) fseek (ifp, -4, SEEK_CUR); else fseek (ifp, -10, SEEK_CUR); @@ -4961,7 +4961,7 @@ int CLASS parse_tiff_ifd (int base) } } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ tiff_ifd[ifd].flip = "50132467"[get2() & 7]-'0'; break; case 277: /* SamplesPerPixel */ diff --git a/libkdcraw/libkdcraw/dcrawbinary.cpp b/libkdcraw/libkdcraw/dcrawbinary.cpp index 33ed117..ac79763 100644 --- a/libkdcraw/libkdcraw/dcrawbinary.cpp +++ b/libkdcraw/libkdcraw/dcrawbinary.cpp @@ -21,9 +21,9 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qfileinfo.h> +#include <tqfileinfo.h> // KDE includes @@ -50,18 +50,18 @@ public: DcrawBinaryPriv() { available = false; - version = QString::null; + version = TQString(); } bool available; - QString version; + TQString version; }; DcrawBinary *DcrawBinary::m_instance = 0; DcrawBinary::DcrawBinary() - : QObject() + : TQObject() { d = new DcrawBinaryPriv; } @@ -90,8 +90,8 @@ void DcrawBinary::checkSystem() process.clearArguments(); process << path(); - connect(&process, SIGNAL(receivedStdout(KProcess *, char*, int)), - this, SLOT(slotReadStdoutFromDcraw(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStdoutFromDcraw(KProcess*, char*, int))); d->available = process.start(KProcess::Block, KProcess::Stdout); } @@ -99,10 +99,10 @@ void DcrawBinary::checkSystem() void DcrawBinary::slotReadStdoutFromDcraw(KProcess*, char* buffer, int buflen) { // The dcraw output looks like this : Raw photo decoder "dcraw" v8.54... - QString dcrawHeader("Raw photo decoder \"dcraw\" v"); + TQString dcrawHeader("Raw photo decoder \"dcraw\" v"); - QString dcrawOut = QString::fromLocal8Bit(buffer, buflen); - QString firstLine = dcrawOut.section('\n', 1, 1); + TQString dcrawOut = TQString::fromLocal8Bit(buffer, buflen); + TQString firstLine = dcrawOut.section('\n', 1, 1); if (firstLine.startsWith(dcrawHeader)) { @@ -126,16 +126,16 @@ bool DcrawBinary::isAvailable() const return d->available; } -QString DcrawBinary::version() const +TQString DcrawBinary::version() const { return d->version; } -QString DcrawBinary::internalVersion() +TQString DcrawBinary::internalVersion() { // The version of dcraw include with this library. // Look into dcraw/dcraw.c implementation. - return QString("8.83"); + return TQString("8.83"); } bool DcrawBinary::versionIsRight() const @@ -151,7 +151,7 @@ bool DcrawBinary::versionIsRight() const void DcrawBinary::checkReport() { - QString appName = KGlobal::instance()->aboutData()->programName(); + TQString appName = KGlobal::instance()->aboutData()->programName(); if (!isAvailable()) { @@ -162,8 +162,8 @@ void DcrawBinary::checkReport() "You can continue, but you will not be able " "to handle any Raw images. " "Please check the installation of libkdcraw package on your computer.") - .arg(path()), - QString(), + .tqarg(path()), + TQString(), i18n("Do not show this message again"), KMessageBox::Notify | KMessageBox::AllowLink); return; @@ -179,29 +179,29 @@ void DcrawBinary::checkReport() "You can continue, but you will not be able " "to handle any Raw images. " "Please check the installation of libkdcraw package on your computer.") - .arg(path()) - .arg(version()), - QString(), + .tqarg(path()) + .tqarg(version()), + TQString(), i18n("Do not show this message again"), KMessageBox::Notify | KMessageBox::AllowLink); } } -QStringList DcrawBinary::supportedCamera() +TQStringList DcrawBinary::supportedCamera() { - QFileInfo fi(path()); - QFile file(fi.dirPath() + QString("/CAMERALIST")); + TQFileInfo fi(path()); + TQFile file(fi.dirPath() + TQString("/CAMERALIST")); if ( !file.open(IO_ReadOnly) ) - return QStringList(); + return TQStringList(); - QByteArray data; + TQByteArray data; data.resize(file.size()); - QDataStream stream( &file ); + TQDataStream stream( &file ); stream.readRawBytes(data.data(), data.size()); file.close(); - QString tmp(data); - QStringList list = QStringList::split('\n', tmp); + TQString tmp(data); + TQStringList list = TQStringList::split('\n', tmp); return list; } diff --git a/libkdcraw/libkdcraw/dcrawbinary.h b/libkdcraw/libkdcraw/dcrawbinary.h index 56d061e..f8fe557 100644 --- a/libkdcraw/libkdcraw/dcrawbinary.h +++ b/libkdcraw/libkdcraw/dcrawbinary.h @@ -24,10 +24,10 @@ #ifndef DCRAW_BINARY_H #define DCRAW_BINARY_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> // Local Includes. @@ -40,9 +40,10 @@ namespace KDcrawIface class DcrawBinaryPriv; -class LIBKDCRAW_EXPORT DcrawBinary : public QObject +class LIBKDCRAW_EXPORT DcrawBinary : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -56,13 +57,13 @@ public: static const char *rawFiles(); /** Return the RAW decoding program version included in this library. */ - static QString internalVersion(); + static TQString internalVersion(); /** Return 'true' if RAW decoding program have be found in your system. */ bool isAvailable() const; /** Return the RAW decoding program version found in your system. */ - QString version() const; + TQString version() const; /** Return 'true' if RAW decoding program version found in your system is the same than the version provided by this library. */ @@ -76,7 +77,7 @@ public: void checkReport(); /** Provide a list of supported RAW Camera name. */ - QStringList supportedCamera(); + TQStringList supportedCamera(); private slots: diff --git a/libkdcraw/libkdcraw/dcrawinfocontainer.h b/libkdcraw/libkdcraw/dcrawinfocontainer.h index 3b04d1c..a90ee0e 100644 --- a/libkdcraw/libkdcraw/dcrawinfocontainer.h +++ b/libkdcraw/libkdcraw/dcrawinfocontainer.h @@ -23,11 +23,11 @@ #ifndef DCRAW_INFO_CONTAINER_H #define DCRAW_INFO_CONTAINER_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qdatetime.h> -#include <qsize.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqsize.h> // Local includes. @@ -149,31 +149,31 @@ public: double cameraMult[4]; /** The camera maker. */ - QString make; + TQString make; /** The camera model. */ - QString model; + TQString model; /** The artist name who have picture owner. */ - QString owner; + TQString owner; /** The demosaising filter pattern. */ - QString filterPattern; + TQString filterPattern; /** The DNG version. NOTE: its only show with DNG RAW files. */ - QString DNGVersion; + TQString DNGVersion; /** Date & time when have been taken the picture. */ - QDateTime dateTime; + TQDateTime dateTime; /** The image dimensions in pixels. */ - QSize imageSize; + TQSize imageSize; /** The thumb dimensions in pixels. */ - QSize thumbSize; + TQSize thumbSize; /** The full RAW image dimensions in pixels. */ - QSize fullSize; + TQSize fullSize; /** The output dimensions in pixels. */ - QSize outputSize; + TQSize outputSize; }; } // namespace KDcrawIface diff --git a/libkdcraw/libkdcraw/dcrawsettingswidget.cpp b/libkdcraw/libkdcraw/dcrawsettingswidget.cpp index 1777edf..b1a4a70 100644 --- a/libkdcraw/libkdcraw/dcrawsettingswidget.cpp +++ b/libkdcraw/libkdcraw/dcrawsettingswidget.cpp @@ -22,14 +22,14 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqstring.h> +#include <tqtooltip.h> // KDE includes. @@ -98,32 +98,32 @@ public: inputColorSpaceComboBox = 0; } - QWidget *demosaicingSettings; - QWidget *whiteBalanceSettings; - QWidget *correctionsSettings; - QWidget *colormanSettings; - - QLabel *whiteBalanceLabel; - QLabel *customWhiteBalanceLabel; - QLabel *customWhiteBalanceGreenLabel; - QLabel *brightnessLabel; - QLabel *RAWQualityLabel; - QLabel *NRThresholdLabel; - QLabel *caRedMultLabel; - QLabel *caBlueMultLabel; - QLabel *unclipColorLabel; - QLabel *reconstructLabel; - QLabel *inputColorSpaceLabel; - QLabel *outputColorSpaceLabel; - QLabel *medianFilterPassesLabel; - - QCheckBox *blackPointCheckBox; - QCheckBox *whitePointCheckBox; - QCheckBox *sixteenBitsImage; - QCheckBox *fourColorCheckBox; - QCheckBox *dontStretchPixelsCheckBox; - QCheckBox *enableNoiseReduction; - QCheckBox *enableCACorrection; + TQWidget *demosaicingSettings; + TQWidget *whiteBalanceSettings; + TQWidget *correctionsSettings; + TQWidget *colormanSettings; + + TQLabel *whiteBalanceLabel; + TQLabel *customWhiteBalanceLabel; + TQLabel *customWhiteBalanceGreenLabel; + TQLabel *brightnessLabel; + TQLabel *RAWQualityLabel; + TQLabel *NRThresholdLabel; + TQLabel *caRedMultLabel; + TQLabel *caBlueMultLabel; + TQLabel *unclipColorLabel; + TQLabel *reconstructLabel; + TQLabel *inputColorSpaceLabel; + TQLabel *outputColorSpaceLabel; + TQLabel *medianFilterPassesLabel; + + TQCheckBox *blackPointCheckBox; + TQCheckBox *whitePointCheckBox; + TQCheckBox *sixteenBitsImage; + TQCheckBox *fourColorCheckBox; + TQCheckBox *dontStretchPixelsCheckBox; + TQCheckBox *enableNoiseReduction; + TQCheckBox *enableCACorrection; KURLRequester *inIccUrlEdit; KURLRequester *outIccUrlEdit; @@ -147,16 +147,16 @@ public: RDoubleNumInput *brightnessSpinBox; }; -DcrawSettingsWidget::DcrawSettingsWidget(QWidget *parent, int advSettings) - : QToolBox(parent) +DcrawSettingsWidget::DcrawSettingsWidget(TQWidget *tqparent, int advSettings) + : TQToolBox(tqparent) { setup(advSettings); } -DcrawSettingsWidget::DcrawSettingsWidget(QWidget *parent, bool sixteenBitsOption, +DcrawSettingsWidget::DcrawSettingsWidget(TQWidget *tqparent, bool sixteenBitsOption, bool outputColorSpaceOption, bool postProcessingOptions) - : QToolBox(parent) + : TQToolBox(tqparent) { int advSettings = 0; @@ -175,13 +175,13 @@ void DcrawSettingsWidget::setup(int advSettings) // --------------------------------------------------------------- // DEMOSAICING Settings panel - d->demosaicingSettings = new QWidget(this); - QGridLayout* demosaicingLayout = new QGridLayout(d->demosaicingSettings, 5, 2); + d->demosaicingSettings = new TQWidget(this); + TQGridLayout* demosaicingLayout = new TQGridLayout(d->demosaicingSettings, 5, 2); int line = 0; - d->sixteenBitsImage = new QCheckBox(i18n("16 bits color depth"), d->demosaicingSettings); - QWhatsThis::add( d->sixteenBitsImage, i18n("<p>If enabled, all RAW files will be decoded in 16-bit " + d->sixteenBitsImage = new TQCheckBox(i18n("16 bits color depth"), d->demosaicingSettings); + TQWhatsThis::add( d->sixteenBitsImage, i18n("<p>If enabled, all RAW files will be decoded in 16-bit " "color depth using a linear gamma curve. To prevent dark " "picture rendering in the editor, it is recommended to use " "Color Management in this mode.<p>" @@ -200,8 +200,8 @@ void DcrawSettingsWidget::setup(int advSettings) d->sixteenBitsImage->hide(); } - d->fourColorCheckBox = new QCheckBox(i18n("Interpolate RGB as four colors"), d->demosaicingSettings); - QWhatsThis::add(d->fourColorCheckBox, i18n("<p><b>Interpolate RGB as four colors</b><p>" + d->fourColorCheckBox = new TQCheckBox(i18n("Interpolate RGB as four colors"), d->demosaicingSettings); + TQWhatsThis::add(d->fourColorCheckBox, i18n("<p><b>Interpolate RGB as four colors</b><p>" "The default is to assume that all green " "pixels are the same. If even-row green " "pixels are more sensitive to ultraviolet light " @@ -215,14 +215,14 @@ void DcrawSettingsWidget::setup(int advSettings) line++; KURLLabel *dcrawVersion = new KURLLabel("http://www.libraw.org", i18n("libraw %1") - .arg(KDcraw::librawVersion()), d->demosaicingSettings); - dcrawVersion->setAlignment(Qt::AlignRight); - QToolTip::add(dcrawVersion, i18n("Visit dcraw project website")); + .tqarg(KDcraw::librawVersion()), d->demosaicingSettings); + dcrawVersion->tqsetAlignment(TQt::AlignRight); + TQToolTip::add(dcrawVersion, i18n("Visit dcraw project website")); demosaicingLayout->addMultiCellWidget(dcrawVersion, 0, 0, 2, 2); - d->dontStretchPixelsCheckBox = new QCheckBox(i18n("Do not stretch or rotate pixels"), d->demosaicingSettings); - QWhatsThis::add( d->dontStretchPixelsCheckBox, i18n("<p><b>Do not stretch or rotate pixels</b><p>" + d->dontStretchPixelsCheckBox = new TQCheckBox(i18n("Do not stretch or rotate pixels"), d->demosaicingSettings); + TQWhatsThis::add( d->dontStretchPixelsCheckBox, i18n("<p><b>Do not stretch or rotate pixels</b><p>" "For Fuji Super CCD cameras, show the image tilted 45 " "degrees. For cameras with non-square pixels, do not " "stretch the image to its correct aspect ratio. In any " @@ -232,14 +232,14 @@ void DcrawSettingsWidget::setup(int advSettings) demosaicingLayout->addMultiCellWidget(d->dontStretchPixelsCheckBox, line, line, 0, 2); line++; - d->RAWQualityLabel = new QLabel(i18n("Quality:"), d->demosaicingSettings); + d->RAWQualityLabel = new TQLabel(i18n("Quality:"), d->demosaicingSettings); d->RAWQualityComboBox = new RComboBox(d->demosaicingSettings); d->RAWQualityComboBox->insertItem(i18n("Bilinear"), RawDecodingSettings::BILINEAR); d->RAWQualityComboBox->insertItem(i18n("VNG"), RawDecodingSettings::VNG); d->RAWQualityComboBox->insertItem(i18n("PPG"), RawDecodingSettings::PPG); d->RAWQualityComboBox->insertItem(i18n("AHD"), RawDecodingSettings::AHD); d->RAWQualityComboBox->setDefaultItem(RawDecodingSettings::BILINEAR); - QWhatsThis::add( d->RAWQualityComboBox, i18n("<p><b>Quality (interpolation)</b><p>" + TQWhatsThis::add( d->RAWQualityComboBox, i18n("<p><b>Quality (interpolation)</b><p>" "Select here the demosaicing RAW images decoding " "interpolation method. A demosaicing algorithm is a digital image process used to " "interpolate a complete image from the partial raw data received from the color-filtered " @@ -269,8 +269,8 @@ void DcrawSettingsWidget::setup(int advSettings) d->medianFilterPassesSpinBox = new RIntNumInput(d->demosaicingSettings); d->medianFilterPassesSpinBox->setRange(0, 10, 1); d->medianFilterPassesSpinBox->setDefaultValue(0); - d->medianFilterPassesLabel = new QLabel(i18n("Filter:"), d->demosaicingSettings); - QWhatsThis::add(d->medianFilterPassesSpinBox, i18n("<p><b>Median Filter</b><p>" + d->medianFilterPassesLabel = new TQLabel(i18n("Filter:"), d->demosaicingSettings); + TQWhatsThis::add(d->medianFilterPassesSpinBox, i18n("<p><b>Median Filter</b><p>" "Set here the passes used by median filter applied after " "interpolation to Red-Green and Blue-Green channels.")); demosaicingLayout->addMultiCellWidget(d->medianFilterPassesLabel, line, line, 0, 0); @@ -284,17 +284,17 @@ void DcrawSettingsWidget::setup(int advSettings) // --------------------------------------------------------------- // WHITE BALANCE Settings Panel - d->whiteBalanceSettings = new QWidget(this); - QGridLayout* whiteBalanceLayout = new QGridLayout(d->whiteBalanceSettings, 7, 2); + d->whiteBalanceSettings = new TQWidget(this); + TQGridLayout* whiteBalanceLayout = new TQGridLayout(d->whiteBalanceSettings, 7, 2); - d->whiteBalanceLabel = new QLabel(i18n("Method:"), d->whiteBalanceSettings); + d->whiteBalanceLabel = new TQLabel(i18n("Method:"), d->whiteBalanceSettings); d->whiteBalanceComboBox = new RComboBox(d->whiteBalanceSettings); d->whiteBalanceComboBox->insertItem(i18n("Default D65"), RawDecodingSettings::NONE); d->whiteBalanceComboBox->insertItem(i18n("Camera"), RawDecodingSettings::CAMERA); d->whiteBalanceComboBox->insertItem(i18n("Automatic"), RawDecodingSettings::AUTO); d->whiteBalanceComboBox->insertItem(i18n("Manual"), RawDecodingSettings::CUSTOM); d->whiteBalanceComboBox->setDefaultItem(RawDecodingSettings::CAMERA); - QWhatsThis::add(d->whiteBalanceComboBox, i18n("<p><b>White Balance Method</b><p>" + TQWhatsThis::add(d->whiteBalanceComboBox, i18n("<p><b>White Balance Method</b><p>" "Configure the raw white balance :<p>" "<b>Default D65</b>: Use a standard daylight D65 white balance (dcraw defaults)<p>" "<b>Camera</b>: Use the white balance specified by the camera. " @@ -306,26 +306,26 @@ void DcrawSettingsWidget::setup(int advSettings) d->customWhiteBalanceSpinBox = new RIntNumInput(d->whiteBalanceSettings); d->customWhiteBalanceSpinBox->setRange(2000, 12000, 10); d->customWhiteBalanceSpinBox->setDefaultValue(6500); - d->customWhiteBalanceLabel = new QLabel(i18n("T(K):"), d->whiteBalanceSettings); - QWhatsThis::add( d->customWhiteBalanceSpinBox, i18n("<p><b>Temperature</b><p>" + d->customWhiteBalanceLabel = new TQLabel(i18n("T(K):"), d->whiteBalanceSettings); + TQWhatsThis::add( d->customWhiteBalanceSpinBox, i18n("<p><b>Temperature</b><p>" "Set here the color temperature in Kelvin.")); d->customWhiteBalanceGreenSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); d->customWhiteBalanceGreenSpinBox->setPrecision(2); d->customWhiteBalanceGreenSpinBox->setRange(0.2, 2.5, 0.01); d->customWhiteBalanceGreenSpinBox->setDefaultValue(1.0); - d->customWhiteBalanceGreenLabel = new QLabel(i18n("Green:"), d->whiteBalanceSettings); - QWhatsThis::add( d->customWhiteBalanceGreenSpinBox, i18n("<p>Set here the green component to set magenta color " + d->customWhiteBalanceGreenLabel = new TQLabel(i18n("Green:"), d->whiteBalanceSettings); + TQWhatsThis::add( d->customWhiteBalanceGreenSpinBox, i18n("<p>Set here the green component to set magenta color " "cast removal level.")); - d->unclipColorLabel = new QLabel(i18n("Highlights:"), d->whiteBalanceSettings); + d->unclipColorLabel = new TQLabel(i18n("Highlights:"), d->whiteBalanceSettings); d->unclipColorComboBox = new RComboBox(d->whiteBalanceSettings); d->unclipColorComboBox->insertItem(i18n("Solid white"), 0); d->unclipColorComboBox->insertItem(i18n("Unclip"), 1); d->unclipColorComboBox->insertItem(i18n("Blend"), 2); d->unclipColorComboBox->insertItem(i18n("Rebuild"), 3); d->unclipColorComboBox->setDefaultItem(0); - QWhatsThis::add( d->unclipColorComboBox, i18n("<p><b>Highlights</b><p>" + TQWhatsThis::add( d->unclipColorComboBox, i18n("<p><b>Highlights</b><p>" "Select here the highlight clipping method:<p>" "<b>Solid white</b>: clip all highlights to solid white<p>" "<b>Unclip</b>: leave highlights unclipped in various " @@ -334,20 +334,20 @@ void DcrawSettingsWidget::setup(int advSettings) "<b>Rebuild</b>: reconstruct highlights using a " "level value")); - d->reconstructLabel = new QLabel(i18n("Level:"), d->whiteBalanceSettings); + d->reconstructLabel = new TQLabel(i18n("Level:"), d->whiteBalanceSettings); d->reconstructSpinBox = new RIntNumInput(d->whiteBalanceSettings); d->reconstructSpinBox->setRange(0, 6, 1); d->reconstructSpinBox->setDefaultValue(0); - QWhatsThis::add(d->reconstructSpinBox, i18n("<p><b>Level</b><p>" + TQWhatsThis::add(d->reconstructSpinBox, i18n("<p><b>Level</b><p>" "Specify the reconstruct highlight level. " "Low values favor whites and high values favor colors.")); - d->brightnessLabel = new QLabel(i18n("Brightness:"), d->whiteBalanceSettings); + d->brightnessLabel = new TQLabel(i18n("Brightness:"), d->whiteBalanceSettings); d->brightnessSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); d->brightnessSpinBox->setPrecision(2); d->brightnessSpinBox->setRange(0.0, 10.0, 0.01); d->brightnessSpinBox->setDefaultValue(1.0); - QWhatsThis::add(d->brightnessSpinBox, i18n("<p><b>Brighness</b><p>" + TQWhatsThis::add(d->brightnessSpinBox, i18n("<p><b>Brighness</b><p>" "Specify the brightness level of output image." "The default value is 1.0 (works in 8-bit mode only).<p>")); @@ -357,26 +357,26 @@ void DcrawSettingsWidget::setup(int advSettings) d->brightnessSpinBox->hide(); } - d->blackPointCheckBox = new QCheckBox(i18n("Black:"), d->whiteBalanceSettings); - QWhatsThis::add( d->blackPointCheckBox, i18n("<p><b>Black point</b><p>" + d->blackPointCheckBox = new TQCheckBox(i18n("Black:"), d->whiteBalanceSettings); + TQWhatsThis::add( d->blackPointCheckBox, i18n("<p><b>Black point</b><p>" "Use a specific black point value to decode RAW pictures. " "If you set this option to off, the Black Point value will be " "automatically computed.<p>")); d->blackPointSpinBox = new RIntNumInput(d->whiteBalanceSettings); d->blackPointSpinBox->setRange(0, 1000, 1); d->blackPointSpinBox->setDefaultValue(0); - QWhatsThis::add(d->blackPointSpinBox, i18n("<p><b>Black point value</b><p>" + TQWhatsThis::add(d->blackPointSpinBox, i18n("<p><b>Black point value</b><p>" "Specify specific black point value of the output image.<p>")); - d->whitePointCheckBox = new QCheckBox(i18n("White:"), d->whiteBalanceSettings); - QWhatsThis::add( d->whitePointCheckBox, i18n("<p><b>White point</b><p>" + d->whitePointCheckBox = new TQCheckBox(i18n("White:"), d->whiteBalanceSettings); + TQWhatsThis::add( d->whitePointCheckBox, i18n("<p><b>White point</b><p>" "Use a specific white point value to decode RAW pictures. " "If you set this option to off, the White Point value will be " "automatically computed.<p>")); d->whitePointSpinBox = new RIntNumInput(d->whiteBalanceSettings); d->whitePointSpinBox->setRange(0, 20000, 1); d->whitePointSpinBox->setDefaultValue(0); - QWhatsThis::add(d->whitePointSpinBox, i18n("<p><b>White point value</b><p>" + TQWhatsThis::add(d->whitePointSpinBox, i18n("<p><b>White point value</b><p>" "Specify specific white point value of the output image.<p>")); if (! (advSettings & BLACKWHITEPOINTS)) @@ -411,39 +411,39 @@ void DcrawSettingsWidget::setup(int advSettings) // --------------------------------------------------------------- // CORRECTIONS Settings panel - d->correctionsSettings = new QWidget(this); - QGridLayout* correctionsLayout = new QGridLayout(d->correctionsSettings, 5, 2); + d->correctionsSettings = new TQWidget(this); + TQGridLayout* correctionsLayout = new TQGridLayout(d->correctionsSettings, 5, 2); - d->enableNoiseReduction = new QCheckBox(i18n("Enable noise reduction"), d->correctionsSettings); - QWhatsThis::add( d->enableNoiseReduction, i18n("<p><b>Enable Noise Reduction</b><p>" + d->enableNoiseReduction = new TQCheckBox(i18n("Enable noise reduction"), d->correctionsSettings); + TQWhatsThis::add( d->enableNoiseReduction, i18n("<p><b>Enable Noise Reduction</b><p>" "Use wavelets to erase noise while preserving real detail.<p>")); d->NRThresholdSpinBox = new RIntNumInput(d->correctionsSettings); d->NRThresholdSpinBox->setRange(10, 1000, 1); d->NRThresholdSpinBox->setDefaultValue(100); - d->NRThresholdLabel = new QLabel(i18n("Threshold:"), d->correctionsSettings); - QWhatsThis::add( d->NRThresholdSpinBox, i18n("<p><b>Threshold</b><p>" + d->NRThresholdLabel = new TQLabel(i18n("Threshold:"), d->correctionsSettings); + TQWhatsThis::add( d->NRThresholdSpinBox, i18n("<p><b>Threshold</b><p>" "Set here the noise reduction threshold value to use.")); - d->enableCACorrection = new QCheckBox(i18n("Enable Chromatic Aberration correction"), d->correctionsSettings); - QWhatsThis::add( d->enableCACorrection, i18n("<p><b>Enable Chromatic Aberration correction</b><p>" + d->enableCACorrection = new TQCheckBox(i18n("Enable Chromatic Aberration correction"), d->correctionsSettings); + TQWhatsThis::add( d->enableCACorrection, i18n("<p><b>Enable Chromatic Aberration correction</b><p>" "Enlarge the raw red and blue layers by the given factors, " "typically 0.999 to 1.001, to correct chromatic aberration.<p>")); - d->caRedMultLabel = new QLabel(i18n("Red:"), d->correctionsSettings); + d->caRedMultLabel = new TQLabel(i18n("Red:"), d->correctionsSettings); d->caRedMultSpinBox = new RDoubleNumInput(d->correctionsSettings); d->caRedMultSpinBox->setPrecision(5); d->caRedMultSpinBox->setRange(0.00001, 2.0, 0.001); d->caRedMultSpinBox->setDefaultValue(1.0); - QWhatsThis::add( d->caRedMultSpinBox, i18n("<p><b>Red multiplier</b><p>" + TQWhatsThis::add( d->caRedMultSpinBox, i18n("<p><b>Red multiplier</b><p>" "Set here the magnification factor of the red layer")); - d->caBlueMultLabel = new QLabel(i18n("Blue:"), d->correctionsSettings); + d->caBlueMultLabel = new TQLabel(i18n("Blue:"), d->correctionsSettings); d->caBlueMultSpinBox = new RDoubleNumInput(d->correctionsSettings); d->caBlueMultSpinBox->setPrecision(5); d->caBlueMultSpinBox->setRange(0.00001, 2.0, 0.001); d->caBlueMultSpinBox->setDefaultValue(1.0); - QWhatsThis::add( d->caBlueMultSpinBox, i18n("<p><b>Blue multiplier</b><p>" + TQWhatsThis::add( d->caBlueMultSpinBox, i18n("<p><b>Blue multiplier</b><p>" "Set here the magnification factor of the blue layer")); correctionsLayout->addMultiCellWidget(d->enableNoiseReduction, 0, 0, 0, 2); @@ -463,16 +463,16 @@ void DcrawSettingsWidget::setup(int advSettings) // --------------------------------------------------------------- // COLOR MANAGEMENT Settings panel - d->colormanSettings = new QWidget(this); - QGridLayout* colormanLayout = new QGridLayout(d->colormanSettings, 4, 2); + d->colormanSettings = new TQWidget(this); + TQGridLayout* colormanLayout = new TQGridLayout(d->colormanSettings, 4, 2); - d->inputColorSpaceLabel = new QLabel(i18n("Camera Profile:"), d->colormanSettings); + d->inputColorSpaceLabel = new TQLabel(i18n("Camera Profile:"), d->colormanSettings); d->inputColorSpaceComboBox = new RComboBox(d->colormanSettings); d->inputColorSpaceComboBox->insertItem(i18n("None"), RawDecodingSettings::NOINPUTCS); d->inputColorSpaceComboBox->insertItem(i18n("Embedded"), RawDecodingSettings::EMBEDDED); d->inputColorSpaceComboBox->insertItem(i18n("Custom"), RawDecodingSettings::CUSTOMINPUTCS); d->inputColorSpaceComboBox->setDefaultItem(RawDecodingSettings::NOINPUTCS); - QWhatsThis::add(d->inputColorSpaceComboBox, i18n("<p><b>Camera Profile</b><p>" + TQWhatsThis::add(d->inputColorSpaceComboBox, i18n("<p><b>Camera Profile</b><p>" "Select here the input color space used to decode RAW data.<p>" "<b>None</b>: no input color profile is used during RAW decoding.<p>" "<b>Embedded</b>: use embedded color profile from RAW file if exist.<p>" @@ -482,7 +482,7 @@ void DcrawSettingsWidget::setup(int advSettings) d->inIccUrlEdit->setMode(KFile::LocalOnly | KFile::File | KFile::ExistingOnly); d->inIccUrlEdit->setFilter("*.icc *.icm|"+i18n("ICC Files (*.icc; *.icm)")); - d->outputColorSpaceLabel = new QLabel(i18n("Workspace:"), d->colormanSettings); + d->outputColorSpaceLabel = new TQLabel(i18n("Workspace:"), d->colormanSettings); d->outputColorSpaceComboBox = new RComboBox(d->colormanSettings); d->outputColorSpaceComboBox->insertItem(i18n("Raw (linear)"), RawDecodingSettings::RAWCOLOR); d->outputColorSpaceComboBox->insertItem(i18n("sRGB"), RawDecodingSettings::SRGB); @@ -491,7 +491,7 @@ void DcrawSettingsWidget::setup(int advSettings) d->outputColorSpaceComboBox->insertItem(i18n("Pro-Photo"), RawDecodingSettings::PROPHOTO); d->outputColorSpaceComboBox->insertItem(i18n("Custom"), RawDecodingSettings::CUSTOMOUTPUTCS); d->outputColorSpaceComboBox->setDefaultItem(RawDecodingSettings::SRGB); - QWhatsThis::add(d->outputColorSpaceComboBox, i18n("<p><b>Workspace</b><p>" + TQWhatsThis::add(d->outputColorSpaceComboBox, i18n("<p><b>Workspace</b><p>" "Select here the output color space used to decode RAW data.<p>" "<b>Raw (linear)</b>: in this mode, no output color space is used " "during RAW decoding.<p>" @@ -538,109 +538,109 @@ void DcrawSettingsWidget::setup(int advSettings) // --------------------------------------------------------------- - connect(d->unclipColorComboBox, SIGNAL(activated(int)), - this, SLOT(slotUnclipColorActivated(int))); + connect(d->unclipColorComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotUnclipColorActivated(int))); - connect(d->whiteBalanceComboBox, SIGNAL(activated(int)), - this, SLOT(slotWhiteBalanceToggled(int))); + connect(d->whiteBalanceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotWhiteBalanceToggled(int))); - connect(d->enableNoiseReduction, SIGNAL(toggled(bool)), - this, SLOT(slotNoiseReductionToggled(bool))); + connect(d->enableNoiseReduction, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotNoiseReductionToggled(bool))); - connect(d->enableCACorrection, SIGNAL(toggled(bool)), - this, SLOT(slotCACorrectionToggled(bool))); + connect(d->enableCACorrection, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotCACorrectionToggled(bool))); - connect(d->blackPointCheckBox, SIGNAL(toggled(bool)), - d->blackPointSpinBox, SLOT(setEnabled(bool))); + connect(d->blackPointCheckBox, TQT_SIGNAL(toggled(bool)), + d->blackPointSpinBox, TQT_SLOT(setEnabled(bool))); - connect(d->whitePointCheckBox, SIGNAL(toggled(bool)), - d->whitePointSpinBox, SLOT(setEnabled(bool))); + connect(d->whitePointCheckBox, TQT_SIGNAL(toggled(bool)), + d->whitePointSpinBox, TQT_SLOT(setEnabled(bool))); - connect(d->sixteenBitsImage, SIGNAL(toggled(bool)), - this, SLOT(slotsixteenBitsImageToggled(bool))); + connect(d->sixteenBitsImage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotsixteenBitsImageToggled(bool))); - connect(dcrawVersion, SIGNAL(leftClickedURL(const QString&)), - this, SLOT(processDcrawURL(const QString&))); + connect(dcrawVersion, TQT_SIGNAL(leftClickedURL(const TQString&)), + this, TQT_SLOT(processDcrawURL(const TQString&))); - connect(d->inputColorSpaceComboBox, SIGNAL(activated(int)), - this, SLOT(slotInputColorSpaceChanged(int))); + connect(d->inputColorSpaceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotInputColorSpaceChanged(int))); - connect(d->outputColorSpaceComboBox, SIGNAL(activated(int)), - this, SLOT(slotOutputColorSpaceChanged(int))); + connect(d->outputColorSpaceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotOutputColorSpaceChanged(int))); // Wrapper to emit signal when something is changed in settings. - connect(d->inIccUrlEdit, SIGNAL(urlSelected(const QString&)), - this, SIGNAL(signalSettingsChanged())); + connect(d->inIccUrlEdit, TQT_SIGNAL(urlSelected(const TQString&)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->outIccUrlEdit, SIGNAL(urlSelected(const QString&)), - this, SIGNAL(signalSettingsChanged())); + connect(d->outIccUrlEdit, TQT_SIGNAL(urlSelected(const TQString&)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->whiteBalanceComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->whiteBalanceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->RAWQualityComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->RAWQualityComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->unclipColorComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->unclipColorComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->inputColorSpaceComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->inputColorSpaceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->outputColorSpaceComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->outputColorSpaceComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->blackPointCheckBox, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->blackPointCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->whitePointCheckBox, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->whitePointCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->sixteenBitsImage, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->sixteenBitsImage, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->fourColorCheckBox, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->fourColorCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->dontStretchPixelsCheckBox, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->dontStretchPixelsCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->enableNoiseReduction, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->enableNoiseReduction, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->enableCACorrection, SIGNAL(toggled(bool)), - this, SIGNAL(signalSettingsChanged())); + connect(d->enableCACorrection, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->customWhiteBalanceSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->customWhiteBalanceSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->reconstructSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->reconstructSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->blackPointSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->blackPointSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->whitePointSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->whitePointSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->NRThresholdSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->NRThresholdSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->medianFilterPassesSpinBox, SIGNAL(valueChanged(int)), - this, SIGNAL(signalSettingsChanged())); + connect(d->medianFilterPassesSpinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->customWhiteBalanceGreenSpinBox, SIGNAL(valueChanged(double)), - this, SIGNAL(signalSettingsChanged())); + connect(d->customWhiteBalanceGreenSpinBox, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->caRedMultSpinBox, SIGNAL(valueChanged(double)), - this, SIGNAL(signalSettingsChanged())); + connect(d->caRedMultSpinBox, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->caBlueMultSpinBox, SIGNAL(valueChanged(double)), - this, SIGNAL(signalSettingsChanged())); + connect(d->caBlueMultSpinBox, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalSettingsChanged())); - connect(d->brightnessSpinBox, SIGNAL(valueChanged(double)), - this, SIGNAL(signalSettingsChanged())); + connect(d->brightnessSpinBox, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalSettingsChanged())); } DcrawSettingsWidget::~DcrawSettingsWidget() @@ -658,7 +658,7 @@ void DcrawSettingsWidget::updateMinimumWidth() setMinimumWidth(width); } -void DcrawSettingsWidget::processDcrawURL(const QString& url) +void DcrawSettingsWidget::processDcrawURL(const TQString& url) { KApplication::kApplication()->invokeBrowser(url); } @@ -1120,24 +1120,24 @@ void DcrawSettingsWidget::setcaBlueMultiplier(double b) // --------------------------------------------------------------- -QString DcrawSettingsWidget::inputColorProfile() +TQString DcrawSettingsWidget::inputColorProfile() { return d->inIccUrlEdit->url(); } -void DcrawSettingsWidget::setInputColorProfile(const QString& path) +void DcrawSettingsWidget::setInputColorProfile(const TQString& path) { d->inIccUrlEdit->setURL(path); } // --------------------------------------------------------------- -QString DcrawSettingsWidget::outputColorProfile() +TQString DcrawSettingsWidget::outputColorProfile() { return d->outIccUrlEdit->url(); } -void DcrawSettingsWidget::setOutputColorProfile(const QString& path) +void DcrawSettingsWidget::setOutputColorProfile(const TQString& path) { d->outIccUrlEdit->setURL(path); } diff --git a/libkdcraw/libkdcraw/dcrawsettingswidget.h b/libkdcraw/libkdcraw/dcrawsettingswidget.h index a769c5f..76d84be 100644 --- a/libkdcraw/libkdcraw/dcrawsettingswidget.h +++ b/libkdcraw/libkdcraw/dcrawsettingswidget.h @@ -25,10 +25,10 @@ #ifndef DCRAW_SETTINGS_WIDGET_H #define DCRAW_SETTINGS_WIDGET_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qtoolbox.h> +#include <tqstring.h> +#include <tqtoolbox.h> // KDE includes. @@ -44,9 +44,10 @@ namespace KDcrawIface class DcrawSettingsWidgetPriv; -class LIBKDCRAW_EXPORT DcrawSettingsWidget : public QToolBox +class LIBKDCRAW_EXPORT DcrawSettingsWidget : public TQToolBox { Q_OBJECT + TQ_OBJECT public: @@ -71,8 +72,8 @@ public: /** * @param advSettings the default value is COLORSPACE */ - DcrawSettingsWidget(QWidget *parent, int advSettings); - DcrawSettingsWidget(QWidget *parent, + DcrawSettingsWidget(TQWidget *tqparent, int advSettings); + DcrawSettingsWidget(TQWidget *tqparent, bool sixteenBitsOption=false, bool outputColorSpaceOption=true, bool postProcessingOptions=false); @@ -103,8 +104,8 @@ public: RawDecodingSettings::InputColorSpace inputColorSpace(); RawDecodingSettings::OutputColorSpace outputColorSpace(); - QString inputColorProfile(); - QString outputColorProfile(); + TQString inputColorProfile(); + TQString outputColorProfile(); void setSixteenBits(bool b); void setCameraWB(bool b); @@ -128,8 +129,8 @@ public: void setQuality(RawDecodingSettings::DecodingQuality q); void setInputColorSpace(RawDecodingSettings::InputColorSpace c); void setOutputColorSpace(RawDecodingSettings::OutputColorSpace c); - void setInputColorProfile(const QString& path); - void setOutputColorProfile(const QString& path); + void setInputColorProfile(const TQString& path); + void setOutputColorProfile(const TQString& path); void setDefaultSettings(); @@ -153,7 +154,7 @@ private slots: void slotUnclipColorActivated(int); void slotNoiseReductionToggled(bool); void slotCACorrectionToggled(bool); - void processDcrawURL(const QString&); + void processDcrawURL(const TQString&); void slotInputColorSpaceChanged(int); void slotOutputColorSpaceChanged(int); diff --git a/libkdcraw/libkdcraw/kdcraw.cpp b/libkdcraw/libkdcraw/kdcraw.cpp index f8dd2da..dd97f2b 100644 --- a/libkdcraw/libkdcraw/kdcraw.cpp +++ b/libkdcraw/libkdcraw/kdcraw.cpp @@ -26,11 +26,11 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qfile.h> -#include <qfileinfo.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> // LibRaw includes. @@ -59,9 +59,9 @@ KDcraw::~KDcraw() delete d; } -QString KDcraw::version() +TQString KDcraw::version() { - return QString(kdcraw_version); + return TQString(kdcraw_version); } void KDcraw::cancel() @@ -69,7 +69,7 @@ void KDcraw::cancel() m_cancel = true; } -bool KDcraw::loadDcrawPreview(QImage& image, const QString& path) +bool KDcraw::loadDcrawPreview(TQImage& image, const TQString& path) { // In first, try to extrcat the embedded JPEG preview. Very fast. bool ret = loadEmbeddedPreview(image, path); @@ -79,9 +79,9 @@ bool KDcraw::loadDcrawPreview(QImage& image, const QString& path) return (loadHalfPreview(image, path)); } -bool KDcraw::loadEmbeddedPreview(QImage& image, const QString& path) +bool KDcraw::loadEmbeddedPreview(TQImage& image, const TQString& path) { - QByteArray imgData; + TQByteArray imgData; if ( loadEmbeddedPreview(imgData, path) ) { @@ -98,18 +98,18 @@ bool KDcraw::loadEmbeddedPreview(QImage& image, const QString& path) return false; } -bool KDcraw::loadEmbeddedPreview(QByteArray& imgData, const QString& path) +bool KDcraw::loadEmbeddedPreview(TQByteArray& imgData, const TQString& path) { - QFileInfo fileInfo(path); - QString rawFilesExt(rawFiles()); - QString ext = fileInfo.extension(false).upper(); + TQFileInfo fileInfo(path); + TQString rawFilesExt(rawFiles()); + TQString ext = fileInfo.extension(false).upper(); - if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().contains(ext)) + if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().tqcontains(ext)) return false; LibRaw raw; - int ret = raw.open_file((const char*)(QFile::encodeName(path))); + int ret = raw.open_file((const char*)(TQFile::encodeName(path))); if (ret != LIBRAW_SUCCESS) { qDebug("LibRaw: failed to run open_file: %s", libraw_strerror(ret)); @@ -156,13 +156,13 @@ bool KDcraw::loadEmbeddedPreview(QByteArray& imgData, const QString& path) return true; } -bool KDcraw::loadHalfPreview(QImage& image, const QString& path) +bool KDcraw::loadHalfPreview(TQImage& image, const TQString& path) { - QFileInfo fileInfo(path); - QString rawFilesExt(rawFiles()); - QString ext = fileInfo.extension(false).upper(); + TQFileInfo fileInfo(path); + TQString rawFilesExt(rawFiles()); + TQString ext = fileInfo.extension(false).upper(); - if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().contains(ext)) + if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().tqcontains(ext)) return false; qDebug("Try to use reduced RAW picture extraction"); @@ -175,7 +175,7 @@ bool KDcraw::loadHalfPreview(QImage& image, const QString& path) // NOTE: new magic option introduced by LibRaw 0.7.0 to to make better noise filtration. raw.imgdata.params.filtering_mode = LIBRAW_FILTERING_AUTOMATIC; - int ret = raw.open_file((const char*)(QFile::encodeName(path))); + int ret = raw.open_file((const char*)(TQFile::encodeName(path))); if (ret != LIBRAW_SUCCESS) { qDebug("LibRaw: failed to run open_file: %s", libraw_strerror(ret)); @@ -207,7 +207,7 @@ bool KDcraw::loadHalfPreview(QImage& image, const QString& path) return false; } - QByteArray imgData; + TQByteArray imgData; KDcrawPriv::createPPMHeader(imgData, halfImg); free(halfImg); raw.recycle(); @@ -222,19 +222,19 @@ bool KDcraw::loadHalfPreview(QImage& image, const QString& path) return true; } -bool KDcraw::rawFileIdentify(DcrawInfoContainer& identify, const QString& path) +bool KDcraw::rawFileIdentify(DcrawInfoContainer& identify, const TQString& path) { - QFileInfo fileInfo(path); - QString rawFilesExt(rawFiles()); - QString ext = fileInfo.extension(false).upper(); + TQFileInfo fileInfo(path); + TQString rawFilesExt(rawFiles()); + TQString ext = fileInfo.extension(false).upper(); identify.isDecodable = false; - if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().contains(ext)) + if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().tqcontains(ext)) return false; LibRaw raw; - int ret = raw.open_file((const char*)(QFile::encodeName(path))); + int ret = raw.open_file((const char*)(TQFile::encodeName(path))); if (ret != LIBRAW_SUCCESS) { qDebug("LibRaw: failed to run open_file: %s", libraw_strerror(ret)); @@ -257,14 +257,14 @@ bool KDcraw::rawFileIdentify(DcrawInfoContainer& identify, const QString& path) // ---------------------------------------------------------------------------------- -bool KDcraw::extractRAWData(const QString& filePath, QByteArray &rawData, DcrawInfoContainer& identify) +bool KDcraw::extractRAWData(const TQString& filePath, TQByteArray &rawData, DcrawInfoContainer& identify) { - QFileInfo fileInfo(filePath); - QString rawFilesExt(rawFiles()); - QString ext = fileInfo.extension(false).upper(); + TQFileInfo fileInfo(filePath); + TQString rawFilesExt(rawFiles()); + TQString ext = fileInfo.extension(false).upper(); identify.isDecodable = false; - if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().contains(ext)) + if (!fileInfo.exists() || ext.isEmpty() || !rawFilesExt.upper().tqcontains(ext)) return false; if (m_cancel) @@ -276,7 +276,7 @@ bool KDcraw::extractRAWData(const QString& filePath, QByteArray &rawData, DcrawI // Set progress call back function. raw.set_progress_handler(callbackForLibRaw, d); - int ret = raw.open_file((const char*)(QFile::encodeName(filePath))); + int ret = raw.open_file((const char*)(TQFile::encodeName(filePath))); if (ret != LIBRAW_SUCCESS) { qDebug("LibRaw: failed to run open_file: %s", libraw_strerror(ret)); @@ -318,7 +318,7 @@ bool KDcraw::extractRAWData(const QString& filePath, QByteArray &rawData, DcrawI } d->setProgress(0.7); - rawData = QByteArray(); + rawData = TQByteArray(); rawData.resize((int)(raw.imgdata.sizes.iwidth * raw.imgdata.sizes.iheight * sizeof(unsigned short))); unsigned short *output = (unsigned short *)rawData.data(); @@ -338,16 +338,16 @@ bool KDcraw::extractRAWData(const QString& filePath, QByteArray &rawData, DcrawI return true; } -bool KDcraw::decodeHalfRAWImage(const QString& filePath, const RawDecodingSettings& rawDecodingSettings, - QByteArray &imageData, int &width, int &height, int &rgbmax) +bool KDcraw::decodeHalfRAWImage(const TQString& filePath, const RawDecodingSettings& rawDecodingSettings, + TQByteArray &imageData, int &width, int &height, int &rgbmax) { m_rawDecodingSettings = rawDecodingSettings; m_rawDecodingSettings.halfSizeColorImage = true; return (loadFromDcraw(filePath, imageData, width, height, rgbmax)); } -bool KDcraw::decodeRAWImage(const QString& filePath, const RawDecodingSettings& rawDecodingSettings, - QByteArray &imageData, int &width, int &height, int &rgbmax) +bool KDcraw::decodeRAWImage(const TQString& filePath, const RawDecodingSettings& rawDecodingSettings, + TQByteArray &imageData, int &width, int &height, int &rgbmax) { m_rawDecodingSettings = rawDecodingSettings; return (loadFromDcraw(filePath, imageData, width, height, rgbmax)); @@ -371,20 +371,20 @@ void KDcraw::setReceivingDataProgress(double) { } -bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, +bool KDcraw::loadFromDcraw(const TQString& filePath, TQByteArray &imageData, int &width, int &height, int &rgbmax) { m_cancel = false; - QStringList args; // List of dcraw options to show as debug message on the console. + TQStringList args; // List of dcraw options to show as debug message on the console. LibRaw raw; // Set progress call back function. raw.set_progress_handler(callbackForLibRaw, d); - QByteArray deadpixelPath = QFile::encodeName(m_rawDecodingSettings.deadPixelMap); - QByteArray cameraProfile = QFile::encodeName(m_rawDecodingSettings.inputProfile); - QByteArray outputProfile = QFile::encodeName(m_rawDecodingSettings.outputProfile); + TQByteArray deadpixelPath = TQFile::encodeName(m_rawDecodingSettings.deadPixelMap); + TQByteArray cameraProfile = TQFile::encodeName(m_rawDecodingSettings.inputProfile); + TQByteArray outputProfile = TQFile::encodeName(m_rawDecodingSettings.outputProfile); // NOTE: new magic option introduced by LibRaw 0.7.0 to to make better noise/etc filtration. raw.imgdata.params.filtering_mode = LIBRAW_FILTERING_AUTOMATIC; @@ -424,35 +424,35 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, } // (-H) Unclip highlight color. - args.append(QString("-H %1").arg(m_rawDecodingSettings.unclipColors)); + args.append(TQString("-H %1").tqarg(m_rawDecodingSettings.unclipColors)); raw.imgdata.params.highlight = m_rawDecodingSettings.unclipColors; if (m_rawDecodingSettings.brightness != 1.0) { // (-b) Set Brightness value. - args.append(QString("-b %1").arg(m_rawDecodingSettings.brightness)); + args.append(TQString("-b %1").tqarg(m_rawDecodingSettings.brightness)); raw.imgdata.params.bright = m_rawDecodingSettings.brightness; } if (m_rawDecodingSettings.enableBlackPoint) { // (-k) Set Black Point value. - args.append(QString("-k %1").arg(m_rawDecodingSettings.blackPoint)); + args.append(TQString("-k %1").tqarg(m_rawDecodingSettings.blackPoint)); raw.imgdata.params.user_black = m_rawDecodingSettings.blackPoint; } if (m_rawDecodingSettings.enableWhitePoint) { // (-S) Set White Point value (saturation). - args.append(QString("-S %1").arg(m_rawDecodingSettings.whitePoint)); + args.append(TQString("-S %1").tqarg(m_rawDecodingSettings.whitePoint)); raw.imgdata.params.user_sat = m_rawDecodingSettings.whitePoint; } if (m_rawDecodingSettings.medianFilterPasses > 0) { // (-m) After interpolation, clean up color artifacts by repeatedly applying a 3x3 median filter to the R-G and B-G channels. - args.append(QString("-m %1").arg(m_rawDecodingSettings.medianFilterPasses)); + args.append(TQString("-m %1").tqarg(m_rawDecodingSettings.medianFilterPasses)); raw.imgdata.params.med_passes = m_rawDecodingSettings.medianFilterPasses; } @@ -460,7 +460,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, { // (-P) Read the dead pixel list from this file. raw.imgdata.params.bad_pixels = deadpixelPath.data(); - args.append(QString("-P %1").arg(raw.imgdata.params.bad_pixels)); + args.append(TQString("-P %1").tqarg(raw.imgdata.params.bad_pixels)); } switch (m_rawDecodingSettings.whiteBalance) @@ -556,10 +556,10 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, raw.imgdata.params.user_mul[1] = RGB[1]; raw.imgdata.params.user_mul[2] = RGB[2]; raw.imgdata.params.user_mul[3] = RGB[1]; - args.append(QString("-r %1 %2 %3 %4").arg(raw.imgdata.params.user_mul[0]) - .arg(raw.imgdata.params.user_mul[1]) - .arg(raw.imgdata.params.user_mul[2]) - .arg(raw.imgdata.params.user_mul[3])); + args.append(TQString("-r %1 %2 %3 %4").tqarg(raw.imgdata.params.user_mul[0]) + .tqarg(raw.imgdata.params.user_mul[1]) + .tqarg(raw.imgdata.params.user_mul[2]) + .tqarg(raw.imgdata.params.user_mul[3])); break; } case RawDecodingSettings::AERA: @@ -569,23 +569,23 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, raw.imgdata.params.greybox[1] = m_rawDecodingSettings.whiteBalanceArea.top(); raw.imgdata.params.greybox[2] = m_rawDecodingSettings.whiteBalanceArea.width(); raw.imgdata.params.greybox[3] = m_rawDecodingSettings.whiteBalanceArea.height(); - args.append(QString("-A %1 %2 %3 %4").arg(raw.imgdata.params.greybox[0]) - .arg(raw.imgdata.params.greybox[1]) - .arg(raw.imgdata.params.greybox[2]) - .arg(raw.imgdata.params.greybox[3])); + args.append(TQString("-A %1 %2 %3 %4").tqarg(raw.imgdata.params.greybox[0]) + .tqarg(raw.imgdata.params.greybox[1]) + .tqarg(raw.imgdata.params.greybox[2]) + .tqarg(raw.imgdata.params.greybox[3])); break; } } // (-q) Use an interpolation method. raw.imgdata.params.user_qual = m_rawDecodingSettings.RAWQuality; - args.append(QString("-q %1").arg(m_rawDecodingSettings.RAWQuality)); + args.append(TQString("-q %1").tqarg(m_rawDecodingSettings.RAWQuality)); if (m_rawDecodingSettings.enableNoiseReduction) { // (-n) Use wavelets to erase noise while preserving real detail. raw.imgdata.params.threshold = m_rawDecodingSettings.NRThreshold; - args.append(QString("-n %1").arg(raw.imgdata.params.threshold)); + args.append(TQString("-n %1").tqarg(raw.imgdata.params.threshold)); } if (m_rawDecodingSettings.enableCACorrection) @@ -593,8 +593,8 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, // (-C) Set Correct chromatic aberration correction. raw.imgdata.params.aber[0] = m_rawDecodingSettings.caMultiplier[0]; raw.imgdata.params.aber[2] = m_rawDecodingSettings.caMultiplier[1]; - args.append(QString("-C %1 %2").arg(raw.imgdata.params.aber[0]) - .arg(raw.imgdata.params.aber[2])); + args.append(TQString("-C %1 %2").tqarg(raw.imgdata.params.aber[0]) + .tqarg(raw.imgdata.params.aber[2])); } switch (m_rawDecodingSettings.inputColorSpace) @@ -603,7 +603,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, { // (-p embed) Use input profile from RAW file to define the camera's raw colorspace. raw.imgdata.params.camera_profile = (char*)"embed"; - args.append(QString("-p embed")); + args.append(TQString("-p embed")); break; } case RawDecodingSettings::CUSTOMINPUTCS: @@ -612,7 +612,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, { // (-p) Use input profile file to define the camera's raw colorspace. raw.imgdata.params.camera_profile = cameraProfile.data(); - args.append(QString("-p %1").arg(raw.imgdata.params.camera_profile)); + args.append(TQString("-p %1").tqarg(raw.imgdata.params.camera_profile)); } break; } @@ -628,7 +628,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, { // (-o) Use ICC profile file to define the output colorspace. raw.imgdata.params.output_profile = outputProfile.data(); - args.append(QString("-o %1").arg(raw.imgdata.params.output_profile)); + args.append(TQString("-o %1").tqarg(raw.imgdata.params.output_profile)); } break; } @@ -636,7 +636,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, { // (-o) Define the output colorspace. raw.imgdata.params.output_color = m_rawDecodingSettings.outputColorSpace; - args.append(QString("-o %1").arg(raw.imgdata.params.output_color)); + args.append(TQString("-o %1").tqarg(raw.imgdata.params.output_color)); break; } } @@ -646,7 +646,7 @@ bool KDcraw::loadFromDcraw(const QString& filePath, QByteArray &imageData, args.append(filePath); qDebug("LibRaw: dcraw emulation: %s", args.join(", ").ascii()); - int ret = raw.open_file((const char*)(QFile::encodeName(filePath))); + int ret = raw.open_file((const char*)(TQFile::encodeName(filePath))); if (ret != LIBRAW_SUCCESS) { qDebug("LibRaw: failed to run open_file: %s", libraw_strerror(ret)); @@ -730,15 +730,15 @@ const char *KDcraw::rawFiles() return raw_file_extentions; } -QStringList KDcraw::rawFilesList() +TQStringList KDcraw::rawFilesList() { - QString string = QString::fromLatin1(rawFiles()).remove("*."); - return QStringList::split(' ', string); + TQString string = TQString::tqfromLatin1(rawFiles()).remove("*."); + return TQStringList::split(' ', string); } -QStringList KDcraw::supportedCamera() +TQStringList KDcraw::supportedCamera() { - QStringList camera; + TQStringList camera; const char** list = LibRaw::cameraList(); for (int i = 0; i < LibRaw::cameraCount(); i++) camera.append(list[i]); @@ -746,9 +746,9 @@ QStringList KDcraw::supportedCamera() return camera; } -QString KDcraw::librawVersion() +TQString KDcraw::librawVersion() { - return QString(LIBRAW_VERSION_STR).remove("-Release"); + return TQString(LIBRAW_VERSION_STR).remove("-Release"); } } // namespace KDcrawIface diff --git a/libkdcraw/libkdcraw/kdcraw.h b/libkdcraw/libkdcraw/kdcraw.h index 3373fad..fa23009 100644 --- a/libkdcraw/libkdcraw/kdcraw.h +++ b/libkdcraw/libkdcraw/kdcraw.h @@ -25,11 +25,11 @@ #ifndef KDCRAW_H #define KDCRAW_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qobject.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqimage.h> // KDE includes. @@ -46,9 +46,10 @@ namespace KDcrawIface class KDcrawPriv; -class LIBKDCRAW_EXPORT KDcraw : public QObject +class LIBKDCRAW_EXPORT KDcraw : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -61,46 +62,46 @@ public: public: /** Return a string version of libkdcraw release */ - static QString version(); + static TQString version(); /** This is a non cancelable method witch do not require a class instance to run. It can loadEmbeddedPreview() in first and if it failed, call loadHalfPreview(). */ - static bool loadDcrawPreview(QImage& image, const QString& path); + static bool loadDcrawPreview(TQImage& image, const TQString& path); - /** Get the embedded JPEG preview image from RAW picture as a QByteArray witch will include Exif Data. + /** Get the embedded JPEG preview image from RAW picture as a TQByteArray witch will include Exif Data. This is a fast and non cancelable. This method do not require a class instance to run. */ - static bool loadEmbeddedPreview(QByteArray& imgData, const QString& path); + static bool loadEmbeddedPreview(TQByteArray& imgData, const TQString& path); - /** Get the embedded JPEG preview image from RAW picture has a QImage. This is a fast and non cancelable + /** Get the embedded JPEG preview image from RAW picture has a TQImage. This is a fast and non cancelable This method do not require a class instance to run. */ - static bool loadEmbeddedPreview(QImage& image, const QString& path); + static bool loadEmbeddedPreview(TQImage& image, const TQString& path); /** Get the half decode RAW picture. This is a more slower than loadEmbeddedPreview() method and non cancelable. This method do not require a class instance to run. */ - static bool loadHalfPreview(QImage& image, const QString& path); + static bool loadHalfPreview(TQImage& image, const TQString& path); /** Get the camera settings witch have taken RAW file. Look into dcrawinfocontainer.h for more details. This is a fast and non cancelable method witch do not require a class instance to run. */ - static bool rawFileIdentify(DcrawInfoContainer& identify, const QString& path); + static bool rawFileIdentify(DcrawInfoContainer& identify, const TQString& path); /** Return the string of all RAW file type mime supported. */ static const char *rawFiles(); /** Return the list of all RAW file type mime supported, - as a QStringList, without wildcard and suffix dot. */ - static QStringList rawFilesList(); + as a TQStringList, without wildcard and suffix dot. */ + static TQStringList rawFilesList(); /** Provide a list of supported RAW Camera name. */ - static QStringList supportedCamera(); + static TQStringList supportedCamera(); /** Return LibRaw version string. */ - static QString librawVersion(); + static TQString librawVersion(); public: @@ -114,7 +115,7 @@ public: - All info about Raw image into 'identify' container. - 'false' is returned if loadding failed, else 'true'. */ - bool extractRAWData(const QString& filePath, QByteArray &rawData, DcrawInfoContainer& identify); + bool extractRAWData(const TQString& filePath, TQByteArray &rawData, DcrawInfoContainer& identify); /** Extract a small size of decode RAW data from 'filePath' picture file using 'rawDecodingSettings' settings. This is a cancelable method which require @@ -130,8 +131,8 @@ public: - The max average of RGB components from decoded picture. - 'false' is returned if decoding failed, else 'true'. */ - bool decodeHalfRAWImage(const QString& filePath, const RawDecodingSettings& rawDecodingSettings, - QByteArray &imageData, int &width, int &height, int &rgbmax); + bool decodeHalfRAWImage(const TQString& filePath, const RawDecodingSettings& rawDecodingSettings, + TQByteArray &imageData, int &width, int &height, int &rgbmax); /** Extract a full size of RAW data from 'filePath' picture file using 'rawDecodingSettings' settings. This is a cancelable method which require @@ -147,8 +148,8 @@ public: - The max average of RGB components from decoded picture. - 'false' is returned if decoding failed, else 'true'. */ - bool decodeRAWImage(const QString& filePath, const RawDecodingSettings& rawDecodingSettings, - QByteArray &imageData, int &width, int &height, int &rgbmax); + bool decodeRAWImage(const TQString& filePath, const RawDecodingSettings& rawDecodingSettings, + TQByteArray &imageData, int &width, int &height, int &rgbmax); /** To cancel 'decodeHalfRAWImage' and 'decodeRAWImage' methods running in a separate thread. @@ -191,7 +192,7 @@ protected: private: - bool loadFromDcraw(const QString& filePath, QByteArray &imageData, + bool loadFromDcraw(const TQString& filePath, TQByteArray &imageData, int &width, int &height, int &rgbmax); private: diff --git a/libkdcraw/libkdcraw/kdcrawprivate.cpp b/libkdcraw/libkdcraw/kdcrawprivate.cpp index 3c98ed0..356ba6d 100644 --- a/libkdcraw/libkdcraw/kdcrawprivate.cpp +++ b/libkdcraw/libkdcraw/kdcrawprivate.cpp @@ -26,10 +26,10 @@ #include <netinet/in.h> -// Qt includes. +// TQt includes. -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> // Local includes. @@ -60,10 +60,10 @@ KDcrawPriv::~KDcrawPriv() { } -void KDcrawPriv::createPPMHeader(QByteArray& imgData, libraw_processed_image_t *img) +void KDcrawPriv::createPPMHeader(TQByteArray& imgData, libraw_processed_image_t *img) { - QCString tmp; - QCString header("P6\n"); + TQCString tmp; + TQCString header("P6\n"); header.append(tmp.setNum(img->width)); header.append(" "); header.append(tmp.setNum(img->height)); @@ -71,7 +71,7 @@ void KDcrawPriv::createPPMHeader(QByteArray& imgData, libraw_processed_image_t * header.append(tmp.setNum((1 << img->bits)-1)); header.append("\n"); - imgData = QByteArray(header.size()-1 + (int)img->data_size); + imgData = TQByteArray(header.size()-1 + (int)img->data_size); memcpy(imgData.data(), header.data(), header.size()-1); memcpy(imgData.data()+header.size()-1, (const char*)img->data, (int)img->data_size); } @@ -110,18 +110,18 @@ double KDcrawPriv::progressValue() void KDcrawPriv::fillIndentifyInfo(LibRaw *raw, DcrawInfoContainer& identify) { identify.dateTime.setTime_t(raw->imgdata.other.timestamp); - identify.make = QString(raw->imgdata.idata.make); - identify.model = QString(raw->imgdata.idata.model); - identify.owner = QString(raw->imgdata.other.artist); - identify.DNGVersion = QString::number(raw->imgdata.idata.dng_version); + identify.make = TQString(raw->imgdata.idata.make); + identify.model = TQString(raw->imgdata.idata.model); + identify.owner = TQString(raw->imgdata.other.artist); + identify.DNGVersion = TQString::number(raw->imgdata.idata.dng_version); identify.sensitivity = raw->imgdata.other.iso_speed; identify.exposureTime = raw->imgdata.other.shutter; identify.aperture = raw->imgdata.other.aperture; identify.focalLength = raw->imgdata.other.focal_len; - identify.imageSize = QSize(raw->imgdata.sizes.width, raw->imgdata.sizes.height); - identify.fullSize = QSize(raw->imgdata.sizes.raw_width, raw->imgdata.sizes.raw_height); - identify.outputSize = QSize(raw->imgdata.sizes.iwidth, raw->imgdata.sizes.iheight); - identify.thumbSize = QSize(raw->imgdata.thumbnail.twidth, raw->imgdata.thumbnail.theight); + identify.imageSize = TQSize(raw->imgdata.sizes.width, raw->imgdata.sizes.height); + identify.fullSize = TQSize(raw->imgdata.sizes.raw_width, raw->imgdata.sizes.raw_height); + identify.outputSize = TQSize(raw->imgdata.sizes.iwidth, raw->imgdata.sizes.iheight); + identify.thumbSize = TQSize(raw->imgdata.thumbnail.twidth, raw->imgdata.thumbnail.theight); identify.hasIccProfile = raw->imgdata.color.profile ? true : false; identify.isDecodable = true; identify.pixelAspectRatio = raw->imgdata.sizes.pixel_aspect; diff --git a/libkdcraw/libkdcraw/kdcrawprivate.h b/libkdcraw/libkdcraw/kdcrawprivate.h index cc3a5f8..1cb5df2 100644 --- a/libkdcraw/libkdcraw/kdcrawprivate.h +++ b/libkdcraw/libkdcraw/kdcrawprivate.h @@ -23,9 +23,9 @@ #ifndef KDCRAWPRIVATE_H #define KDCRAWPRIVATE_H -// Qt includes. +// TQt includes. -#include <qcstring.h> +#include <tqcstring.h> // LibRaw includes. @@ -55,7 +55,7 @@ public: public: - static void createPPMHeader(QByteArray& imgData, libraw_processed_image_t *img); + static void createPPMHeader(TQByteArray& imgData, libraw_processed_image_t *img); static void fillIndentifyInfo(LibRaw *raw, DcrawInfoContainer& identify); diff --git a/libkdcraw/libkdcraw/rawdecodingsettings.h b/libkdcraw/libkdcraw/rawdecodingsettings.h index a686d2a..9d84334 100644 --- a/libkdcraw/libkdcraw/rawdecodingsettings.h +++ b/libkdcraw/libkdcraw/rawdecodingsettings.h @@ -25,10 +25,10 @@ #ifndef RAW_DECODING_SETTINGS_H #define RAW_DECODING_SETTINGS_H -// Qt includes. +// TQt includes. -#include <qrect.h> -#include <qstring.h> +#include <tqrect.h> +#include <tqstring.h> // Local includes. @@ -146,12 +146,12 @@ public: caMultiplier[0] = 1.0; caMultiplier[1] = 1.0; - inputProfile = QString(); - outputProfile = QString(); + inputProfile = TQString(); + outputProfile = TQString(); - deadPixelMap = QString(); + deadPixelMap = TQString(); - whiteBalanceArea = QRect(); + whiteBalanceArea = TQRect(); }; /** Compare for equality */ @@ -221,12 +221,12 @@ public: caMultiplier[0] = 1.0; caMultiplier[1] = 1.0; - inputProfile = QString(); - outputProfile = QString(); + inputProfile = TQString(); + outputProfile = TQString(); - deadPixelMap = QString(); + deadPixelMap = TQString(); - whiteBalanceArea = QRect(); + whiteBalanceArea = TQRect(); }; public: @@ -330,7 +330,7 @@ public: /** Path to custom input ICC profile to define the camera's raw colorspace. */ - QString inputProfile; + TQString inputProfile; /** The output color profile used to decoded RAW data. See OutputColorProfile values for details. @@ -339,15 +339,15 @@ public: /** Path to custom output ICC profile to define the color workspace. */ - QString outputProfile; + TQString outputProfile; /** Path to text file including dead pixel list. */ - QString deadPixelMap; + TQString deadPixelMap; /** Rectangle used to calculate the white balance by averaging the region of image. */ - QRect whiteBalanceArea; + TQRect whiteBalanceArea; }; } // namespace KDcrawIface diff --git a/libkdcraw/libkdcraw/rcombobox.cpp b/libkdcraw/libkdcraw/rcombobox.cpp index 1cea819..ff3b7af 100644 --- a/libkdcraw/libkdcraw/rcombobox.cpp +++ b/libkdcraw/libkdcraw/rcombobox.cpp @@ -22,10 +22,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> // KDE includes. @@ -55,22 +55,22 @@ public: int defaultItem; - QToolButton *resetButton; + TQToolButton *resetButton; KComboBox *combo; }; -RComboBox::RComboBox(QWidget *parent) - : QHBox(parent) +RComboBox::RComboBox(TQWidget *tqparent) + : TQHBox(tqparent) { d = new RComboBoxPriv; d->combo = new KComboBox(this); - d->resetButton = new QToolButton(this); + d->resetButton = new TQToolButton(this); d->resetButton->setAutoRaise(true); - d->resetButton->setFocusPolicy(QWidget::NoFocus); + d->resetButton->setFocusPolicy(TQ_NoFocus); d->resetButton->setIconSet(SmallIconSet("reload_page")); - QToolTip::add(d->resetButton, i18n("Reset to default value")); + TQToolTip::add(d->resetButton, i18n("Reset to default value")); setStretchFactor(d->combo, 10); setMargin(0); @@ -78,11 +78,11 @@ RComboBox::RComboBox(QWidget *parent) // ------------------------------------------------------------- - connect(d->resetButton, SIGNAL(clicked()), - this, SLOT(slotReset())); + connect(d->resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotReset())); - connect(d->combo, SIGNAL(activated(int)), - this, SLOT(slotItemActivated(int))); + connect(d->combo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotItemActivated(int))); } RComboBox::~RComboBox() @@ -95,7 +95,7 @@ KComboBox* RComboBox::combo() const return d->combo; } -void RComboBox::insertItem(const QString& t, int index) +void RComboBox::insertItem(const TQString& t, int index) { d->combo->insertItem(t, index); } diff --git a/libkdcraw/libkdcraw/rcombobox.h b/libkdcraw/libkdcraw/rcombobox.h index f906339..f23885d 100644 --- a/libkdcraw/libkdcraw/rcombobox.h +++ b/libkdcraw/libkdcraw/rcombobox.h @@ -25,9 +25,9 @@ #ifndef RCOMBOBOX_H #define RCOMBOBOX_H -// Qt includes. +// TQt includes. -#include <qhbox.h> +#include <tqhbox.h> // KDE includes. @@ -42,14 +42,15 @@ namespace KDcrawIface class RComboBoxPriv; -class LIBKDCRAW_EXPORT RComboBox : public QHBox +class LIBKDCRAW_EXPORT RComboBox : public TQHBox { Q_OBJECT + TQ_OBJECT public: - RComboBox(QWidget *parent=0); + RComboBox(TQWidget *tqparent=0); ~RComboBox(); void setCurrentItem(int d); @@ -60,7 +61,7 @@ public: KComboBox* combo() const; - void insertItem(const QString& t, int index=-1); + void insertItem(const TQString& t, int index=-1); signals: diff --git a/libkdcraw/libkdcraw/rnuminput.cpp b/libkdcraw/libkdcraw/rnuminput.cpp index dec18f3..1123c4f 100644 --- a/libkdcraw/libkdcraw/rnuminput.cpp +++ b/libkdcraw/libkdcraw/rnuminput.cpp @@ -23,10 +23,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> // KDE includes. @@ -56,22 +56,22 @@ public: int defaultValue; - QToolButton *resetButton; + TQToolButton *resetButton; KIntNumInput *input; }; -RIntNumInput::RIntNumInput(QWidget *parent) - : QHBox(parent) +RIntNumInput::RIntNumInput(TQWidget *tqparent) + : TQHBox(tqparent) { d = new RIntNumInputPriv; d->input = new KIntNumInput(this); - d->resetButton = new QToolButton(this); + d->resetButton = new TQToolButton(this); d->resetButton->setAutoRaise(true); - d->resetButton->setFocusPolicy(QWidget::NoFocus); + d->resetButton->setFocusPolicy(TQ_NoFocus); d->resetButton->setIconSet(SmallIconSet("reload_page")); - QToolTip::add(d->resetButton, i18n("Reset to default value")); + TQToolTip::add(d->resetButton, i18n("Reset to default value")); setStretchFactor(d->input, 10); setMargin(0); @@ -79,11 +79,11 @@ RIntNumInput::RIntNumInput(QWidget *parent) // ------------------------------------------------------------- - connect(d->resetButton, SIGNAL(clicked()), - this, SLOT(slotReset())); + connect(d->resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotReset())); - connect(d->input, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); + connect(d->input, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); } RIntNumInput::~RIntNumInput() @@ -154,22 +154,22 @@ public: double defaultValue; - QToolButton *resetButton; + TQToolButton *resetButton; KDoubleNumInput *input; }; -RDoubleNumInput::RDoubleNumInput(QWidget *parent) - : QHBox(parent) +RDoubleNumInput::RDoubleNumInput(TQWidget *tqparent) + : TQHBox(tqparent) { d = new RDoubleNumInputPriv; d->input = new KDoubleNumInput(this); - d->resetButton = new QToolButton(this); + d->resetButton = new TQToolButton(this); d->resetButton->setAutoRaise(true); - d->resetButton->setFocusPolicy(QWidget::NoFocus); + d->resetButton->setFocusPolicy(TQ_NoFocus); d->resetButton->setIconSet(SmallIconSet("reload_page")); - QToolTip::add(d->resetButton, i18n("Reset to default value")); + TQToolTip::add(d->resetButton, i18n("Reset to default value")); setStretchFactor(d->input, 10); setMargin(0); @@ -177,11 +177,11 @@ RDoubleNumInput::RDoubleNumInput(QWidget *parent) // ------------------------------------------------------------- - connect(d->resetButton, SIGNAL(clicked()), - this, SLOT(slotReset())); + connect(d->resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotReset())); - connect(d->input, SIGNAL(valueChanged(double)), - this, SLOT(slotValueChanged(double))); + connect(d->input, TQT_SIGNAL(valueChanged(double)), + this, TQT_SLOT(slotValueChanged(double))); } RDoubleNumInput::~RDoubleNumInput() diff --git a/libkdcraw/libkdcraw/rnuminput.h b/libkdcraw/libkdcraw/rnuminput.h index fb7877a..14bc03a 100644 --- a/libkdcraw/libkdcraw/rnuminput.h +++ b/libkdcraw/libkdcraw/rnuminput.h @@ -26,9 +26,9 @@ #ifndef RNUMINPUT_H #define RNUMINPUT_H -// Qt includes. +// TQt includes. -#include <qhbox.h> +#include <tqhbox.h> // KDE includes. @@ -43,14 +43,15 @@ namespace KDcrawIface class RIntNumInputPriv; -class LIBKDCRAW_EXPORT RIntNumInput : public QHBox +class LIBKDCRAW_EXPORT RIntNumInput : public TQHBox { Q_OBJECT + TQ_OBJECT public: - RIntNumInput(QWidget *parent=0); + RIntNumInput(TQWidget *tqparent=0); ~RIntNumInput(); int value(); @@ -85,14 +86,15 @@ private: class RDoubleNumInputPriv; -class LIBKDCRAW_EXPORT RDoubleNumInput : public QHBox +class LIBKDCRAW_EXPORT RDoubleNumInput : public TQHBox { Q_OBJECT + TQ_OBJECT public: - RDoubleNumInput(QWidget *parent=0); + RDoubleNumInput(TQWidget *tqparent=0); ~RDoubleNumInput(); double value(); diff --git a/libkdcraw/libraw/internal/dcraw_common.cpp b/libkdcraw/libraw/internal/dcraw_common.cpp index 2a79d50..93d7a37 100644 --- a/libkdcraw/libraw/internal/dcraw_common.cpp +++ b/libkdcraw/libraw/internal/dcraw_common.cpp @@ -273,7 +273,7 @@ void CLASS canon_600_load_raw() { black += pixel[col]; #ifdef LIBRAW_LIBRARY_BUILD - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = pixel[col]; #endif } @@ -346,7 +346,7 @@ void CLASS canon_a5_load_raw() buf = (vbits += 16, (buf << 16) + *dp++); pixel = buf >> vbits & 0x3ff; #ifdef LIBRAW_LIBRARY_BUILD - ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin); + ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin); if(dfp) *dfp = pixel; #endif if ((unsigned) row < height && (unsigned) col < width) @@ -619,7 +619,7 @@ void CLASS canon_compressed_load_raw() #endif for (col=0; col < raw_width; col++) { #ifdef LIBRAW_LIBRARY_BUILD - ushort *dfp = get_masked_pointer(row+r,col); + ushort *dfp = get_tqmasked_pointer(row+r,col); if(dfp) *dfp = pixel[r*raw_width+col]; if (irow >= height) continue; // skip for top/bottom rows #endif @@ -771,7 +771,7 @@ void CLASS lossless_jpeg_load_raw() if (raw_width == 3984 && (col -= 2) < 0) col += (row--,raw_width); #ifdef LIBRAW_LIBRARY_BUILD - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = val; #endif if ((unsigned) (row-top_margin) < height) { @@ -880,7 +880,7 @@ void CLASS adobe_copy_pixel (int row, int col, ushort **rp) BAYER(r,c) = val; else { - ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin); + ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin); if(dfp) *dfp = val; } #else @@ -987,7 +987,7 @@ void CLASS pentax_k10_load_raw() #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = hpred[col & 1]; } @@ -1081,7 +1081,7 @@ void CLASS nikon_compressed_load_raw() } else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = xval; } #endif @@ -1251,7 +1251,7 @@ void CLASS fuji_load_raw() } else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = pixel[col]; } } @@ -1330,7 +1330,7 @@ void CLASS rollei_load_raw() #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(todo[i] / raw_width,todo[i] % raw_width); + ushort *dfp = get_tqmasked_pointer(todo[i] / raw_width,todo[i] % raw_width); if(dfp) *dfp = (todo[i+1] & 0x3ff); } #endif @@ -1517,12 +1517,12 @@ void CLASS phase_one_correct() void CLASS phase_one_load_raw() { int row, col, a, b; - ushort *pixel, akey, bkey, mask; + ushort *pixel, akey, bkey, tqmask; fseek (ifp, ph1.key_off, SEEK_SET); akey = get2(); bkey = get2(); - mask = ph1.format == 1 ? 0x5555:0x1354; + tqmask = ph1.format == 1 ? 0x5555:0x1354; #ifndef LIBRAW_LIBRARY_BUILD fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); pixel = (ushort *) calloc (raw_width, sizeof *pixel); @@ -1532,8 +1532,8 @@ void CLASS phase_one_load_raw() for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); + pixel[col+0] = (a & tqmask) | (b & ~tqmask); + pixel[col+1] = (b & tqmask) | (a & ~tqmask); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col+left_margin]; @@ -1548,12 +1548,12 @@ void CLASS phase_one_load_raw() for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); + pixel[col+0] = (a & tqmask) | (b & ~tqmask); + pixel[col+1] = (b & tqmask) | (a & ~tqmask); } for (col=0; col < raw_width; col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = pixel[col]; else @@ -1608,9 +1608,9 @@ void CLASS phase_one_load_raw_c() { read_shorts ((ushort *) t_black[0], raw_height*2); #ifdef LIBRAW_LIBRARY_BUILD - imgdata.masked_pixels.ph1_black = (ushort (*)[2])calloc(raw_height*2,sizeof(ushort)); - merror (imgdata.masked_pixels.ph1_black, "phase_one_load_raw_c()"); - memmove(imgdata.masked_pixels.ph1_black,(ushort *) t_black[0],raw_height*2*sizeof(ushort)); + imgdata.tqmasked_pixels.ph1_black = (ushort (*)[2])calloc(raw_height*2,sizeof(ushort)); + merror (imgdata.tqmasked_pixels.ph1_black, "phase_one_load_raw_c()"); + memmove(imgdata.tqmasked_pixels.ph1_black,(ushort *) t_black[0],raw_height*2*sizeof(ushort)); #endif } for (i=0; i < 256; i++) @@ -1662,7 +1662,7 @@ void CLASS phase_one_load_raw_c() } else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(i>0 && dfp) *dfp = i; } } @@ -1675,7 +1675,7 @@ void CLASS phase_one_load_raw_c() - ph1.t_black + t_black[row][(col+left_margin) >= ph1.split_col]; if (i > 0) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = i; } } @@ -1719,7 +1719,7 @@ void CLASS hasselblad_load_raw() #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin); + ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin); if(dfp) *dfp = pred[i]; } #endif @@ -1833,7 +1833,7 @@ void CLASS packed_12_load_raw() #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = bitbuf << (52-vbits) >> 52; } #endif @@ -1871,7 +1871,7 @@ void CLASS unpacked_load_raw() //fseek (ifp, 2*(raw_width - width), SEEK_CUR); for (col=0; col < raw_width; col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = pixel[col]; else @@ -1904,7 +1904,7 @@ void CLASS nokia_load_raw() int col; for(col=0;col<width;col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = pixel[col]; } @@ -1969,7 +1969,7 @@ void CLASS panasonic_load_raw() #ifdef LIBRAW_LIBRARY_BUILD if(col>=width) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp)*dfp = pred[col & 1]; } #endif @@ -2008,7 +2008,7 @@ void CLASS olympus_e300_load_raw() #else for (col=0; col < raw_width; col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = (pixel[col] & 0xfff); else @@ -2445,14 +2445,14 @@ void CLASS eight_bit_load_raw() BAYER(row,col-left_margin) = val; else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = val; lblack += val; } } else // top/bottom margins { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = val; } } @@ -2547,7 +2547,7 @@ void CLASS kodak_262_load_raw() black += val; #else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = val; black += val; } @@ -2741,12 +2741,12 @@ void CLASS sony_load_raw() #ifdef LIBRAW_LIBRARY_BUILD for (col=0; col < left_margin; col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = ntohs(pixel[col]); } for (col=left_margin+width; col < raw_width; col++) { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = ntohs(pixel[col]); } #endif @@ -2782,7 +2782,7 @@ void CLASS sony_arw_load_raw() #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(row,col); + ushort *dfp = get_tqmasked_pointer(row,col); if(dfp) *dfp = sum; } #endif @@ -2903,7 +2903,7 @@ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) #ifdef LIBRAW_LIBRARY_BUILD else { - ushort *dfp = get_masked_pointer(row+top_margin,col+left_margin); + ushort *dfp = get_tqmasked_pointer(row+top_margin,col+left_margin); if(dfp) *dfp = pred[pix &1]; } #endif @@ -4335,7 +4335,7 @@ void CLASS parse_makernote (int base, int uptag) !strcmp (buf,"EPSON")) fseek (ifp, -2, SEEK_CUR); else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) + !strcmp (buf,"TQVC")) fseek (ifp, -4, SEEK_CUR); else fseek (ifp, -10, SEEK_CUR); @@ -4876,7 +4876,7 @@ int CLASS parse_tiff_ifd (int base) } } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ tiff_ifd[ifd].t_flip = "50132467"[get2() & 7]-'0'; break; case 277: /* SamplesPerPixel */ diff --git a/libkdcraw/libraw/internal/foveon.cpp b/libkdcraw/libraw/internal/foveon.cpp index 6080bb8..93fc152 100644 --- a/libkdcraw/libraw/internal/foveon.cpp +++ b/libkdcraw/libraw/internal/foveon.cpp @@ -315,7 +315,7 @@ void CLASS foveon_interpolate() foveon_fixed (chroma_dq, 3, "ChromaDQ"); foveon_fixed (color_dq, 3, foveon_camf_param ("IncludeBlocks", "ColorDQ") ? - "ColorDQ" : "ColorDQCamRGB"); + "ColorDQ" : "ColorDTQCamRGB"); if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) foveon_fixed (&cfilt, 1, "ColumnFilter"); diff --git a/libkdcraw/libraw/libraw/libraw.h b/libkdcraw/libraw/libraw/libraw.h index a9c486d..e9fcee1 100644 --- a/libkdcraw/libraw/libraw/libraw.h +++ b/libkdcraw/libraw/libraw/libraw.h @@ -62,7 +62,7 @@ DllDef int libraw_cameraCount(); DllDef void libraw_set_memerror_handler(libraw_data_t*, memory_callback cb, void *datap); DllDef void libraw_set_dataerror_handler(libraw_data_t*,data_callback func,void *datap); DllDef void libraw_set_progress_handler(libraw_data_t*,progress_callback cb,void *datap); -DllDef int libraw_add_masked_borders_to_bitmap(libraw_data_t* lr); +DllDef int libraw_add_tqmasked_borders_to_bitmap(libraw_data_t* lr); DllDef const char * libraw_unpack_function_name(libraw_data_t* lr); DllDef int libraw_rotate_fuji_raw(libraw_data_t* lr); @@ -124,7 +124,7 @@ class DllDef LibRaw int FC(int row,int col) { return (imgdata.idata.filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);} int fc (int row, int col); - int add_masked_borders_to_bitmap(); + int add_tqmasked_borders_to_bitmap(); const char *unpack_function_name(); int rotate_fuji_raw(); @@ -157,8 +157,8 @@ class DllDef LibRaw // moved from implementation level to private: visibility - void init_masked_ptrs(); - ushort *get_masked_pointer(int row, int col); + void init_tqmasked_ptrs(); + ushort *get_tqmasked_pointer(int row, int col); int own_filtering_supported(){ return 0;} void identify(); diff --git a/libkdcraw/libraw/libraw/libraw_types.h b/libkdcraw/libraw/libraw/libraw_types.h index 188b651..f0075a7 100644 --- a/libkdcraw/libraw/libraw/libraw_types.h +++ b/libkdcraw/libraw/libraw/libraw_types.h @@ -119,7 +119,7 @@ typedef struct unsigned is_foveon; int colors; - unsigned filters; // camera CFA pattern mask + unsigned filters; // camera CFA pattern tqmask char cdesc[5]; }libraw_iparams_t; @@ -140,8 +140,8 @@ typedef struct double pixel_aspect; int flip; - // masked border sizes - ushort right_margin,bottom_margin; // right masked width and bottom height, inited after idendify() + // tqmasked border sizes + ushort right_margin,bottom_margin; // right tqmasked width and bottom height, inited after idendify() } libraw_image_sizes_t; @@ -264,7 +264,7 @@ typedef struct ushort *bottom; // bottom size=(raw_height-height-top_margin)*width ushort *br; // bottom right size=(raw_height-height-top_margin)* ushort (*ph1_black)[2]; // Phase One black -}libraw_masked_t; +}libraw_tqmasked_t; typedef struct { @@ -275,14 +275,14 @@ typedef struct libraw_colordata_t color; libraw_imgother_t other; libraw_thumbnail_t thumbnail; - libraw_masked_t masked_pixels; + libraw_tqmasked_t tqmasked_pixels; ushort (*image)[4] ; #ifdef _OPENMP #pragma omp shared(image) #endif libraw_output_params_t params; // pointer to LibRaw class for use in C calls - void *parent_class; + void *tqparent_class; } libraw_data_t; diff --git a/libkdcraw/libraw/samples/unprocessed_raw.cpp b/libkdcraw/libraw/samples/unprocessed_raw.cpp index ca3118d..6910fcf 100644 --- a/libkdcraw/libraw/samples/unprocessed_raw.cpp +++ b/libkdcraw/libraw/samples/unprocessed_raw.cpp @@ -4,7 +4,7 @@ * Created: Fri Jan 02, 2009 * * LibRaw sample - * Generates unprocessed raw image: with masked pixels and without black subtraction + * Generates unprocessed raw image: with tqmasked pixels and without black subtraction * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -116,9 +116,9 @@ int main(int ac, char *av[]) if(verbose) printf("Unpacked....\n"); - if( (ret = RawProcessor.add_masked_borders_to_bitmap() ) != LIBRAW_SUCCESS) + if( (ret = RawProcessor.add_tqmasked_borders_to_bitmap() ) != LIBRAW_SUCCESS) { - fprintf(stderr,"Cannot add mask data to bitmap %s\n",av[i]); + fprintf(stderr,"Cannot add tqmask data to bitmap %s\n",av[i]); } for(int r=0;r<S.iheight;r++) for(c=0;c<S.iwidth;c++) diff --git a/libkdcraw/libraw/src/libraw_c_api.cpp b/libkdcraw/libraw/src/libraw_c_api.cpp index 8ce5736..ac3957b 100644 --- a/libkdcraw/libraw/src/libraw_c_api.cpp +++ b/libkdcraw/libraw/src/libraw_c_api.cpp @@ -27,78 +27,78 @@ extern "C" const char* libraw_unpack_function_name(libraw_data_t* lr) { if(!lr) return "NULL parameter passed"; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->unpack_function_name(); } int libraw_rotate_fuji_raw(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->rotate_fuji_raw(); } - int libraw_add_masked_borders_to_bitmap(libraw_data_t* lr) + int libraw_add_tqmasked_borders_to_bitmap(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; - return ip->add_masked_borders_to_bitmap(); + LibRaw *ip = (LibRaw*) lr->tqparent_class; + return ip->add_tqmasked_borders_to_bitmap(); } int libraw_open_file(libraw_data_t* lr, const char *file) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->open_file(file); } int libraw_open_buffer(libraw_data_t* lr, void *buffer, size_t size) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->open_buffer(buffer,size); } int libraw_unpack(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->unpack(); } int libraw_unpack_thumb(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->unpack_thumb(); } void libraw_recycle(libraw_data_t* lr) { if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; ip->recycle(); } void libraw_close(libraw_data_t* lr) { if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; delete ip; } void libraw_set_memerror_handler(libraw_data_t* lr, memory_callback cb,void *data) { if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; ip->set_memerror_handler(cb,data); } void libraw_set_dataerror_handler(libraw_data_t* lr,data_callback func,void *data) { if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; ip->set_dataerror_handler(func,data); } void libraw_set_progress_handler(libraw_data_t* lr, progress_callback cb,void *data) { if(!lr) return; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; ip->set_progress_handler(cb,data); } @@ -107,34 +107,34 @@ extern "C" int libraw_adjust_sizes_info_only(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->adjust_sizes_info_only(); } int libraw_dcraw_document_mode_processing(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->dcraw_document_mode_processing(); } int libraw_dcraw_ppm_tiff_writer(libraw_data_t* lr,const char *filename) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->dcraw_ppm_tiff_writer(filename); } int libraw_dcraw_thumb_writer(libraw_data_t* lr,const char *fname) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->dcraw_thumb_writer(fname); } int libraw_dcraw_process(libraw_data_t* lr) { if(!lr) return EINVAL; - LibRaw *ip = (LibRaw*) lr->parent_class; + LibRaw *ip = (LibRaw*) lr->tqparent_class; return ip->dcraw_process(); } diff --git a/libkdcraw/libraw/src/libraw_cxx.cpp b/libkdcraw/libraw/src/libraw_cxx.cpp index be1ec0a..f7fe84d 100644 --- a/libkdcraw/libraw/src/libraw_cxx.cpp +++ b/libkdcraw/libraw/src/libraw_cxx.cpp @@ -53,7 +53,7 @@ extern "C" case LIBRAW_UNSUPPORTED_THUMBNAIL: return "Unsupported thumbnail format"; case LIBRAW_CANNOT_ADDMASK: - return "Cannot add masked pixels to resized image"; + return "Cannot add tqmasked pixels to resized image"; case LIBRAW_UNSUFFICIENT_MEMORY: return "Unsufficient memory"; case LIBRAW_DATA_ERROR: @@ -85,7 +85,7 @@ const float LibRaw_constants::d65_white[3] = { 0.950456, 1, 1.088754 }; #define S imgdata.sizes #define O imgdata.params #define C imgdata.color -#define M imgdata.masked_pixels +#define M imgdata.tqmasked_pixels #define T imgdata.thumbnail #define IO libraw_internal_data.internal_output_params #define ID libraw_internal_data.internal_data @@ -162,7 +162,7 @@ LibRaw:: LibRaw(unsigned int flags) imgdata.params.output_bps=8; imgdata.params.use_fuji_rotate=1; imgdata.params.auto_bright_thr = 0.01; - imgdata.parent_class = this; + imgdata.tqparent_class = this; imgdata.progress_flags = 0; tls = new LibRaw_TLS; tls->init(); @@ -225,11 +225,11 @@ void LibRaw:: recycle() FREE(libraw_internal_data.output_data.histogram); FREE(libraw_internal_data.output_data.oprof); FREE(imgdata.color.profile); - FREE(imgdata.masked_pixels.buffer); - FREE(imgdata.masked_pixels.ph1_black); + FREE(imgdata.tqmasked_pixels.buffer); + FREE(imgdata.tqmasked_pixels.ph1_black); #undef FREE #define ZERO(a) bzero(&a,sizeof(a)) - ZERO(imgdata.masked_pixels); + ZERO(imgdata.tqmasked_pixels); ZERO(imgdata.sizes); ZERO(libraw_internal_data.internal_output_params); #undef ZERO @@ -316,7 +316,7 @@ void LibRaw:: merror (void *ptr, const char *where) throw LIBRAW_EXCEPTION_ALLOC; } -ushort * LibRaw::get_masked_pointer(int row, int col) +ushort * LibRaw::get_tqmasked_pointer(int row, int col) { if(row<0 || col < 0) return NULL; if(!M.buffer) return NULL; @@ -391,7 +391,7 @@ ushort * LibRaw::get_masked_pointer(int row, int col) return NULL; } -void LibRaw:: init_masked_ptrs() +void LibRaw:: init_tqmasked_ptrs() { if(!M.buffer) return; @@ -411,7 +411,7 @@ void LibRaw:: init_masked_ptrs() } -int LibRaw::add_masked_borders_to_bitmap() +int LibRaw::add_tqmasked_borders_to_bitmap() { CHECK_ORDER_HIGH(LIBRAW_PROGRESS_PRE_INTERPOLATE); CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW); @@ -434,14 +434,14 @@ int LibRaw::add_masked_borders_to_bitmap() ushort (*newimage)[4]; newimage = (ushort (*)[4]) calloc (S.raw_height*S.raw_width, sizeof (*newimage)); - merror (newimage, "add_masked_borders_to_bitmap()"); + merror (newimage, "add_tqmasked_borders_to_bitmap()"); int r,c; // top rows for (r=0; r<S.top_margin;r++) for(c=0;c<S.raw_width;c++) { - ushort *p = get_masked_pointer(r,c); + ushort *p = get_tqmasked_pointer(r,c); if(p) newimage[r*S.raw_width+c][FC(r,c)] = *p; } @@ -451,7 +451,7 @@ int LibRaw::add_masked_borders_to_bitmap() int row = r-S.top_margin; for(c=0;c<S.left_margin;c++) { - ushort *p = get_masked_pointer(r,c); + ushort *p = get_tqmasked_pointer(r,c); if(p) newimage[r*S.raw_width+c][FC(r,c)] = *p; } @@ -462,7 +462,7 @@ int LibRaw::add_masked_borders_to_bitmap() } for(c=S.left_margin+S.iwidth;c<S.raw_width;c++) { - ushort *p = get_masked_pointer(r,c); + ushort *p = get_tqmasked_pointer(r,c); if(p) newimage[r*S.raw_width+c][FC(r,c)] = *p; } @@ -471,7 +471,7 @@ int LibRaw::add_masked_borders_to_bitmap() for (r=S.top_margin+S.height; r<S.raw_height;r++) for(c=0;c<S.raw_width;c++) { - ushort *p = get_masked_pointer(r,c); + ushort *p = get_tqmasked_pointer(r,c); if(p) newimage[r*S.raw_width+c][FC(r,c)] = *p; } @@ -656,9 +656,9 @@ int LibRaw::unpack(void) { unsigned sz = S.raw_height*(S.left_margin+S.right_margin) + S.width*(S.top_margin+S.bottom_margin); - imgdata.masked_pixels.buffer = (ushort*) calloc(sz, sizeof(ushort)); - merror (imgdata.masked_pixels.buffer, "unpack()"); - init_masked_ptrs(); + imgdata.tqmasked_pixels.buffer = (ushort*) calloc(sz, sizeof(ushort)); + merror (imgdata.tqmasked_pixels.buffer, "unpack()"); + init_tqmasked_ptrs(); } if (libraw_internal_data.unpacker_data.meta_length) { diff --git a/libkdcraw/test/raw2png.cpp b/libkdcraw/test/raw2png.cpp index 114cdc5..d958ddf 100644 --- a/libkdcraw/test/raw2png.cpp +++ b/libkdcraw/test/raw2png.cpp @@ -20,18 +20,18 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> // KDE includes. #include "kdeversion.h" #if KDE_IS_VERSION(4,0,0) -#include "qdebug.h" +#include "tqdebug.h" #define PRINT_DEBUG qDebug() #define ENDL #else @@ -55,13 +55,13 @@ int main (int argc, char **argv) return -1; } - QString filePath(argv[1]); - QFileInfo input(filePath); - QString previewFilePath(input.baseName() + QString(".preview.png")); - QFileInfo previewOutput(previewFilePath); - QString halfFilePath(input.baseName() + QString(".half.png")); - QFileInfo halfOutput(halfFilePath); - QImage image; + TQString filePath(argv[1]); + TQFileInfo input(filePath); + TQString previewFilePath(input.baseName() + TQString(".preview.png")); + TQFileInfo previewOutput(previewFilePath); + TQString halfFilePath(input.baseName() + TQString(".half.png")); + TQFileInfo halfOutput(halfFilePath); + TQImage image; DcrawInfoContainer identify; // ----------------------------------------------------------- @@ -79,7 +79,7 @@ int main (int argc, char **argv) int height = identify.imageSize.height(); PRINT_DEBUG << "raw2png: Raw image info:" ENDL; - PRINT_DEBUG << "--- Date: " << identify.dateTime.toString(Qt::ISODate) ENDL; + PRINT_DEBUG << "--- Date: " << identify.dateTime.toString(TQt::ISODate) ENDL; PRINT_DEBUG << "--- Make: " << identify.make ENDL; PRINT_DEBUG << "--- Model: " << identify.model ENDL; PRINT_DEBUG << "--- Size: " << width << "x" << height ENDL; @@ -106,7 +106,7 @@ int main (int argc, char **argv) PRINT_DEBUG << "raw2png: Loading half RAW image" ENDL; - image = QImage(); + image = TQImage(); if (!rawProcessor.loadHalfPreview(image, filePath)) { PRINT_DEBUG << "raw2png: Loading half RAW image failed. Aborted..." ENDL; |