summaryrefslogtreecommitdiffstats
path: root/lib/kopainter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kopainter')
-rw-r--r--lib/kopainter/koColor.cc22
-rw-r--r--lib/kopainter/koColor.h16
-rw-r--r--lib/kopainter/koColorChooser.cc166
-rw-r--r--lib/kopainter/koColorChooser.h92
-rw-r--r--lib/kopainter/koColorSlider.cc122
-rw-r--r--lib/kopainter/koColorSlider.h69
-rw-r--r--lib/kopainter/koFrameButton.cc22
-rw-r--r--lib/kopainter/koFrameButton.h27
-rw-r--r--lib/kopainter/koIconChooser.cc98
-rw-r--r--lib/kopainter/koIconChooser.h48
-rw-r--r--lib/kopainter/ko_cmyk_widget.cc110
-rw-r--r--lib/kopainter/ko_cmyk_widget.h55
-rw-r--r--lib/kopainter/ko_color_wheel.cc36
-rw-r--r--lib/kopainter/ko_color_wheel.h19
-rw-r--r--lib/kopainter/ko_gray_widget.cc70
-rw-r--r--lib/kopainter/ko_gray_widget.h39
-rw-r--r--lib/kopainter/ko_hsv_widget.cc80
-rw-r--r--lib/kopainter/ko_hsv_widget.h39
-rw-r--r--lib/kopainter/ko_rgb_widget.cc114
-rw-r--r--lib/kopainter/ko_rgb_widget.h49
-rw-r--r--lib/kopainter/kogradientmanager.cc120
-rw-r--r--lib/kopainter/kogradientmanager.h32
-rw-r--r--lib/kopainter/svgnamedcolors.h4
-rw-r--r--lib/kopainter/svgpathparser.cc8
-rw-r--r--lib/kopainter/svgpathparser.h4
25 files changed, 739 insertions, 722 deletions
diff --git a/lib/kopainter/koColor.cc b/lib/kopainter/koColor.cc
index e808ca8b..813aee8d 100644
--- a/lib/kopainter/koColor.cc
+++ b/lib/kopainter/koColor.cc
@@ -89,7 +89,7 @@ KoColor::KoColor(int c, int m, int y, int k)
cmykChanged();
}
-KoColor::KoColor(const QColor &c)
+KoColor::KoColor(const TQColor &c)
{
mR = c.red();
mG = c.green();
@@ -98,7 +98,7 @@ KoColor::KoColor(const QColor &c)
rgbChanged();
}
-KoColor::KoColor(const QString &name)
+KoColor::KoColor(const TQString &name)
{
setNamedColor(name);
}
@@ -231,9 +231,9 @@ void KoColor::cmyk(int *C, int *M, int *Y, int *K) const
*K = mK;
}
-QString KoColor::name() const
+TQString KoColor::name() const
{
- QString s;
+ TQString s;
switch(mNative)
{
case csRGB:
@@ -254,11 +254,11 @@ QString KoColor::name() const
return s;
}
-QColor KoColor::color() const
+TQColor KoColor::color() const
{
if(!mRGBvalid)
calcRGB();
- return QColor(mR, mG, mB);
+ return TQColor(mR, mG, mB);
}
void KoColor::setRGB(int R, int G, int B)
@@ -298,7 +298,7 @@ void KoColor::setCMYK(int C, int M, int Y, int K)
cmykChanged();
}
-void KoColor::setNamedColor(const QString &name)
+void KoColor::setNamedColor(const TQString &name)
{
switch(name[0])
{
@@ -340,7 +340,7 @@ void KoColor::setNamedColor(const QString &name)
}
}
-void KoColor::setColor(const QColor &c)
+void KoColor::setColor(const TQColor &c)
{
mR = c.red();
mG = c.green();
@@ -621,13 +621,13 @@ void KoColor::CMYKtoLAB(int C, int M, int Y, int K, int *L, int *a, int *b)
RGBtoLAB(R, G, B, L, a, b);
}
-int KoColor::hex2int(QChar c)
+int KoColor::hex2int(TQChar c)
{
if(c.isDigit())
return c.digitValue();
- else if('A' <= c && c <= 'F')
+ else if('A' <= (int)c && (int)c <= 'F')
return c - 'A' + 10;
- else if('a' <= c && c <= 'f')
+ else if('a' <= (int)c && (int)c <= 'f')
return c - 'a' + 10;
else
return 0;
diff --git a/lib/kopainter/koColor.h b/lib/kopainter/koColor.h
index f955754f..70fffd1f 100644
--- a/lib/kopainter/koColor.h
+++ b/lib/kopainter/koColor.h
@@ -21,7 +21,7 @@
#ifndef __ko_color_h__
#define __ko_color_h__
-#include <qcolor.h>
+#include <tqcolor.h>
#include <koffice_export.h>
class KOPAINTER_EXPORT KoColor
{
@@ -31,8 +31,8 @@ public:
KoColor();
KoColor(int a, int b, int c, cSpace m = csRGB);
KoColor(int c, int m, int y, int k);
- KoColor(const QString &name);
- KoColor(const QColor &c);
+ KoColor(const TQString &name);
+ KoColor(const TQColor &c);
cSpace native() const {return mNative; }
@@ -54,15 +54,15 @@ public:
void hsv(int *H, int *S, int *V) const;
void lab(int *L, int *a, int *b) const;
void cmyk(int *C, int *M, int *Y, int *K) const;
- QString name() const;
- QColor color() const;
+ TQString name() const;
+ TQColor color() const;
void setRGB(int R, int G, int B);
void setHSV(int H, int S, int V);
void setLab(int L, int a, int b);
void setCMYK(int C, int M, int Y, int K);
- void setNamedColor(const QString &name);
- void setColor(const QColor &c);
+ void setNamedColor(const TQString &name);
+ void setColor(const TQColor &c);
static void RGBtoHSV(int R, int G, int B, int *H, int *S, int *V);
static void RGBtoLAB(int R, int G, int B, int *L, int *a, int *b);
@@ -99,7 +99,7 @@ public:
static const KoColor darkYellow();
protected:
- int hex2int(QChar c);
+ int hex2int(TQChar c);
void calcRGB() const;
void calcHSV() const;
diff --git a/lib/kopainter/koColorChooser.cc b/lib/kopainter/koColorChooser.cc
index e321123a..7f2a7d58 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();
diff --git a/lib/kopainter/koColorChooser.h b/lib/kopainter/koColorChooser.h
index 3dddcb8b..c6d72113 100644
--- a/lib/kopainter/koColorChooser.h
+++ b/lib/kopainter/koColorChooser.h
@@ -21,12 +21,12 @@
#ifndef __ko_ColorChooser_h__
#define __ko_ColorChooser_h__
-#include <qwidget.h>
+#include <tqwidget.h>
#include "koColor.h"
class KoFrameButton;
-class QGridLayout;
-class QTabWidget;
+class TQGridLayout;
+class TQTabWidget;
class RGBWidget;
class HSVWidget;
class CMYKWidget;
@@ -34,23 +34,24 @@ class LABWidget;
class GreyWidget;
class KoColor;
class KoColorSlider;
-class QLabel;
-class QSpinBox;
+class TQLabel;
+class TQSpinBox;
class KHSSelector;
class KColorPatch;
class ColorWidget;
-class KoColorChooser : public QWidget
+class KoColorChooser : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorChooser(QWidget *parent = 0L, const char *name = 0L);
+ KoColorChooser(TQWidget *tqparent = 0L, const char *name = 0L);
const KoColor &color() const {return mColor; }
public slots:
void slotChangeColor(const KoColor &c);
- void slotChangeColor(const QColor &c);
+ void slotChangeColor(const TQColor &c);
signals:
void colorChanged(const KoColor &c);
@@ -60,13 +61,13 @@ protected slots:
private slots:
void childColorChanged(const KoColor& c);
- void slotCurrentChanged(QWidget *current);
+ void slotCurrentChanged(TQWidget *current);
private:
ColorWidget *m_current;
KoColor mColor;
- QTabWidget *m_tab;
- QGridLayout *mGrid;
+ TQTabWidget *m_tab;
+ TQGridLayout *mGrid;
KoFrameButton *btnRGB;
KoFrameButton *btnHSV;
KoFrameButton *btnCMYK;
@@ -74,22 +75,23 @@ private:
KoFrameButton *btnGrey;
RGBWidget *mRGBWidget;
HSVWidget *mHSVWidget;
- QWidget *mCMYKWidget;
+ TQWidget *mCMYKWidget;
LABWidget *mLABWidget;
GreyWidget *mGreyWidget;
KHSSelector *mColorSelector;
};
-class ColorWidget : public QWidget {
+class ColorWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- ColorWidget(QWidget *parent = 0);
+ ColorWidget(TQWidget *tqparent = 0);
virtual ~ColorWidget();
public slots:
virtual void slotChangeColor(const KoColor& c);
- virtual void slotChangeColor(const QColor& c);
+ virtual void slotChangeColor(const TQColor& c);
virtual void slotRefreshColor() = 0;
protected:
@@ -99,8 +101,9 @@ protected:
class RGBWidget : public ColorWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- RGBWidget(QWidget *parent = 0L);
+ RGBWidget(TQWidget *tqparent = 0L);
virtual ~RGBWidget() {}
public slots:
@@ -115,7 +118,7 @@ protected slots:
void slotGInChanged(int g);
void slotBInChanged(int b);
- void slotPatchChanged(const QColor& clr);
+ void slotPatchChanged(const TQColor& clr);
signals:
void colorChanged(const KoColor &c);
@@ -124,20 +127,21 @@ private:
KoColorSlider *mRSlider;
KoColorSlider *mGSlider;
KoColorSlider *mBSlider;
- QLabel *mRLabel;
- QLabel *mGLabel;
- QLabel *mBLabel;
- QSpinBox *mRIn;
- QSpinBox *mGIn;
- QSpinBox *mBIn;
+ TQLabel *mRLabel;
+ TQLabel *mGLabel;
+ TQLabel *mBLabel;
+ TQSpinBox *mRIn;
+ TQSpinBox *mGIn;
+ TQSpinBox *mBIn;
KColorPatch *mColorPatch;
};
class HSVWidget : public ColorWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- HSVWidget(QWidget *parent = 0L);
+ HSVWidget(TQWidget *tqparent = 0L);
virtual ~HSVWidget() {}
public slots:
@@ -152,7 +156,7 @@ protected slots:
void slotSInChanged(int s);
void slotVInChanged(int v);
- void slotPatchChanged(const QColor& clr);
+ void slotPatchChanged(const TQColor& clr);
signals:
void colorChanged(const KoColor &c);
@@ -161,20 +165,21 @@ private:
KoColorSlider *mHSlider;
KoColorSlider *mSSlider;
KoColorSlider *mVSlider;
- QLabel *mHLabel;
- QLabel *mSLabel;
- QLabel *mVLabel;
- QSpinBox *mHIn;
- QSpinBox *mSIn;
- QSpinBox *mVIn;
+ TQLabel *mHLabel;
+ TQLabel *mSLabel;
+ TQLabel *mVLabel;
+ TQSpinBox *mHIn;
+ TQSpinBox *mSIn;
+ TQSpinBox *mVIn;
KColorPatch *mColorPatch;
};
class GreyWidget : public ColorWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- GreyWidget(QWidget *parent = 0L);
+ GreyWidget(TQWidget *tqparent = 0L);
virtual ~GreyWidget() {}
public slots:
@@ -183,23 +188,24 @@ public slots:
protected slots:
void slotVSliderChanged(int v);
void slotVInChanged(int v);
- void slotPatchChanged(const QColor& clr);
+ void slotPatchChanged(const TQColor& clr);
signals:
void colorChanged(const KoColor &c);
protected:
KoColorSlider *mVSlider;
- QLabel *mVLabel;
- QSpinBox *mVIn;
+ TQLabel *mVLabel;
+ TQSpinBox *mVIn;
KColorPatch *mColorPatch;
};
class LABWidget : public ColorWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- LABWidget(QWidget *parent = 0L);
+ LABWidget(TQWidget *tqparent = 0L);
virtual ~LABWidget() {}
public slots:
@@ -214,7 +220,7 @@ protected slots:
void slotAInChanged(int a);
void slotBInChanged(int b);
- void slotPatchChanged(const QColor& clr);
+ void slotPatchChanged(const TQColor& clr);
signals:
void colorChanged(const KoColor &c);
@@ -223,12 +229,12 @@ private:
KoColorSlider *mLSlider;
KoColorSlider *mASlider;
KoColorSlider *mBSlider;
- QLabel *mLLabel;
- QLabel *mALabel;
- QLabel *mBLabel;
- QSpinBox *mLIn;
- QSpinBox *mAIn;
- QSpinBox *mBIn;
+ TQLabel *mLLabel;
+ TQLabel *mALabel;
+ TQLabel *mBLabel;
+ TQSpinBox *mLIn;
+ TQSpinBox *mAIn;
+ TQSpinBox *mBIn;
KColorPatch *mColorPatch;
};
diff --git a/lib/kopainter/koColorSlider.cc b/lib/kopainter/koColorSlider.cc
index 08c8020a..a7674e4b 100644
--- a/lib/kopainter/koColorSlider.cc
+++ b/lib/kopainter/koColorSlider.cc
@@ -19,29 +19,29 @@
#include "koColorSlider.h"
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qpen.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqpen.h>
#include <kdebug.h>
#include <kpixmapeffect.h>
-KoColorFrame::KoColorFrame(QWidget *parent):
-QFrame(parent)
+KoColorFrame::KoColorFrame(TQWidget *tqparent):
+TQFrame(tqparent)
{
setFrameStyle(Panel | Sunken);
setBackgroundMode(NoBackground);
/* default values */
- mC1 = QColor(0, 0, 0);
- mC2 = QColor(255, 255, 255);
+ mC1 = TQColor(0, 0, 0);
+ mC2 = TQColor(255, 255, 255);
mColorChanged = false;
mPixChanged = false;
mDragging = false;
}
-const QColor KoColorFrame::colorAt(const QPoint &p)
+const TQColor KoColorFrame::colorAt(const TQPoint &p)
{
if(mPixChanged)
{
@@ -50,29 +50,29 @@ const QColor KoColorFrame::colorAt(const QPoint &p)
}
if(p.x() >= mPixmap.width() || p.y() >= mPixmap.height())
- return QColor(255,255,255);
+ return TQColor(255,255,255);
- return QColor(mImage.pixel(p.x(), p.y()));
+ return TQColor(mImage.pixel(p.x(), p.y()));
}
-void KoColorFrame::slotSetColor1(const QColor &c)
+void KoColorFrame::slotSetColor1(const TQColor &c)
{
mC1 = c;
mColorChanged = true;
mPixChanged = true;
- repaint();
+ tqrepaint();
}
-void KoColorFrame::slotSetColor2(const QColor &c)
+void KoColorFrame::slotSetColor2(const TQColor &c)
{
mC2 = c;
mColorChanged = true;
- repaint();
+ tqrepaint();
}
-void KoColorFrame::drawContents(QPainter *p)
+void KoColorFrame::drawContents(TQPainter *p)
{
- QRect r = contentsRect();
+ TQRect r = contentsRect();
if((mPixmap.size() != r.size()) || mColorChanged)
{
@@ -85,14 +85,14 @@ void KoColorFrame::drawContents(QPainter *p)
p->drawPixmap(r.left(), r.top(), mPixmap);
}
-void KoColorFrame::mousePressEvent(QMouseEvent *e)
+void KoColorFrame::mousePressEvent(TQMouseEvent *e)
{
- if(e->button() & LeftButton)
+ if(e->button() & Qt::LeftButton)
{
emit clicked(e->pos());
mDragging = true;
- QPoint pos = QPoint(e->pos().x() - contentsRect().left(), e->pos().y() - contentsRect().top());
+ TQPoint pos = TQPoint(e->pos().x() - contentsRect().left(), e->pos().y() - contentsRect().top());
if(pos.x() < 0)
pos.setX(0);
@@ -104,22 +104,22 @@ void KoColorFrame::mousePressEvent(QMouseEvent *e)
else if(pos.y() >= contentsRect().height())
pos.setY(contentsRect().height()-1);
- QColor c = colorAt(pos);
+ TQColor c = colorAt(pos);
emit colorSelected(c);
}
else
- QFrame::mousePressEvent(e);
+ TQFrame::mousePressEvent(e);
}
-void KoColorFrame::mouseReleaseEvent(QMouseEvent *e)
+void KoColorFrame::mouseReleaseEvent(TQMouseEvent *e)
{
- if(e->button() & LeftButton)
+ if(e->button() & Qt::LeftButton)
mDragging = false;
else
- QFrame::mouseReleaseEvent(e);
+ TQFrame::mouseReleaseEvent(e);
}
-void KoColorFrame::mouseMoveEvent(QMouseEvent *e)
+void KoColorFrame::mouseMoveEvent(TQMouseEvent *e)
{
if(mDragging)
{
@@ -154,31 +154,31 @@ void KoColorFrame::mouseMoveEvent(QMouseEvent *e)
}
// if(set)
-// QCursor::setPos(mapToGlobal(QPoint(x,y)));
+// TQCursor::setPos(mapToGlobal(TQPoint(x,y)));
- QPoint pos = QPoint(x - contentsRect().left(), y - contentsRect().top());
+ TQPoint pos = TQPoint(x - contentsRect().left(), y - contentsRect().top());
- QColor c = colorAt(pos);
+ TQColor c = colorAt(pos);
emit colorSelected(c);
}
else
- QFrame::mouseMoveEvent(e);
+ TQFrame::mouseMoveEvent(e);
}
/***********************************************************************************/
-KoSliderWidget::KoSliderWidget(QWidget *parent):
-QWidget(parent)
+KoSliderWidget::KoSliderWidget(TQWidget *tqparent):
+TQWidget(tqparent)
{
mDragging = false;
setFixedHeight(6);
setFixedWidth(11);
}
-void KoSliderWidget::paintEvent(QPaintEvent *)
+void KoSliderWidget::paintEvent(TQPaintEvent *)
{
- QPainter p;
- QPen pen(black, 1);
+ TQPainter p;
+ TQPen pen(black, 1);
p.begin(this);
p.setPen(pen);
@@ -188,35 +188,35 @@ void KoSliderWidget::paintEvent(QPaintEvent *)
p.end();
}
-void KoSliderWidget::mousePressEvent(QMouseEvent *e)
+void KoSliderWidget::mousePressEvent(TQMouseEvent *e)
{
- if(e->button() & LeftButton)
+ if(e->button() & Qt::LeftButton)
{
mPos = e->pos();
mDragging = true;
}
else
- QWidget::mousePressEvent(e);
+ TQWidget::mousePressEvent(e);
}
-void KoSliderWidget::mouseReleaseEvent(QMouseEvent *e)
+void KoSliderWidget::mouseReleaseEvent(TQMouseEvent *e)
{
- if(e->button() & LeftButton)
+ if(e->button() & Qt::LeftButton)
mDragging = false;
else
- QWidget::mouseReleaseEvent(e);
+ TQWidget::mouseReleaseEvent(e);
}
-void KoSliderWidget::mouseMoveEvent(QMouseEvent *e)
+void KoSliderWidget::mouseMoveEvent(TQMouseEvent *e)
{
if(mDragging)
{
- QWidget *p = parentWidget();
+ TQWidget *p = tqparentWidget();
if(!p)
return;
- QPoint newPos = p->mapFromGlobal(QCursor::pos()) - mPos;
+ TQPoint newPos = p->mapFromGlobal(TQCursor::pos()) - mPos;
/* don't drag vertically */
newPos.setY(pos().y());
@@ -230,13 +230,13 @@ void KoSliderWidget::mouseMoveEvent(QMouseEvent *e)
emit positionChanged(newPos.x());
}
else
- QWidget::mouseMoveEvent(e);
+ TQWidget::mouseMoveEvent(e);
}
/***********************************************************************************/
-KoColorSlider::KoColorSlider(QWidget *parent):
-QWidget(parent)
+KoColorSlider::KoColorSlider(TQWidget *tqparent):
+TQWidget(tqparent)
{
mColorFrame = new KoColorFrame(this);
mSlider = new KoSliderWidget(this);
@@ -245,8 +245,8 @@ QWidget(parent)
mMax = 255;
mValue = 0;
- connect(mSlider, SIGNAL(positionChanged(int)), this, SLOT(slotSliderMoved(int)));
- connect(mColorFrame, SIGNAL(clicked(const QPoint &)), this, SLOT(slotFrameClicked(const QPoint &)));
+ connect(mSlider, TQT_SIGNAL(positionChanged(int)), this, TQT_SLOT(slotSliderMoved(int)));
+ connect(mColorFrame, TQT_SIGNAL(clicked(const TQPoint &)), this, TQT_SLOT(slotFrameClicked(const TQPoint &)));
}
KoColorSlider::~KoColorSlider()
@@ -274,21 +274,21 @@ void KoColorSlider::slotSetRange(int min, int max)
mMax = max;
}
-void KoColorSlider::resizeEvent(QResizeEvent *e)
+void KoColorSlider::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
// m_pSlider->width()/2 * 2 seems stupid but is not because for example
// m_pSlider->width() == 11 I get 10.
mColorFrame->setGeometry(mSlider->width() / 2, 0, width() - mSlider->width() / 2 * 2, height() - mSlider->height());
slotSetValue(mValue);
}
-void KoColorSlider::slotSetColor1(const QColor &c)
+void KoColorSlider::slotSetColor1(const TQColor &c)
{
mColorFrame->slotSetColor1(c);
}
-void KoColorSlider::slotSetColor2(const QColor &c)
+void KoColorSlider::slotSetColor2(const TQColor &c)
{
mColorFrame->slotSetColor2(c);
}
@@ -310,7 +310,7 @@ void KoColorSlider::slotSetValue(int value)
float factor = v / range;
int x = static_cast<int>(factor * mColorFrame->contentsRect().width());
- mSlider->move(QPoint(x, height() - mSlider->height()));
+ mSlider->move(TQPoint(x, height() - mSlider->height()));
}
void KoColorSlider::slotSliderMoved(int x)
@@ -327,13 +327,13 @@ void KoColorSlider::slotSliderMoved(int x)
mValue = static_cast<int>(factor * range);
emit valueChanged(mValue);
- emit colorSelected(mColorFrame->colorAt(QPoint(x, mColorFrame->contentsRect().height()/2)));
+ emit colorSelected(mColorFrame->colorAt(TQPoint(x, mColorFrame->contentsRect().height()/2)));
}
-void KoColorSlider::slotFrameClicked(const QPoint &p)
+void KoColorSlider::slotFrameClicked(const TQPoint &p)
{
- QPoint local = mColorFrame->mapToParent(p);
- QPoint pos = QPoint(local.x() - mSlider->width() / 2, height() - mSlider->height());
+ TQPoint local = mColorFrame->mapToParent(p);
+ TQPoint pos = TQPoint(local.x() - mSlider->width() / 2, height() - mSlider->height());
if(pos.x() < 0)
pos.setX(0);
@@ -344,11 +344,11 @@ void KoColorSlider::slotFrameClicked(const QPoint &p)
slotSliderMoved(pos.x());
}
-void KoColorSlider::mousePressEvent(QMouseEvent *e)
+void KoColorSlider::mousePressEvent(TQMouseEvent *e)
{
- if(e->button() & LeftButton)
+ if(e->button() & Qt::LeftButton)
{
- QPoint pos = QPoint(e->pos().x() - mSlider->width() / 2, height() - mSlider->height());
+ TQPoint pos = TQPoint(e->pos().x() - mSlider->width() / 2, height() - mSlider->height());
if(pos.x() < 0)
pos.setX(0);
@@ -359,7 +359,7 @@ void KoColorSlider::mousePressEvent(QMouseEvent *e)
slotSliderMoved(pos.x());
}
else
- QWidget::mousePressEvent(e);
+ TQWidget::mousePressEvent(e);
}
#include "koColorSlider.moc"
diff --git a/lib/kopainter/koColorSlider.h b/lib/kopainter/koColorSlider.h
index 5c520ba8..e556bcf2 100644
--- a/lib/kopainter/koColorSlider.h
+++ b/lib/kopainter/koColorSlider.h
@@ -20,93 +20,96 @@
#ifndef __ko_ColorSlider_h__
#define __ko_ColorSlider_h__
-#include <qframe.h>
-#include <qpoint.h>
-#include <qimage.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqpoint.h>
+#include <tqimage.h>
+#include <tqwidget.h>
#include <kpixmap.h>
#include <koffice_export.h>
class SliderWidget;
-class KOPAINTER_EXPORT KoColorFrame : public QFrame
+class KOPAINTER_EXPORT KoColorFrame : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorFrame(QWidget *parent = 0L);
+ KoColorFrame(TQWidget *tqparent = 0L);
- const QColor colorAt(const QPoint &p);
+ const TQColor colorAt(const TQPoint &p);
protected:
- void drawContents(QPainter *p);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ void drawContents(TQPainter *p);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
public slots:
- void slotSetColor1(const QColor &c);
- void slotSetColor2(const QColor &c);
+ void slotSetColor1(const TQColor &c);
+ void slotSetColor2(const TQColor &c);
signals:
- void clicked(const QPoint &p);
- void colorSelected(const QColor &c);
+ void clicked(const TQPoint &p);
+ void colorSelected(const TQColor &c);
protected:
- QColor mC1;
- QColor mC2;
+ TQColor mC1;
+ TQColor mC2;
KPixmap mPixmap;
- QImage mImage;
+ TQImage mImage;
bool mColorChanged;
bool mPixChanged;
bool mDragging;
};
-class KOPAINTER_EXPORT KoSliderWidget : public QWidget
+class KOPAINTER_EXPORT KoSliderWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoSliderWidget(QWidget *parent = 0L);
+ KoSliderWidget(TQWidget *tqparent = 0L);
protected:
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void paintEvent(QPaintEvent *);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
+ void paintEvent(TQPaintEvent *);
signals:
void positionChanged(int);
protected:
bool mDragging;
- QPoint mPos;
+ TQPoint mPos;
};
-class KOPAINTER_EXPORT KoColorSlider : public QWidget
+class KOPAINTER_EXPORT KoColorSlider : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorSlider(QWidget *parent = 0L);
+ KoColorSlider(TQWidget *tqparent = 0L);
virtual ~KoColorSlider();
int minValue();
int maxValue();
protected:
- void resizeEvent(QResizeEvent *);
- void mousePressEvent(QMouseEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mousePressEvent(TQMouseEvent *);
public slots:
- void slotSetColor1(const QColor &c);
- void slotSetColor2(const QColor &c);
+ void slotSetColor1(const TQColor &c);
+ void slotSetColor2(const TQColor &c);
void slotSetValue(int value);
void slotSetRange(int min, int max);
protected slots:
void slotSliderMoved(int x);
- void slotFrameClicked(const QPoint &p);
+ void slotFrameClicked(const TQPoint &p);
signals:
- void colorSelected(const QColor &c);
+ void colorSelected(const TQColor &c);
void valueChanged(int value);
protected:
diff --git a/lib/kopainter/koFrameButton.cc b/lib/kopainter/koFrameButton.cc
index cb752363..80610422 100644
--- a/lib/kopainter/koFrameButton.cc
+++ b/lib/kopainter/koFrameButton.cc
@@ -20,8 +20,8 @@
#include "koFrameButton.h"
-KoFrameButton::KoFrameButton(QWidget *parent, const char *name):
-QLabel(parent, name)
+KoFrameButton::KoFrameButton(TQWidget *tqparent, const char *name):
+TQLabel(tqparent, name)
{
setAutoResize(true);
setFrameStyle(Panel | Raised);
@@ -31,19 +31,19 @@ QLabel(parent, name)
mToggle = false;
}
-KoFrameButton::KoFrameButton(const QString &text, QWidget *parent, const char *name):
-QLabel(parent, name)
+KoFrameButton::KoFrameButton(const TQString &text, TQWidget *tqparent, const char *name):
+TQLabel(tqparent, name)
{
setFrameStyle(Panel | Raised);
setLineWidth(1);
setText(text);
- setAlignment(AlignHCenter | AlignVCenter);
+ tqsetAlignment(AlignHCenter | AlignVCenter);
mActive = false;
mToggle = false;
}
-KoFrameButton::KoFrameButton(const QPixmap &pixmap, QWidget *parent, const char *name):
-QLabel(parent, name)
+KoFrameButton::KoFrameButton(const TQPixmap &pixmap, TQWidget *tqparent, const char *name):
+TQLabel(tqparent, name)
{
setFrameStyle(Panel | Raised);
setLineWidth(1);
@@ -52,12 +52,12 @@ QLabel(parent, name)
mToggle = false;
}
-void KoFrameButton::mousePressEvent(QMouseEvent *)
+void KoFrameButton::mousePressEvent(TQMouseEvent *)
{
setFrameStyle(Panel | Sunken);
}
-void KoFrameButton::mouseReleaseEvent(QMouseEvent *)
+void KoFrameButton::mouseReleaseEvent(TQMouseEvent *)
{
if(mToggle)
{
@@ -93,10 +93,10 @@ void KoFrameButton::setToggleButton(bool v)
mToggle = v;
}
-void KoFrameButton::setText(const QString &t)
+void KoFrameButton::setText(const TQString &t)
{
mText = t;
- QLabel::setText(t);
+ TQLabel::setText(t);
}
#include "koFrameButton.moc"
diff --git a/lib/kopainter/koFrameButton.h b/lib/kopainter/koFrameButton.h
index c540fd9f..d05e1d1f 100644
--- a/lib/kopainter/koFrameButton.h
+++ b/lib/kopainter/koFrameButton.h
@@ -21,18 +21,19 @@
#ifndef __ko_framebutton_h__
#define __ko_framebutton_h__
-#include <qlabel.h>
+#include <tqlabel.h>
-class QPixmap;
-class QString;
+class TQPixmap;
+class TQString;
-class KoFrameButton : public QLabel
+class KoFrameButton : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoFrameButton(QWidget *parent = 0, const char *name = 0);
- KoFrameButton(const QString &text, QWidget *parent = 0, const char *name = 0);
- KoFrameButton(const QPixmap &pixmap, QWidget *parent = 0, const char *name = 0);
+ KoFrameButton(TQWidget *tqparent = 0, const char *name = 0);
+ KoFrameButton(const TQString &text, TQWidget *tqparent = 0, const char *name = 0);
+ KoFrameButton(const TQPixmap &pixmap, TQWidget *tqparent = 0, const char *name = 0);
bool isOn() {return mActive; }
void setOn(bool v);
@@ -40,21 +41,21 @@ public:
bool isToggleButton() {return mToggle; }
void setToggleButton(bool v);
- QString text() {return mText; }
- virtual void setText(const QString &t);
+ TQString text() {return mText; }
+ virtual void setText(const TQString &t);
signals:
void clicked();
- void clicked(const QString &);
+ void clicked(const TQString &);
protected:
- void mousePressEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
private:
bool mActive;
bool mToggle;
- QString mText;
+ TQString mText;
};
#endif
diff --git a/lib/kopainter/koIconChooser.cc b/lib/kopainter/koIconChooser.cc
index 57fda8d8..ae4bc613 100644
--- a/lib/kopainter/koIconChooser.cc
+++ b/lib/kopainter/koIconChooser.cc
@@ -22,18 +22,18 @@
#include <koIconChooser.h>
#include <kglobal.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
#include <kdebug.h>
-KoPixmapWidget::KoPixmapWidget(const QPixmap &aPixmap, QWidget *parent, const char *name):
-QFrame(parent, name, WType_Popup)
+KoPixmapWidget::KoPixmapWidget(const TQPixmap &aPixmap, TQWidget *tqparent, const char *name):
+TQFrame(tqparent, name, WType_Popup)
{
kdDebug() << "Popup created: " << name << "\n";
- setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
mPixmap = aPixmap;
int w = mPixmap.width() + 2 * lineWidth();
int h = mPixmap.height() + 2 * lineWidth();
@@ -46,25 +46,25 @@ KoPixmapWidget::~KoPixmapWidget()
}
// paint the centered pixmap; don't overpaint the frame
-void KoPixmapWidget::paintEvent(QPaintEvent *e)
+void KoPixmapWidget::paintEvent(TQPaintEvent *e)
{
- QFrame::paintEvent(e);
- QPainter p(this);
+ TQFrame::paintEvent(e);
+ TQPainter p(this);
p.setClipRect(e->rect());
p.drawPixmap(lineWidth(), lineWidth(), mPixmap);
}
-void KoPixmapWidget::mouseReleaseEvent(QMouseEvent *)
+void KoPixmapWidget::mouseReleaseEvent(TQMouseEvent *)
{
hide();
}
-KoIconChooser::KoIconChooser(QSize aIconSize, QWidget *parent, const char *name, bool sort):
-QGridView(parent, name)
+KoIconChooser::KoIconChooser(TQSize aIconSize, TQWidget *tqparent, const char *name, bool sort):
+TQGridView(tqparent, name)
{
- QGridView::setBackgroundColor(Qt::white);
+ TQGridView::setBackgroundColor(TQt::white);
mMargin = 2;
setCellWidth(aIconSize.width() + 2 * mMargin);
@@ -92,7 +92,7 @@ KoIconChooser::~KoIconChooser()
void KoIconChooser::addItem(KoIconItem *item)
{
- Q_INT32 n = mItemCount;
+ TQ_INT32 n = mItemCount;
KoIconItem *current = currentItem();
Q_ASSERT(item);
@@ -125,7 +125,7 @@ void KoIconChooser::addItem(KoIconItem *item)
bool KoIconChooser::removeItem(KoIconItem *item)
{
- int index = mIconList.find(item);
+ int index = mIconList.tqfind(item);
bool ok = mIconList.remove(item);
if( ok )
{
@@ -155,7 +155,7 @@ KoIconItem *KoIconChooser::currentItem()
// does NOT emit selected() (should it?)
void KoIconChooser::setCurrentItem(KoIconItem *item)
{
- int index = mIconList.find(item);
+ int index = mIconList.tqfind(item);
// item is available
if(index != -1 && mNCols > 0)
@@ -166,21 +166,21 @@ void KoIconChooser::setCurrentItem(KoIconItem *item)
mCurRow = index / mNCols;
mCurCol = index % mNCols;
- // repaint the old and the new item
- repaintCell(oldRow, oldCol);
- repaintCell(mCurRow, mCurCol);
+ // tqrepaint the old and the new item
+ tqrepaintCell(oldRow, oldCol);
+ tqrepaintCell(mCurRow, mCurCol);
ensureCellVisible(mCurRow, mCurCol);
}
}
// eventually select the item, clicked on
-void KoIconChooser::mousePressEvent(QMouseEvent *e)
+void KoIconChooser::mousePressEvent(TQMouseEvent *e)
{
- QGridView::mousePressEvent(e);
+ TQGridView::mousePressEvent(e);
}
-void KoIconChooser::mouseMoveEvent(QMouseEvent *e)
+void KoIconChooser::mouseMoveEvent(TQMouseEvent *e)
{
if(mMouseButtonDown && mDragEnabled )
{
@@ -191,7 +191,7 @@ void KoIconChooser::mouseMoveEvent(QMouseEvent *e)
mPixmapWidget = 0L;
}
#endif
- if( ( mDragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() )
+ if( ( mDragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() )
startDrag();
}
}
@@ -202,16 +202,16 @@ KoIconChooser::startDrag()
mMouseButtonDown = false;
}
-void KoIconChooser::mouseReleaseEvent(QMouseEvent * e)
+void KoIconChooser::mouseReleaseEvent(TQMouseEvent * e)
{
mMouseButtonDown = true;
- if(e->button() == LeftButton)
+ if(e->button() == Qt::LeftButton)
{
- QPoint p = e->pos();
+ TQPoint p = e->pos();
mDragStartPos = p;
int x = contentsX() + p.x();
int y = contentsY() + p.y();
- QSize gridExtent = gridSize();
+ TQSize gridExtent = gridSize();
if (x < gridExtent.width() && y < gridExtent.height())
{
@@ -221,7 +221,7 @@ void KoIconChooser::mouseReleaseEvent(QMouseEvent * e)
KoIconItem *item = itemAt(row, col);
if(item)
{
- const QPixmap &pix = item->pixmap();
+ const TQPixmap &pix = item->pixmap();
if(pix.width() > mItemWidth || pix.height() > mItemHeight)
showFullPixmap(pix, p);
@@ -233,16 +233,16 @@ void KoIconChooser::mouseReleaseEvent(QMouseEvent * e)
}
// FIXME: implement keyboard navigation
-void KoIconChooser::keyPressEvent(QKeyEvent *e)
+void KoIconChooser::keyPressEvent(TQKeyEvent *e)
{
- QGridView::keyPressEvent(e);
+ TQGridView::keyPressEvent(e);
}
// recalculate the number of items that fit into one row
// set the current item again after calculating the new grid
-void KoIconChooser::resizeEvent(QResizeEvent *e)
+void KoIconChooser::resizeEvent(TQResizeEvent *e)
{
- QGridView::resizeEvent(e);
+ TQGridView::resizeEvent(e);
KoIconItem *item = currentItem();
int oldNCols = mNCols;
@@ -264,13 +264,13 @@ void KoIconChooser::resizeEvent(QResizeEvent *e)
// paint one cell
// mark the current item and center items smaller than the cellSize
// TODO: scale down big pixmaps and paint the size as text into the pixmap
-void KoIconChooser::paintCell(QPainter *p, int row, int col)
+void KoIconChooser::paintCell(TQPainter *p, int row, int col)
{
KoIconItem *item = itemAt(row, col);
if(item)
{
- const QPixmap &pix = item->pixmap();
+ const TQPixmap &pix = item->pixmap();
int x = mMargin;
int y = mMargin;
@@ -289,7 +289,7 @@ void KoIconChooser::paintCell(QPainter *p, int row, int col)
p->drawPixmap(x, y, pix, 0, 0, mItemWidth, mItemHeight);
else
{
- const QPixmap &thumbpix = item->thumbPixmap();
+ const TQPixmap &thumbpix = item->thumbPixmap();
x = mMargin;
y = mMargin;
pw = thumbpix.width();
@@ -322,7 +322,7 @@ void KoIconChooser::paintCell(QPainter *p, int row, int col)
else
{
// empty cell
- p->fillRect(0, 0, cellWidth(), cellHeight(), QBrush(Qt::white));
+ p->fillRect(0, 0, cellWidth(), cellHeight(), TQBrush(TQt::white));
}
}
@@ -371,13 +371,13 @@ void KoIconChooser::calculateCells()
}
// show the full pixmap of a large item in an extra widget
-void KoIconChooser::showFullPixmap(const QPixmap &pix, const QPoint &/*p*/)
+void KoIconChooser::showFullPixmap(const TQPixmap &pix, const TQPoint &/*p*/)
{
//delete mPixmapWidget;
mPixmapWidget = new KoPixmapWidget(pix, this);
// center widget under mouse cursor
- QPoint p = QCursor::pos();
+ TQPoint p = TQCursor::pos();
int w = mPixmapWidget->width();
int h = mPixmapWidget->height();
mPixmapWidget->move(p.x() - w / 2, p.y() - h / 2);
@@ -431,22 +431,22 @@ int KoIconChooser::sortInsertionIndex(const KoIconItem *item)
return index;
}
-KoPatternChooser::KoPatternChooser( const QPtrList<KoIconItem> &list, QWidget *parent, const char *name )
- : QWidget( parent, name )
+KoPatternChooser::KoPatternChooser( const TQPtrList<KoIconItem> &list, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
// only serves as beautifier for the iconchooser
- //frame = new QHBox( this );
- //frame->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- chooser = new KoIconChooser( QSize(30,30), this, "pattern chooser" );
+ //frame = new TQHBox( this );
+ //frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ chooser = new KoIconChooser( TQSize(30,30), this, "pattern chooser" );
- QObject::connect( chooser, SIGNAL(selected( KoIconItem * ) ),
- this, SIGNAL( selected( KoIconItem * )));
+ TQObject::connect( chooser, TQT_SIGNAL(selected( KoIconItem * ) ),
+ this, TQT_SIGNAL( selected( KoIconItem * )));
- QPtrListIterator<KoIconItem> itr( list );
+ TQPtrListIterator<KoIconItem> itr( list );
for( itr.toFirst(); itr.current(); ++itr )
chooser->addItem( itr.current() );
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 1, -1, "main layout" );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 1, -1, "main tqlayout" );
mainLayout->addWidget( chooser, 10 );
}
diff --git a/lib/kopainter/koIconChooser.h b/lib/kopainter/koIconChooser.h
index 5beb25a0..df69fd72 100644
--- a/lib/kopainter/koIconChooser.h
+++ b/lib/kopainter/koIconChooser.h
@@ -21,9 +21,9 @@
#ifndef __ko_iconchooser_h__
#define __ko_iconchooser_h__
-#include <qgridview.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqgridview.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
#include <koffice_export.h>
class KoIconItem
@@ -39,32 +39,33 @@ public:
virtual int spacing() const {return 0; }
virtual void setSpacing(int) {}
- virtual QPixmap &pixmap() const = 0;
- virtual QPixmap &thumbPixmap() const = 0;
+ virtual TQPixmap &pixmap() const = 0;
+ virtual TQPixmap &thumbPixmap() const = 0;
// Return -1 if this is less than other, 0 if equal, 1 if greater than.
virtual int compare(const KoIconItem */*other*/) const { return 0; }
};
-class KoPixmapWidget : public QFrame
+class KoPixmapWidget : public TQFrame
{
public:
- KoPixmapWidget(const QPixmap &aPixmap, QWidget *parent = 0L, const char *name = 0L);
+ KoPixmapWidget(const TQPixmap &aPixmap, TQWidget *tqparent = 0L, const char *name = 0L);
~KoPixmapWidget();
protected:
- void paintEvent(QPaintEvent *e);
- void mouseReleaseEvent( QMouseEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void mouseReleaseEvent( TQMouseEvent *e);
private:
- QPixmap mPixmap;
+ TQPixmap mPixmap;
};
-class KOPAINTER_EXPORT KoIconChooser: public QGridView
+class KOPAINTER_EXPORT KoIconChooser: public TQGridView
{
Q_OBJECT
+ TQ_OBJECT
public:
// To make the items sorted, set 'sort' to true and override KoIconItem::compare().
- KoIconChooser(QSize iconSize, QWidget *parent = 0L, const char *name = 0L, bool sort = false);
+ KoIconChooser(TQSize iconSize, TQWidget *tqparent = 0L, const char *name = 0L, bool sort = false);
virtual ~KoIconChooser();
bool autoDelete() const {return mIconList.autoDelete(); }
@@ -87,22 +88,22 @@ signals:
void selected(KoIconItem *item);
protected:
- void keyPressEvent(QKeyEvent *e);
- void mousePressEvent( QMouseEvent *e);
- void mouseReleaseEvent( QMouseEvent *e);
- void mouseMoveEvent( QMouseEvent *e);
- void resizeEvent(QResizeEvent *e);
- void paintCell(QPainter *p, int row, int col);
+ void keyPressEvent(TQKeyEvent *e);
+ void mousePressEvent( TQMouseEvent *e);
+ void mouseReleaseEvent( TQMouseEvent *e);
+ void mouseMoveEvent( TQMouseEvent *e);
+ void resizeEvent(TQResizeEvent *e);
+ void paintCell(TQPainter *p, int row, int col);
virtual void startDrag();
private:
int cellIndex(int row, int col);
void calculateCells();
- void showFullPixmap(const QPixmap &pix, const QPoint &p);
+ void showFullPixmap(const TQPixmap &pix, const TQPoint &p);
int sortInsertionIndex(const KoIconItem *item);
private:
- QPtrList<KoIconItem> mIconList;
+ TQPtrList<KoIconItem> mIconList;
KoPixmapWidget *mPixmapWidget;
int mItemWidth;
int mItemHeight;
@@ -111,7 +112,7 @@ private:
int mCurRow;
int mCurCol;
int mMargin;
- QPoint mDragStartPos;
+ TQPoint mDragStartPos;
bool mMouseButtonDown;
bool mDragEnabled;
bool mSort;
@@ -120,11 +121,12 @@ private:
// This is a first attempt at a pattern chooser widget abstraction which is at least
// useful for two applications(karbon and krita). It is really a light version of
// kis_patternchooser. (Rob)
-class KOPAINTER_EXPORT KoPatternChooser : public QWidget
+class KOPAINTER_EXPORT KoPatternChooser : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoPatternChooser( const QPtrList<KoIconItem> &list, QWidget *parent, const char *name = 0 );
+ KoPatternChooser( const TQPtrList<KoIconItem> &list, TQWidget *tqparent, const char *name = 0 );
~KoPatternChooser();
KoIconItem *currentPattern();
diff --git a/lib/kopainter/ko_cmyk_widget.cc b/lib/kopainter/ko_cmyk_widget.cc
index 86b20ad9..5dee7ec5 100644
--- a/lib/kopainter/ko_cmyk_widget.cc
+++ b/lib/kopainter/ko_cmyk_widget.cc
@@ -22,12 +22,12 @@
#include "ko_cmyk_widget.h"
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -38,73 +38,73 @@
#include <kcolordialog.h>
#include <kdualcolorbutton.h>
-KoCMYKWidget::KoCMYKWidget(QWidget *parent, const char *name) : super(parent, name)
+KoCMYKWidget::KoCMYKWidget(TQWidget *tqparent, const char *name) : super(tqparent, name)
{
m_ColorButton = new KDualColorButton(this);
- m_ColorButton -> setFixedSize(m_ColorButton->sizeHint());
- QGridLayout *mGrid = new QGridLayout(this, 4, 5, 5, 2);
+ m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint());
+ TQGridLayout *mGrid = new TQGridLayout(this, 4, 5, 5, 2);
/* setup color sliders */
mCSlider = new KoColorSlider(this);
mCSlider->setMaximumHeight(20);
mCSlider->slotSetRange(0, 255);
- mCSlider->setFocusPolicy( QWidget::ClickFocus );
+ mCSlider->setFocusPolicy( TQ_ClickFocus );
mMSlider = new KoColorSlider(this);
mMSlider->setMaximumHeight(20);
mMSlider->slotSetRange(0, 255);
- mMSlider->setFocusPolicy( QWidget::ClickFocus );
+ mMSlider->setFocusPolicy( TQ_ClickFocus );
mYSlider = new KoColorSlider(this);
mYSlider->setMaximumHeight(20);
mYSlider->slotSetRange(0, 255);
- mYSlider->setFocusPolicy( QWidget::ClickFocus );
+ mYSlider->setFocusPolicy( TQ_ClickFocus );
mKSlider = new KoColorSlider(this);
mKSlider->setMaximumHeight(20);
mKSlider->slotSetRange(0, 255);
- mKSlider->setFocusPolicy( QWidget::ClickFocus );
+ mKSlider->setFocusPolicy( TQ_ClickFocus );
/* setup slider labels */
- mCLabel = new QLabel("C", this);
+ mCLabel = new TQLabel("C", this);
mCLabel->setFixedWidth(12);
mCLabel->setFixedHeight(20);
- mMLabel = new QLabel("M", this);
+ mMLabel = new TQLabel("M", this);
mMLabel->setFixedWidth(12);
mMLabel->setFixedHeight(20);
- mYLabel = new QLabel("Y", this);
+ mYLabel = new TQLabel("Y", this);
mYLabel->setFixedWidth(12);
mYLabel->setFixedHeight(20);
- mKLabel = new QLabel("K", this);
+ mKLabel = new TQLabel("K", this);
mKLabel->setFixedWidth(12);
mKLabel->setFixedHeight(20);
/* setup spin box */
- mCIn = new QSpinBox(0, 255, 1, this);
+ mCIn = new TQSpinBox(0, 255, 1, this);
mCIn->setFixedWidth(50);
mCIn->setFixedHeight(20);
- mCIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mCIn, i18n( "Cyan" ) );
+ mCIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mCIn, i18n( "Cyan" ) );
- mMIn = new QSpinBox(0, 255, 1, this);
+ mMIn = new TQSpinBox(0, 255, 1, this);
mMIn->setFixedWidth(50);
mMIn->setFixedHeight(20);
- mMIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mMIn, i18n( "Magenta" ) );
+ mMIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mMIn, i18n( "Magenta" ) );
- mYIn = new QSpinBox(0, 255, 1, this);
+ mYIn = new TQSpinBox(0, 255, 1, this);
mYIn->setFixedWidth(50);
mYIn->setFixedHeight(20);
- mYIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mYIn, i18n( "Yellow" ) );
+ mYIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mYIn, i18n( "Yellow" ) );
- mKIn = new QSpinBox(0, 255, 1, this);
+ mKIn = new TQSpinBox(0, 255, 1, this);
mKIn->setFixedWidth(50);
mKIn->setFixedHeight(20);
- mKIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mKIn, i18n( "Black" ) );
+ mKIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mKIn, i18n( "Black" ) );
- mGrid->addMultiCellWidget(m_ColorButton, 0, 4, 0, 0, Qt::AlignTop);
+ mGrid->addMultiCellWidget(m_ColorButton, 0, 4, 0, 0, TQt::AlignTop);
mGrid->addWidget(mCLabel, 0, 1);
mGrid->addWidget(mMLabel, 1, 1);
mGrid->addWidget(mYLabel, 2, 1);
@@ -118,20 +118,20 @@ KoCMYKWidget::KoCMYKWidget(QWidget *parent, const char *name) : super(parent, na
mGrid->addWidget(mYIn, 2, 4);
mGrid->addWidget(mKIn, 3, 4);
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
/* connect color sliders */
- connect(mCSlider, SIGNAL(valueChanged(int)), this, SLOT(slotCChanged(int)));
- connect(mMSlider, SIGNAL(valueChanged(int)), this, SLOT(slotMChanged(int)));
- connect(mYSlider, SIGNAL(valueChanged(int)), this, SLOT(slotYChanged(int)));
- connect(mKSlider, SIGNAL(valueChanged(int)), this, SLOT(slotKChanged(int)));
+ connect(mCSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotCChanged(int)));
+ connect(mMSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotMChanged(int)));
+ connect(mYSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotYChanged(int)));
+ connect(mKSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotKChanged(int)));
/* connect spin box */
- connect(mCIn, SIGNAL(valueChanged(int)), this, SLOT(slotCChanged(int)));
- connect(mMIn, SIGNAL(valueChanged(int)), this, SLOT(slotMChanged(int)));
- connect(mYIn, SIGNAL(valueChanged(int)), this, SLOT(slotYChanged(int)));
- connect(mKIn, SIGNAL(valueChanged(int)), this, SLOT(slotKChanged(int)));
+ connect(mCIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotCChanged(int)));
+ connect(mMIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotMChanged(int)));
+ connect(mYIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotYChanged(int)));
+ connect(mKIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotKChanged(int)));
}
void KoCMYKWidget::slotCChanged(int c)
@@ -206,33 +206,33 @@ void KoCMYKWidget::slotKChanged(int k)
}
}
-void KoCMYKWidget::setFgColor(const QColor & c)
+void KoCMYKWidget::setFgColor(const TQColor & c)
{
update(c, m_bgColor);
}
-void KoCMYKWidget::setBgColor(const QColor & c)
+void KoCMYKWidget::setBgColor(const TQColor & c)
{
update(m_fgColor, c);
}
-void KoCMYKWidget::update(const QColor fgColor, const QColor bgColor)
+void KoCMYKWidget::update(const TQColor fgColor, const TQColor bgColor)
{
m_fgColor = fgColor;
m_bgColor = bgColor;
- QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
+ TQColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
CMYKColor col = RgbToCmyk(color);
- disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
m_ColorButton->setForeground( m_fgColor );
m_ColorButton->setBackground( m_bgColor );
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
mCSlider->blockSignals(true);
mCIn->blockSignals(true);
@@ -293,19 +293,19 @@ void KoCMYKWidget::update(const QColor fgColor, const QColor bgColor)
mKIn->blockSignals(false);
}
-void KoCMYKWidget::slotFGColorSelected(const QColor& c)
+void KoCMYKWidget::slotFGColorSelected(const TQColor& c)
{
- m_fgColor = QColor(c);
+ m_fgColor = TQColor(c);
emit sigFgColorChanged(m_fgColor);
}
-void KoCMYKWidget::slotBGColorSelected(const QColor& c)
+void KoCMYKWidget::slotBGColorSelected(const TQColor& c)
{
- m_bgColor = QColor(c);
+ m_bgColor = TQColor(c);
emit sigBgColorChanged(m_bgColor);
}
-CMYKColor KoCMYKWidget::RgbToCmyk(const QColor& col)
+CMYKColor KoCMYKWidget::RgbToCmyk(const TQColor& col)
{
kdDebug() << "--[ KoCMYKWidget::RgbToCmyk ]--------------------------------------" << endl;
kdDebug() << endl;
@@ -382,7 +382,7 @@ CMYKColor KoCMYKWidget::RgbToCmyk(const QColor& col)
return color;
}
-QColor KoCMYKWidget::CmykToRgb(const CMYKColor& c)
+TQColor KoCMYKWidget::CmykToRgb(const CMYKColor& c)
{
// CMYK to CMY
float ac = kMin(1.0, c.C * (1.0 - c.K) + c.K);
@@ -394,7 +394,7 @@ QColor KoCMYKWidget::CmykToRgb(const CMYKColor& c)
int g = int((1.0 - am) * 255.0);
int b = int((1.0 - ay) * 255.0);
- QColor color;
+ TQColor color;
color.setRgb(r,g,b);
return color;
diff --git a/lib/kopainter/ko_cmyk_widget.h b/lib/kopainter/ko_cmyk_widget.h
index 5cb00b7a..b65f6645 100644
--- a/lib/kopainter/ko_cmyk_widget.h
+++ b/lib/kopainter/ko_cmyk_widget.h
@@ -20,16 +20,16 @@
#ifndef KO_CMYK_WIDGET_H
#define KO_CMYK_WIDGET_H
-#include "qwidget.h"
+#include "tqwidget.h"
#include <koffice_export.h>
class KoFrameButton;
-class QGridLayout;
-class QColor;
+class TQGridLayout;
+class TQColor;
class KoColorSlider;
-class QLabel;
-class QSpinBox;
+class TQLabel;
+class TQSpinBox;
class KDualColorButton;
struct CMYKColor
@@ -41,29 +41,30 @@ struct CMYKColor
};
class KoCMYKWidget
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
- typedef QWidget super;
+ TQ_OBJECT
+ typedef TQWidget super;
public:
- KoCMYKWidget(QWidget *parent = 0L, const char *name = 0);
+ KoCMYKWidget(TQWidget *tqparent = 0L, const char *name = 0);
virtual ~KoCMYKWidget() {}
public slots:
/**
* Set the current color to c. Do not emit the color changed signals
*/
- virtual void setFgColor(const QColor & c);
- virtual void setBgColor(const QColor & c);
+ virtual void setFgColor(const TQColor & c);
+ virtual void setBgColor(const TQColor & c);
signals:
/**
* Emitted when the current color is changed.
*/
- virtual void sigFgColorChanged(const QColor & c);
- virtual void sigBgColorChanged(const QColor & c);
+ virtual void sigFgColorChanged(const TQColor & c);
+ virtual void sigBgColorChanged(const TQColor & c);
protected slots:
@@ -73,15 +74,15 @@ protected slots:
virtual void slotYChanged(int y);
virtual void slotKChanged(int k);
- void slotFGColorSelected(const QColor& c);
- void slotBGColorSelected(const QColor& c);
+ void slotFGColorSelected(const TQColor& c);
+ void slotBGColorSelected(const TQColor& c);
private:
- void update(const QColor fgColor, const QColor);
+ void update(const TQColor fgColor, const TQColor);
- CMYKColor RgbToCmyk(const QColor& col);
- QColor CmykToRgb(const CMYKColor& c);
+ CMYKColor RgbToCmyk(const TQColor& col);
+ TQColor CmykToRgb(const CMYKColor& c);
private:
@@ -89,14 +90,14 @@ private:
KoColorSlider *mMSlider;
KoColorSlider *mYSlider;
KoColorSlider *mKSlider;
- QLabel *mCLabel;
- QLabel *mMLabel;
- QLabel *mYLabel;
- QLabel *mKLabel;
- QSpinBox *mCIn;
- QSpinBox *mMIn;
- QSpinBox *mYIn;
- QSpinBox *mKIn;
+ TQLabel *mCLabel;
+ TQLabel *mMLabel;
+ TQLabel *mYLabel;
+ TQLabel *mKLabel;
+ TQSpinBox *mCIn;
+ TQSpinBox *mMIn;
+ TQSpinBox *mYIn;
+ TQSpinBox *mKIn;
KDualColorButton *m_ColorButton;
float m_fgC;
@@ -109,8 +110,8 @@ private:
float m_bgY;
float m_bgK;
- QColor m_fgColor;
- QColor m_bgColor;
+ TQColor m_fgColor;
+ TQColor m_bgColor;
};
#endif
diff --git a/lib/kopainter/ko_color_wheel.cc b/lib/kopainter/ko_color_wheel.cc
index a7a77a44..17a93c7b 100644
--- a/lib/kopainter/ko_color_wheel.cc
+++ b/lib/kopainter/ko_color_wheel.cc
@@ -18,40 +18,40 @@
#include <math.h>
-#include <qpoint.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqpoint.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <kdebug.h>
#include "ko_color_wheel.h"
#define pi 3.14159265
-KoColorWheel::KoColorWheel( QWidget *parent, const char *name ): KXYSelector( parent, name )
+KoColorWheel::KoColorWheel( TQWidget *tqparent, const char *name ): KXYSelector( tqparent, name )
{
}
-void KoColorWheel::resizeEvent( QResizeEvent * )
+void KoColorWheel::resizeEvent( TQResizeEvent * )
{
drawWheel(&m_pixmap);
setRange( 0, 0, contentsRect().width(), contentsRect().height() );
}
-void KoColorWheel::drawContents( QPainter *painter )
+void KoColorWheel::drawContents( TQPainter *painter )
{
painter->drawPixmap( contentsRect().x(), contentsRect().y(), m_pixmap );
}
-void KoColorWheel::drawWheel( QPixmap *pixmap )
+void KoColorWheel::drawWheel( TQPixmap *pixmap )
{
- int size = QMIN(contentsRect().width(), contentsRect().height());
- QPoint center(size/2, size/2);
+ int size = TQMIN(contentsRect().width(), contentsRect().height());
+ TQPoint center(size/2, size/2);
- QImage image( size, size, 32 );
- image.fill(colorGroup ().background().pixel());
+ TQImage image( size, size, 32 );
+ image.fill(tqcolorGroup ().background().pixel());
- QColor col;
+ TQColor col;
int a, b, h, s;
uint *p;
@@ -76,10 +76,10 @@ void KoColorWheel::drawWheel( QPixmap *pixmap )
pixmap->convertFromImage( image );
}
-void KoColorWheel::mousePressEvent( QMouseEvent *e )
+void KoColorWheel::mousePressEvent( TQMouseEvent *e )
{
- int size = QMIN(contentsRect().width(), contentsRect().height());
- QPoint center(size/2, size/2);
+ int size = TQMIN(contentsRect().width(), contentsRect().height());
+ TQPoint center(size/2, size/2);
int xVal, yVal;
valuesFromPosition( e->pos().x() - 2, e->pos().y() - 2, xVal, yVal );
@@ -98,15 +98,15 @@ void KoColorWheel::mousePressEvent( QMouseEvent *e )
emit valueChanged(m_color);
}
-void KoColorWheel::mouseMoveEvent( QMouseEvent *e )
+void KoColorWheel::mouseMoveEvent( TQMouseEvent *e )
{
mousePressEvent( e );
}
void KoColorWheel::slotSetValue(const KoColor& c)
{
- int size = QMIN(contentsRect().width(), contentsRect().height());
- QPoint center(size/2, size/2);
+ int size = TQMIN(contentsRect().width(), contentsRect().height());
+ TQPoint center(size/2, size/2);
int xVal, yVal;
xVal = (int)(sin(c.H() * pi /180) * c.S() / 255 * (size/2) + center.x());
diff --git a/lib/kopainter/ko_color_wheel.h b/lib/kopainter/ko_color_wheel.h
index c084a564..d12fa1bc 100644
--- a/lib/kopainter/ko_color_wheel.h
+++ b/lib/kopainter/ko_color_wheel.h
@@ -19,19 +19,20 @@
#ifndef KO_COLORWHEEL_H
#define KO_COLORWHEEL_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kselect.h>
#include <koColor.h>
-class QPainter;
+class TQPainter;
class KoColorWheel : public KXYSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorWheel( QWidget *parent=0, const char *name=0 );
+ KoColorWheel( TQWidget *tqparent=0, const char *name=0 );
signals:
void valueChanged(const KoColor& c);
@@ -40,14 +41,14 @@ public slots:
virtual void slotSetValue(const KoColor& c);
protected:
- virtual void drawWheel( QPixmap *pixmap );
- virtual void resizeEvent( QResizeEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void drawContents( QPainter *painter );
+ virtual void drawWheel( TQPixmap *pixmap );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void drawContents( TQPainter *painter );
private:
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
KoColor m_color;
};
diff --git a/lib/kopainter/ko_gray_widget.cc b/lib/kopainter/ko_gray_widget.cc
index 957ee917..bf7503df 100644
--- a/lib/kopainter/ko_gray_widget.cc
+++ b/lib/kopainter/ko_gray_widget.cc
@@ -19,11 +19,11 @@
#include "ko_gray_widget.h"
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcolor.h>
#include <kdebug.h>
@@ -31,46 +31,46 @@
#include <koColorSlider.h>
#include <kcolordialog.h>
-KoGrayWidget::KoGrayWidget(QWidget *parent, const char *name) : super(parent, name)
+KoGrayWidget::KoGrayWidget(TQWidget *tqparent, const char *name) : super(tqparent, name)
{
m_ColorButton = new KDualColorButton(this);
Q_CHECK_PTR(m_ColorButton);
- m_ColorButton -> setFixedSize(m_ColorButton->sizeHint());
- QGridLayout *mGrid = new QGridLayout(this, 3, 5, 5, 2);
+ m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint());
+ TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2);
/* setup color sliders */
mSlider = new KoColorSlider(this);
- mSlider->setFocusPolicy( QWidget::ClickFocus );
+ mSlider->setFocusPolicy( TQ_ClickFocus );
mSlider->setMaximumHeight(20);
mSlider->slotSetRange(0, 255);
- mSlider->slotSetColor1(QColor(255, 255, 255));
- mSlider->slotSetColor2(QColor(0, 0, 0));
+ mSlider->slotSetColor1(TQColor(255, 255, 255));
+ mSlider->slotSetColor2(TQColor(0, 0, 0));
/* setup slider labels */
- mLabel = new QLabel("K:", this);
+ mLabel = new TQLabel("K:", this);
mLabel->setFixedWidth(12);
mLabel->setFixedHeight(20);
/* setup spin box */
- mIn = new QSpinBox(0, 255, 1, this);
+ mIn = new TQSpinBox(0, 255, 1, this);
mIn->setFixedWidth(50);
mIn->setFixedHeight(20);
- mIn->setFocusPolicy( QWidget::ClickFocus );
+ mIn->setFocusPolicy( TQ_ClickFocus );
- mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, Qt::AlignTop);
+ mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, TQt::AlignTop);
mGrid->addWidget(mLabel, 0, 1);
mGrid->addMultiCellWidget(mSlider, 0, 0, 2, 3);
mGrid->addWidget(mIn, 0, 4);
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
/* connect color slider */
- connect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
/* connect spin box */
- connect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
}
void KoGrayWidget::slotChanged(int v)
@@ -78,37 +78,37 @@ void KoGrayWidget::slotChanged(int v)
v = 255 - v;
if (m_ColorButton->current() == KDualColorButton::Foreground){
- slotFGColorSelected( QColor( v, v, v));
+ slotFGColorSelected( TQColor( v, v, v));
}
else{
- slotBGColorSelected( QColor( v, v, v));
+ slotBGColorSelected( TQColor( v, v, v));
}
}
-void KoGrayWidget::setFgColor(const QColor & c)
+void KoGrayWidget::setFgColor(const TQColor & c)
{
blockSignals(true);
slotFGColorSelected(c);
blockSignals(false);
}
-void KoGrayWidget::setBgColor(const QColor & c)
+void KoGrayWidget::setBgColor(const TQColor & c)
{
blockSignals(true);
slotBGColorSelected(c);
blockSignals(false);
}
-void KoGrayWidget::update(const QColor & fgColor, const QColor & bgColor)
+void KoGrayWidget::update(const TQColor & fgColor, const TQColor & bgColor)
{
m_fgColor = fgColor;
m_bgColor = bgColor;
- QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
+ TQColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
- disconnect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
- disconnect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ disconnect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
+ disconnect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
mIn->blockSignals(true);
mSlider->blockSignals(true);
@@ -120,28 +120,28 @@ void KoGrayWidget::update(const QColor & fgColor, const QColor & bgColor)
mIn->blockSignals(false);
mSlider->blockSignals(false);
- connect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
- connect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
+ connect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
}
-void KoGrayWidget::slotFGColorSelected(const QColor& c)
+void KoGrayWidget::slotFGColorSelected(const TQColor& c)
{
m_fgColor = c;
- disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
m_ColorButton->setForeground( m_fgColor );
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
emit sigFgColorChanged(m_fgColor);
}
-void KoGrayWidget::slotBGColorSelected(const QColor& c)
+void KoGrayWidget::slotBGColorSelected(const TQColor& c)
{
m_bgColor = c;
- disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
m_ColorButton->setBackground( m_bgColor );
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
emit sigBgColorChanged(m_bgColor);
}
diff --git a/lib/kopainter/ko_gray_widget.h b/lib/kopainter/ko_gray_widget.h
index 818932c5..6f950201 100644
--- a/lib/kopainter/ko_gray_widget.h
+++ b/lib/kopainter/ko_gray_widget.h
@@ -19,62 +19,63 @@
#ifndef KO_GRAY_WIDGET_H
#define KO_GRAY_WIDGET_H
-#include "qwidget.h"
+#include "tqwidget.h"
#include <koffice_export.h>
#include <kdualcolorbutton.h>
class KoFrameButton;
-class QGridLayout;
-class QColor;
+class TQGridLayout;
+class TQColor;
class KoColorSlider;
-class QLabel;
-class QSpinBox;
+class TQLabel;
+class TQSpinBox;
class KDualColorButton;
class KoGrayWidget
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
- typedef QWidget super;
+ TQ_OBJECT
+ typedef TQWidget super;
public:
- KoGrayWidget(QWidget *parent = 0L, const char *name = 0);
+ KoGrayWidget(TQWidget *tqparent = 0L, const char *name = 0);
virtual ~KoGrayWidget() {}
public slots:
/**
* Set the current color to c. Do not emit the color changed signals
*/
- virtual void setFgColor(const QColor & c);
- virtual void setBgColor(const QColor & c);
+ virtual void setFgColor(const TQColor & c);
+ virtual void setBgColor(const TQColor & c);
signals:
/**
* Emitted when the current color is changed.
*/
- virtual void sigFgColorChanged(const QColor & c);
- virtual void sigBgColorChanged(const QColor & c);
+ virtual void sigFgColorChanged(const TQColor & c);
+ virtual void sigBgColorChanged(const TQColor & c);
protected slots:
virtual void slotChanged(int v);
- void slotFGColorSelected(const QColor& c);
- void slotBGColorSelected(const QColor& c);
+ void slotFGColorSelected(const TQColor& c);
+ void slotBGColorSelected(const TQColor& c);
void currentChanged(KDualColorButton::DualColor);
private:
- void update(const QColor & fgColor, const QColor & bgColor);
+ void update(const TQColor & fgColor, const TQColor & bgColor);
KoColorSlider *mSlider;
- QLabel *mLabel;
- QSpinBox *mIn;
+ TQLabel *mLabel;
+ TQSpinBox *mIn;
KDualColorButton *m_ColorButton;
- QColor m_fgColor;
- QColor m_bgColor;
+ TQColor m_fgColor;
+ TQColor m_bgColor;
};
#endif
diff --git a/lib/kopainter/ko_hsv_widget.cc b/lib/kopainter/ko_hsv_widget.cc
index 3670b5d9..1633fbc8 100644
--- a/lib/kopainter/ko_hsv_widget.cc
+++ b/lib/kopainter/ko_hsv_widget.cc
@@ -21,11 +21,11 @@
#include "ko_color_wheel.h"
#include <kselect.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
#include <koFrameButton.h>
#include <koColorSlider.h>
#include <kcolordialog.h>
@@ -34,42 +34,42 @@
#include <kdebug.h>
#include <klocale.h>
-KoHSVWidget::KoHSVWidget(QWidget *parent, const char *name) : super(parent, name)
+KoHSVWidget::KoHSVWidget(TQWidget *tqparent, const char *name) : super(tqparent, name)
{
m_ColorButton = new KDualColorButton(this);
- m_ColorButton -> setFixedSize(m_ColorButton->sizeHint());
+ m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint());
- QGridLayout *mGrid = new QGridLayout(this, 5, 7, 5, 2);
+ TQGridLayout *mGrid = new TQGridLayout(this, 5, 7, 5, 2);
m_colorwheel = new KoColorWheel(this);
m_colorwheel->setFixedSize( 120, 120);
m_VSelector = new KValueSelector(Qt::Vertical, this);
m_VSelector-> setFixedSize( 30, 120);
/* setup slider labels */
- mHLabel = new QLabel("H:", this);
+ mHLabel = new TQLabel("H:", this);
mHLabel->setFixedSize(12, 20);
- mSLabel = new QLabel("S:", this);
+ mSLabel = new TQLabel("S:", this);
mSLabel->setFixedSize(12, 20);
- mVLabel = new QLabel("V:", this);
+ mVLabel = new TQLabel("V:", this);
mVLabel->setFixedSize(12, 20);
/* setup spin box */
- mHIn = new QSpinBox(0, 359, 1, this);
+ mHIn = new TQSpinBox(0, 359, 1, this);
mHIn->setFixedSize(50, 20);
- mHIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mHIn, i18n( "Hue" ) );
+ mHIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mHIn, i18n( "Hue" ) );
- mSIn = new QSpinBox(0, 255, 1, this);
+ mSIn = new TQSpinBox(0, 255, 1, this);
mSIn->setFixedSize(50, 20);
- mSIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mSIn, i18n( "Saturation" ) );
+ mSIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mSIn, i18n( "Saturation" ) );
- mVIn = new QSpinBox(0, 255, 1, this);
+ mVIn = new TQSpinBox(0, 255, 1, this);
mVIn->setFixedSize(50, 20);
- mVIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mVIn, i18n( "Value (brightness)" ) );
+ mVIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mVIn, i18n( "Value (brightness)" ) );
- mGrid->addMultiCellWidget(m_ColorButton, 0, 0, 0, 1, Qt::AlignTop);
+ mGrid->addMultiCellWidget(m_ColorButton, 0, 0, 0, 1, TQt::AlignTop);
mGrid->addWidget(mHLabel, 1, 0);
mGrid->addWidget(mSLabel, 2, 0);
@@ -84,22 +84,22 @@ KoHSVWidget::KoHSVWidget(QWidget *parent, const char *name) : super(parent, name
mGrid->addMultiCellWidget(m_VSelector, 0, 3, 5, 5);
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(currentChanged(KDualColorButton::DualColor)), this, SLOT(currentChanged(KDualColorButton::DualColor)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), this, TQT_SLOT(currentChanged(KDualColorButton::DualColor)));
- connect(m_VSelector, SIGNAL(valueChanged(int)), this, SLOT(slotVChanged(int)));
- connect(m_colorwheel, SIGNAL(valueChanged(const KoColor&)), this, SLOT(slotWheelChanged(const KoColor&)));
+ connect(m_VSelector, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVChanged(int)));
+ connect(m_colorwheel, TQT_SIGNAL(valueChanged(const KoColor&)), this, TQT_SLOT(slotWheelChanged(const KoColor&)));
/* connect spin box */
- connect(mHIn, SIGNAL(valueChanged(int)), this, SLOT(slotHChanged(int)));
- connect(mSIn, SIGNAL(valueChanged(int)), this, SLOT(slotSChanged(int)));
- connect(mVIn, SIGNAL(valueChanged(int)), this, SLOT(slotVChanged(int)));
+ connect(mHIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHChanged(int)));
+ connect(mSIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSChanged(int)));
+ connect(mVIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVChanged(int)));
- //setFixedSize(mGrid -> minimumSize());
+ //setFixedSize(mGrid -> tqminimumSize());
m_autovalue = true; // So on the initial selection of h or v, s gets set to 255.
- update(Qt::black, Qt::white);
+ update(TQt::black, TQt::white);
}
void KoHSVWidget::slotHChanged(int h)
@@ -162,7 +162,7 @@ void KoHSVWidget::slotWheelChanged(const KoColor& c)
}
-void KoHSVWidget::setFgColor(const QColor & c)
+void KoHSVWidget::setFgColor(const TQColor & c)
{
//kdDebug() << "setFGColor " << c << endl;
blockSignals(true);
@@ -170,7 +170,7 @@ void KoHSVWidget::setFgColor(const QColor & c)
blockSignals(false);
}
-void KoHSVWidget::setBgColor(const QColor & c)
+void KoHSVWidget::setBgColor(const TQColor & c)
{
//kdDebug() << "setBgColor " << c << endl;
blockSignals(true);
@@ -181,9 +181,9 @@ void KoHSVWidget::setBgColor(const QColor & c)
void KoHSVWidget::changedFgColor()
{
//kdDebug() << "ChangedFgColor\n";
- disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
m_ColorButton->setForeground( m_fgColor.color() );
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
update( m_fgColor, m_bgColor);
@@ -193,9 +193,9 @@ void KoHSVWidget::changedFgColor()
void KoHSVWidget::changedBgColor()
{
//kdDebug() << "changedBgColor()\n";
- disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
m_ColorButton->setBackground( m_bgColor.color() );
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
update(m_fgColor, m_bgColor );
@@ -236,11 +236,11 @@ void KoHSVWidget::update(const KoColor & fgColor, const KoColor & bgColor)
mSIn->blockSignals(false);
mVIn->blockSignals(false);
m_VSelector->blockSignals(false);
- m_VSelector->repaint(false);
+ m_VSelector->tqrepaint(false);
m_colorwheel->blockSignals(false);
}
-void KoHSVWidget::slotFGColorSelected(const QColor& c)
+void KoHSVWidget::slotFGColorSelected(const TQColor& c)
{
//kdDebug() << "slotFGColorSelected " << c << endl;
m_fgColor = KoColor(c);
@@ -248,7 +248,7 @@ void KoHSVWidget::slotFGColorSelected(const QColor& c)
changedFgColor();
}
-void KoHSVWidget::slotBGColorSelected(const QColor& c)
+void KoHSVWidget::slotBGColorSelected(const TQColor& c)
{
//kdDebug() << "slotBGColorSelected()" << c << endl;
m_bgColor = KoColor(c);
diff --git a/lib/kopainter/ko_hsv_widget.h b/lib/kopainter/ko_hsv_widget.h
index f8fcdcfb..529e5af2 100644
--- a/lib/kopainter/ko_hsv_widget.h
+++ b/lib/kopainter/ko_hsv_widget.h
@@ -19,7 +19,7 @@
#ifndef KO_HSV_WIDGET_H
#define KO_HSV_WIDGET_H
-#include "qwidget.h"
+#include "tqwidget.h"
#include "kdualcolorbutton.h"
#include "koColor.h"
@@ -31,26 +31,27 @@ class KValueSelector;
class KoColorWheel;
class KoColorSlider;
class KoFrameButton;
-class QGridLayout;
-class QLabel;
-class QSpinBox;
+class TQGridLayout;
+class TQLabel;
+class TQSpinBox;
class KoHSVWidget
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
- typedef QWidget super;
+ TQ_OBJECT
+ typedef TQWidget super;
public:
- KoHSVWidget(QWidget *parent = 0L, const char *name = 0);
+ KoHSVWidget(TQWidget *tqparent = 0L, const char *name = 0);
virtual ~KoHSVWidget() {}
public slots:
/**
* Set the current color to c. Do not emit the color changed signals
*/
- virtual void setFgColor(const QColor & c);
- virtual void setBgColor(const QColor & c);
+ virtual void setFgColor(const TQColor & c);
+ virtual void setBgColor(const TQColor & c);
/// Sets the current mode (foreground/background) without emitting the signal
virtual void setMode(KDualColorButton::DualColor);
signals:
@@ -58,8 +59,8 @@ signals:
/**
* Emitted when the current color is changed.
*/
- virtual void sigFgColorChanged(const QColor & c);
- virtual void sigBgColorChanged(const QColor & c);
+ virtual void sigFgColorChanged(const TQColor & c);
+ virtual void sigBgColorChanged(const TQColor & c);
/// Emitted when the mode (foreground/background) was changed
virtual void sigModeChanged(KDualColorButton::DualColor);
@@ -70,8 +71,8 @@ protected slots:
virtual void slotVChanged(int v);
virtual void slotWheelChanged(const KoColor& c);
- void slotFGColorSelected(const QColor& c);
- void slotBGColorSelected(const QColor& c);
+ void slotFGColorSelected(const TQColor& c);
+ void slotBGColorSelected(const TQColor& c);
void currentChanged(KDualColorButton::DualColor);
private:
@@ -82,12 +83,12 @@ private:
KoColorWheel *m_colorwheel;
KValueSelector *m_VSelector;
- QLabel *mHLabel;
- QLabel *mSLabel;
- QLabel *mVLabel;
- QSpinBox *mHIn;
- QSpinBox *mSIn;
- QSpinBox *mVIn;
+ TQLabel *mHLabel;
+ TQLabel *mSLabel;
+ TQLabel *mVLabel;
+ TQSpinBox *mHIn;
+ TQSpinBox *mSIn;
+ TQSpinBox *mVIn;
KDualColorButton *m_ColorButton;
KoColor m_fgColor;
diff --git a/lib/kopainter/ko_rgb_widget.cc b/lib/kopainter/ko_rgb_widget.cc
index f533bef5..64b15366 100644
--- a/lib/kopainter/ko_rgb_widget.cc
+++ b/lib/kopainter/ko_rgb_widget.cc
@@ -21,12 +21,12 @@
#include "ko_rgb_widget.h"
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,59 +35,59 @@
#include <koColorSlider.h>
#include <kcolordialog.h>
-KoRGBWidget::KoRGBWidget(QWidget *parent, const char *name) : super(parent, name)
+KoRGBWidget::KoRGBWidget(TQWidget *tqparent, const char *name) : super(tqparent, name)
{
m_ColorButton = new KDualColorButton(this);
- m_ColorButton -> setFixedSize(m_ColorButton->sizeHint());
- QGridLayout *mGrid = new QGridLayout(this, 3, 5, 5, 2);
+ m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint());
+ TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2);
/* setup color sliders */
mRSlider = new KoColorSlider(this);
mRSlider->setMaximumHeight(20);
mRSlider->slotSetRange(0, 255);
- mRSlider->setFocusPolicy( QWidget::ClickFocus );
+ mRSlider->setFocusPolicy( TQ_ClickFocus );
mGSlider = new KoColorSlider(this);
mGSlider->setMaximumHeight(20);
mGSlider->slotSetRange(0, 255);
- mGSlider->setFocusPolicy( QWidget::ClickFocus );
+ mGSlider->setFocusPolicy( TQ_ClickFocus );
mBSlider = new KoColorSlider(this);
mBSlider->setMaximumHeight(20);
mBSlider->slotSetRange(0, 255);
- mBSlider->setFocusPolicy( QWidget::ClickFocus );
+ mBSlider->setFocusPolicy( TQ_ClickFocus );
/* setup slider labels */
- mRLabel = new QLabel("R:", this);
+ mRLabel = new TQLabel("R:", this);
mRLabel->setFixedWidth(12);
mRLabel->setFixedHeight(20);
- mGLabel = new QLabel("G:", this);
+ mGLabel = new TQLabel("G:", this);
mGLabel->setFixedWidth(12);
mGLabel->setFixedHeight(20);
- mBLabel = new QLabel("B:", this);
+ mBLabel = new TQLabel("B:", this);
mBLabel->setFixedWidth(12);
mBLabel->setFixedHeight(20);
/* setup spin box */
- mRIn = new QSpinBox(0, 255, 1, this);
+ mRIn = new TQSpinBox(0, 255, 1, this);
mRIn->setFixedWidth(50);
mRIn->setFixedHeight(20);
- mRIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mRIn, i18n( "Red" ) );
+ mRIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mRIn, i18n( "Red" ) );
- mGIn = new QSpinBox(0, 255, 1, this);
+ mGIn = new TQSpinBox(0, 255, 1, this);
mGIn->setFixedWidth(50);
mGIn->setFixedHeight(20);
- mGIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mGIn, i18n( "Green" ) );
+ mGIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mGIn, i18n( "Green" ) );
- mBIn = new QSpinBox(0, 255, 1, this);
+ mBIn = new TQSpinBox(0, 255, 1, this);
mBIn->setFixedWidth(50);
mBIn->setFixedHeight(20);
- mBIn->setFocusPolicy( QWidget::ClickFocus );
- QToolTip::add( mBIn, i18n( "Blue" ) );
+ mBIn->setFocusPolicy( TQ_ClickFocus );
+ TQToolTip::add( mBIn, i18n( "Blue" ) );
- mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, Qt::AlignTop);
+ mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, TQt::AlignTop);
mGrid->addWidget(mRLabel, 0, 1);
mGrid->addWidget(mGLabel, 1, 1);
mGrid->addWidget(mBLabel, 2, 1);
@@ -98,68 +98,68 @@ KoRGBWidget::KoRGBWidget(QWidget *parent, const char *name) : super(parent, name
mGrid->addWidget(mGIn, 1, 4);
mGrid->addWidget(mBIn, 2, 4);
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
- connect(m_ColorButton, SIGNAL(currentChanged(KDualColorButton::DualColor)), this, SLOT(currentChanged(KDualColorButton::DualColor)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), this, TQT_SLOT(currentChanged(KDualColorButton::DualColor)));
/* connect color sliders */
- connect(mRSlider, SIGNAL(valueChanged(int)), this, SLOT(slotRChanged(int)));
- connect(mGSlider, SIGNAL(valueChanged(int)), this, SLOT(slotGChanged(int)));
- connect(mBSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBChanged(int)));
+ connect(mRSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRChanged(int)));
+ connect(mGSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGChanged(int)));
+ connect(mBSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBChanged(int)));
/* connect spin box */
- connect(mRIn, SIGNAL(valueChanged(int)), this, SLOT(slotRChanged(int)));
- connect(mGIn, SIGNAL(valueChanged(int)), this, SLOT(slotGChanged(int)));
- connect(mBIn, SIGNAL(valueChanged(int)), this, SLOT(slotBChanged(int)));
+ connect(mRIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotRChanged(int)));
+ connect(mGIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotGChanged(int)));
+ connect(mBIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBChanged(int)));
- update(Qt::black, Qt::white);
+ update(TQt::black, TQt::white);
}
void KoRGBWidget::slotRChanged(int r)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
- slotFGColorSelected( QColor(r, m_fgColor.green(), m_fgColor.blue()));
+ slotFGColorSelected( TQColor(r, m_fgColor.green(), m_fgColor.blue()));
else
- slotBGColorSelected( QColor(r, m_bgColor.green(), m_bgColor.blue()));
+ slotBGColorSelected( TQColor(r, m_bgColor.green(), m_bgColor.blue()));
}
void KoRGBWidget::slotGChanged(int g)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
- slotFGColorSelected( QColor( m_fgColor.red(), g, m_fgColor.blue()));
+ slotFGColorSelected( TQColor( m_fgColor.red(), g, m_fgColor.blue()));
else
- slotBGColorSelected( QColor( m_bgColor.red(), g, m_bgColor.blue()));;
+ slotBGColorSelected( TQColor( m_bgColor.red(), g, m_bgColor.blue()));;
}
void KoRGBWidget::slotBChanged(int b)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
- slotFGColorSelected( QColor( m_fgColor.red(), m_fgColor.green(), b));
+ slotFGColorSelected( TQColor( m_fgColor.red(), m_fgColor.green(), b));
else
- slotBGColorSelected( QColor( m_bgColor.red(), m_bgColor.green(), b));
+ slotBGColorSelected( TQColor( m_bgColor.red(), m_bgColor.green(), b));
}
-void KoRGBWidget::setFgColor(const QColor & c)
+void KoRGBWidget::setFgColor(const TQColor & c)
{
blockSignals(true);
slotFGColorSelected(c);
blockSignals(false);
}
-void KoRGBWidget::setBgColor(const QColor & c)
+void KoRGBWidget::setBgColor(const TQColor & c)
{
blockSignals(true);
slotBGColorSelected(c);
blockSignals(false);
}
-void KoRGBWidget::update(const QColor fgColor, const QColor bgColor)
+void KoRGBWidget::update(const TQColor fgColor, const TQColor bgColor)
{
m_fgColor = fgColor;
m_bgColor = bgColor;
- QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
+ TQColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
int r = color.red();
int g = color.green();
@@ -172,18 +172,18 @@ void KoRGBWidget::update(const QColor fgColor, const QColor bgColor)
mBSlider->blockSignals(true);
mBIn->blockSignals(true);
- 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);
@@ -195,24 +195,24 @@ void KoRGBWidget::update(const QColor fgColor, const QColor bgColor)
mBIn->blockSignals(false);
}
-void KoRGBWidget::slotFGColorSelected(const QColor& c)
+void KoRGBWidget::slotFGColorSelected(const TQColor& c)
{
m_fgColor = c;
- disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
m_ColorButton->setForeground( m_fgColor );
- connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &)));
update( m_fgColor, m_bgColor);
emit sigFgColorChanged(m_fgColor);
}
-void KoRGBWidget::slotBGColorSelected(const QColor& c)
+void KoRGBWidget::slotBGColorSelected(const TQColor& c)
{
m_bgColor = c;
- disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
m_ColorButton->setBackground( m_bgColor );
- connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
+ connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &)));
update(m_fgColor, m_bgColor);
emit sigBgColorChanged(m_bgColor);
diff --git a/lib/kopainter/ko_rgb_widget.h b/lib/kopainter/ko_rgb_widget.h
index ab18c8a5..c7d657a4 100644
--- a/lib/kopainter/ko_rgb_widget.h
+++ b/lib/kopainter/ko_rgb_widget.h
@@ -19,37 +19,38 @@
#ifndef KO_RGB_WIDGET_H
#define KO_RGB_WIDGET_H
-#include "qwidget.h"
+#include "tqwidget.h"
#include <koffice_export.h>
#include <kdualcolorbutton.h>
class KoFrameButton;
-class QGridLayout;
-class QColor;
+class TQGridLayout;
+class TQColor;
class KoColorSlider;
-class QLabel;
-class QSpinBox;
+class TQLabel;
+class TQSpinBox;
class KDualColorButton;
class KoColorSlider;
-class QColor;
+class TQColor;
class KoRGBWidget
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
- typedef QWidget super;
+ TQ_OBJECT
+ typedef TQWidget super;
public:
- KoRGBWidget(QWidget *parent = 0L, const char *name = 0);
+ KoRGBWidget(TQWidget *tqparent = 0L, const char *name = 0);
virtual ~KoRGBWidget() {}
public slots:
/**
* Set the current color to c. Do not emit the color changed signals
*/
- virtual void setFgColor(const QColor & c);
- virtual void setBgColor(const QColor & c);
+ virtual void setFgColor(const TQColor & c);
+ virtual void setBgColor(const TQColor & c);
/// Sets the current mode (foreground/background) without emitting the signal
virtual void setMode(KDualColorButton::DualColor);
@@ -58,8 +59,8 @@ signals:
/**
* Emitted when the current color is changed.
*/
- virtual void sigFgColorChanged(const QColor & c);
- virtual void sigBgColorChanged(const QColor & c);
+ virtual void sigFgColorChanged(const TQColor & c);
+ virtual void sigBgColorChanged(const TQColor & c);
/// Emitted when the mode (foreground/background) was changed
virtual void sigModeChanged(KDualColorButton::DualColor);
@@ -70,29 +71,29 @@ protected slots:
virtual void slotGChanged(int g);
virtual void slotBChanged(int b);
- void slotFGColorSelected(const QColor& c);
- void slotBGColorSelected(const QColor& c);
+ void slotFGColorSelected(const TQColor& c);
+ void slotBGColorSelected(const TQColor& c);
void currentChanged(KDualColorButton::DualColor);
private:
- void update(const QColor fgColor, const QColor);
+ void update(const TQColor fgColor, const TQColor);
private:
KoColorSlider *mRSlider;
KoColorSlider *mGSlider;
KoColorSlider *mBSlider;
- QLabel *mRLabel;
- QLabel *mGLabel;
- QLabel *mBLabel;
- QSpinBox *mRIn;
- QSpinBox *mGIn;
- QSpinBox *mBIn;
+ TQLabel *mRLabel;
+ TQLabel *mGLabel;
+ TQLabel *mBLabel;
+ TQSpinBox *mRIn;
+ TQSpinBox *mGIn;
+ TQSpinBox *mBIn;
KDualColorButton *m_ColorButton;
- QColor m_fgColor;
- QColor m_bgColor;
+ TQColor m_fgColor;
+ TQColor m_bgColor;
};
#endif
diff --git a/lib/kopainter/kogradientmanager.cc b/lib/kopainter/kogradientmanager.cc
index 41f31d81..7c936c4b 100644
--- a/lib/kopainter/kogradientmanager.cc
+++ b/lib/kopainter/kogradientmanager.cc
@@ -21,8 +21,8 @@
#include "svgnamedcolors.h"
-#include <qtextstream.h>
-#include <qcstring.h>
+#include <tqtextstream.h>
+#include <tqcstring.h>
#include <kdebug.h>
@@ -35,16 +35,16 @@ KoGradientManager::~KoGradientManager()
// XXX: Should we delete the gradients here?
}
-KoGradient* KoGradientManager::loadGradient(const QString& filename)
+KoGradient* KoGradientManager::loadGradient(const TQString& filename)
{
- QString strExt;
- const int result=filename.findRev('.');
+ TQString strExt;
+ const int result=filename.tqfindRev('.');
if (result>=0)
{
strExt=filename.mid(result).lower();
}
- QFile f(filename);
+ TQFile f(filename);
if(f.open(IO_ReadOnly))
{
@@ -65,16 +65,16 @@ KoGradient* KoGradientManager::loadGradient(const QString& filename)
return 0;
}
-KoGradient* KoGradientManager::loadKarbonGradient(QFile* file)
+KoGradient* KoGradientManager::loadKarbonGradient(TQFile* file)
{
- QDomDocument doc;
+ TQDomDocument doc;
if(!(doc.setContent(file)))
file->close();
else
{
- QDomElement e;
- QDomNode n = doc.documentElement().firstChild();
+ TQDomElement e;
+ TQDomNode n = doc.documentElement().firstChild();
if(!n.isNull())
{
@@ -89,17 +89,17 @@ KoGradient* KoGradientManager::loadKarbonGradient(QFile* file)
return 0;
}
-KoGradient* KoGradientManager::loadKritaGradient(QFile* file)
+KoGradient* KoGradientManager::loadKritaGradient(TQFile* file)
{
KoGradient* grad = new KoGradient();
- QByteArray m_data = file->readAll();
+ TQByteArray m_data = file->readAll();
file->close();
- QTextIStream fileContent(m_data);
- fileContent.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextIStream fileContent(m_data);
+ fileContent.setEncoding(TQTextStream::UnicodeUTF8);
- QString header = fileContent.readLine();
+ TQString header = fileContent.readLine();
if (header != "GIMP Gradient")
{
@@ -107,12 +107,12 @@ KoGradient* KoGradientManager::loadKritaGradient(QFile* file)
return 0;
}
- QString nameDefinition = fileContent.readLine();
- QString numSegmentsText;
+ TQString nameDefinition = fileContent.readLine();
+ TQString numSegmentsText;
if (nameDefinition.startsWith("Name: "))
{
- QString nameText = nameDefinition.right(nameDefinition.length() - 6);
+ TQString nameText = nameDefinition.right(nameDefinition.length() - 6);
numSegmentsText = fileContent.readLine();
}
else
@@ -136,8 +136,8 @@ KoGradient* KoGradientManager::loadKritaGradient(QFile* file)
{
KoColorStop *stop = new KoColorStop();
- QString segmentText = fileContent.readLine();
- QTextIStream segmentFields(&segmentText);
+ TQString segmentText = fileContent.readLine();
+ TQTextIStream segmentFields(&segmentText);
double leftOffset;
double middleOffset;
@@ -215,17 +215,17 @@ KoGradient* KoGradientManager::loadKritaGradient(QFile* file)
}
}
-KoGradient* KoGradientManager::loadSvgGradient(QFile* file)
+KoGradient* KoGradientManager::loadSvgGradient(TQFile* file)
{
- QDomDocument doc;
+ TQDomDocument doc;
if(!(doc.setContent(file)))
file->close();
else
{
- for( QDomNode n = doc.documentElement().firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = doc.documentElement().firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( e.isNull() ) continue;
if( e.tagName() == "linearGradient" || e.tagName() == "radialGradient" )
@@ -236,7 +236,7 @@ KoGradient* KoGradientManager::loadSvgGradient(QFile* file)
return 0;
}
-KoGradient* KoGradientManager::parseKarbonGradient(const QDomElement& element)
+KoGradient* KoGradientManager::parseKarbonGradient(const TQDomElement& element)
{
KoGradient* grad = new KoGradient();
@@ -252,18 +252,18 @@ KoGradient* KoGradientManager::parseKarbonGradient(const QDomElement& element)
grad->colorStops.clear();
// load stops
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement colorstop = list.item( i ).toElement();
+ TQDomElement colorstop = list.item( i ).toElement();
if( colorstop.tagName() == "COLORSTOP" )
{
KoColorStop *stop = new KoColorStop();
- QDomElement e = colorstop.firstChild().toElement();
+ TQDomElement e = colorstop.firstChild().toElement();
switch(e.attribute("colorSpace").toUShort())
{
@@ -313,14 +313,14 @@ KoGradient* KoGradientManager::parseKarbonGradient(const QDomElement& element)
return grad;
}
-KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
+KoGradient* KoGradientManager::parseSvgGradient(const TQDomElement& element)
{
KoGradient* grad = new KoGradient;
grad->colorStops.clear();
grad->gradientRepeatMethod = repeat_method_none;
- /*QString href = e.attribute( "xlink:href" ).mid( 1 );
+ /*TQString href = e.attribute( "xlink:href" ).mid( 1 );
if( !href.isEmpty() )
{
}*/
@@ -331,7 +331,7 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
{
if( bbox )
{
- QString s;
+ TQString s;
s = element.attribute( "x1", "0%" );
double xOrigin;
@@ -379,7 +379,7 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
{
if( bbox )
{
- QString s;
+ TQString s;
s = element.attribute( "cx", "50%" );
double xOrigin;
@@ -448,7 +448,7 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
grad->gradientType = gradient_type_radial;
}
// handle spread method
- QString spreadMethod = element.attribute( "spreadMethod" );
+ TQString spreadMethod = element.attribute( "spreadMethod" );
if( !spreadMethod.isEmpty() )
{
if( spreadMethod == "reflect" )
@@ -457,16 +457,16 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
grad->gradientRepeatMethod = repeat_method_repeat;
}
- for( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement colorstop = n.toElement();
+ TQDomElement colorstop = n.toElement();
if( colorstop.tagName() == "stop" )
{
KoColorStop *stop = new KoColorStop();
- QColor c;
+ TQColor c;
float off;
- QString temp = colorstop.attribute( "offset" );
- if( temp.contains( '%' ) )
+ TQString temp = colorstop.attribute( "offset" );
+ if( temp.tqcontains( '%' ) )
{
temp = temp.left( temp.length() - 1 );
off = temp.toFloat() / 100.0;
@@ -479,13 +479,13 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
else
{
// try style attr
- QString style = colorstop.attribute( "style" ).simplifyWhiteSpace();
- QStringList substyles = QStringList::split( ';', style );
- for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it )
+ TQString style = colorstop.attribute( "style" ).simplifyWhiteSpace();
+ TQStringList substyles = TQStringList::split( ';', style );
+ for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it )
{
- QStringList substyle = QStringList::split( ':', (*it) );
- QString command = substyle[0].stripWhiteSpace();
- QString params = substyle[1].stripWhiteSpace();
+ TQStringList substyle = TQStringList::split( ':', (*it) );
+ TQString command = substyle[0].stripWhiteSpace();
+ TQString params = substyle[1].stripWhiteSpace();
if( command == "stop-color" )
parseSvgColor( c, params );
if( command == "stop-opacity" )
@@ -511,47 +511,47 @@ KoGradient* KoGradientManager::parseSvgGradient(const QDomElement& element)
return grad;
}
-void KoGradientManager::parseSvgColor(QColor &color, const QString &s)
+void KoGradientManager::parseSvgColor(TQColor &color, const TQString &s)
{
if( s.startsWith( "rgb(" ) )
{
- QString parse = s.stripWhiteSpace();
- QStringList colors = QStringList::split( ',', parse );
- QString r = colors[0].right( ( colors[0].length() - 4 ) );
- QString g = colors[1];
- QString b = colors[2].left( ( colors[2].length() - 1 ) );
+ TQString parse = s.stripWhiteSpace();
+ TQStringList colors = TQStringList::split( ',', parse );
+ TQString r = colors[0].right( ( colors[0].length() - 4 ) );
+ TQString g = colors[1];
+ TQString b = colors[2].left( ( colors[2].length() - 1 ) );
- if( r.contains( "%" ) )
+ if( r.tqcontains( "%" ) )
{
r = r.left( r.length() - 1 );
- r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
+ r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
}
- if( g.contains( "%" ) )
+ if( g.tqcontains( "%" ) )
{
g = g.left( g.length() - 1 );
- g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
+ g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
}
- if( b.contains( "%" ) )
+ if( b.tqcontains( "%" ) )
{
b = b.left( b.length() - 1 );
- b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
+ b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
}
- color = QColor( r.toInt(), g.toInt(), b.toInt() );
+ color = TQColor( r.toInt(), g.toInt(), b.toInt() );
}
else
{
- QString rgbColor = s.stripWhiteSpace();
- QColor c;
+ TQString rgbColor = s.stripWhiteSpace();
+ TQColor c;
if( rgbColor.startsWith( "#" ) )
c.setNamedColor( rgbColor );
else
{
int r, g, b;
svgNamedColorToRGB( rgbColor, r, g, b );
- c = QColor( r, g, b );
+ c = TQColor( r, g, b );
}
color = c;
}
diff --git a/lib/kopainter/kogradientmanager.h b/lib/kopainter/kogradientmanager.h
index 08412108..86130480 100644
--- a/lib/kopainter/kogradientmanager.h
+++ b/lib/kopainter/kogradientmanager.h
@@ -20,12 +20,12 @@
#ifndef __GRADIENT_LOADER__
#define __GRADIENT_LOADER__
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qcolor.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqcolor.h>
#include <koffice_export.h>
struct KoColorStop
{
@@ -51,7 +51,7 @@ struct KoGradient
int gradientType;
int gradientRepeatMethod;
- QPtrList<KoColorStop> colorStops;
+ TQPtrList<KoColorStop> colorStops;
};
class KOPAINTER_EXPORT KoGradientManager
@@ -93,21 +93,21 @@ public:
KoGradientManager();
~KoGradientManager();
- KoGradient* loadGradient(const QString& filename);
- static QStringList filters()
+ KoGradient* loadGradient(const TQString& filename);
+ static TQStringList filters()
{
- QStringList filterList;
+ TQStringList filterList;
filterList << "*.kgr" << "*.svg" << "*.ggr";
return filterList;
}
private:
- KoGradient* loadKarbonGradient(QFile* file);
- KoGradient* loadKritaGradient(QFile* file);
- KoGradient* loadSvgGradient(QFile* file);
- KoGradient* parseKarbonGradient(const QDomElement& element);
- KoGradient* parseSvgGradient(const QDomElement& element);
- void parseSvgColor(QColor &color, const QString &s);
+ KoGradient* loadKarbonGradient(TQFile* file);
+ KoGradient* loadKritaGradient(TQFile* file);
+ KoGradient* loadSvgGradient(TQFile* file);
+ KoGradient* parseKarbonGradient(const TQDomElement& element);
+ KoGradient* parseSvgGradient(const TQDomElement& element);
+ void parseSvgColor(TQColor &color, const TQString &s);
};
#endif
diff --git a/lib/kopainter/svgnamedcolors.h b/lib/kopainter/svgnamedcolors.h
index bf926331..d31e38d7 100644
--- a/lib/kopainter/svgnamedcolors.h
+++ b/lib/kopainter/svgnamedcolors.h
@@ -6,7 +6,7 @@
g = green; \
}
-void svgNamedColorToRGB( QString rgbColor, int &r, int &g, int &b )
+void svgNamedColorToRGB( TQString rgbColor, int &r, int &g, int &b )
{
if( rgbColor == "aliceblue" )
TORGB( 240, 248, 255)
@@ -206,7 +206,7 @@ void svgNamedColorToRGB( QString rgbColor, int &r, int &g, int &b )
TORGB( 245, 255, 250 )
else if( rgbColor == "mistyrose" )
TORGB( 255, 228, 225 )
- else if( rgbColor == "moccasin" )
+ else if( rgbColor == "tqmoccasin" )
TORGB( 255, 228, 181 )
else if( rgbColor == "navajowhite" )
TORGB( 255, 222, 173 )
diff --git a/lib/kopainter/svgpathparser.cc b/lib/kopainter/svgpathparser.cc
index 454c921b..1bdc3095 100644
--- a/lib/kopainter/svgpathparser.cc
+++ b/lib/kopainter/svgpathparser.cc
@@ -18,7 +18,7 @@
*/
#include "svgpathparser.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <math.h>
#include <kdebug.h>
@@ -88,12 +88,12 @@ SVGPathParser::getCoord( const char *ptr, double &number )
}
void
-SVGPathParser::parseSVG( const QString &s, bool process )
+SVGPathParser::parseSVG( const TQString &s, bool process )
{
if( !s.isEmpty() )
{
- QString d = s;
- d = d.replace( ',', ' ' );
+ TQString d = s;
+ d = d.tqreplace( ',', ' ' );
d = d.simplifyWhiteSpace();
const char *ptr = d.latin1();
diff --git a/lib/kopainter/svgpathparser.h b/lib/kopainter/svgpathparser.h
index 00a23c81..fd1d1470 100644
--- a/lib/kopainter/svgpathparser.h
+++ b/lib/kopainter/svgpathparser.h
@@ -20,7 +20,7 @@
#ifndef __SVGPATHPARSER_H__
#define __SVGPATHPARSER_H__
-class QString;
+class TQString;
#include <koffice_export.h>
/**
@@ -38,7 +38,7 @@ class KOPAINTER_EXPORT SVGPathParser
{
public:
virtual ~SVGPathParser(){}
- void parseSVG( const QString &d, bool process = false );
+ void parseSVG( const TQString &d, bool process = false );
protected:
virtual void svgMoveTo( double x1, double y1, bool abs = true ) = 0;