summaryrefslogtreecommitdiffstats
path: root/lib/kopainter/koColorChooser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kopainter/koColorChooser.cc')
-rw-r--r--lib/kopainter/koColorChooser.cc166
1 files changed, 83 insertions, 83 deletions
diff --git a/lib/kopainter/koColorChooser.cc b/lib/kopainter/koColorChooser.cc
index e321123a8..7f2a7d58d 100644
--- a/lib/kopainter/koColorChooser.cc
+++ b/lib/kopainter/koColorChooser.cc
@@ -20,10 +20,10 @@
#include "koColorChooser.h"
-#include <qcolor.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -32,18 +32,18 @@
#include <koFrameButton.h>
#include <koColorSlider.h>
-KoColorChooser::KoColorChooser(QWidget *parent, const char *name) : QWidget(parent, name)
+KoColorChooser::KoColorChooser(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_current = 0;
- m_tab = new QTabWidget(this, "KoColorChooser tab");
- mGrid = new QGridLayout(this, 3, 5);
+ m_tab = new TQTabWidget(this, "KoColorChooser tab");
+ mGrid = new TQGridLayout(this, 3, 5);
mRGBWidget = new RGBWidget(m_tab);
m_current = mRGBWidget;
m_tab -> addTab(mRGBWidget, "RGB");
mHSVWidget = new HSVWidget(m_tab);
m_tab -> addTab(mHSVWidget, "HSV");
#if 0
- mCMYKWidget = new QWidget(m_tab);
+ mCMYKWidget = new TQWidget(m_tab);
m_tab -> addTab(mCMYKWidget, "CMYK");
mLABWidget = new LABWidget(m_tab);
m_tab -> addTab(mLABWidget, "LAB");
@@ -54,16 +54,16 @@ KoColorChooser::KoColorChooser(QWidget *parent, const char *name) : QWidget(pare
mColorSelector->setFixedHeight(20);
mGrid->addMultiCellWidget(m_tab, 0, 1, 0, 4);
mGrid->addMultiCellWidget(mColorSelector, 2, 2, 0, 4);
- connect(mRGBWidget, SIGNAL(colorChanged(const KoColor &)), this, SLOT(childColorChanged(const KoColor &)));
- connect(mHSVWidget, SIGNAL(colorChanged(const KoColor &)), this, SLOT(childColorChanged(const KoColor &)));
-// connect(mLABWidget, SIGNAL(colorChanged(const KoColor &)), this, SLOT(childColorChanged(const KoColor &)));
- connect(mGreyWidget, SIGNAL(colorChanged(const KoColor &)), this, SLOT(childColorChanged(const KoColor &)));
- connect(mColorSelector, SIGNAL(valueChanged(int, int)), this, SLOT(slotChangeXY(int, int)));
- connect(m_tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotCurrentChanged(QWidget*)));
+ connect(mRGBWidget, TQT_SIGNAL(colorChanged(const KoColor &)), this, TQT_SLOT(childColorChanged(const KoColor &)));
+ connect(mHSVWidget, TQT_SIGNAL(colorChanged(const KoColor &)), this, TQT_SLOT(childColorChanged(const KoColor &)));
+// connect(mLABWidget, TQT_SIGNAL(colorChanged(const KoColor &)), this, TQT_SLOT(childColorChanged(const KoColor &)));
+ connect(mGreyWidget, TQT_SIGNAL(colorChanged(const KoColor &)), this, TQT_SLOT(childColorChanged(const KoColor &)));
+ connect(mColorSelector, TQT_SIGNAL(valueChanged(int, int)), this, TQT_SLOT(slotChangeXY(int, int)));
+ connect(m_tab, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotCurrentChanged(TQWidget*)));
slotChangeColor(KoColor::black());
}
-void KoColorChooser::slotCurrentChanged(QWidget *current)
+void KoColorChooser::slotCurrentChanged(TQWidget *current)
{
m_current = static_cast<ColorWidget*>(current);
m_current -> slotChangeColor(mColor);
@@ -76,7 +76,7 @@ void KoColorChooser::slotChangeXY(int h, int s)
m_current -> slotChangeColor(c);
}
-void KoColorChooser::slotChangeColor(const QColor &c)
+void KoColorChooser::slotChangeColor(const TQColor &c)
{
slotChangeColor(KoColor(c));
}
@@ -95,9 +95,9 @@ void KoColorChooser::slotChangeColor(const KoColor &c)
}
/* RGBWidget */
-RGBWidget::RGBWidget(QWidget *parent) : ColorWidget(parent)
+RGBWidget::RGBWidget(TQWidget *tqparent) : ColorWidget(tqparent)
{
- QGridLayout *mGrid = new QGridLayout(this, 4, 5);
+ TQGridLayout *mGrid = new TQGridLayout(this, 4, 5);
mColorPatch = new KColorPatch(this);
@@ -115,24 +115,24 @@ RGBWidget::RGBWidget(QWidget *parent) : ColorWidget(parent)
mBSlider->slotSetRange(0, 255);
/* setup slider labels */
- mRLabel = new QLabel("R", this);
+ mRLabel = new TQLabel("R", this);
mRLabel->setFixedWidth(16);
mRLabel->setFixedHeight(20);
- mGLabel = new QLabel("G", this);
+ mGLabel = new TQLabel("G", this);
mGLabel->setFixedWidth(16);
mGLabel->setFixedHeight(20);
- mBLabel = new QLabel("B", this);
+ mBLabel = new TQLabel("B", this);
mBLabel->setFixedWidth(16);
mBLabel->setFixedHeight(20);
/* setup spin box */
- mRIn = new QSpinBox(0, 255, 1, this);
+ mRIn = new TQSpinBox(0, 255, 1, this);
mRIn->setFixedWidth(42);
mRIn->setFixedHeight(20);
- mGIn = new QSpinBox(0, 255, 1, this);
+ mGIn = new TQSpinBox(0, 255, 1, this);
mGIn->setFixedWidth(42);
mGIn->setFixedHeight(20);
- mBIn = new QSpinBox(0, 255, 1, this);
+ mBIn = new TQSpinBox(0, 255, 1, this);
mBIn->setFixedWidth(42);
mBIn->setFixedHeight(20);
@@ -147,20 +147,20 @@ RGBWidget::RGBWidget(QWidget *parent) : ColorWidget(parent)
mGrid->addWidget(mGIn, 2, 4);
mGrid->addWidget(mBIn, 3, 4);
- connect(mColorPatch, SIGNAL(colorChanged(const QColor &)), this, SLOT(slotPatchChanged(const QColor &)));
+ connect(mColorPatch, TQT_SIGNAL(colorChanged(const TQColor &)), this, TQT_SLOT(slotPatchChanged(const TQColor &)));
/* connect color sliders */
- connect(mRSlider, SIGNAL(valueChanged(int)), this, SLOT(slotRSliderChanged(int)));
- connect(mGSlider, SIGNAL(valueChanged(int)), this, SLOT(slotGSliderChanged(int)));
- connect(mBSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBSliderChanged(int)));
+ connect(mRSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRSliderChanged(int)));
+ connect(mGSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGSliderChanged(int)));
+ connect(mBSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBSliderChanged(int)));
/* connect spin box */
- connect(mRIn, SIGNAL(valueChanged(int)), this, SLOT(slotRInChanged(int)));
- connect(mGIn, SIGNAL(valueChanged(int)), this, SLOT(slotGInChanged(int)));
- connect(mBIn, SIGNAL(valueChanged(int)), this, SLOT(slotBInChanged(int)));
+ connect(mRIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRInChanged(int)));
+ connect(mGIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGInChanged(int)));
+ connect(mBIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBInChanged(int)));
}
-ColorWidget::ColorWidget(QWidget *parent) : QWidget(parent)
+ColorWidget::ColorWidget(TQWidget *tqparent) : TQWidget(tqparent)
{
}
@@ -174,7 +174,7 @@ void ColorWidget::slotChangeColor(const KoColor& c)
slotRefreshColor();
}
-void ColorWidget::slotChangeColor(const QColor& c)
+void ColorWidget::slotChangeColor(const TQColor& c)
{
mColor.setColor(c);
slotRefreshColor();
@@ -186,18 +186,18 @@ void RGBWidget::slotRefreshColor()
int g = mColor.G();
int b = mColor.B();
- mRSlider->slotSetColor1(QColor(0, g, b));
- mRSlider->slotSetColor2(QColor(255, g, b));
+ mRSlider->slotSetColor1(TQColor(0, g, b));
+ mRSlider->slotSetColor2(TQColor(255, g, b));
mRSlider->slotSetValue(r);
mRIn->setValue(r);
- mGSlider->slotSetColor1(QColor(r, 0, b));
- mGSlider->slotSetColor2(QColor(r, 255, b));
+ mGSlider->slotSetColor1(TQColor(r, 0, b));
+ mGSlider->slotSetColor2(TQColor(r, 255, b));
mGSlider->slotSetValue(g);
mGIn->setValue(g);
- mBSlider->slotSetColor1(QColor(r, g, 0));
- mBSlider->slotSetColor2(QColor(r, g, 255));
+ mBSlider->slotSetColor1(TQColor(r, g, 0));
+ mBSlider->slotSetColor2(TQColor(r, g, 255));
mBSlider->slotSetValue(b);
mBIn->setValue(b);
mColorPatch -> setColor(mColor.color());
@@ -263,7 +263,7 @@ void RGBWidget::slotBInChanged(int b)
emit colorChanged(KoColor(r, g, b, KoColor::csRGB));
}
-void RGBWidget::slotPatchChanged(const QColor& clr)
+void RGBWidget::slotPatchChanged(const TQColor& clr)
{
int r = clr.red();
int g = clr.green();
@@ -276,9 +276,9 @@ void RGBWidget::slotPatchChanged(const QColor& clr)
/* HSVWidget */
-HSVWidget::HSVWidget(QWidget *parent): ColorWidget(parent)
+HSVWidget::HSVWidget(TQWidget *tqparent): ColorWidget(tqparent)
{
- QGridLayout *mGrid = new QGridLayout(this, 3, 3);
+ TQGridLayout *mGrid = new TQGridLayout(this, 3, 3);
mColorPatch = new KColorPatch(this);
@@ -296,24 +296,24 @@ HSVWidget::HSVWidget(QWidget *parent): ColorWidget(parent)
mVSlider->slotSetRange(0, 255);
/* setup slider labels */
- mHLabel = new QLabel("H", this);
+ mHLabel = new TQLabel("H", this);
mHLabel->setFixedWidth(16);
mHLabel->setFixedHeight(20);
- mSLabel = new QLabel("S", this);
+ mSLabel = new TQLabel("S", this);
mSLabel->setFixedWidth(16);
mSLabel->setFixedHeight(20);
- mVLabel = new QLabel("V", this);
+ mVLabel = new TQLabel("V", this);
mVLabel->setFixedWidth(16);
mVLabel->setFixedHeight(20);
/* setup spin box */
- mHIn = new QSpinBox(0, 359, 1, this);
+ mHIn = new TQSpinBox(0, 359, 1, this);
mHIn->setFixedWidth(42);
mHIn->setFixedHeight(20);
- mSIn = new QSpinBox(0, 255, 1, this);
+ mSIn = new TQSpinBox(0, 255, 1, this);
mSIn->setFixedWidth(42);
mSIn->setFixedHeight(20);
- mVIn = new QSpinBox(0, 255, 1, this);
+ mVIn = new TQSpinBox(0, 255, 1, this);
mVIn->setFixedWidth(42);
mVIn->setFixedHeight(20);
@@ -328,17 +328,17 @@ HSVWidget::HSVWidget(QWidget *parent): ColorWidget(parent)
mGrid->addWidget(mSIn, 2, 4);
mGrid->addWidget(mVIn, 3, 4);
- connect(mColorPatch, SIGNAL(colorChanged(const QColor &)), this, SLOT(slotPatchChanged(const QColor &)));
+ connect(mColorPatch, TQT_SIGNAL(colorChanged(const TQColor &)), this, TQT_SLOT(slotPatchChanged(const TQColor &)));
/* connect color sliders */
- connect(mHSlider, SIGNAL(valueChanged(int)), this, SLOT(slotHSliderChanged(int)));
- connect(mSSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSSliderChanged(int)));
- connect(mVSlider, SIGNAL(valueChanged(int)), this, SLOT(slotVSliderChanged(int)));
+ connect(mHSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHSliderChanged(int)));
+ connect(mSSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSSliderChanged(int)));
+ connect(mVSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVSliderChanged(int)));
/* connect spin box */
- connect(mHIn, SIGNAL(valueChanged(int)), this, SLOT(slotHInChanged(int)));
- connect(mSIn, SIGNAL(valueChanged(int)), this, SLOT(slotSInChanged(int)));
- connect(mVIn, SIGNAL(valueChanged(int)), this, SLOT(slotVInChanged(int)));
+ connect(mHIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHInChanged(int)));
+ connect(mSIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSInChanged(int)));
+ connect(mVIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVInChanged(int)));
}
void HSVWidget::slotRefreshColor()
@@ -424,7 +424,7 @@ void HSVWidget::slotVInChanged(int v)
emit colorChanged(mColor);
}
-void HSVWidget::slotPatchChanged(const QColor& clr)
+void HSVWidget::slotPatchChanged(const TQColor& clr)
{
int r = clr.red();
int g = clr.green();
@@ -437,9 +437,9 @@ void HSVWidget::slotPatchChanged(const QColor& clr)
/* GreyWidget */
-GreyWidget::GreyWidget(QWidget *parent): ColorWidget(parent)
+GreyWidget::GreyWidget(TQWidget *tqparent): ColorWidget(tqparent)
{
- QGridLayout *mGrid = new QGridLayout(this, 3, 3);
+ TQGridLayout *mGrid = new TQGridLayout(this, 3, 3);
mColorPatch = new KColorPatch(this);
@@ -447,16 +447,16 @@ GreyWidget::GreyWidget(QWidget *parent): ColorWidget(parent)
mVSlider = new KoColorSlider(this);
mVSlider->setMaximumHeight(20);
mVSlider->slotSetRange(0, 255);
- mVSlider->slotSetColor1(QColor(255, 255, 255));
- mVSlider->slotSetColor2(QColor(0, 0, 0));
+ mVSlider->slotSetColor1(TQColor(255, 255, 255));
+ mVSlider->slotSetColor2(TQColor(0, 0, 0));
/* setup slider label */
- mVLabel = new QLabel("K", this);
+ mVLabel = new TQLabel("K", this);
mVLabel->setFixedWidth(18);
mVLabel->setFixedHeight(20);
/* setup spin box */
- mVIn = new QSpinBox(0, 255, 1, this);
+ mVIn = new TQSpinBox(0, 255, 1, this);
mVIn->setFixedWidth(42);
mVIn->setFixedHeight(20);
@@ -465,13 +465,13 @@ GreyWidget::GreyWidget(QWidget *parent): ColorWidget(parent)
mGrid->addMultiCellWidget(mVSlider, 1, 1, 2, 3);
mGrid->addWidget(mVIn, 1, 4);
- connect(mColorPatch, SIGNAL(colorChanged(const QColor &)), this, SLOT(slotPatchChanged(const QColor &)));
+ connect(mColorPatch, TQT_SIGNAL(colorChanged(const TQColor &)), this, TQT_SLOT(slotPatchChanged(const TQColor &)));
/* connect color slider */
- connect(mVSlider, SIGNAL(valueChanged(int)), this, SLOT(slotVSliderChanged(int)));
+ connect(mVSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVSliderChanged(int)));
/* connect spin box */
- connect(mVIn, SIGNAL(valueChanged(int)), mVSlider, SLOT(slotSetValue(int)));
+ connect(mVIn, TQT_SIGNAL(valueChanged(int)), mVSlider, TQT_SLOT(slotSetValue(int)));
}
void GreyWidget::slotRefreshColor()
@@ -502,18 +502,18 @@ void GreyWidget::slotVInChanged(int v)
emit colorChanged(mColor);
}
-void GreyWidget::slotPatchChanged(const QColor& clr)
+void GreyWidget::slotPatchChanged(const TQColor& clr)
{
- int gray = qGray(clr.red(), clr.green(), clr.blue());
+ int gray = tqGray(clr.red(), clr.green(), clr.blue());
mColor.setRGB(gray, gray, gray);
slotRefreshColor();
emit colorChanged(mColor);
}
-LABWidget::LABWidget(QWidget *parent) : ColorWidget(parent)
+LABWidget::LABWidget(TQWidget *tqparent) : ColorWidget(tqparent)
{
- QGridLayout *mGrid = new QGridLayout(this, 4, 5);
+ TQGridLayout *mGrid = new TQGridLayout(this, 4, 5);
mColorPatch = new KColorPatch(this);
@@ -531,24 +531,24 @@ LABWidget::LABWidget(QWidget *parent) : ColorWidget(parent)
mBSlider->slotSetRange(0, 255);
/* setup slider labels */
- mLLabel = new QLabel("L", this);
+ mLLabel = new TQLabel("L", this);
mLLabel->setFixedWidth(16);
mLLabel->setFixedHeight(20);
- mALabel = new QLabel("A", this);
+ mALabel = new TQLabel("A", this);
mALabel->setFixedWidth(16);
mALabel->setFixedHeight(20);
- mBLabel = new QLabel("B", this);
+ mBLabel = new TQLabel("B", this);
mBLabel->setFixedWidth(16);
mBLabel->setFixedHeight(20);
/* setup spin box */
- mLIn = new QSpinBox(0, 255, 1, this);
+ mLIn = new TQSpinBox(0, 255, 1, this);
mLIn->setFixedWidth(42);
mLIn->setFixedHeight(20);
- mAIn = new QSpinBox(0, 255, 1, this);
+ mAIn = new TQSpinBox(0, 255, 1, this);
mAIn->setFixedWidth(42);
mAIn->setFixedHeight(20);
- mBIn = new QSpinBox(0, 255, 1, this);
+ mBIn = new TQSpinBox(0, 255, 1, this);
mBIn->setFixedWidth(42);
mBIn->setFixedHeight(20);
@@ -563,17 +563,17 @@ LABWidget::LABWidget(QWidget *parent) : ColorWidget(parent)
mGrid->addWidget(mAIn, 2, 4);
mGrid->addWidget(mBIn, 3, 4);
- connect(mColorPatch, SIGNAL(colorChanged(const QColor &)), this, SLOT(slotPatchChanged(const QColor &)));
+ connect(mColorPatch, TQT_SIGNAL(colorChanged(const TQColor &)), this, TQT_SLOT(slotPatchChanged(const TQColor &)));
/* connect color sliders */
- connect(mLSlider, SIGNAL(valueChanged(int)), this, SLOT(slotLSliderChanged(int)));
- connect(mASlider, SIGNAL(valueChanged(int)), this, SLOT(slotASliderChanged(int)));
- connect(mBSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBSliderChanged(int)));
+ connect(mLSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotLSliderChanged(int)));
+ connect(mASlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotASliderChanged(int)));
+ connect(mBSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBSliderChanged(int)));
/* connect spin box */
- connect(mLIn, SIGNAL(valueChanged(int)), this, SLOT(slotLInChanged(int)));
- connect(mAIn, SIGNAL(valueChanged(int)), this, SLOT(slotAInChanged(int)));
- connect(mBIn, SIGNAL(valueChanged(int)), this, SLOT(slotBInChanged(int)));
+ connect(mLIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotLInChanged(int)));
+ connect(mAIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotAInChanged(int)));
+ connect(mBIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBInChanged(int)));
}
void LABWidget::slotRefreshColor()
@@ -660,7 +660,7 @@ void LABWidget::slotBInChanged(int b)
emit colorChanged(mColor);
}
-void LABWidget::slotPatchChanged(const QColor& clr)
+void LABWidget::slotPatchChanged(const TQColor& clr)
{
int r = clr.red();
int g = clr.green();