summaryrefslogtreecommitdiffstats
path: root/digikam/imageplugins/coreplugin/bcgtool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'digikam/imageplugins/coreplugin/bcgtool.cpp')
-rw-r--r--digikam/imageplugins/coreplugin/bcgtool.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/digikam/imageplugins/coreplugin/bcgtool.cpp b/digikam/imageplugins/coreplugin/bcgtool.cpp
index a6fba7bd..993bcdee 100644
--- a/digikam/imageplugins/coreplugin/bcgtool.cpp
+++ b/digikam/imageplugins/coreplugin/bcgtool.cpp
@@ -23,22 +23,22 @@
*
* ============================================================ */
-// Qt includes.
-
-#include <qcheckbox.h>
-#include <qcolor.h>
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+// TQt includes.
+
+#include <tqcheckbox.h>
+#include <tqcolor.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
// KDE includes.
@@ -74,8 +74,8 @@ using namespace Digikam;
namespace DigikamImagesPluginCore
{
-BCGTool::BCGTool(QObject* parent)
- : EditorTool(parent)
+BCGTool::BCGTool(TQObject* tqparent)
+ : EditorTool(tqparent)
{
setName("bcgadjust");
setToolName(i18n("Brightness / Contrast / Gamma"));
@@ -97,47 +97,47 @@ BCGTool::BCGTool(QObject* parent)
EditorToolSettings::Ok|
EditorToolSettings::Cancel);
- QGridLayout* gridSettings = new QGridLayout(m_gboxSettings->plainPage(), 9, 4);
+ TQGridLayout* gridSettings = new TQGridLayout(m_gboxSettings->plainPage(), 9, 4);
- QLabel *label1 = new QLabel(i18n("Channel:"), m_gboxSettings->plainPage());
- label1->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
- m_channelCB = new QComboBox(false, m_gboxSettings->plainPage());
+ TQLabel *label1 = new TQLabel(i18n("Channel:"), m_gboxSettings->plainPage());
+ label1->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ m_channelCB = new TQComboBox(false, m_gboxSettings->plainPage());
m_channelCB->insertItem(i18n("Luminosity"));
m_channelCB->insertItem(i18n("Red"));
m_channelCB->insertItem(i18n("Green"));
m_channelCB->insertItem(i18n("Blue"));
- 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>"
"<b>Blue</b>: display the blue image-channel values.<p>"));
- m_scaleBG = new QHButtonGroup(m_gboxSettings->plainPage());
+ m_scaleBG = new TQHButtonGroup(m_gboxSettings->plainPage());
m_scaleBG->setExclusive(true);
- m_scaleBG->setFrameShape(QFrame::NoFrame);
+ m_scaleBG->setFrameShape(TQFrame::NoFrame);
m_scaleBG->setInsideMargin(0);
- QWhatsThis::add( m_scaleBG, i18n("<p>Select the histogram scale here.<p>"
+ 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, 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, 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);
@@ -145,36 +145,36 @@ BCGTool::BCGTool(QObject* parent)
// -------------------------------------------------------------
- QVBox *histoBox = new QVBox(m_gboxSettings->plainPage());
+ TQVBox *histoBox = new TQVBox(m_gboxSettings->plainPage());
m_histogramWidget = new HistogramWidget(256, 140, histoBox, 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 "
"settings changes."));
- QLabel *space = new QLabel(histoBox);
+ TQLabel *space = new TQLabel(histoBox);
space->setFixedHeight(1);
m_hGradient = new ColorGradientWidget(ColorGradientWidget::Horizontal, 10, histoBox);
- m_hGradient->setColors(QColor("black"), QColor("white"));
+ m_hGradient->setColors(TQColor("black"), TQColor("white"));
// -------------------------------------------------------------
- QLabel *label2 = new QLabel(i18n("Brightness:"), m_gboxSettings->plainPage());
+ TQLabel *label2 = new TQLabel(i18n("Brightness:"), m_gboxSettings->plainPage());
m_bInput = new RIntNumInput(m_gboxSettings->plainPage());
m_bInput->setRange(-100, 100, 1);
m_bInput->setDefaultValue(0);
- QWhatsThis::add( m_bInput, i18n("<p>Set here the brightness adjustment of the image."));
+ TQWhatsThis::add( m_bInput, i18n("<p>Set here the brightness adjustment of the image."));
- QLabel *label3 = new QLabel(i18n("Contrast:"), m_gboxSettings->plainPage());
+ TQLabel *label3 = new TQLabel(i18n("Contrast:"), m_gboxSettings->plainPage());
m_cInput = new RIntNumInput(m_gboxSettings->plainPage());
m_cInput->setRange(-100, 100, 1);
m_cInput->setDefaultValue(0);
- QWhatsThis::add( m_cInput, i18n("<p>Set here the contrast adjustment of the image."));
+ TQWhatsThis::add( m_cInput, i18n("<p>Set here the contrast adjustment of the image."));
- QLabel *label4 = new QLabel(i18n("Gamma:"), m_gboxSettings->plainPage());
+ TQLabel *label4 = new TQLabel(i18n("Gamma:"), m_gboxSettings->plainPage());
m_gInput = new RDoubleNumInput(m_gboxSettings->plainPage());
m_gInput->setPrecision(2);
m_gInput->setRange(0.1, 3.0, 0.01);
m_gInput->setDefaultValue(1.0);
- QWhatsThis::add( m_gInput, i18n("<p>Set here the gamma adjustment of the image."));
+ TQWhatsThis::add( m_gInput, i18n("<p>Set here the gamma adjustment of the image."));
// -------------------------------------------------------------
@@ -193,26 +193,26 @@ BCGTool::BCGTool(QObject* parent)
// -------------------------------------------------------------
- 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(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_bInput, SIGNAL(valueChanged(int)),
- this, SLOT(slotTimer()));
+ connect(m_bInput, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotTimer()));
- connect(m_cInput, SIGNAL(valueChanged(int)),
- this, SLOT(slotTimer()));
+ connect(m_cInput, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotTimer()));
- connect(m_gInput, SIGNAL(valueChanged(double)),
- this, SLOT(slotTimer()));
+ connect(m_gInput, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotTimer()));
- connect(m_previewWidget, SIGNAL(signalResized()),
- this, SLOT(slotEffect()));
+ connect(m_previewWidget, TQT_SIGNAL(signalResized()),
+ this, TQT_SLOT(slotEffect()));
// -------------------------------------------------------------
@@ -231,32 +231,32 @@ void BCGTool::slotChannelChanged(int channel)
{
case LuminosityChannel:
m_histogramWidget->m_channelType = HistogramWidget::ValueHistogram;
- m_hGradient->setColors(QColor("black"), QColor("white"));
+ m_hGradient->setColors(TQColor("black"), TQColor("white"));
break;
case RedChannel:
m_histogramWidget->m_channelType = HistogramWidget::RedChannelHistogram;
- m_hGradient->setColors(QColor("black"), QColor("red"));
+ m_hGradient->setColors(TQColor("black"), TQColor("red"));
break;
case GreenChannel:
m_histogramWidget->m_channelType = HistogramWidget::GreenChannelHistogram;
- m_hGradient->setColors(QColor("black"), QColor("green"));
+ m_hGradient->setColors(TQColor("black"), TQColor("green"));
break;
case BlueChannel:
m_histogramWidget->m_channelType = HistogramWidget::BlueChannelHistogram;
- m_hGradient->setColors(QColor("black"), QColor("blue"));
+ m_hGradient->setColors(TQColor("black"), TQColor("blue"));
break;
}
- m_histogramWidget->repaint(false);
+ m_histogramWidget->tqrepaint(false);
}
void BCGTool::slotScaleChanged(int scale)
{
m_histogramWidget->m_scaleType = scale;
- m_histogramWidget->repaint(false);
+ m_histogramWidget->tqrepaint(false);
}
void BCGTool::slotColorSelectedFromTarget(const DColor &color)