diff options
Diffstat (limited to 'digikam/imageplugins/adjustlevels/adjustlevels.cpp')
| -rw-r--r-- | digikam/imageplugins/adjustlevels/adjustlevels.cpp | 372 |
1 files changed, 186 insertions, 186 deletions
diff --git a/digikam/imageplugins/adjustlevels/adjustlevels.cpp b/digikam/imageplugins/adjustlevels/adjustlevels.cpp index bc9a000d..3b0a4d94 100644 --- a/digikam/imageplugins/adjustlevels/adjustlevels.cpp +++ b/digikam/imageplugins/adjustlevels/adjustlevels.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. @@ -78,8 +78,8 @@ namespace DigikamAdjustLevelsImagesPlugin { -AdjustLevelDialog::AdjustLevelDialog(QWidget* parent) - : Digikam::ImageDlgBase(parent, i18n("Adjust Color Levels"), +AdjustLevelDialog::AdjustLevelDialog(TQWidget* tqparent) + : Digikam::ImageDlgBase(tqparent, i18n("Adjust Color Levels"), "adjustlevels", true, false) { m_destinationPreviewData = 0L; @@ -122,19 +122,19 @@ AdjustLevelDialog::AdjustLevelDialog(QWidget* parent) // ------------------------------------------------------------- - QWidget *gboxSettings = new QWidget(plainPage()); - QGridLayout* grid = new QGridLayout(gboxSettings, 16, 8, spacingHint(), 0); + TQWidget *gboxSettings = new TQWidget(plainPage()); + TQGridLayout* grid = new TQGridLayout(gboxSettings, 16, 8, spacingHint(), 0); - 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>Here select the histogram channel to display:<p>" + TQWhatsThis::add( m_channelCB, i18n("<p>Here select the histogram channel to display:<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>" @@ -143,32 +143,32 @@ AdjustLevelDialog::AdjustLevelDialog(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); + m_scaleBG = new TQHButtonGroup(gboxSettings); m_scaleBG->setExclusive(true); - m_scaleBG->setFrameShape(QFrame::NoFrame); + m_scaleBG->setFrameShape(TQFrame::NoFrame); m_scaleBG->setInsideMargin( 0 ); - QWhatsThis::add( m_scaleBG, i18n("<p>Here select the histogram scale.<p>" + TQWhatsThis::add( m_scaleBG, i18n("<p>Here select the histogram scale.<p>" "If the image's maximal counts are small, you can use the linear scale.<p>" "The 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::HistogramWidget::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::HistogramWidget::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); - QHBoxLayout* l1 = new QHBoxLayout(); + TQHBoxLayout* l1 = new TQHBoxLayout(); l1->addWidget(label1); l1->addWidget(m_channelCB); l1->addStretch(10); @@ -177,13 +177,13 @@ AdjustLevelDialog::AdjustLevelDialog(QWidget* parent) // ------------------------------------------------------------- m_histogramWidget = new Digikam::HistogramWidget(256, 140, gboxSettings, false, true, true); - QWhatsThis::add( m_histogramWidget, i18n("<p>Here you can see the target preview image histogram drawing of the " + 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 levels " "settings changes.")); m_levelsHistogramWidget = new Digikam::HistogramWidget(256, 140, m_originalImage.bits(), m_originalImage.width(), m_originalImage.height(), m_originalImage.sixteenBit(), gboxSettings, false); - QWhatsThis::add( m_levelsHistogramWidget, i18n("<p>This is the histogram drawing of the selected channel " + TQWhatsThis::add( m_levelsHistogramWidget, i18n("<p>This is the histogram drawing of the selected channel " "from original image")); // ------------------------------------------------------------- @@ -192,117 +192,117 @@ AdjustLevelDialog::AdjustLevelDialog(QWidget* parent) m_hGradientMinInput->setFixedHeight( 20 ); m_hGradientMinInput->setMinValue(0); m_hGradientMinInput->setMaxValue(m_histoSegments); - QWhatsThis::add( m_hGradientMinInput, i18n("<p>Select the minimal intensity input value of the histogram.")); - QToolTip::add( m_hGradientMinInput, i18n( "Minimal intensity input." ) ); - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "white" ) ); + TQWhatsThis::add( m_hGradientMinInput, i18n("<p>Select the minimal intensity input value of the histogram.")); + TQToolTip::add( m_hGradientMinInput, i18n( "Minimal intensity input." ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "white" ) ); m_hGradientMinInput->installEventFilter(this); m_hGradientMaxInput = new KGradientSelector( KSelector::Horizontal, gboxSettings ); m_hGradientMaxInput->setFixedHeight( 20 ); m_hGradientMaxInput->setMinValue(0); m_hGradientMaxInput->setMaxValue(m_histoSegments); - QWhatsThis::add( m_hGradientMaxInput, i18n("<p>Select the maximal intensity input value of the histogram.")); - QToolTip::add( m_hGradientMaxInput, i18n( "Maximal intensity input." ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "white" ) ); + TQWhatsThis::add( m_hGradientMaxInput, i18n("<p>Select the maximal intensity input value of the histogram.")); + TQToolTip::add( m_hGradientMaxInput, i18n( "Maximal intensity input." ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "white" ) ); m_hGradientMaxInput->installEventFilter(this); - m_minInput = new QSpinBox(0, m_histoSegments, 1, gboxSettings); + m_minInput = new TQSpinBox(0, m_histoSegments, 1, gboxSettings); m_minInput->setValue(0); - QWhatsThis::add( m_minInput, i18n("<p>Select the minimal intensity input value of the histogram.")); - QToolTip::add( m_minInput, i18n( "Minimal intensity input." ) ); + TQWhatsThis::add( m_minInput, i18n("<p>Select the minimal intensity input value of the histogram.")); + TQToolTip::add( m_minInput, i18n( "Minimal intensity input." ) ); m_gammaInput = new KDoubleNumInput(gboxSettings); m_gammaInput->setPrecision(2); m_gammaInput->setRange(0.1, 3.0, 0.01); m_gammaInput->setValue(1.0); - QToolTip::add( m_gammaInput, i18n( "Gamma input value." ) ); - QWhatsThis::add( m_gammaInput, i18n("<p>Select the gamma input value.")); + TQToolTip::add( m_gammaInput, i18n( "Gamma input value." ) ); + TQWhatsThis::add( m_gammaInput, i18n("<p>Select the gamma input value.")); - m_maxInput = new QSpinBox(0, m_histoSegments, 1, gboxSettings); + m_maxInput = new TQSpinBox(0, m_histoSegments, 1, gboxSettings); m_maxInput->setValue(m_histoSegments); - QToolTip::add( m_maxInput, i18n( "Maximal intensity input." ) ); - QWhatsThis::add( m_maxInput, i18n("<p>Select the maximal intensity input value of the histogram.")); + TQToolTip::add( m_maxInput, i18n( "Maximal intensity input." ) ); + TQWhatsThis::add( m_maxInput, i18n("<p>Select the maximal intensity input value of the histogram.")); m_hGradientMinOutput = new KGradientSelector( KSelector::Horizontal, gboxSettings ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "white" ) ); - QWhatsThis::add( m_hGradientMinOutput, i18n("<p>Select the minimal intensity output value of the histogram.")); - QToolTip::add( m_hGradientMinOutput, i18n( "Minimal intensity output." ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); + TQWhatsThis::add( m_hGradientMinOutput, i18n("<p>Select the minimal intensity output value of the histogram.")); + TQToolTip::add( m_hGradientMinOutput, i18n( "Minimal intensity output." ) ); m_hGradientMinOutput->setFixedHeight( 20 ); m_hGradientMinOutput->setMinValue(0); m_hGradientMinOutput->setMaxValue(m_histoSegments); m_hGradientMinOutput->installEventFilter(this); m_hGradientMaxOutput = new KGradientSelector( KSelector::Horizontal, gboxSettings ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "white" ) ); - QWhatsThis::add( m_hGradientMaxOutput, i18n("<p>Select the maximal intensity output value of the histogram.")); - QToolTip::add( m_hGradientMaxOutput, i18n( "Maximal intensity output." ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); + TQWhatsThis::add( m_hGradientMaxOutput, i18n("<p>Select the maximal intensity output value of the histogram.")); + TQToolTip::add( m_hGradientMaxOutput, i18n( "Maximal intensity output." ) ); m_hGradientMaxOutput->setFixedHeight( 20 ); m_hGradientMaxOutput->setMinValue(0); m_hGradientMaxOutput->setMaxValue(m_histoSegments); m_hGradientMaxOutput->installEventFilter(this); - m_minOutput = new QSpinBox(0, m_histoSegments, 1, gboxSettings); + m_minOutput = new TQSpinBox(0, m_histoSegments, 1, gboxSettings); m_minOutput->setValue(0); - QToolTip::add( m_minOutput, i18n( "Minimal intensity output." ) ); - QWhatsThis::add( m_minOutput, i18n("<p>Select the minimal intensity output value of the histogram.")); + TQToolTip::add( m_minOutput, i18n( "Minimal intensity output." ) ); + TQWhatsThis::add( m_minOutput, i18n("<p>Select the minimal intensity output value of the histogram.")); - m_maxOutput = new QSpinBox(0, m_histoSegments, 1, gboxSettings); + m_maxOutput = new TQSpinBox(0, m_histoSegments, 1, gboxSettings); m_maxOutput->setValue(m_histoSegments); - QToolTip::add( m_maxOutput, i18n( "Maximal intensity output." ) ); - QWhatsThis::add( m_maxOutput, i18n("<p>Select the maximal intensity output value of the histogram.")); + TQToolTip::add( m_maxOutput, i18n( "Maximal intensity output." ) ); + TQWhatsThis::add( m_maxOutput, i18n("<p>Select the maximal intensity output value of the histogram.")); // ------------------------------------------------------------- - 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> " "levels input 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-gray", KGlobal::dirs()->kde_default("data") + "digikam/data"); directory = KGlobal::dirs()->findResourceDir("color-picker-gray", "color-picker-gray.png"); - m_pickGray->setPixmap( QPixmap( directory + "color-picker-gray.png" ) ); + m_pickGray->setPixmap( TQPixmap( directory + "color-picker-gray.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> " "levels input 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> " "levels input on Red, Green, Blue, and Luminosity channels.")); m_pickerColorButtonGroup->setExclusive(true); - m_pickerColorButtonGroup->setFrameShape(QFrame::NoFrame); + m_pickerColorButtonGroup->setFrameShape(TQFrame::NoFrame); - m_autoButton = new QPushButton(gboxSettings); - m_autoButton->setPixmap(kapp->iconLoader()->loadIcon("run", (KIcon::Group)KIcon::Toolbar)); QToolTip::add( m_autoButton, i18n( "Adjust all levels automatically." ) ); - QWhatsThis::add( m_autoButton, i18n("<p>If you press this button, all channel levels will be adjusted " + m_autoButton = new TQPushButton(gboxSettings); + m_autoButton->setPixmap(kapp->iconLoader()->loadIcon("run", (KIcon::Group)KIcon::Toolbar)); TQToolTip::add( m_autoButton, i18n( "Adjust all levels automatically." ) ); + TQWhatsThis::add( m_autoButton, i18n("<p>If you press this button, all channel levels will be adjusted " "automatically.")); - m_resetButton = new QPushButton(i18n("&Reset"), gboxSettings); + m_resetButton = new TQPushButton(i18n("&Reset"), gboxSettings); m_resetButton->setPixmap(kapp->iconLoader()->loadIcon("reload_page", (KIcon::Group)KIcon::Toolbar)); - QToolTip::add( m_resetButton, i18n( "Reset current channel levels' values." ) ); - QWhatsThis::add( m_resetButton, i18n("<p>If you press this button, all levels' values " + TQToolTip::add( m_resetButton, i18n( "Reset current channel levels' values." ) ); + TQWhatsThis::add( m_resetButton, i18n("<p>If you press this button, all levels' values " "from the current selected channel " "will be reset to the default values.")); - QLabel *space = new QLabel(gboxSettings); + TQLabel *space = new TQLabel(gboxSettings); space->setFixedWidth(spacingHint()); - QHBoxLayout* l3 = new QHBoxLayout(); + TQHBoxLayout* l3 = new TQHBoxLayout(); l3->addWidget(m_pickerColorButtonGroup); l3->addWidget(m_autoButton); l3->addWidget(space); @@ -342,62 +342,62 @@ AdjustLevelDialog::AdjustLevelDialog(QWidget* parent) // ------------------------------------------------------------- // Channels and scale selection 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_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())); // ------------------------------------------------------------- // Color sliders and spinbox slots. - connect(m_hGradientMinInput, SIGNAL(valueChanged(int)), - this, SLOT(slotAdjustMinInputSpinBox(int))); + connect(m_hGradientMinInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAdjustMinInputSpinBox(int))); - connect(m_minInput, SIGNAL(valueChanged (int)), - this, SLOT(slotAdjustSliders())); + connect(m_minInput, TQT_SIGNAL(valueChanged (int)), + this, TQT_SLOT(slotAdjustSliders())); - connect(m_gammaInput, SIGNAL(valueChanged (double)), - this, SLOT(slotGammaInputchanged(double))); + connect(m_gammaInput, TQT_SIGNAL(valueChanged (double)), + this, TQT_SLOT(slotGammaInputchanged(double))); - connect(m_hGradientMaxInput, SIGNAL(valueChanged(int)), - this, SLOT(slotAdjustMaxInputSpinBox(int))); + connect(m_hGradientMaxInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAdjustMaxInputSpinBox(int))); - connect(m_maxInput, SIGNAL(valueChanged (int)), - this, SLOT(slotAdjustSliders())); + connect(m_maxInput, TQT_SIGNAL(valueChanged (int)), + this, TQT_SLOT(slotAdjustSliders())); - connect(m_hGradientMinOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotAdjustMinOutputSpinBox(int))); + connect(m_hGradientMinOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAdjustMinOutputSpinBox(int))); - connect(m_minOutput, SIGNAL(valueChanged (int)), - this, SLOT(slotAdjustSliders())); + connect(m_minOutput, TQT_SIGNAL(valueChanged (int)), + this, TQT_SLOT(slotAdjustSliders())); - connect(m_hGradientMaxOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotAdjustMaxOutputSpinBox(int))); + connect(m_hGradientMaxOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAdjustMaxOutputSpinBox(int))); - connect(m_maxOutput, SIGNAL(valueChanged (int)), - this, SLOT(slotAdjustSliders())); + connect(m_maxOutput, TQT_SIGNAL(valueChanged (int)), + this, TQT_SLOT(slotAdjustSliders())); // ------------------------------------------------------------- // Bouttons slots. - connect(m_autoButton, SIGNAL(clicked()), - this, SLOT(slotAutoLevels())); + connect(m_autoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAutoLevels())); - 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())); } @@ -627,46 +627,46 @@ void AdjustLevelDialog::slotChannelChanged(int channel) case LuminosityChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::ValueHistogram; m_levelsHistogramWidget->m_channelType = Digikam::HistogramWidget::ValueHistogram; - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "white" ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); break; case RedChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::RedChannelHistogram; m_levelsHistogramWidget->m_channelType = Digikam::HistogramWidget::RedChannelHistogram; - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "red" ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "red" ) ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "red" ) ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "red" ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "red" ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "red" ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "red" ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "red" ) ); break; case GreenChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::GreenChannelHistogram; m_levelsHistogramWidget->m_channelType = Digikam::HistogramWidget::GreenChannelHistogram; - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "green" ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "green" ) ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "green" ) ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "green" ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "green" ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "green" ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "green" ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "green" ) ); break; case BlueChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::BlueChannelHistogram; m_levelsHistogramWidget->m_channelType = Digikam::HistogramWidget::BlueChannelHistogram; - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "blue" ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "blue" ) ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "blue" ) ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "blue" ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "blue" ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "blue" ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "blue" ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "blue" ) ); break; case AlphaChannel: m_histogramWidget->m_channelType = Digikam::HistogramWidget::AlphaChannelHistogram; m_levelsHistogramWidget->m_channelType = Digikam::HistogramWidget::AlphaChannelHistogram; - m_hGradientMinInput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMaxInput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMinOutput->setColors( QColor( "black" ), QColor( "white" ) ); - m_hGradientMaxOutput->setColors( QColor( "black" ), QColor( "white" ) ); + m_hGradientMinInput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMaxInput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMinOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); + m_hGradientMaxOutput->setColors( TQColor( "black" ), TQColor( "white" ) ); break; } @@ -676,16 +676,16 @@ void AdjustLevelDialog::slotChannelChanged(int channel) m_levels->getLevelLowOutputValue(channel), m_levels->getLevelHighOutputValue(channel)); - m_levelsHistogramWidget->repaint(false); - m_histogramWidget->repaint(false); + m_levelsHistogramWidget->tqrepaint(false); + m_histogramWidget->tqrepaint(false); } void AdjustLevelDialog::slotScaleChanged(int scale) { m_levelsHistogramWidget->m_scaleType = scale; m_histogramWidget->m_scaleType = scale; - m_histogramWidget->repaint(false); - m_levelsHistogramWidget->repaint(false); + m_histogramWidget->tqrepaint(false); + m_levelsHistogramWidget->tqrepaint(false); } void AdjustLevelDialog::readUserSettings() @@ -700,11 +700,11 @@ void AdjustLevelDialog::readUserSettings() { bool sb = m_originalImage.sixteenBit(); int max = sb ? 65535 : 255; - double gamma = config->readDoubleNumEntry(QString("GammaChannel%1").arg(i), 1.0); - int lowInput = config->readNumEntry(QString("LowInputChannel%1").arg(i), 0); - int lowOutput = config->readNumEntry(QString("LowOutputChannel%1").arg(i), 0); - int highInput = config->readNumEntry(QString("HighInputChannel%1").arg(i), max); - int highOutput = config->readNumEntry(QString("HighOutputChannel%1").arg(i), max); + double gamma = config->readDoubleNumEntry(TQString("GammaChannel%1").tqarg(i), 1.0); + int lowInput = config->readNumEntry(TQString("LowInputChannel%1").tqarg(i), 0); + int lowOutput = config->readNumEntry(TQString("LowOutputChannel%1").tqarg(i), 0); + int highInput = config->readNumEntry(TQString("HighInputChannel%1").tqarg(i), max); + int highOutput = config->readNumEntry(TQString("HighOutputChannel%1").tqarg(i), max); m_levels->setLevelGammaValue(i, gamma); m_levels->setLevelLowInputValue(i, sb ? lowInput*255 : lowInput); @@ -742,11 +742,11 @@ void AdjustLevelDialog::writeUserSettings() int highInput = m_levels->getLevelHighInputValue(i); int highOutput = m_levels->getLevelHighOutputValue(i); - config->writeEntry(QString("GammaChannel%1").arg(i), gamma); - config->writeEntry(QString("LowInputChannel%1").arg(i), sb ? lowInput/255 : lowInput); - config->writeEntry(QString("LowOutputChannel%1").arg(i), sb ? lowOutput/255 : lowOutput); - config->writeEntry(QString("HighInputChannel%1").arg(i), sb ? highInput/255 : highInput); - config->writeEntry(QString("HighOutputChannel%1").arg(i), sb ? highOutput/255 : highOutput); + config->writeEntry(TQString("GammaChannel%1").tqarg(i), gamma); + config->writeEntry(TQString("LowInputChannel%1").tqarg(i), sb ? lowInput/255 : lowInput); + config->writeEntry(TQString("LowOutputChannel%1").tqarg(i), sb ? lowOutput/255 : lowOutput); + config->writeEntry(TQString("HighInputChannel%1").tqarg(i), sb ? highInput/255 : highInput); + config->writeEntry(TQString("HighOutputChannel%1").tqarg(i), sb ? highOutput/255 : highOutput); } config->sync(); @@ -769,8 +769,8 @@ void AdjustLevelDialog::slotUser3() KURL loadLevelsFile; loadLevelsFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(), - QString( "*" ), this, - QString( i18n("Select Gimp Levels File to Load")) ); + TQString( "*" ), this, + TQString( i18n("Select Gimp Levels File to Load")) ); if( loadLevelsFile.isEmpty() ) return; @@ -790,8 +790,8 @@ void AdjustLevelDialog::slotUser2() KURL saveLevelsFile; saveLevelsFile = KFileDialog::getSaveURL(KGlobalSettings::documentPath(), - QString( "*" ), this, - QString( i18n("Gimp Levels File to Save")) ); + TQString( "*" ), this, + TQString( i18n("Gimp Levels File to Save")) ); if( saveLevelsFile.isEmpty() ) return; @@ -807,21 +807,21 @@ void AdjustLevelDialog::slotUser2() // See B.K.O #146636: use event filter with all level slider to display a // guide over level histogram. -bool AdjustLevelDialog::eventFilter(QObject *obj, QEvent *ev) +bool AdjustLevelDialog::eventFilter(TQObject *obj, TQEvent *ev) { if ( obj == m_hGradientMinInput ) { - if ( ev->type() == QEvent::MouseButtonPress) + if ( ev->type() == TQEvent::MouseButtonPress) { - connect(m_minInput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + connect(m_minInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); return false; } - if ( ev->type() == QEvent::MouseButtonRelease) + if ( ev->type() == TQEvent::MouseButtonRelease) { - disconnect(m_minInput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + disconnect(m_minInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); m_levelsHistogramWidget->reset(); return false; @@ -833,17 +833,17 @@ bool AdjustLevelDialog::eventFilter(QObject *obj, QEvent *ev) } if ( obj == m_hGradientMaxInput ) { - if ( ev->type() == QEvent::MouseButtonPress) + if ( ev->type() == TQEvent::MouseButtonPress) { - connect(m_maxInput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + connect(m_maxInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); return false; } - if ( ev->type() == QEvent::MouseButtonRelease) + if ( ev->type() == TQEvent::MouseButtonRelease) { - disconnect(m_maxInput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + disconnect(m_maxInput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); m_levelsHistogramWidget->reset(); return false; @@ -855,17 +855,17 @@ bool AdjustLevelDialog::eventFilter(QObject *obj, QEvent *ev) } if ( obj == m_hGradientMinOutput ) { - if ( ev->type() == QEvent::MouseButtonPress) + if ( ev->type() == TQEvent::MouseButtonPress) { - connect(m_minOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + connect(m_minOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); return false; } - if ( ev->type() == QEvent::MouseButtonRelease) + if ( ev->type() == TQEvent::MouseButtonRelease) { - disconnect(m_minOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + disconnect(m_minOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); m_levelsHistogramWidget->reset(); return false; @@ -877,17 +877,17 @@ bool AdjustLevelDialog::eventFilter(QObject *obj, QEvent *ev) } if ( obj == m_hGradientMaxOutput ) { - if ( ev->type() == QEvent::MouseButtonPress) + if ( ev->type() == TQEvent::MouseButtonPress) { - connect(m_maxOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + connect(m_maxOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); return false; } - if ( ev->type() == QEvent::MouseButtonRelease) + if ( ev->type() == TQEvent::MouseButtonRelease) { - disconnect(m_maxOutput, SIGNAL(valueChanged(int)), - this, SLOT(slotShowHistogramGuide(int))); + disconnect(m_maxOutput, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotShowHistogramGuide(int))); m_levelsHistogramWidget->reset(); return false; @@ -899,7 +899,7 @@ bool AdjustLevelDialog::eventFilter(QObject *obj, QEvent *ev) } else { - // pass the event on to the parent class + // pass the event on to the tqparent class return KDialogBase::eventFilter(obj, ev); } } |
