diff options
Diffstat (limited to 'digikam/imageplugins/adjustcurves/adjustcurves.cpp')
-rw-r--r-- | digikam/imageplugins/adjustcurves/adjustcurves.cpp | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/digikam/imageplugins/adjustcurves/adjustcurves.cpp b/digikam/imageplugins/adjustcurves/adjustcurves.cpp index 3172730..02a65ed 100644 --- a/digikam/imageplugins/adjustcurves/adjustcurves.cpp +++ b/digikam/imageplugins/adjustcurves/adjustcurves.cpp @@ -25,25 +25,25 @@ #include <cmath> -// Qt includes. - -#include <qlayout.h> -#include <qcolor.h> -#include <qgroupbox.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qwhatsthis.h> -#include <qtooltip.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qframe.h> -#include <qtimer.h> -#include <qhbuttongroup.h> -#include <qpixmap.h> +// TQt includes. + +#include <tqlayout.h> +#include <tqcolor.h> +#include <tqgroupbox.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqwhatsthis.h> +#include <tqtooltip.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqtimer.h> +#include <tqhbuttongroup.h> +#include <tqpixmap.h> // KDE includes. @@ -80,8 +80,8 @@ namespace DigikamAdjustCurvesImagesPlugin { -AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) - : Digikam::ImageDlgBase(parent, i18n("Adjust Color Curves"), "adjustcurves", true, false) +AdjustCurveDialog::AdjustCurveDialog(TQWidget* tqparent) + : Digikam::ImageDlgBase(tqparent, i18n("Adjust Color Curves"), "adjustcurves", true, false) { m_destinationPreviewData = 0L; @@ -123,19 +123,19 @@ AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) // ------------------------------------------------------------- - QWidget *gboxSettings = new QWidget(plainPage()); - QGridLayout* grid = new QGridLayout( gboxSettings, 5, 5, spacingHint()); + TQWidget *gboxSettings = new TQWidget(plainPage()); + TQGridLayout* grid = new TQGridLayout( gboxSettings, 5, 5, spacingHint()); - QLabel *label1 = new QLabel(i18n("Channel:"), gboxSettings); - label1->setAlignment ( Qt::AlignRight | Qt::AlignVCenter ); - m_channelCB = new QComboBox( false, gboxSettings ); + TQLabel *label1 = new TQLabel(i18n("Channel:"), gboxSettings); + label1->tqsetAlignment ( TQt::AlignRight | TQt::AlignVCenter ); + m_channelCB = new TQComboBox( false, gboxSettings ); m_channelCB->insertItem( i18n("Luminosity") ); m_channelCB->insertItem( i18n("Red") ); m_channelCB->insertItem( i18n("Green") ); m_channelCB->insertItem( i18n("Blue") ); m_channelCB->insertItem( i18n("Alpha") ); m_channelCB->setCurrentText( i18n("Luminosity") ); - QWhatsThis::add( m_channelCB, i18n("<p>Select the histogram channel to display here:<p>" + TQWhatsThis::add( m_channelCB, i18n("<p>Select the histogram channel to display here:<p>" "<b>Luminosity</b>: display the image's luminosity values.<p>" "<b>Red</b>: display the red image-channel values.<p>" "<b>Green</b>: display the green image-channel values.<p>" @@ -144,34 +144,34 @@ AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) "This channel corresponds to the transparency value and " "is supported by some image formats, such as PNG or TIF.")); - m_scaleBG = new QHButtonGroup(gboxSettings); - QWhatsThis::add( m_scaleBG, i18n("<p>Select the histogram scale here.<p>" + m_scaleBG = new TQHButtonGroup(gboxSettings); + TQWhatsThis::add( m_scaleBG, i18n("<p>Select the histogram scale here.<p>" "If the image's maximal counts are small, you can use the linear scale.<p>" "Logarithmic scale can be used when the maximal counts are big; " "if it is used, all values (small and large) will be visible on the graph.")); - QPushButton *linHistoButton = new QPushButton( m_scaleBG ); - QToolTip::add( linHistoButton, i18n( "<p>Linear" ) ); + TQPushButton *linHistoButton = new TQPushButton( m_scaleBG ); + TQToolTip::add( linHistoButton, i18n( "<p>Linear" ) ); m_scaleBG->insert(linHistoButton, Digikam::CurvesWidget::LinScaleHistogram); KGlobal::dirs()->addResourceType("histogram-lin", KGlobal::dirs()->kde_default("data") + "digikam/data"); - QString directory = KGlobal::dirs()->findResourceDir("histogram-lin", "histogram-lin.png"); - linHistoButton->setPixmap( QPixmap( directory + "histogram-lin.png" ) ); + TQString directory = KGlobal::dirs()->findResourceDir("histogram-lin", "histogram-lin.png"); + linHistoButton->setPixmap( TQPixmap( directory + "histogram-lin.png" ) ); linHistoButton->setToggleButton(true); - QPushButton *logHistoButton = new QPushButton( m_scaleBG ); - QToolTip::add( logHistoButton, i18n( "<p>Logarithmic" ) ); + TQPushButton *logHistoButton = new TQPushButton( m_scaleBG ); + TQToolTip::add( logHistoButton, i18n( "<p>Logarithmic" ) ); m_scaleBG->insert(logHistoButton, Digikam::CurvesWidget::LogScaleHistogram); KGlobal::dirs()->addResourceType("histogram-log", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("histogram-log", "histogram-log.png"); - logHistoButton->setPixmap( QPixmap( directory + "histogram-log.png" ) ); + logHistoButton->setPixmap( TQPixmap( directory + "histogram-log.png" ) ); logHistoButton->setToggleButton(true); m_scaleBG->setExclusive(true); m_scaleBG->setButton(Digikam::CurvesWidget::LogScaleHistogram); - m_scaleBG->setFrameShape(QFrame::NoFrame); + m_scaleBG->setFrameShape(TQFrame::NoFrame); m_scaleBG->setInsideMargin( 0 ); - QHBoxLayout* l1 = new QHBoxLayout(); + TQHBoxLayout* l1 = new TQHBoxLayout(); l1->addStretch(10); l1->addWidget(m_scaleBG); @@ -181,31 +181,31 @@ AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) // ------------------------------------------------------------- - QWidget *curveBox = new QWidget(gboxSettings); - QGridLayout* gl = new QGridLayout(curveBox, 4, 2, 0); + TQWidget *curveBox = new TQWidget(gboxSettings); + TQGridLayout* gl = new TQGridLayout(curveBox, 4, 2, 0); m_histogramWidget = new Digikam::HistogramWidget(256, 140, curveBox, false, true, true); - QWhatsThis::add( m_histogramWidget, i18n("<p>Here you can see the target preview image histogram drawing " + TQWhatsThis::add( m_histogramWidget, i18n("<p>Here you can see the target preview image histogram drawing " "of the selected image channel. This one is re-computed at any " "curves settings changes.")); m_vGradient = new Digikam::ColorGradientWidget( Digikam::ColorGradientWidget::Vertical, 10, curveBox ); - m_vGradient->setColors( QColor( "white" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "white" ), TQColor( "black" ) ); - QLabel *spacev = new QLabel(curveBox); + TQLabel *spacev = new TQLabel(curveBox); spacev->setFixedWidth(1); m_curvesWidget = new Digikam::CurvesWidget(256, 256, m_originalImage.bits(), m_originalImage.width(), m_originalImage.height(), m_originalImage.sixteenBit(), m_curves, curveBox); - QWhatsThis::add( m_curvesWidget, i18n("<p>This is the curve drawing of the selected channel from " + TQWhatsThis::add( m_curvesWidget, i18n("<p>This is the curve drawing of the selected channel from " "original image")); - QLabel *spaceh = new QLabel(curveBox); + TQLabel *spaceh = new TQLabel(curveBox); spaceh->setFixedHeight(1); m_hGradient = new Digikam::ColorGradientWidget( Digikam::ColorGradientWidget::Horizontal, 10, curveBox ); - m_hGradient->setColors( QColor( "black" ), QColor( "white" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "white" ) ); gl->addMultiCellWidget(m_histogramWidget, 0, 0, 2, 2); gl->addMultiCellWidget(m_vGradient, 2, 2, 0, 0); @@ -219,75 +219,75 @@ AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) // ------------------------------------------------------------- - m_curveType = new QHButtonGroup(gboxSettings); - m_curveFree = new QPushButton(m_curveType); + m_curveType = new TQHButtonGroup(gboxSettings); + m_curveFree = new TQPushButton(m_curveType); m_curveType->insert(m_curveFree, FreeDrawing); KGlobal::dirs()->addResourceType("curvefree", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("curvefree", "curvefree.png"); - m_curveFree->setPixmap( QPixmap( directory + "curvefree.png" ) ); + m_curveFree->setPixmap( TQPixmap( directory + "curvefree.png" ) ); m_curveFree->setToggleButton(true); - QToolTip::add( m_curveFree, i18n( "Curve free mode" ) ); - QWhatsThis::add( m_curveFree, i18n("<p>With this button, you can draw your curve free-hand with the mouse.")); - m_curveSmooth = new QPushButton(m_curveType); + TQToolTip::add( m_curveFree, i18n( "Curve free mode" ) ); + TQWhatsThis::add( m_curveFree, i18n("<p>With this button, you can draw your curve free-hand with the mouse.")); + m_curveSmooth = new TQPushButton(m_curveType); m_curveType->insert(m_curveSmooth, SmoothDrawing); KGlobal::dirs()->addResourceType("curvemooth", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("curvemooth", "curvemooth.png"); - m_curveSmooth->setPixmap( QPixmap( directory + "curvemooth.png" ) ); + m_curveSmooth->setPixmap( TQPixmap( directory + "curvemooth.png" ) ); m_curveSmooth->setToggleButton(true); - QToolTip::add( m_curveSmooth, i18n( "Curve smooth mode" ) ); - QWhatsThis::add( m_curveSmooth, i18n("<p>With this button, you constrains the curve type to a smooth line with tension.")); + TQToolTip::add( m_curveSmooth, i18n( "Curve smooth mode" ) ); + TQWhatsThis::add( m_curveSmooth, i18n("<p>With this button, you constrains the curve type to a smooth line with tension.")); m_curveType->setExclusive(true); m_curveType->setButton(SmoothDrawing); - m_curveType->setFrameShape(QFrame::NoFrame); + m_curveType->setFrameShape(TQFrame::NoFrame); // ------------------------------------------------------------- - m_pickerColorButtonGroup = new QHButtonGroup(gboxSettings); - m_pickBlack = new QPushButton(m_pickerColorButtonGroup); + m_pickerColorButtonGroup = new TQHButtonGroup(gboxSettings); + m_pickBlack = new TQPushButton(m_pickerColorButtonGroup); m_pickerColorButtonGroup->insert(m_pickBlack, BlackTonal); KGlobal::dirs()->addResourceType("color-picker-black", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("color-picker-black", "color-picker-black.png"); - m_pickBlack->setPixmap( QPixmap( directory + "color-picker-black.png" ) ); + m_pickBlack->setPixmap( TQPixmap( directory + "color-picker-black.png" ) ); m_pickBlack->setToggleButton(true); - QToolTip::add( m_pickBlack, i18n( "All channels shadow tone color picker" ) ); - QWhatsThis::add( m_pickBlack, i18n("<p>With this button, you can pick the color from original image used to set <b>Shadow Tone</b> " + TQToolTip::add( m_pickBlack, i18n( "All channels shadow tone color picker" ) ); + TQWhatsThis::add( m_pickBlack, i18n("<p>With this button, you can pick the color from original image used to set <b>Shadow Tone</b> " "smooth curves point on Red, Green, Blue, and Luminosity channels.")); - m_pickGray = new QPushButton(m_pickerColorButtonGroup); + m_pickGray = new TQPushButton(m_pickerColorButtonGroup); m_pickerColorButtonGroup->insert(m_pickGray, GrayTonal); KGlobal::dirs()->addResourceType("color-picker-grey", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("color-picker-grey", "color-picker-grey.png"); - m_pickGray->setPixmap( QPixmap( directory + "color-picker-grey.png" ) ); + m_pickGray->setPixmap( TQPixmap( directory + "color-picker-grey.png" ) ); m_pickGray->setToggleButton(true); - QToolTip::add( m_pickGray, i18n( "All channels middle tone color picker" ) ); - QWhatsThis::add( m_pickGray, i18n("<p>With this button, you can pick the color from original image used to set <b>Middle Tone</b> " + TQToolTip::add( m_pickGray, i18n( "All channels middle tone color picker" ) ); + TQWhatsThis::add( m_pickGray, i18n("<p>With this button, you can pick the color from original image used to set <b>Middle Tone</b> " "smooth curves point on Red, Green, Blue, and Luminosity channels.")); - m_pickWhite = new QPushButton(m_pickerColorButtonGroup); + m_pickWhite = new TQPushButton(m_pickerColorButtonGroup); m_pickerColorButtonGroup->insert(m_pickWhite, WhiteTonal); KGlobal::dirs()->addResourceType("color-picker-white", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("color-picker-white", "color-picker-white.png"); - m_pickWhite->setPixmap( QPixmap( directory + "color-picker-white.png" ) ); + m_pickWhite->setPixmap( TQPixmap( directory + "color-picker-white.png" ) ); m_pickWhite->setToggleButton(true); - QToolTip::add( m_pickWhite, i18n( "All channels highlight tone color picker" ) ); - QWhatsThis::add( m_pickWhite, i18n("<p>With this button, you can pick the color from original image used to set <b>Highlight Tone</b> " + TQToolTip::add( m_pickWhite, i18n( "All channels highlight tone color picker" ) ); + TQWhatsThis::add( m_pickWhite, i18n("<p>With this button, you can pick the color from original image used to set <b>Highlight Tone</b> " "smooth curves point on Red, Green, Blue, and Luminosity channels.")); m_pickerColorButtonGroup->setExclusive(true); - m_pickerColorButtonGroup->setFrameShape(QFrame::NoFrame); + m_pickerColorButtonGroup->setFrameShape(TQFrame::NoFrame); // ------------------------------------------------------------- - m_resetButton = new QPushButton(i18n("&Reset"), gboxSettings); + m_resetButton = new TQPushButton(i18n("&Reset"), gboxSettings); m_resetButton->setPixmap( SmallIcon("reload_page", 18) ); - QToolTip::add( m_resetButton, i18n( "Reset current channel curves' values." ) ); - QWhatsThis::add( m_resetButton, i18n("<p>If you press this button, all curves' values " + TQToolTip::add( m_resetButton, i18n( "Reset current channel curves' values." ) ); + TQWhatsThis::add( m_resetButton, i18n("<p>If you press this button, all curves' values " "from the current selected channel " "will be reset to the default values.")); - QHBoxLayout* l3 = new QHBoxLayout(); + TQHBoxLayout* l3 = new TQHBoxLayout(); l3->addWidget(m_curveType); l3->addWidget(m_pickerColorButtonGroup); l3->addWidget(m_resetButton); @@ -303,38 +303,38 @@ AdjustCurveDialog::AdjustCurveDialog(QWidget* parent) // ------------------------------------------------------------- - connect(m_curvesWidget, SIGNAL(signalCurvesChanged()), - this, SLOT(slotTimer())); + connect(m_curvesWidget, TQT_SIGNAL(signalCurvesChanged()), + this, TQT_SLOT(slotTimer())); - connect(m_previewWidget, SIGNAL(spotPositionChangedFromOriginal( const Digikam::DColor &, const QPoint & )), - this, SLOT(slotSpotColorChanged( const Digikam::DColor & ))); + connect(m_previewWidget, TQT_SIGNAL(spotPositionChangedFromOriginal( const Digikam::DColor &, const TQPoint & )), + this, TQT_SLOT(slotSpotColorChanged( const Digikam::DColor & ))); - connect(m_previewWidget, SIGNAL(spotPositionChangedFromTarget( const Digikam::DColor &, const QPoint & )), - this, SLOT(slotColorSelectedFromTarget( const Digikam::DColor & ))); + connect(m_previewWidget, TQT_SIGNAL(spotPositionChangedFromTarget( const Digikam::DColor &, const TQPoint & )), + this, TQT_SLOT(slotColorSelectedFromTarget( const Digikam::DColor & ))); - connect(m_previewWidget, SIGNAL(signalResized()), - this, SLOT(slotEffect())); + connect(m_previewWidget, TQT_SIGNAL(signalResized()), + this, TQT_SLOT(slotEffect())); // ------------------------------------------------------------- // ComboBox slots. - connect(m_channelCB, SIGNAL(activated(int)), - this, SLOT(slotChannelChanged(int))); + connect(m_channelCB, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotChannelChanged(int))); - connect(m_scaleBG, SIGNAL(released(int)), - this, SLOT(slotScaleChanged(int))); + connect(m_scaleBG, TQT_SIGNAL(released(int)), + this, TQT_SLOT(slotScaleChanged(int))); - connect(m_curveType, SIGNAL(clicked(int)), - this, SLOT(slotCurveTypeChanged(int))); + connect(m_curveType, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(slotCurveTypeChanged(int))); // ------------------------------------------------------------- // Bouttons slots. - connect(m_resetButton, SIGNAL(clicked()), - this, SLOT(slotResetCurrentChannel())); + connect(m_resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotResetCurrentChannel())); - connect(m_pickerColorButtonGroup, SIGNAL(released(int)), - this, SLOT(slotPickerColorButtonActived())); + connect(m_pickerColorButtonGroup, TQT_SIGNAL(released(int)), + this, TQT_SLOT(slotPickerColorButtonActived())); } AdjustCurveDialog::~AdjustCurveDialog() @@ -365,30 +365,30 @@ void AdjustCurveDialog::slotSpotColorChanged(const Digikam::DColor &color) { // Black tonal curves point. m_curves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 1, - QPoint(QMAX(QMAX(sc.red(), sc.green()), sc.blue()), 42*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 1, QPoint(sc.red(), 42*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 1, QPoint(sc.green(), 42*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 1, QPoint(sc.blue(), 42*m_histoSegments/256)); + TQPoint(TQMAX(TQMAX(sc.red(), sc.green()), sc.blue()), 42*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 1, TQPoint(sc.red(), 42*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 1, TQPoint(sc.green(), 42*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 1, TQPoint(sc.blue(), 42*m_histoSegments/256)); m_pickBlack->setOn(false); } else if ( m_pickGray->isOn() ) { // Gray tonal curves point. m_curves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 8, - QPoint(QMAX(QMAX(sc.red(), sc.green()), sc.blue()), 128*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 8, QPoint(sc.red(), 128*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 8, QPoint(sc.green(), 128*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 8, QPoint(sc.blue(), 128*m_histoSegments/256)); + TQPoint(TQMAX(TQMAX(sc.red(), sc.green()), sc.blue()), 128*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 8, TQPoint(sc.red(), 128*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 8, TQPoint(sc.green(), 128*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 8, TQPoint(sc.blue(), 128*m_histoSegments/256)); m_pickGray->setOn(false); } else if ( m_pickWhite->isOn() ) { // White tonal curves point. m_curves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 15, - QPoint(QMAX(QMAX(sc.red(), sc.green()), sc.blue()), 213*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 15, QPoint(sc.red(), 213*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 15, QPoint(sc.green(), 213*m_histoSegments/256)); - m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 15, QPoint(sc.blue(), 213*m_histoSegments/256)); + TQPoint(TQMAX(TQMAX(sc.red(), sc.green()), sc.blue()), 213*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::RedChannel, 15, TQPoint(sc.red(), 213*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::GreenChannel, 15, TQPoint(sc.green(), 213*m_histoSegments/256)); + m_curves->setCurvePoint(Digikam::ImageHistogram::BlueChannel, 15, TQPoint(sc.blue(), 213*m_histoSegments/256)); m_pickWhite->setOn(false); } else @@ -402,7 +402,7 @@ void AdjustCurveDialog::slotSpotColorChanged(const Digikam::DColor &color) for (int i = Digikam::ImageHistogram::ValueChannel ; i <= Digikam::ImageHistogram::BlueChannel ; i++) m_curves->curvesCalculateCurve(i); - m_curvesWidget->repaint(false); + m_curvesWidget->tqrepaint(false); // restore previous rendering mode. m_previewWidget->setRenderingPreviewMode(m_currentPreviewMode); @@ -486,52 +486,52 @@ void AdjustCurveDialog::slotChannelChanged(int channel) { case LuminosityChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::ValueHistogram; - m_hGradient->setColors( QColor( "black" ), QColor( "white" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "white" ) ); m_curvesWidget->m_channelType = Digikam::CurvesWidget::ValueHistogram; - m_vGradient->setColors( QColor( "white" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "white" ), TQColor( "black" ) ); break; case RedChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::RedChannelHistogram; - m_hGradient->setColors( QColor( "black" ), QColor( "red" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "red" ) ); m_curvesWidget->m_channelType = Digikam::CurvesWidget::RedChannelHistogram; - m_vGradient->setColors( QColor( "red" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "red" ), TQColor( "black" ) ); break; case GreenChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::GreenChannelHistogram; - m_hGradient->setColors( QColor( "black" ), QColor( "green" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "green" ) ); m_curvesWidget->m_channelType = Digikam::CurvesWidget::GreenChannelHistogram; - m_vGradient->setColors( QColor( "green" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "green" ), TQColor( "black" ) ); break; case BlueChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::BlueChannelHistogram; - m_hGradient->setColors( QColor( "black" ), QColor( "blue" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "blue" ) ); m_curvesWidget->m_channelType = Digikam::CurvesWidget::BlueChannelHistogram; - m_vGradient->setColors( QColor( "blue" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "blue" ), TQColor( "black" ) ); break; case AlphaChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::AlphaChannelHistogram; - m_hGradient->setColors( QColor( "black" ), QColor( "white" ) ); + m_hGradient->setColors( TQColor( "black" ), TQColor( "white" ) ); m_curvesWidget->m_channelType = Digikam::CurvesWidget::AlphaChannelHistogram; - m_vGradient->setColors( QColor( "white" ), QColor( "black" ) ); + m_vGradient->setColors( TQColor( "white" ), TQColor( "black" ) ); break; } m_curveType->setButton(m_curves->getCurveType(channel)); - m_curvesWidget->repaint(false); - m_histogramWidget->repaint(false); + m_curvesWidget->tqrepaint(false); + m_histogramWidget->tqrepaint(false); } void AdjustCurveDialog::slotScaleChanged(int scale) { m_curvesWidget->m_scaleType = scale; m_histogramWidget->m_scaleType = scale; - m_histogramWidget->repaint(false); - m_curvesWidget->repaint(false); + m_histogramWidget->tqrepaint(false); + m_curvesWidget->tqrepaint(false); } void AdjustCurveDialog::slotCurveTypeChanged(int type) @@ -569,13 +569,13 @@ void AdjustCurveDialog::readUserSettings() for (int i = 0 ; i < 5 ; i++) { m_curves->curvesChannelReset(i); - m_curves->setCurveType(i, (Digikam::ImageCurves::CurveType)config->readNumEntry(QString("CurveTypeChannel%1").arg(i), + m_curves->setCurveType(i, (Digikam::ImageCurves::CurveType)config->readNumEntry(TQString("CurveTypeChannel%1").tqarg(i), Digikam::ImageCurves::CURVE_SMOOTH)); for (int j = 0 ; j < 17 ; j++) { - QPoint disable(-1, -1); - QPoint p = config->readPointEntry(QString("CurveAjustmentChannel%1Point%2").arg(i).arg(j), &disable); + TQPoint disable(-1, -1); + TQPoint p = config->readPointEntry(TQString("CurveAjustmentChannel%1Point%2").tqarg(i).tqarg(j), &disable); if (m_originalImage.sixteenBit() && p.x() != -1) { @@ -602,11 +602,11 @@ void AdjustCurveDialog::writeUserSettings() for (int i = 0 ; i < 5 ; i++) { - config->writeEntry(QString("CurveTypeChannel%1").arg(i), m_curves->getCurveType(i)); + config->writeEntry(TQString("CurveTypeChannel%1").tqarg(i), m_curves->getCurveType(i)); for (int j = 0 ; j < 17 ; j++) { - QPoint p = m_curves->getCurvePoint(i, j); + TQPoint p = m_curves->getCurvePoint(i, j); if (m_originalImage.sixteenBit() && p.x() != -1) { @@ -614,7 +614,7 @@ void AdjustCurveDialog::writeUserSettings() p.setY(p.y()/255); } - config->writeEntry(QString("CurveAjustmentChannel%1Point%2").arg(i).arg(j), p); + config->writeEntry(TQString("CurveAjustmentChannel%1Point%2").tqarg(i).tqarg(j), p); } } @@ -636,8 +636,8 @@ void AdjustCurveDialog::slotUser3() KURL loadCurvesFile; loadCurvesFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(), - QString( "*" ), this, - QString( i18n("Select Gimp Curves File to Load")) ); + TQString( "*" ), this, + TQString( i18n("Select Gimp Curves File to Load")) ); if( loadCurvesFile.isEmpty() ) return; @@ -658,8 +658,8 @@ void AdjustCurveDialog::slotUser2() KURL saveCurvesFile; saveCurvesFile = KFileDialog::getSaveURL(KGlobalSettings::documentPath(), - QString( "*" ), this, - QString( i18n("Gimp Curves File to Save")) ); + TQString( "*" ), this, + TQString( i18n("Gimp Curves File to Save")) ); if( saveCurvesFile.isEmpty() ) return; |