summaryrefslogtreecommitdiffstats
path: root/kolourpaint/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/widgets')
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.cpp82
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.h16
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.cpp32
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.h2
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.cpp266
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.h74
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.cpp14
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.h8
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.cpp38
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.h20
-rw-r--r--kolourpaint/widgets/kptooltoolbar.cpp108
-rw-r--r--kolourpaint/widgets/kptooltoolbar.h32
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp62
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.h34
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.cpp24
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.h12
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.cpp30
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.h8
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.cpp42
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.h16
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.cpp16
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.h2
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp2
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.h2
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.cpp18
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.h2
26 files changed, 481 insertions, 481 deletions
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
index 9fe3f29b..c09e495a 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
@@ -32,9 +32,9 @@
#include <math.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <klocale.h>
@@ -49,14 +49,14 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance =
kpColorSimilarityCube::kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
- : QFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_colorSimilarity (-1)
{
if (look & Depressed)
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
setColorSimilarity (0);
@@ -66,7 +66,7 @@ kpColorSimilarityCube::kpColorSimilarityCube (int look,
if (look & DoubleClickInstructions)
{
- QWhatsThis::add (this,
+ TQWhatsThis::add (this,
i18n ("<qt><p><b>Color Similarity</b> is how close "
"colors must be in the RGB Color Cube "
"to be considered the same.</p>"
@@ -87,7 +87,7 @@ kpColorSimilarityCube::kpColorSimilarityCube (int look,
}
else
{
- QWhatsThis::add (this,
+ TQWhatsThis::add (this,
i18n ("<qt><p><b>Color Similarity</b> is how close "
"colors must be in the RGB Color Cube "
"to be considered the same.</p>"
@@ -138,14 +138,14 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity)
// protected virtual [base QWidget]
-QSize kpColorSimilarityCube::sizeHint () const
+TQSize kpColorSimilarityCube::sizeHint () const
{
- return QSize (52, 52);
+ return TQSize (52, 52);
}
// protected
-QColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
+TQColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
int baseBrightness,
int similarityDirection) const
{
@@ -161,26 +161,26 @@ QColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
switch (redOrGreenOrBlue)
{
default:
- case 0: return QColor (brightness, 0, 0);
- case 1: return QColor (0, brightness, 0);
- case 2: return QColor (0, 0, brightness);
+ case 0: return TQColor (brightness, 0, 0);
+ case 1: return TQColor (0, brightness, 0);
+ case 2: return TQColor (0, 0, brightness);
}
}
-static QPoint pointBetween (const QPoint &p, const QPoint &q)
+static TQPoint pointBetween (const TQPoint &p, const TQPoint &q)
{
- return QPoint ((p.x () + q.x ()) / 2, (p.y () + q.y ()) / 2);
+ return TQPoint ((p.x () + q.x ()) / 2, (p.y () + q.y ()) / 2);
}
-static void drawQuadrant (QPainter *p,
- const QColor &col,
- const QPoint &p1, const QPoint &p2, const QPoint &p3,
- const QPoint pointNotOnOutline)
+static void drawQuadrant (TQPainter *p,
+ const TQColor &col,
+ const TQPoint &p1, const TQPoint &p2, const TQPoint &p3,
+ const TQPoint pointNotOnOutline)
{
p->save ();
- QPointArray points (4);
+ TQPointArray points (4);
points [0] = p1;
points [1] = p2;
points [2] = p3;
@@ -202,10 +202,10 @@ static void drawQuadrant (QPainter *p,
}
// protected
-void kpColorSimilarityCube::drawFace (QPainter *p,
+void kpColorSimilarityCube::drawFace (TQPainter *p,
int redOrGreenOrBlue,
- const QPoint &tl, const QPoint &tr,
- const QPoint &bl, const QPoint &br)
+ const TQPoint &tl, const TQPoint &tr,
+ const TQPoint &bl, const TQPoint &br)
{
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
kdDebug () << "kpColorSimilarityCube(RorGorB=" << redOrGreenOrBlue
@@ -225,18 +225,18 @@ void kpColorSimilarityCube::drawFace (QPainter *p,
// | | |
// bl --- bm --- br
- const QPoint tm (::pointBetween (tl, tr));
- const QPoint bm (::pointBetween (bl, br));
+ const TQPoint tm (::pointBetween (tl, tr));
+ const TQPoint bm (::pointBetween (bl, br));
- const QPoint ml (::pointBetween (tl, bl));
- const QPoint mr (::pointBetween (tr, br));
- const QPoint mm (::pointBetween (ml, mr));
+ const TQPoint ml (::pointBetween (tl, bl));
+ const TQPoint mr (::pointBetween (tr, br));
+ const TQPoint mm (::pointBetween (ml, mr));
const int baseBrightness = QMAX (127,
255 - int (kpColorSimilarityDialog::maximumColorSimilarity *
kpColorSimilarityCube::colorCubeDiagonalDistance / 2));
- QColor colors [2] =
+ TQColor colors [2] =
{
color (redOrGreenOrBlue, baseBrightness, -1),
color (redOrGreenOrBlue, baseBrightness, +1)
@@ -269,14 +269,14 @@ void kpColorSimilarityCube::drawFace (QPainter *p,
}
// protected virtual [base QFrame]
-void kpColorSimilarityCube::drawContents (QPainter *p)
+void kpColorSimilarityCube::drawContents (TQPainter *p)
{
- QRect cr (contentsRect ());
+ TQRect cr (contentsRect ());
- QPixmap backBuffer (cr.width (), cr.height ());
+ TQPixmap backBuffer (cr.width (), cr.height ());
backBuffer.fill (colorGroup ().background ());
- QPainter backBufferPainter (&backBuffer);
+ TQPainter backBufferPainter (&backBuffer);
int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
int dx = (cr.width () - cubeRectSize) / 2,
@@ -304,13 +304,13 @@ void kpColorSimilarityCube::drawContents (QPainter *p)
const double side = double (cubeRectSize) / (1 + sin (angle));
- const QPoint pointP ((int) (side * cos (angle)), 0);
- const QPoint pointQ ((int) (side * cos (angle) + side), 0);
- const QPoint pointR (0, (int) (side * sin (angle)));
- const QPoint pointS ((int) (side), (int) (side * sin (angle)));
- const QPoint pointU (0, (int) (side * sin (angle) + side));
- const QPoint pointT ((int) (side + side * cos (angle)), (int) (side));
- const QPoint pointV ((int) (side), (int) (side * sin (angle) + side));
+ const TQPoint pointP ((int) (side * cos (angle)), 0);
+ const TQPoint pointQ ((int) (side * cos (angle) + side), 0);
+ const TQPoint pointR (0, (int) (side * sin (angle)));
+ const TQPoint pointS ((int) (side), (int) (side * sin (angle)));
+ const TQPoint pointU (0, (int) (side * sin (angle) + side));
+ const TQPoint pointT ((int) (side + side * cos (angle)), (int) (side));
+ const TQPoint pointV ((int) (side), (int) (side * sin (angle) + side));
// Top Face
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h
index 358d4b3a..ee074d55 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.h
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.h
@@ -29,7 +29,7 @@
#ifndef __kp_color_similarity_cube_h__
#define __kp_color_similarity_cube_h__
-#include <qframe.h>
+#include <tqframe.h>
class kpColor;
class kpMainWindow;
@@ -46,7 +46,7 @@ public:
kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityCube ();
@@ -55,15 +55,15 @@ public:
double colorSimilarity () const;
void setColorSimilarity (double similarity);
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
protected:
- QColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
- void drawFace (QPainter *p,
+ TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
+ void drawFace (TQPainter *p,
int redOrGreenOrBlue,
- const QPoint &tl, const QPoint &tr,
- const QPoint &bl, const QPoint &br);
- virtual void drawContents (QPainter *p);
+ const TQPoint &tl, const TQPoint &tr,
+ const TQPoint &bl, const TQPoint &br);
+ virtual void drawContents (TQPainter *p);
kpMainWindow *m_mainWindow;
double m_colorSimilarity;
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
index d2766568..5831c62f 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
@@ -28,10 +28,10 @@
#include <kpcolorsimilaritydialog.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <knuminput.h>
@@ -44,36 +44,36 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30;
kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: KDialogBase (parent, name, true/*modal*/,
i18n ("Color Similarity"),
KDialogBase::Ok | KDialogBase::Cancel),
m_mainWindow (mainWindow)
{
- QWidget *baseWidget = new QWidget (this);
+ TQWidget *baseWidget = new TQWidget (this);
setMainWidget (baseWidget);
- QGroupBox *cubeGroupBox = new QGroupBox (i18n ("Preview"), baseWidget);
+ TQGroupBox *cubeGroupBox = new TQGroupBox (i18n ("Preview"), baseWidget);
m_colorSimilarityCube = new kpColorSimilarityCube (kpColorSimilarityCube::Plain,
mainWindow, cubeGroupBox);
m_colorSimilarityCube->setMinimumSize (240, 180);
- QPushButton *updatePushButton = new QPushButton (i18n ("&Update"), cubeGroupBox);
+ TQPushButton *updatePushButton = new TQPushButton (i18n ("&Update"), cubeGroupBox);
- QVBoxLayout *cubeLayout = new QVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
+ TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/);
cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter);
- connect (updatePushButton, SIGNAL (clicked ()),
- this, SLOT (slotColorSimilarityValueChanged ()));
+ connect (updatePushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (slotColorSimilarityValueChanged ()));
- QGroupBox *inputGroupBox = new QGroupBox (i18n ("RGB Color Cube Distance"), baseWidget);
+ TQGroupBox *inputGroupBox = new TQGroupBox (i18n ("RGB Color Cube Distance"), baseWidget);
m_colorSimilarityInput = new KIntNumInput (inputGroupBox);
m_colorSimilarityInput->setRange (0, int (kpColorSimilarityDialog::maximumColorSimilarity * 100 + .1/*don't floor below target int*/),
@@ -82,15 +82,15 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
m_colorSimilarityInput->setSpecialValueText (i18n ("Exact Match"));
- QVBoxLayout *inputLayout = new QVBoxLayout (inputGroupBox, marginHint () * 2, spacingHint ());
+ TQVBoxLayout *inputLayout = new TQVBoxLayout (inputGroupBox, marginHint () * 2, spacingHint ());
inputLayout->addWidget (m_colorSimilarityInput);
- connect (m_colorSimilarityInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotColorSimilarityValueChanged ()));
+ connect (m_colorSimilarityInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotColorSimilarityValueChanged ()));
- QVBoxLayout *baseLayout = new QVBoxLayout (baseWidget, 0/*margin*/, spacingHint () * 2);
+ TQVBoxLayout *baseLayout = new TQVBoxLayout (baseWidget, 0/*margin*/, spacingHint () * 2);
baseLayout->addWidget (cubeGroupBox, 1/*stretch*/);
baseLayout->addWidget (inputGroupBox);
}
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h
index fd70ecd0..7dee17b8 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.h
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h
@@ -41,7 +41,7 @@ Q_OBJECT
public:
kpColorSimilarityDialog (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityDialog ();
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp
index cba73b4f..327229df 100644
--- a/kolourpaint/widgets/kpcolortoolbar.cpp
+++ b/kolourpaint/widgets/kpcolortoolbar.cpp
@@ -31,14 +31,14 @@
#include <kpcolortoolbar.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qsize.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqsize.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kcolordialog.h>
@@ -61,12 +61,12 @@
*/
kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
- : QFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ TQWidget *parent, const char *name)
+ : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_backBuffer (0)
{
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
m_color [0] = kpColor (0, 0, 0); // black
m_color [1] = kpColor (255, 255, 255); // white
@@ -150,48 +150,48 @@ kpColor kpDualColorButton::oldBackgroundColor () const
// public virtual [base QWidget]
-QSize kpDualColorButton::sizeHint () const
+TQSize kpDualColorButton::sizeHint () const
{
- return QSize (52, 52);
+ return TQSize (52, 52);
}
// protected
-QRect kpDualColorButton::swapPixmapRect () const
+TQRect kpDualColorButton::swapPixmapRect () const
{
- QPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
+ TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
- return QRect (contentsRect ().width () - swapPixmap.width (),
+ return TQRect (contentsRect ().width () - swapPixmap.width (),
0,
swapPixmap.width (),
swapPixmap.height ());
}
// protected
-QRect kpDualColorButton::foregroundBackgroundRect () const
+TQRect kpDualColorButton::foregroundBackgroundRect () const
{
- QRect cr (contentsRect ());
- return QRect (cr.width () / 8,
+ TQRect cr (contentsRect ());
+ return TQRect (cr.width () / 8,
cr.height () / 8,
cr.width () * 6 / 8,
cr.height () * 6 / 8);
}
// protected
-QRect kpDualColorButton::foregroundRect () const
+TQRect kpDualColorButton::foregroundRect () const
{
- QRect fbr (foregroundBackgroundRect ());
- return QRect (fbr.x (),
+ TQRect fbr (foregroundBackgroundRect ());
+ return TQRect (fbr.x (),
fbr.y (),
fbr.width () * 3 / 4,
fbr.height () * 3 / 4);
}
// protected
-QRect kpDualColorButton::backgroundRect () const
+TQRect kpDualColorButton::backgroundRect () const
{
- QRect fbr (foregroundBackgroundRect ());
- return QRect (fbr.x () + fbr.width () / 4,
+ TQRect fbr (foregroundBackgroundRect ());
+ return TQRect (fbr.x () + fbr.width () / 4,
fbr.y () + fbr.height () / 4,
fbr.width () * 3 / 4,
fbr.height () * 3 / 4);
@@ -201,7 +201,7 @@ QRect kpDualColorButton::backgroundRect () const
// TODO: drag a colour from this widget
// protected virtual [base QWidget]
-void kpDualColorButton::dragMoveEvent (QDragMoveEvent *e)
+void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e)
{
e->accept ((foregroundRect ().contains (e->pos ()) ||
backgroundRect ().contains (e->pos ())) &&
@@ -209,9 +209,9 @@ void kpDualColorButton::dragMoveEvent (QDragMoveEvent *e)
}
// protected virtual [base QWidget]
-void kpDualColorButton::dropEvent (QDropEvent *e)
+void kpDualColorButton::dropEvent (TQDropEvent *e)
{
- QColor col;
+ TQColor col;
KColorDrag::decode (e, col/*ref*/);
if (col.isValid ())
@@ -225,13 +225,13 @@ void kpDualColorButton::dropEvent (QDropEvent *e)
// protected virtual [base QWidget]
-void kpDualColorButton::mousePressEvent (QMouseEvent * /*e*/)
+void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// protected virtual [base QWidget]
-void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
+void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
{
int whichColor = -1;
@@ -242,7 +242,7 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
if (whichColor == 0 || whichColor == 1)
{
- QColor col = Qt::black;
+ TQColor col = Qt::black;
if (color (whichColor).isOpaque ())
col = color (whichColor).toQColor ();
else
@@ -264,7 +264,7 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
}
// protected virtual [base QWidget]
-void kpDualColorButton::mouseReleaseEvent (QMouseEvent *e)
+void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
{
if (swapPixmapRect ().contains (e->pos ()) &&
m_color [0] != m_color [1])
@@ -289,7 +289,7 @@ void kpDualColorButton::mouseReleaseEvent (QMouseEvent *e)
// protected virtual [base QFrame]
-void kpDualColorButton::drawContents (QPainter *p)
+void kpDualColorButton::drawContents (TQPainter *p)
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
kdDebug () << "kpDualColorButton::draw() rect=" << rect ()
@@ -302,11 +302,11 @@ void kpDualColorButton::drawContents (QPainter *p)
m_backBuffer->height () != contentsRect ().height ())
{
delete m_backBuffer;
- m_backBuffer = new QPixmap (contentsRect ().width (), contentsRect ().height ());
+ m_backBuffer = new TQPixmap (contentsRect ().width (), contentsRect ().height ());
}
- QPainter backBufferPainter (m_backBuffer);
+ TQPainter backBufferPainter (m_backBuffer);
if (isEnabled () && m_mainWindow)
{
@@ -318,21 +318,21 @@ void kpDualColorButton::drawContents (QPainter *p)
else
{
backBufferPainter.fillRect (m_backBuffer->rect (),
- colorGroup ().color (QColorGroup::Background));
+ colorGroup ().color (TQColorGroup::Background));
}
- QPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
+ TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
if (!isEnabled ())
{
// swapPixmap has a mask after all
- swapPixmap.fill (colorGroup ().color (QColorGroup::Dark));
+ swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark));
}
backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap);
// foreground patch must be drawn after background patch
// as it overlaps on top of background patch
- QRect bgRect = backgroundRect ();
- QRect bgRectInside = QRect (bgRect.x () + 2, bgRect.y () + 2,
+ TQRect bgRect = backgroundRect ();
+ TQRect bgRectInside = TQRect (bgRect.x () + 2, bgRect.y () + 2,
bgRect.width () - 4, bgRect.height () - 4);
if (isEnabled ())
{
@@ -346,13 +346,13 @@ void kpDualColorButton::drawContents (QPainter *p)
backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (bgRectInside, colorGroup ().color (QColorGroup::Button));
+ backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button));
qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
- QRect fgRect = foregroundRect ();
- QRect fgRectInside = QRect (fgRect.x () + 2, fgRect.y () + 2,
+ TQRect fgRect = foregroundRect ();
+ TQRect fgRectInside = TQRect (fgRect.x () + 2, fgRect.y () + 2,
fgRect.width () - 4, fgRect.height () - 4);
if (isEnabled ())
{
@@ -366,7 +366,7 @@ void kpDualColorButton::drawContents (QPainter *p)
backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (fgRectInside, colorGroup ().color (QColorGroup::Button));
+ backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button));
qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -404,14 +404,14 @@ enum
blendAdd = 100
};
-static QColor blend (const QColor &a, const QColor &b, int percent = blendNormal)
+static TQColor blend (const TQColor &a, const TQColor &b, int percent = blendNormal)
{
- return QColor (btwn0_255 (roundUp2 (a.red () + b.red ()) * percent / 100),
+ return TQColor (btwn0_255 (roundUp2 (a.red () + b.red ()) * percent / 100),
btwn0_255 (roundUp2 (a.green () + b.green ()) * percent / 100),
btwn0_255 (roundUp2 (a.blue () + b.blue ()) * percent / 100));
}
-static QColor add (const QColor &a, const QColor &b)
+static TQColor add (const TQColor &a, const TQColor &b)
{
return blend (a, b, blendAdd);
}
@@ -426,33 +426,33 @@ static QColor add (const QColor &a, const QColor &b)
//
// primary colors + B&W
-static QColor kpRed;
-static QColor kpGreen;
-static QColor kpBlue;
-static QColor kpBlack;
-static QColor kpWhite;
+static TQColor kpRed;
+static TQColor kpGreen;
+static TQColor kpBlue;
+static TQColor kpBlack;
+static TQColor kpWhite;
// intentionally _not_ an HSV darkener
-static QColor dark (const QColor &color)
+static TQColor dark (const TQColor &color)
{
return blend (color, kpBlack);
}
// full-brightness colors
-static QColor kpYellow;
-static QColor kpPurple;
-static QColor kpAqua;
+static TQColor kpYellow;
+static TQColor kpPurple;
+static TQColor kpAqua;
// mixed colors
-static QColor kpGrey;
-static QColor kpLightGrey;
-static QColor kpOrange;
+static TQColor kpGrey;
+static TQColor kpLightGrey;
+static TQColor kpOrange;
// pastel colors
-static QColor kpPink;
-static QColor kpLightGreen;
-static QColor kpLightBlue;
-static QColor kpTan;
+static TQColor kpPink;
+static TQColor kpLightGreen;
+static TQColor kpLightBlue;
+static TQColor kpTan;
static bool ownColorsInitialised = false;
@@ -461,7 +461,7 @@ static bool ownColorsInitialised = false;
*/
#define rows 2
#define cols 11
-kpColorCells::kpColorCells (QWidget *parent,
+kpColorCells::kpColorCells (TQWidget *parent,
Qt::Orientation o,
const char *name)
: KColorCells (parent, rows, cols),
@@ -476,8 +476,8 @@ kpColorCells::kpColorCells (QWidget *parent,
setAcceptDrops (true);
setAcceptDrags (true);
- connect (this, SIGNAL (colorDoubleClicked (int)),
- SLOT (slotColorDoubleClicked (int)));
+ connect (this, TQT_SIGNAL (colorDoubleClicked (int)),
+ TQT_SLOT (slotColorDoubleClicked (int)));
if (!ownColorsInitialised)
{
@@ -485,11 +485,11 @@ kpColorCells::kpColorCells (QWidget *parent,
// allocation context. This way, the colours aren't sometimes
// invalid (e.g. at 8-bit).
- kpRed = QColor (255, 0, 0);
- kpGreen = QColor (0, 255, 0);
- kpBlue = QColor (0, 0, 255);
- kpBlack = QColor (0, 0, 0);
- kpWhite = QColor (255, 255, 255);
+ kpRed = TQColor (255, 0, 0);
+ kpGreen = TQColor (0, 255, 0);
+ kpBlue = TQColor (0, 0, 255);
+ kpBlack = TQColor (0, 0, 0);
+ kpWhite = TQColor (255, 255, 255);
kpYellow = add (kpRed, kpGreen);
kpPurple = add (kpRed, kpBlue);
@@ -553,7 +553,7 @@ void kpColorCells::setOrientation (Qt::Orientation o)
kdDebug () << "\tsizeof (colors)=" << sizeof (colors)
<< " sizeof (colors [0])=" << sizeof (colors [0])
<< endl;*/
- QColor colors [] =
+ TQColor colors [] =
{
kpBlack,
kpGrey,
@@ -603,14 +603,14 @@ void kpColorCells::setOrientation (Qt::Orientation o)
}
KColorCells::setColor (pos, colors [i]);
- //QToolTip::add (this, cellGeometry (y, x), colors [i].name ());
+ //TQToolTip::add (this, cellGeometry (y, x), colors [i].name ());
}
m_orientation = o;
}
// virtual protected [base KColorCells]
-void kpColorCells::dropEvent (QDropEvent *e)
+void kpColorCells::dropEvent (TQDropEvent *e)
{
// Eat event so that:
//
@@ -622,9 +622,9 @@ void kpColorCells::dropEvent (QDropEvent *e)
}
// virtual protected
-void kpColorCells::paintCell (QPainter *painter, int row, int col)
+void kpColorCells::paintCell (TQPainter *painter, int row, int col)
{
- QColor oldColor;
+ TQColor oldColor;
int cellNo;
if (!isEnabled ())
@@ -653,7 +653,7 @@ void kpColorCells::paintCell (QPainter *painter, int row, int col)
}
// virtual protected
-void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
+void kpColorCells::mouseReleaseEvent (TQMouseEvent *e)
{
m_mouseButton = -1;
@@ -674,9 +674,9 @@ void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
m_mouseButton = 1;
}
- connect (this, SIGNAL (colorSelected (int)), this, SLOT (slotColorSelected (int)));
+ connect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int)));
KColorCells::mouseReleaseEvent (e);
- disconnect (this, SIGNAL (colorSelected (int)), this, SLOT (slotColorSelected (int)));
+ disconnect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int)));
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpColorCells::mouseReleaseEvent() setting m_mouseButton back to -1" << endl;
@@ -685,7 +685,7 @@ void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
}
// protected virtual [base KColorCells]
-void kpColorCells::resizeEvent (QResizeEvent *e)
+void kpColorCells::resizeEvent (TQResizeEvent *e)
{
// KColorCells::resizeEvent() tries to adjust the cellWidth and cellHeight
// to the current dimensions but doesn't take into account
@@ -703,7 +703,7 @@ void kpColorCells::slotColorSelected (int cell)
kdDebug () << "kpColorCells::slotColorSelected(cell=" << cell
<< ") mouseButton = " << m_mouseButton << endl;
#endif
- QColor c = KColorCells::color (cell);
+ TQColor c = KColorCells::color (cell);
if (m_mouseButton == 0)
{
@@ -727,7 +727,7 @@ void kpColorCells::slotColorDoubleClicked (int cell)
<< cell << ")" << endl;
#endif
- QColor color = KColorCells::color (cell);
+ TQColor color = KColorCells::color (cell);
// TODO: parent
if (KColorDialog::getColor (color/*ref*/))
@@ -739,14 +739,14 @@ void kpColorCells::slotColorDoubleClicked (int cell)
* kpTransparentColorCell
*/
-kpTransparentColorCell::kpTransparentColorCell (QWidget *parent, const char *name)
- : QFrame (parent, name)
+kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name)
+ : TQFrame (parent, name)
{
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl;
#endif
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
#if DEBUG_KP_COLOR_TOOL_BAR && 0
kdDebug () << "\tdefault line width=" << lineWidth ()
<< " frame width=" << frameWidth () << endl;
@@ -759,7 +759,7 @@ kpTransparentColorCell::kpTransparentColorCell (QWidget *parent, const char *nam
m_pixmap = UserIcon ("color_transparent_26x26");
- QToolTip::add (this, i18n ("Transparent"));
+ TQToolTip::add (this, i18n ("Transparent"));
}
kpTransparentColorCell::~kpTransparentColorCell ()
@@ -768,20 +768,20 @@ kpTransparentColorCell::~kpTransparentColorCell ()
// public virtual [base QWidget]
-QSize kpTransparentColorCell::sizeHint () const
+TQSize kpTransparentColorCell::sizeHint () const
{
- return QSize (m_pixmap.width () + frameWidth () * 2,
+ return TQSize (m_pixmap.width () + frameWidth () * 2,
m_pixmap.height () + frameWidth () * 2);
}
// protected virtual [base QWidget]
-void kpTransparentColorCell::mousePressEvent (QMouseEvent * /*e*/)
+void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// protected virtual [base QWidget]
-void kpTransparentColorCell::mouseReleaseEvent (QMouseEvent *e)
+void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
{
if (rect ().contains (e->pos ()))
{
@@ -799,9 +799,9 @@ void kpTransparentColorCell::mouseReleaseEvent (QMouseEvent *e)
}
// protected virtual [base QFrame]
-void kpTransparentColorCell::drawContents (QPainter *p)
+void kpTransparentColorCell::drawContents (TQPainter *p)
{
- QFrame::drawContents (p);
+ TQFrame::drawContents (p);
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (QPainter *p)
* kpColorPalette
*/
-kpColorPalette::kpColorPalette (QWidget *parent,
+kpColorPalette::kpColorPalette (TQWidget *parent,
Qt::Orientation o,
const char *name)
- : QWidget (parent, name),
+ : TQWidget (parent, name),
m_boxLayout (0)
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -829,17 +829,17 @@ kpColorPalette::kpColorPalette (QWidget *parent,
#endif
m_transparentColorCell = new kpTransparentColorCell (this);
- m_transparentColorCell->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_transparentColorCell, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_transparentColorCell, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ connect (m_transparentColorCell, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
+ connect (m_transparentColorCell, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
m_colorCells = new kpColorCells (this);
- connect (m_colorCells, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_colorCells, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ connect (m_colorCells, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
+ connect (m_colorCells, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
setOrientation (o);
}
@@ -862,13 +862,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
- m_boxLayout = new QBoxLayout (this, QBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
+ m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter);
m_boxLayout->addWidget (m_colorCells);
}
else
{
- m_boxLayout = new QBoxLayout (this, QBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
+ m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter);
m_boxLayout->addWidget (m_colorCells);
}
@@ -882,7 +882,7 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
*/
kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorSimilarityCube (kpColorSimilarityCube::Depressed |
kpColorSimilarityCube::DoubleClickInstructions,
@@ -912,9 +912,9 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity)
kpColorSimilarityCube::setColorSimilarity (similarity);
if (similarity > 0)
- QToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
+ TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
else
- QToolTip::add (this, i18n ("Color similarity: Exact"));
+ TQToolTip::add (this, i18n ("Color similarity: Exact"));
m_processedColorSimilarity = kpColor::processSimilarity (colorSimilarity ());
@@ -931,13 +931,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const
// private virtual [base QWidget]
-void kpColorSimilarityToolBarItem::mousePressEvent (QMouseEvent * /*e*/)
+void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// private virtual [base QWidget]
-void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (QMouseEvent * /*e*/)
+void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/)
{
kpColorSimilarityDialog dialog (m_mainWindow, this);
dialog.setColorSimilarity (colorSimilarity ());
@@ -952,42 +952,42 @@ void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (QMouseEvent * /*e*/)
* kpColorToolBar
*/
-kpColorToolBar::kpColorToolBar (const QString &label, kpMainWindow *mainWindow, const char *name)
+kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name)
: KToolBar (mainWindow, name),
m_mainWindow (mainWindow)
{
setText (label);
- QWidget *base = new QWidget (this);
- m_boxLayout = new QBoxLayout (base, QBoxLayout::LeftToRight,
+ TQWidget *base = new TQWidget (this);
+ m_boxLayout = new TQBoxLayout (base, TQBoxLayout::LeftToRight,
5/*margin*/, (10 * 4)/*spacing*/);
m_dualColorButton = new kpDualColorButton (mainWindow, base);
- m_dualColorButton->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_dualColorButton, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
- this, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)));
- connect (m_dualColorButton, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_dualColorButton, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ connect (m_dualColorButton, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
+ this, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)));
+ connect (m_dualColorButton, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
+ connect (m_dualColorButton, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
m_boxLayout->addWidget (m_dualColorButton, 0/*stretch*/);
m_colorPalette = new kpColorPalette (base);
- connect (m_colorPalette, SIGNAL (foregroundColorChanged (const kpColor &)),
- m_dualColorButton, SLOT (setForegroundColor (const kpColor &)));
- connect (m_colorPalette, SIGNAL (backgroundColorChanged (const kpColor &)),
- m_dualColorButton, SLOT (setBackgroundColor (const kpColor &)));
+ connect (m_colorPalette, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ m_dualColorButton, TQT_SLOT (setForegroundColor (const kpColor &)));
+ connect (m_colorPalette, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ m_dualColorButton, TQT_SLOT (setBackgroundColor (const kpColor &)));
m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/);
m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base);
- m_colorSimilarityToolBarItem->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_colorSimilarityToolBarItem, SIGNAL (colorSimilarityChanged (double, int)),
- this, SIGNAL (colorSimilarityChanged (double, int)));
+ m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ connect (m_colorSimilarityToolBarItem, TQT_SIGNAL (colorSimilarityChanged (double, int)),
+ this, TQT_SIGNAL (colorSimilarityChanged (double, int)));
m_boxLayout->addWidget (m_colorSimilarityToolBarItem, 0/*stretch*/);
- // HACK: couldn't get QSpacerItem to work
- QWidget *fakeSpacer = new QWidget (base);
+ // HACK: couldn't get TQSpacerItem to work
+ TQWidget *fakeSpacer = new TQWidget (base);
m_boxLayout->addWidget (fakeSpacer, 1/*stretch*/);
m_lastDockedOrientationSet = false;
@@ -999,8 +999,8 @@ kpColorToolBar::kpColorToolBar (const QString &label, kpMainWindow *mainWindow,
// virtual
void kpColorToolBar::setOrientation (Qt::Orientation o)
{
- // (QDockWindow::undock() calls us)
- bool isOutsideDock = (place () == QDockWindow::OutsideDock);
+ // (TQDockWindow::undock() calls us)
+ bool isOutsideDock = (place () == TQDockWindow::OutsideDock);
if (!m_lastDockedOrientationSet || !isOutsideDock)
{
@@ -1016,11 +1016,11 @@ void kpColorToolBar::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
- m_boxLayout->setDirection (QBoxLayout::LeftToRight);
+ m_boxLayout->setDirection (TQBoxLayout::LeftToRight);
}
else
{
- m_boxLayout->setDirection (QBoxLayout::TopToBottom);
+ m_boxLayout->setDirection (TQBoxLayout::TopToBottom);
}
m_colorPalette->setOrientation (o);
diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h
index b4a77bfb..3b50c825 100644
--- a/kolourpaint/widgets/kpcolortoolbar.h
+++ b/kolourpaint/widgets/kpcolortoolbar.h
@@ -30,8 +30,8 @@
#define __kp_color_toolbar_h__
-#include <qframe.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqwidget.h>
#include <kcolordialog.h>
#include <ktoolbar.h>
@@ -40,7 +40,7 @@
#include <kpcolorsimilaritycube.h>
-class QGridLayout;
+class TQGridLayout;
class KColorButton;
class kpColorSimilarityCube;
@@ -62,7 +62,7 @@ Q_OBJECT
public:
kpDualColorButton (kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpDualColorButton ();
kpColor color (int which) const;
@@ -90,28 +90,28 @@ public:
kpColor oldBackgroundColor () const;
public:
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
protected:
- QRect swapPixmapRect () const;
- QRect foregroundBackgroundRect () const;
- QRect foregroundRect () const;
- QRect backgroundRect () const;
+ TQRect swapPixmapRect () const;
+ TQRect foregroundBackgroundRect () const;
+ TQRect foregroundRect () const;
+ TQRect backgroundRect () const;
- //virtual void dragEnterEvent (QDragEnterEvent *e);
- virtual void dragMoveEvent (QDragMoveEvent *e);
- virtual void dropEvent (QDropEvent *e);
+ //virtual void dragEnterEvent (TQDragEnterEvent *e);
+ virtual void dragMoveEvent (TQDragMoveEvent *e);
+ virtual void dropEvent (TQDropEvent *e);
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseDoubleClickEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseDoubleClickEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
- virtual void drawContents (QPainter *p);
+ virtual void drawContents (TQPainter *p);
kpMainWindow *m_mainWindow;
kpColor m_color [2];
kpColor m_oldColor [2];
- QPixmap *m_backBuffer;
+ TQPixmap *m_backBuffer;
};
@@ -120,7 +120,7 @@ class kpColorCells : public KColorCells
Q_OBJECT
public:
- kpColorCells (QWidget *parent,
+ kpColorCells (TQWidget *parent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorCells ();
@@ -129,8 +129,8 @@ public:
void setOrientation (Qt::Orientation o);
signals:
- void foregroundColorChanged (const QColor &color);
- void backgroundColorChanged (const QColor &color);
+ void foregroundColorChanged (const TQColor &color);
+ void backgroundColorChanged (const TQColor &color);
// lazy
void foregroundColorChanged (const kpColor &color);
@@ -139,10 +139,10 @@ signals:
protected:
Qt::Orientation m_orientation;
- virtual void dropEvent (QDropEvent *e);
- virtual void paintCell (QPainter *painter, int row, int col);
- virtual void mouseReleaseEvent (QMouseEvent *e);
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void dropEvent (TQDropEvent *e);
+ virtual void paintCell (TQPainter *painter, int row, int col);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
int m_mouseButton;
@@ -157,10 +157,10 @@ class kpTransparentColorCell : public QFrame
Q_OBJECT
public:
- kpTransparentColorCell (QWidget *parent, const char *name = 0);
+ kpTransparentColorCell (TQWidget *parent, const char *name = 0);
virtual ~kpTransparentColorCell ();
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
signals:
void transparentColorSelected (int mouseButton);
@@ -170,12 +170,12 @@ signals:
void backgroundColorChanged (const kpColor &color);
protected:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
- virtual void drawContents (QPainter *p);
+ virtual void drawContents (TQPainter *p);
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
};
@@ -184,7 +184,7 @@ class kpColorPalette : public QWidget
Q_OBJECT
public:
- kpColorPalette (QWidget *parent,
+ kpColorPalette (TQWidget *parent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorPalette ();
@@ -199,7 +199,7 @@ signals:
protected:
Qt::Orientation m_orientation;
- QBoxLayout *m_boxLayout;
+ TQBoxLayout *m_boxLayout;
kpTransparentColorCell *m_transparentColorCell;
kpColorCells *m_colorCells;
};
@@ -211,7 +211,7 @@ Q_OBJECT
public:
kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityToolBarItem ();
@@ -229,8 +229,8 @@ public:
double oldColorSimilarity () const;
private:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseDoubleClickEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseDoubleClickEvent (TQMouseEvent *e);
private:
kpMainWindow *m_mainWindow;
@@ -245,7 +245,7 @@ class kpColorToolBar : public KToolBar
Q_OBJECT
public:
- kpColorToolBar (const QString &label, kpMainWindow *mainWindow, const char *name = 0);
+ kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0);
virtual ~kpColorToolBar ();
kpColor color (int which) const;
@@ -288,7 +288,7 @@ private:
bool m_lastDockedOrientationSet;
virtual void setOrientation (Qt::Orientation o);
- QBoxLayout *m_boxLayout;
+ TQBoxLayout *m_boxLayout;
kpDualColorButton *m_dualColorButton;
kpColorPalette *m_colorPalette;
kpColorSimilarityToolBarItem *m_colorSimilarityToolBarItem;
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp
index 77d0ad2b..cb5a2311 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.cpp
+++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp
@@ -33,16 +33,16 @@
#include <kdebug.h>
-kpResizeSignallingLabel::kpResizeSignallingLabel (const QString &string,
- QWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string,
+ TQWidget *parent,
const char *name)
- : QLabel (string, parent, name)
+ : TQLabel (string, parent, name)
{
}
-kpResizeSignallingLabel::kpResizeSignallingLabel (QWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent,
const char *name)
- : QLabel (parent, name)
+ : TQLabel (parent, name)
{
}
@@ -52,13 +52,13 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel ()
// protected virtual [base QLabel]
-void kpResizeSignallingLabel::resizeEvent (QResizeEvent *e)
+void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_RESIZE_SIGNALLING_LABEL
kdDebug () << "kpResizeSignallingLabel::resizeEvent() newSize=" << e->size ()
<< " oldSize=" << e->oldSize () << endl;
#endif
- QLabel::resizeEvent (e);
+ TQLabel::resizeEvent (e);
emit resized ();
}
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h
index 6cd3beba..5a53dcf2 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.h
+++ b/kolourpaint/widgets/kpresizesignallinglabel.h
@@ -29,7 +29,7 @@
#define KP_RESIZE_SIGNALLING_LABEL
-#include <qlabel.h>
+#include <tqlabel.h>
class kpResizeSignallingLabel : public QLabel
@@ -37,15 +37,15 @@ class kpResizeSignallingLabel : public QLabel
Q_OBJECT
public:
- kpResizeSignallingLabel (const QString &string, QWidget *parent, const char *name = 0);
- kpResizeSignallingLabel (QWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (TQWidget *parent, const char *name = 0);
virtual ~kpResizeSignallingLabel ();
signals:
void resized ();
protected:
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
};
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
index 53fd85c9..613c93a9 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
@@ -30,22 +30,22 @@
#include <kpsqueezedtextlabel.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
-kpSqueezedTextLabel::kpSqueezedTextLabel (QWidget *parent, const char *name)
- : QLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name)
+ : TQLabel (parent, name),
m_showEllipsis (true)
{
}
-kpSqueezedTextLabel::kpSqueezedTextLabel (const QString &text, QWidget *parent, const char *name)
- : QLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name)
+ : TQLabel (parent, name),
m_showEllipsis (true)
{
setText (text);
@@ -53,18 +53,18 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const QString &text, QWidget *parent,
// public virtual
-QSize kpSqueezedTextLabel::minimumSizeHint () const
+TQSize kpSqueezedTextLabel::minimumSizeHint () const
{
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers"
- << QLabel::minimumSizeHint () << endl;
+ << TQLabel::minimumSizeHint () << endl;
#endif
- return QSize (-1/*no minimum width*/, QLabel::minimumHeight ());
+ return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ());
}
// public
-QString kpSqueezedTextLabel::fullText () const
+TQString kpSqueezedTextLabel::fullText () const
{
return m_fullText;
}
@@ -89,7 +89,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes)
// public slots virtual [base QLabel]
-void kpSqueezedTextLabel::setText (const QString &text)
+void kpSqueezedTextLabel::setText (const TQString &text)
{
m_fullText = text;
squeezeText ();
@@ -97,7 +97,7 @@ void kpSqueezedTextLabel::setText (const QString &text)
// protected virtual [base QWidget]
-void kpSqueezedTextLabel::resizeEvent (QResizeEvent *e)
+void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size ()
@@ -109,9 +109,9 @@ void kpSqueezedTextLabel::resizeEvent (QResizeEvent *e)
// protected
-QString kpSqueezedTextLabel::ellipsisText () const
+TQString kpSqueezedTextLabel::ellipsisText () const
{
- return m_showEllipsis ? i18n ("...") : QString::null;
+ return m_showEllipsis ? i18n ("...") : TQString::null;
}
// protected
@@ -121,7 +121,7 @@ void kpSqueezedTextLabel::squeezeText ()
kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl;
#endif
- QFontMetrics fontMetrics (font ());
+ TQFontMetrics fontMetrics (font ());
int fullTextWidth = fontMetrics.width (m_fullText);
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText=" << m_fullText
@@ -135,7 +135,7 @@ void kpSqueezedTextLabel::squeezeText ()
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText will fit - display" << endl;
#endif
- QLabel::setText (m_fullText);
+ TQLabel::setText (m_fullText);
}
else
{
@@ -151,7 +151,7 @@ void kpSqueezedTextLabel::squeezeText ()
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl;
#endif
- QLabel::setText (QString::null);
+ TQLabel::setText (TQString::null);
return;
}
@@ -208,7 +208,7 @@ void kpSqueezedTextLabel::squeezeText ()
}
}
- QLabel::setText (m_fullText.left (numLettersToUse) + ellipsisText ());
+ TQLabel::setText (m_fullText.left (numLettersToUse) + ellipsisText ());
}
}
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h
index 57aa7b2f..f4bd320d 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.h
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.h
@@ -28,8 +28,8 @@
#ifndef __kp_squeezed_text_label_h__
#define __kp_squeezed_text_label_h__
-#include <qlabel.h>
-#include <qstring.h>
+#include <tqlabel.h>
+#include <tqstring.h>
// KSqueezedTextLabel done properly - squeeze at the end of the string,
@@ -39,26 +39,26 @@ class kpSqueezedTextLabel : public QLabel
Q_OBJECT
public:
- kpSqueezedTextLabel (QWidget *parent, const char *name = 0);
- kpSqueezedTextLabel (const QString &text, QWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (TQWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0);
- virtual QSize minimumSizeHint () const;
+ virtual TQSize minimumSizeHint () const;
// TODO: maybe text() should return the full text?
- QString fullText () const;
+ TQString fullText () const;
bool showEllipsis () const;
void setShowEllipsis (bool yes = true);
public slots:
- virtual void setText (const QString &text);
+ virtual void setText (const TQString &text);
protected:
- virtual void resizeEvent (QResizeEvent *);
- QString ellipsisText () const;
+ virtual void resizeEvent (TQResizeEvent *);
+ TQString ellipsisText () const;
void squeezeText ();
- QString m_fullText;
+ TQString m_fullText;
bool m_showEllipsis;
};
diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp
index b8d1985c..26c610e9 100644
--- a/kolourpaint/widgets/kptooltoolbar.cpp
+++ b/kolourpaint/widgets/kptooltoolbar.cpp
@@ -31,13 +31,13 @@
#include <kptooltoolbar.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -58,8 +58,8 @@
class kpToolButton : public QToolButton
{
public:
- kpToolButton (kpTool *tool, QWidget *parent)
- : QToolButton (parent),
+ kpToolButton (kpTool *tool, TQWidget *parent)
+ : TQToolButton (parent),
m_tool (tool)
{
}
@@ -70,7 +70,7 @@ public:
protected:
// virtual [base QWidget]
- void mouseDoubleClickEvent (QMouseEvent *e)
+ void mouseDoubleClickEvent (TQMouseEvent *e)
{
if (e->button () == Qt::LeftButton && m_tool)
m_tool->globalDraw ();
@@ -80,8 +80,8 @@ protected:
};
-kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, int colsOrRows, const char *name)
- : KToolBar ((QWidget *) mainWindow, name, false/*don't use global toolBar settings*/, true/*readConfig*/),
+kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows, const char *name)
+ : KToolBar ((TQWidget *) mainWindow, name, false/*don't use global toolBar settings*/, true/*readConfig*/),
m_vertCols (colsOrRows),
m_buttonGroup (0),
m_baseWidget (0),
@@ -102,10 +102,10 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
//setVerticallyStretchable (false);
- m_baseWidget = new QWidget (this);
+ m_baseWidget = new TQWidget (this);
#if DEBUG_KP_TOOL_TOOL_BAR
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
@@ -127,12 +127,12 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
<< timer.restart () << endl;
#endif
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
- connect (*it, SIGNAL (optionSelected (int, int)),
- this, SIGNAL (toolWidgetOptionSelected ()));
+ connect (*it, TQT_SIGNAL (optionSelected (int, int)),
+ this, TQT_SIGNAL (toolWidgetOptionSelected ()));
}
#if DEBUG_KP_TOOL_TOOL_BAR
@@ -148,10 +148,10 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
<< timer.elapsed () << endl;
#endif
- m_buttonGroup = new QButtonGroup (); // invisible
+ m_buttonGroup = new TQButtonGroup (); // invisible
m_buttonGroup->setExclusive (true);
- connect (m_buttonGroup, SIGNAL (clicked (int)), SLOT (slotToolButtonClicked ()));
+ connect (m_buttonGroup, TQT_SIGNAL (clicked (int)), TQT_SLOT (slotToolButtonClicked ()));
hideAllToolWidgets ();
}
@@ -200,7 +200,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0)
{
// Adapt according to screen geometry
- const QRect desktopSize = KGlobalSettings::desktopGeometry (this);
+ const TQRect desktopSize = KGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl;
#endif
@@ -221,7 +221,7 @@ int kpToolToolBar::defaultIconSize ()
// public
void kpToolToolBar::registerTool (kpTool *tool)
{
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -230,7 +230,7 @@ void kpToolToolBar::registerTool (kpTool *tool)
}
int num = m_buttonToolPairs.count ();
- QToolButton *b = new kpToolButton (tool, m_baseWidget);
+ TQToolButton *b = new kpToolButton (tool, m_baseWidget);
b->setAutoRaise (true);
b->setUsesBigPixmap (false);
b->setUsesTextLabel (false);
@@ -238,8 +238,8 @@ void kpToolToolBar::registerTool (kpTool *tool)
b->setText (tool->text ());
b->setIconSet (tool->iconSet (defaultIconSize ()));
- QToolTip::add (b, tool->toolTip ());
- QWhatsThis::add (b, tool->description ());
+ TQToolTip::add (b, tool->toolTip ());
+ TQWhatsThis::add (b, tool->description ());
m_buttonGroup->insert (b);
addButton (b, orientation (), num);
@@ -247,16 +247,16 @@ void kpToolToolBar::registerTool (kpTool *tool)
m_buttonToolPairs.append (kpButtonToolPair (b, tool));
- connect (tool, SIGNAL (actionActivated ()),
- this, SLOT (slotToolActionActivated ()));
- connect (tool, SIGNAL (actionToolTipChanged (const QString &)),
- this, SLOT (slotToolActionToolTipChanged ()));
+ connect (tool, TQT_SIGNAL (actionActivated ()),
+ this, TQT_SLOT (slotToolActionActivated ()));
+ connect (tool, TQT_SIGNAL (actionToolTipChanged (const TQString &)),
+ this, TQT_SLOT (slotToolActionToolTipChanged ()));
}
// public
void kpToolToolBar::unregisterTool (kpTool *tool)
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -265,10 +265,10 @@ void kpToolToolBar::unregisterTool (kpTool *tool)
delete ((*it).m_button);
m_buttonToolPairs.erase (it);
- disconnect (tool, SIGNAL (actionActivated ()),
- this, SLOT (slotToolActionActivated ()));
- disconnect (tool, SIGNAL (actionToolTipChanged (const QString &)),
- this, SLOT (slotToolActionToolTipChanged ()));
+ disconnect (tool, TQT_SIGNAL (actionActivated ()),
+ this, TQT_SLOT (slotToolActionActivated ()));
+ disconnect (tool, TQT_SIGNAL (actionToolTipChanged (const TQString &)),
+ this, TQT_SLOT (slotToolActionToolTipChanged ()));
break;
}
}
@@ -277,7 +277,7 @@ void kpToolToolBar::unregisterTool (kpTool *tool)
// public
void kpToolToolBar::unregisterAllTools ()
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -308,7 +308,7 @@ void kpToolToolBar::selectTool (const kpTool *tool, bool reselectIfSameTool)
if (tool)
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -322,7 +322,7 @@ void kpToolToolBar::selectTool (const kpTool *tool, bool reselectIfSameTool)
}
else
{
- QButton *b = m_buttonGroup->selected ();
+ TQButton *b = m_buttonGroup->selected ();
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\twant to select no tool - button selected=" << b << endl;
#endif
@@ -351,7 +351,7 @@ void kpToolToolBar::selectPreviousTool ()
// public
void kpToolToolBar::hideAllToolWidgets ()
{
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -368,7 +368,7 @@ int kpToolToolBar::numShownToolWidgets () const
int ret = 0;
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -389,7 +389,7 @@ kpToolWidgetBase *kpToolToolBar::shownToolWidget (int which) const
{
int uptoVisibleWidget = 0;
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -409,7 +409,7 @@ kpToolWidgetBase *kpToolToolBar::shownToolWidget (int which) const
// public
bool kpToolToolBar::toolsSingleKeyTriggersEnabled () const
{
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -427,7 +427,7 @@ void kpToolToolBar::enableToolsSingleKeyTriggers (bool enable)
kdDebug () << "kpToolToolBar::enableToolsSingleKeyTriggers(" << enable << ")" << endl;
#endif
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -439,14 +439,14 @@ void kpToolToolBar::enableToolsSingleKeyTriggers (bool enable)
// private slot
void kpToolToolBar::slotToolButtonClicked ()
{
- QButton *b = m_buttonGroup->selected ();
+ TQButton *b = m_buttonGroup->selected ();
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "kpToolToolBar::slotToolButtonClicked() button=" << b << endl;
#endif
kpTool *tool = 0;
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -534,13 +534,13 @@ void kpToolToolBar::slotToolActionToolTipChanged ()
if (!tool)
return;
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
if (tool == (*it).m_tool)
{
- QToolTip::add ((*it).m_button, tool->toolTip ());
+ TQToolTip::add ((*it).m_button, tool->toolTip ());
return;
}
}
@@ -556,8 +556,8 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
<< ") called!" << endl;
#endif
- // (QDockWindow::undock() calls us)
- bool isOutsideDock = (place () == QDockWindow::OutsideDock);
+ // (TQDockWindow::undock() calls us)
+ bool isOutsideDock = (place () == TQDockWindow::OutsideDock);
if (!m_lastDockedOrientationSet || !isOutsideDock)
{
@@ -577,10 +577,10 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
delete m_baseLayout;
if (o == Qt::Vertical)
{
- m_baseLayout = new QBoxLayout (m_baseWidget, QBoxLayout::TopToBottom,
+ m_baseLayout = new TQBoxLayout (m_baseWidget, TQBoxLayout::TopToBottom,
5/*margin*/,
10/*spacing*/);
- m_toolLayout = new QGridLayout (m_baseLayout,
+ m_toolLayout = new TQGridLayout (m_baseLayout,
5/*arbitrary rows since toolBar auto-expands*/,
m_vertCols,
0/*margin*/,
@@ -588,10 +588,10 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
}
else // if (o == Qt::Horizontal)
{
- m_baseLayout = new QBoxLayout (m_baseWidget, QBoxLayout::LeftToRight,
+ m_baseLayout = new TQBoxLayout (m_baseWidget, TQBoxLayout::LeftToRight,
5/*margin*/,
10/*spacing*/);
- m_toolLayout = new QGridLayout (m_baseLayout,
+ m_toolLayout = new TQGridLayout (m_baseLayout,
m_vertCols/*rows in this case, since horiz*/,
5/*arbitrary cols since toolBar auto-expands*/,
0/*margin*/,
@@ -600,7 +600,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
int num = 0;
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -608,7 +608,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
num++;
}
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -624,7 +624,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
}
// private
-void kpToolToolBar::addButton (QButton *button, Qt::Orientation o, int num)
+void kpToolToolBar::addButton (TQButton *button, Qt::Orientation o, int num)
{
if (o == Qt::Vertical)
m_toolLayout->addWidget (button, num / m_vertCols, num % m_vertCols);
diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h
index c3a7d1b7..417ae022 100644
--- a/kolourpaint/widgets/kptooltoolbar.h
+++ b/kolourpaint/widgets/kptooltoolbar.h
@@ -29,16 +29,16 @@
#ifndef __kp_tool_tool_bar_h__
#define __kp_tool_tool_bar_h__
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <ktoolbar.h>
-class QBoxLayout;
-class QButton;
-class QButtonGroup;
-class QWidget;
-class QGridLayout;
+class TQBoxLayout;
+class TQButton;
+class TQButtonGroup;
+class TQWidget;
+class TQGridLayout;
class kpMainWindow;
class kpTool;
@@ -56,7 +56,7 @@ class kpToolToolBar : public KToolBar
Q_OBJECT
public:
- kpToolToolBar (const QString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
+ kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
virtual ~kpToolToolBar ();
private:
@@ -102,16 +102,16 @@ public slots:
virtual void setOrientation (Qt::Orientation o);
private:
- void addButton (QButton *button, Qt::Orientation o, int num);
+ void addButton (TQButton *button, Qt::Orientation o, int num);
Qt::Orientation m_lastDockedOrientation;
bool m_lastDockedOrientationSet;
int m_vertCols;
- QButtonGroup *m_buttonGroup;
- QWidget *m_baseWidget;
- QBoxLayout *m_baseLayout;
- QGridLayout *m_toolLayout;
+ TQButtonGroup *m_buttonGroup;
+ TQWidget *m_baseWidget;
+ TQBoxLayout *m_baseLayout;
+ TQGridLayout *m_toolLayout;
kpToolWidgetBrush *m_toolWidgetBrush;
kpToolWidgetEraserSize *m_toolWidgetEraserSize;
@@ -120,12 +120,12 @@ private:
kpToolWidgetOpaqueOrTransparent *m_toolWidgetOpaqueOrTransparent;
kpToolWidgetSpraycanSize *m_toolWidgetSpraycanSize;
- QValueVector <kpToolWidgetBase *> m_toolWidgets;
+ TQValueVector <kpToolWidgetBase *> m_toolWidgets;
private:
struct kpButtonToolPair
{
- kpButtonToolPair (QButton *button, kpTool *tool)
+ kpButtonToolPair (TQButton *button, kpTool *tool)
: m_button (button), m_tool (tool)
{
}
@@ -135,11 +135,11 @@ private:
{
}
- QButton *m_button;
+ TQButton *m_button;
kpTool *m_tool;
};
- QValueVector <kpButtonToolPair> m_buttonToolPairs;
+ TQValueVector <kpButtonToolPair> m_buttonToolPairs;
kpTool *m_previousTool, *m_currentTool;
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index a0042dbc..0d0a9245 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -31,11 +31,11 @@
#include <kptoolwidgetbase.h>
-#include <qbitmap.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -45,15 +45,15 @@
#include <kpeffectinvert.h>
-kpToolWidgetBase::kpToolWidgetBase (QWidget *parent, const char *name)
- : QFrame (parent, name),
+kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name)
+ : TQFrame (parent, name),
m_invertSelectedPixmap (true),
m_selectedRow (-1), m_selectedCol (-1)
{
if (!name)
kdError () << "kpToolWidgetBase::kpToolWidgetBase() without name" << endl;
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
setFixedSize (44, 66);
}
@@ -63,13 +63,13 @@ kpToolWidgetBase::~kpToolWidgetBase ()
// public
-void kpToolWidgetBase::addOption (const QPixmap &pixmap, const QString &toolTip)
+void kpToolWidgetBase::addOption (const TQPixmap &pixmap, const TQString &toolTip)
{
if (m_pixmaps.isEmpty ())
startNewOptionRow ();
m_pixmaps.last ().append (pixmap);
- m_pixmapRects.last ().append (QRect ());
+ m_pixmapRects.last ().append (TQRect ());
m_toolTips.last ().append (toolTip);
}
@@ -110,14 +110,14 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
// private
-QValueVector <int> kpToolWidgetBase::spreadOutElements (const QValueVector <int> &sizes, int max)
+TQValueVector <int> kpToolWidgetBase::spreadOutElements (const TQValueVector <int> &sizes, int max)
{
if (sizes.count () == 0)
- return QValueVector <int> ();
+ return TQValueVector <int> ();
else if (sizes.count () == 1)
- return QValueVector <int> (1, sizes.first () > max ? 0 : 1/*margin*/);
+ return TQValueVector <int> (1, sizes.first () > max ? 0 : 1/*margin*/);
- QValueVector <int> retOffsets (sizes.count ());
+ TQValueVector <int> retOffsets (sizes.count ());
int totalSize = 0;
for (int i = 0; i < (int) sizes.count (); i++)
@@ -175,10 +175,10 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- QString nameString = QString::fromLatin1 (name ());
+ TQString nameString = TQString::fromLatin1 (name ());
- row = cfg->readNumEntry (nameString + QString::fromLatin1 (" Row"), -1);
- col = cfg->readNumEntry (nameString + QString::fromLatin1 (" Col"), -1);
+ row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1);
+ col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1);
}
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -218,9 +218,9 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- QString nameString = QString::fromLatin1 (name ());
- cfg->writeEntry (nameString + QString::fromLatin1 (" Row"), m_selectedRow);
- cfg->writeEntry (nameString + QString::fromLatin1 (" Col"), m_selectedCol);
+ TQString nameString = TQString::fromLatin1 (name ());
+ cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow);
+ cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol);
cfg->sync ();
}
@@ -250,7 +250,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\tfinding heights of rows:" << endl;
#endif
- QValueVector <int> maxHeightOfRow (m_pixmaps.count ());
+ TQValueVector <int> maxHeightOfRow (m_pixmaps.count ());
for (int r = 0; r < (int) m_pixmaps.count (); r++)
{
@@ -264,7 +264,7 @@ void kpToolWidgetBase::relayoutOptions ()
#endif
}
- QValueVector <int> rowYOffset = spreadOutElements (maxHeightOfRow, height ());
+ TQValueVector <int> rowYOffset = spreadOutElements (maxHeightOfRow, height ());
#if DEBUG_KP_TOOL_WIDGET_BASE
kdDebug () << "\tspread out offsets of rows:" << endl;
for (int r = 0; r < (int) rowYOffset.count (); r++)
@@ -277,7 +277,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\tlaying out row " << r << ":" << endl;
#endif
- QValueVector <int> widths (m_pixmaps [r].count ());
+ TQValueVector <int> widths (m_pixmaps [r].count ());
for (int c = 0; c < (int) m_pixmaps [r].count (); c++)
widths [c] = m_pixmaps [r][c].width ();
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -286,7 +286,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\t\t\t" << c << ": " << widths [c] << endl;
#endif
- QValueVector <int> colXOffset = spreadOutElements (widths, width ());
+ TQValueVector <int> colXOffset = spreadOutElements (widths, width ());
#if DEBUG_KP_TOOL_WIDGET_BASE
kdDebug () << "\t\tspread out offsets of cols:" << endl;
for (int c = 0; c < (int) colXOffset.count (); c++)
@@ -319,10 +319,10 @@ void kpToolWidgetBase::relayoutOptions ()
else
h = rowYOffset [r + 1] - y;
- m_pixmapRects [r][c] = QRect (x, y, w, h);
+ m_pixmapRects [r][c] = TQRect (x, y, w, h);
if (!m_toolTips [r][c].isEmpty ())
- QToolTip::add (this, m_pixmapRects [r][c], m_toolTips [r][c]);
+ TQToolTip::add (this, m_pixmapRects [r][c], m_toolTips [r][c]);
}
}
@@ -537,7 +537,7 @@ bool kpToolWidgetBase::selectNextOption ()
// protected virtual [base QWidget]
-void kpToolWidgetBase::mousePressEvent (QMouseEvent *e)
+void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
e->ignore ();
@@ -560,7 +560,7 @@ void kpToolWidgetBase::mousePressEvent (QMouseEvent *e)
}
// protected virtual [base QFrame]
-void kpToolWidgetBase::drawContents (QPainter *painter)
+void kpToolWidgetBase::drawContents (TQPainter *painter)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
kdDebug () << "kpToolWidgetBase::drawContents(): rect=" << contentsRect () << endl;
@@ -574,8 +574,8 @@ void kpToolWidgetBase::drawContents (QPainter *painter)
for (int j = 0; j < (int) m_pixmaps [i].count (); j++)
{
- QRect rect = m_pixmapRects [i][j];
- QPixmap pixmap = m_pixmaps [i][j];
+ TQRect rect = m_pixmapRects [i][j];
+ TQPixmap pixmap = m_pixmaps [i][j];
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
kdDebug () << "\t\tCol: " << j << " rect=" << rect << endl;
@@ -598,7 +598,7 @@ void kpToolWidgetBase::drawContents (QPainter *painter)
#endif
- painter->drawPixmap (QPoint (rect.x () + (rect.width () - pixmap.width ()) / 2,
+ painter->drawPixmap (TQPoint (rect.x () + (rect.width () - pixmap.width ()) / 2,
rect.y () + (rect.height () - pixmap.height ()) / 2),
pixmap);
}
diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h
index a23f9a16..1a4c8a6f 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.h
+++ b/kolourpaint/widgets/kptoolwidgetbase.h
@@ -29,15 +29,15 @@
#ifndef __kp_tool_widget_base_h__
#define __kp_tool_widget_base_h__
-#include <qframe.h>
-#include <qpair.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqpair.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
-class QPainter;
+class TQPainter;
// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small
@@ -46,11 +46,11 @@ class kpToolWidgetBase : public QFrame
Q_OBJECT
public:
- kpToolWidgetBase (QWidget *parent, const char *name); // must provide a name for config to work
+ kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work
virtual ~kpToolWidgetBase ();
public:
- void addOption (const QPixmap &pixmap, const QString &toolTip = QString::null);
+ void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null);
void startNewOptionRow ();
// Call this at the end of your constructor.
@@ -59,7 +59,7 @@ public:
void finishConstruction (int fallBackRow, int fallBackCol);
private:
- QValueVector <int> spreadOutElements (const QValueVector <int> &sizes, int maxSize);
+ TQValueVector <int> spreadOutElements (const TQValueVector <int> &sizes, int maxSize);
public: // (only have to use these if you don't use finishConstruction())
// (rereads from config file)
@@ -92,19 +92,19 @@ signals:
void optionSelected (int row, int col);
protected:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void drawContents (QPainter *painter);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void drawContents (TQPainter *painter);
void setInvertSelectedPixmap (bool yes = true) { m_invertSelectedPixmap = yes; }
bool m_invertSelectedPixmap;
- // coulbe be a QFrame or a ComboBox
- QWidget *m_baseWidget;
+ // coulbe be a TQFrame or a ComboBox
+ TQWidget *m_baseWidget;
- QValueVector < QValueVector <QPixmap> > m_pixmaps;
- QValueVector < QValueVector <QString> > m_toolTips;
+ TQValueVector < TQValueVector <TQPixmap> > m_pixmaps;
+ TQValueVector < TQValueVector <TQString> > m_toolTips;
- QValueVector < QValueVector <QRect> > m_pixmapRects;
+ TQValueVector < TQValueVector <TQRect> > m_pixmapRects;
int m_selectedRow, m_selectedCol;
};
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp
index 046dc8b5..1e53891e 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp
@@ -31,8 +31,8 @@
#include <kptoolwidgetbrush.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -52,12 +52,12 @@ static int brushSize [][3] =
#define BRUSH_SIZE_NUM_COLS (int (sizeof (brushSize [0]) / sizeof (brushSize [0][0])))
#define BRUSH_SIZE_NUM_ROWS (int (sizeof (brushSize) / sizeof (brushSize [0])))
-kpToolWidgetBrush::kpToolWidgetBrush (QWidget *parent, const char *name)
+kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
- QPixmap *pm = m_brushBitmaps;
+ TQPixmap *pm = m_brushBitmaps;
for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++)
{
@@ -69,13 +69,13 @@ kpToolWidgetBrush::kpToolWidgetBrush (QWidget *parent, const char *name)
(h <= 0 ? height () : h));
const int s = brushSize [shape][i];
- QRect rect;
+ TQRect rect;
if (s >= pm->width () || s >= pm->height ())
- rect = QRect (0, 0, pm->width (), pm->height ());
+ rect = TQRect (0, 0, pm->width (), pm->height ());
else
{
- rect = QRect ((pm->width () - s) / 2,
+ rect = TQRect ((pm->width () - s) / 2,
(pm->height () - s) / 2,
s,
s);
@@ -87,7 +87,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (QWidget *parent, const char *name)
pm->fill (Qt::white);
- QPainter painter (pm);
+ TQPainter painter (pm);
painter.setPen (Qt::black);
painter.setBrush (Qt::black);
@@ -127,14 +127,14 @@ kpToolWidgetBrush::~kpToolWidgetBrush ()
// private
-QString kpToolWidgetBrush::brushName (int shape, int whichSize)
+TQString kpToolWidgetBrush::brushName (int shape, int whichSize)
{
int s = brushSize [shape][whichSize];
if (s == 1)
return i18n ("1x1");
- QString shapeName;
+ TQString shapeName;
// sync: <brushes>
switch (shape)
@@ -156,12 +156,12 @@ QString kpToolWidgetBrush::brushName (int shape, int whichSize)
}
if (shapeName.isEmpty ())
- return QString::null;
+ return TQString::null;
return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName);
}
-QPixmap kpToolWidgetBrush::brush () const
+TQPixmap kpToolWidgetBrush::brush () const
{
return m_brushBitmaps [selectedRow () * BRUSH_SIZE_NUM_COLS + selectedCol ()];
}
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h
index db222e79..563d9625 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.h
+++ b/kolourpaint/widgets/kptoolwidgetbrush.h
@@ -29,7 +29,7 @@
#ifndef __kptoolwidgetbrush_h__
#define __kptoolwidgetbrush_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kptoolwidgetbase.h>
@@ -38,24 +38,24 @@ class kpToolWidgetBrush : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetBrush (QWidget *parent, const char *name);
+ kpToolWidgetBrush (TQWidget *parent, const char *name);
virtual ~kpToolWidgetBrush ();
private:
- QString brushName (int shape, int whichSize);
+ TQString brushName (int shape, int whichSize);
public:
- QPixmap brush () const;
+ TQPixmap brush () const;
bool brushIsDiagonalLine () const;
signals:
- void brushChanged (const QPixmap &pixmap, bool isDiagonalLine);
+ void brushChanged (const TQPixmap &pixmap, bool isDiagonalLine);
protected slots:
virtual bool setSelected (int row, int col, bool saveAsDefault);
private:
- QPixmap m_brushBitmaps [16];
+ TQPixmap m_brushBitmaps [16];
};
#endif // __kptoolwidgetbrush_h__
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
index cc58c0d1..9b9ffe8a 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
@@ -30,8 +30,8 @@
#include <kptoolwidgeterasersize.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,13 +44,13 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29};
static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0]));
-kpToolWidgetEraserSize::kpToolWidgetEraserSize (QWidget *parent, const char *name)
+kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
- m_cursorPixmaps = new QPixmap [numEraserSizes];
- QPixmap *cursorPixmap = m_cursorPixmaps;
+ m_cursorPixmaps = new TQPixmap [numEraserSizes];
+ TQPixmap *cursorPixmap = m_cursorPixmaps;
for (int i = 0; i < numEraserSizes; i++)
{
@@ -63,22 +63,22 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (QWidget *parent, const char *nam
cursorPixmap->fill (Qt::black);
- QPixmap previewPixmap (s, s);
+ TQPixmap previewPixmap (s, s);
if (i < 3)
{
// HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing
previewPixmap.resize ((width () - 4) / 3, 9);
}
- QPainter painter (&previewPixmap);
- QRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
+ TQPainter painter (&previewPixmap);
+ TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
painter.fillRect (rect, Qt::black);
painter.end ();
- QBitmap mask (previewPixmap.width (), previewPixmap.height ());
+ TQBitmap mask (previewPixmap.width (), previewPixmap.height ());
mask.fill (Qt::color0/*transparent*/);
- QPainter maskPainter (&mask);
+ TQPainter maskPainter (&mask);
maskPainter.fillRect (rect, Qt::color1/*opaque*/);
maskPainter.end ();
@@ -104,7 +104,7 @@ int kpToolWidgetEraserSize::eraserSize () const
return eraserSizes [selected ()];
}
-QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
+TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
{
#if DEBUG_KP_TOOL_WIDGET_ERASER_SIZE
kdDebug () << "kpToolWidgetEraseSize::cursorPixmap() selected=" << selected ()
@@ -113,7 +113,7 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
#endif
// TODO: why are we even storing m_cursorPixmaps?
- QPixmap pixmap = m_cursorPixmaps [selected ()];
+ TQPixmap pixmap = m_cursorPixmaps [selected ()];
if (color.isOpaque ())
pixmap.fill (color.toQColor ());
@@ -122,7 +122,7 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (showBorder)
{
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
painter.setPen (Qt::black);
painter.drawRect (pixmap.rect ());
}
@@ -130,13 +130,13 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (color.isTransparent ())
{
- QBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
maskBitmap.fill (Qt::color0/*transparent*/);
if (showBorder)
{
- QPainter maskBitmapPainter (&maskBitmap);
+ TQPainter maskBitmapPainter (&maskBitmap);
maskBitmapPainter.setPen (Qt::color1/*opaque*/);
maskBitmapPainter.drawRect (maskBitmap.rect ());
}
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h
index 71093fd6..09b8c0f8 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.h
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.h
@@ -29,7 +29,7 @@
#ifndef __kptoolwidgeterasersize_h__
#define __kptoolwidgeterasersize_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kptoolwidgetbase.h>
@@ -40,11 +40,11 @@ class kpToolWidgetEraserSize : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetEraserSize (QWidget *parent, const char *name);
+ kpToolWidgetEraserSize (TQWidget *parent, const char *name);
virtual ~kpToolWidgetEraserSize ();
int eraserSize () const;
- QPixmap cursorPixmap (const kpColor &color) const;
+ TQPixmap cursorPixmap (const kpColor &color) const;
signals:
void eraserSizeChanged (int size);
@@ -53,7 +53,7 @@ protected slots:
virtual bool setSelected (int row, int col, bool saveAsDefault);
private:
- QPixmap *m_cursorPixmaps;
+ TQPixmap *m_cursorPixmaps;
};
#endif // __kptoolwidgeterasersize_h__
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
index 74c174ce..9b780b3f 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
@@ -30,9 +30,9 @@
#include <kptoolwidgetfillstyle.h>
-#include <qbitmap.h>
-#include <qbrush.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqbrush.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -42,14 +42,14 @@
#include <kptool.h>
-kpToolWidgetFillStyle::kpToolWidgetFillStyle (QWidget *parent, const char *name)
+kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
for (int i = 0; i < (int) FillStyleNum; i++)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap = fillStylePixmap ((FillStyle) i,
(width () - 2/*margin*/) * 3 / 4,
@@ -68,14 +68,14 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle ()
// private
-QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
+TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
{
- QPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
+ TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
pixmap.fill (Qt::white);
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
- painter.setPen (QPen (Qt::black, 2));
+ painter.setPen (TQPen (Qt::black, 2));
painter.setBrush (brushForFillStyle (fs,
kpColor (Qt::black.rgb ())/*foreground*/,
kpColor (Qt::gray.rgb ())/*background*/));
@@ -85,11 +85,11 @@ QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
painter.end ();
- QBitmap mask (pixmap.width (), pixmap.height ());
+ TQBitmap mask (pixmap.width (), pixmap.height ());
mask.fill (Qt::color0);
painter.begin (&mask);
- painter.setPen (QPen (Qt::color1, 2));
+ painter.setPen (TQPen (Qt::color1, 2));
if (fs == FillWithBackground || fs == FillWithForeground)
painter.setBrush (Qt::color1);
@@ -104,7 +104,7 @@ QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
}
// private
-QString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
+TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
{
// do not complain about the "useless" breaks
// as the return statements might not be return statements one day
@@ -121,7 +121,7 @@ QString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
return i18n ("Fill with Foreground Color");
break;
default:
- return QString::null;
+ return TQString::null;
break;
}
}
@@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
}
// public static
-QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -152,10 +152,10 @@ QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush;
break;
case FillWithBackground:
- return QBrush (backgroundColor.maskColor ());
+ return TQBrush (backgroundColor.maskColor ());
break;
case FillWithForeground:
- return QBrush (foregroundColor.maskColor ());
+ return TQBrush (foregroundColor.maskColor ());
break;
default:
return Qt::NoBrush;
@@ -163,14 +163,14 @@ QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
}
}
-QBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
}
// public static
-QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -186,13 +186,13 @@ QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
break;
case FillWithBackground:
if (backgroundColor.isOpaque ())
- return QBrush (backgroundColor.toQColor ());
+ return TQBrush (backgroundColor.toQColor ());
else
return Qt::NoBrush;
break;
case FillWithForeground:
if (foregroundColor.isOpaque ())
- return QBrush (foregroundColor.toQColor ());
+ return TQBrush (foregroundColor.toQColor ());
else
return Qt::NoBrush;
break;
@@ -203,7 +203,7 @@ QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
}
// public
-QBrush kpToolWidgetFillStyle::brush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::brush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
return brushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h
index 219d47f2..86a47270 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.h
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h
@@ -31,7 +31,7 @@
#include <kptoolwidgetbase.h>
-class QBrush;
+class TQBrush;
class kpColor;
@@ -40,7 +40,7 @@ class kpToolWidgetFillStyle : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetFillStyle (QWidget *parent, const char *name);
+ kpToolWidgetFillStyle (TQWidget *parent, const char *name);
virtual ~kpToolWidgetFillStyle ();
enum FillStyle
@@ -52,22 +52,22 @@ public:
};
private:
- QPixmap fillStylePixmap (FillStyle fs, int width, int height);
- QString fillStyleName (FillStyle fs) const;
+ TQPixmap fillStylePixmap (FillStyle fs, int width, int height);
+ TQString fillStyleName (FillStyle fs) const;
public:
FillStyle fillStyle () const;
- static QBrush maskBrushForFillStyle (FillStyle fs,
+ static TQBrush maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- QBrush maskBrush (const kpColor &foregroundColor,
+ TQBrush maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
- static QBrush brushForFillStyle (FillStyle fs,
+ static TQBrush brushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- QBrush brush (const kpColor &foregroundColor,
+ TQBrush brush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
signals:
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
index 27e34ecb..ded51a03 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
@@ -28,15 +28,15 @@
#include <kptoolwidgetlinewidth.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <klocale.h>
static int lineWidths [] = {1, 2, 3, 5, 8};
-kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
+kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
@@ -48,19 +48,19 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
for (int i = 0; i < numLineWidths; i++)
{
- QPixmap pixmap ((w <= 0 ? width () : w),
+ TQPixmap pixmap ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
pixmap.fill (Qt::white);
- QBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
maskBitmap.fill (Qt::color0/*transparent*/);
- QPainter painter (&pixmap), maskPainter (&maskBitmap);
+ TQPainter painter (&pixmap), maskPainter (&maskBitmap);
painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/);
painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/);
- QRect rect = QRect (0, (pixmap.height () - lineWidths [i]) / 2,
+ TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]);
painter.drawRect (rect), maskPainter.drawRect (rect);
@@ -69,7 +69,7 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
pixmap.setMask (maskBitmap);
- addOption (pixmap, QString::number (lineWidths [i]));
+ addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow ();
}
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h
index 3255e443..8fa041a0 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.h
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h
@@ -36,7 +36,7 @@ class kpToolWidgetLineWidth : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetLineWidth (QWidget *parent, const char *name);
+ kpToolWidgetLineWidth (TQWidget *parent, const char *name);
virtual ~kpToolWidgetLineWidth ();
int lineWidth () const;
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
index 41b55d0f..4cd5b6f6 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
@@ -35,7 +35,7 @@
#include <klocale.h>
-kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (QWidget *parent, const char *name)
+kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap (false);
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
index c24cd308..82ea3f50 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
@@ -37,7 +37,7 @@ class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetOpaqueOrTransparent (QWidget *parent, const char *name);
+ kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name);
virtual ~kpToolWidgetOpaqueOrTransparent ();
bool isOpaque () const;
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
index 161e5015..2f426df5 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
@@ -31,9 +31,9 @@
#include <kptoolwidgetspraycansize.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -44,7 +44,7 @@
static int spraycanSizes [] = {9, 17, 29};
-kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const char *name)
+kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
@@ -54,22 +54,22 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{
int s = spraycanSizes [i];
- QString iconName = QString ("tool_spraycan_%1x%1").arg (s).arg(s);
+ TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl;
#endif
- QPixmap pixmap (s, s);
+ TQPixmap pixmap (s, s);
pixmap.fill (Qt::white);
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
painter.drawPixmap (0, 0, UserIcon (iconName));
painter.end ();
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
- QBitmap mask (pixmap.width (), pixmap.height ());
+ TQBitmap mask (pixmap.width (), pixmap.height ());
mask.fill (Qt::color0);
painter.begin (&mask);
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h
index b4233a80..6cc7d11e 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.h
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h
@@ -36,7 +36,7 @@ class kpToolWidgetSpraycanSize : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetSpraycanSize (QWidget *parent, const char *name);
+ kpToolWidgetSpraycanSize (TQWidget *parent, const char *name);
virtual ~kpToolWidgetSpraycanSize ();
int spraycanSize () const;