summaryrefslogtreecommitdiffstats
path: root/kolourpaint/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/widgets')
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.cpp32
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.h6
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.cpp8
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.h3
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.cpp114
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.h26
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.cpp10
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.h7
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.cpp48
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.h9
-rw-r--r--kolourpaint/widgets/kptooltoolbar.cpp16
-rw-r--r--kolourpaint/widgets/kptooltoolbar.h1
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp36
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.h13
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.cpp44
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.h5
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.cpp38
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.cpp40
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.h7
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.cpp22
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp4
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.h3
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.cpp20
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.h3
26 files changed, 269 insertions, 252 deletions
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
index c09e495a..07693130 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
@@ -49,9 +49,9 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance =
kpColorSimilarityCube::kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_colorSimilarity (-1)
{
@@ -133,12 +133,12 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity)
m_colorSimilarity = similarity;
- repaint (false/*no erase*/);
+ tqrepaint (false/*no erase*/);
}
-// protected virtual [base QWidget]
-TQSize kpColorSimilarityCube::sizeHint () const
+// protected virtual [base TQWidget]
+TQSize kpColorSimilarityCube::tqsizeHint () const
{
return TQSize (52, 52);
}
@@ -193,8 +193,8 @@ static void drawQuadrant (TQPainter *p,
points.resize (3);
- p->setPen (Qt::black);
- p->setBrush (Qt::NoBrush);
+ p->setPen (TQt::black);
+ p->setBrush (TQt::NoBrush);
p->drawPolyline (points);
@@ -233,7 +233,7 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
const TQPoint mm (::pointBetween (ml, mr));
- const int baseBrightness = QMAX (127,
+ const int baseBrightness = TQMAX (127,
255 - int (kpColorSimilarityDialog::maximumColorSimilarity *
kpColorSimilarityCube::colorCubeDiagonalDistance / 2));
TQColor colors [2] =
@@ -247,8 +247,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
kdDebug () << "\tnot enabled - making us grey" << endl;
#endif
- colors [0] = colorGroup ().background ();
- colors [1] = colorGroup ().background ();
+ colors [0] = tqcolorGroup ().background ();
+ colors [1] = tqcolorGroup ().background ();
}
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
@@ -256,8 +256,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
<< " colorCubeDiagDist=" << kpColorSimilarityCube::colorCubeDiagonalDistance
<< endl
<< "\tbaseBrightness=" << baseBrightness
- << " color[0]=" << ((colors [0].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
- << " color[1]=" << ((colors [1].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
+ << " color[0]=" << ((colors [0].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
+ << " color[1]=" << ((colors [1].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8))
<< endl;
#endif
@@ -268,17 +268,17 @@ void kpColorSimilarityCube::drawFace (TQPainter *p,
::drawQuadrant (p, colors [0], bm, br, mr, mm);
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpColorSimilarityCube::drawContents (TQPainter *p)
{
TQRect cr (contentsRect ());
TQPixmap backBuffer (cr.width (), cr.height ());
- backBuffer.fill (colorGroup ().background ());
+ backBuffer.fill (tqcolorGroup ().background ());
TQPainter backBufferPainter (&backBuffer);
- int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
+ int cubeRectSize = TQMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
int dx = (cr.width () - cubeRectSize) / 2,
dy = (cr.height () - cubeRectSize) / 2;
backBufferPainter.translate (dx, dy);
@@ -336,7 +336,7 @@ void kpColorSimilarityCube::drawContents (TQPainter *p)
#if 0
backBufferPainter.save ();
- backBufferPainter.setPen (Qt::cyan);
+ backBufferPainter.setPen (TQt::cyan);
backBufferPainter.drawRect (0, 0, cubeRectSize, cubeRectSize);
backBufferPainter.restore ();
#endif
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h
index ee074d55..d2fb85d2 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.h
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.h
@@ -34,7 +34,7 @@
class kpColor;
class kpMainWindow;
-class kpColorSimilarityCube : public QFrame
+class kpColorSimilarityCube : public TQFrame
{
public:
enum Look
@@ -46,7 +46,7 @@ public:
kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityCube ();
@@ -55,7 +55,7 @@ public:
double colorSimilarity () const;
void setColorSimilarity (double similarity);
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
protected:
TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
index 5831c62f..ee4ff1b0 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
@@ -44,9 +44,9 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30;
kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : KDialogBase (parent, name, true/*modal*/,
+ : KDialogBase (tqparent, name, true/*modal*/,
i18n ("Color Similarity"),
KDialogBase::Ok | KDialogBase::Cancel),
m_mainWindow (mainWindow)
@@ -66,7 +66,7 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/);
- cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter);
+ cubeLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter);
connect (updatePushButton, TQT_SIGNAL (clicked ()),
@@ -109,7 +109,7 @@ double kpColorSimilarityDialog::colorSimilarity () const
// public
void kpColorSimilarityDialog::setColorSimilarity (double similarity)
{
- m_colorSimilarityInput->setValue (qRound (similarity * 100));
+ m_colorSimilarityInput->setValue (tqRound (similarity * 100));
}
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h
index 7dee17b8..df4e2445 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.h
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h
@@ -38,10 +38,11 @@ class kpMainWindow;
class kpColorSimilarityDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorSimilarityDialog (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityDialog ();
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp
index 327229df..89357d1c 100644
--- a/kolourpaint/widgets/kpcolortoolbar.cpp
+++ b/kolourpaint/widgets/kpcolortoolbar.cpp
@@ -61,8 +61,8 @@
*/
kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow,
- TQWidget *parent, const char *name)
- : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_backBuffer (0)
{
@@ -149,8 +149,8 @@ kpColor kpDualColorButton::oldBackgroundColor () const
}
-// public virtual [base QWidget]
-TQSize kpDualColorButton::sizeHint () const
+// public virtual [base TQWidget]
+TQSize kpDualColorButton::tqsizeHint () const
{
return TQSize (52, 52);
}
@@ -200,15 +200,15 @@ TQRect kpDualColorButton::backgroundRect () const
// TODO: drag a colour from this widget
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e)
{
- e->accept ((foregroundRect ().contains (e->pos ()) ||
- backgroundRect ().contains (e->pos ())) &&
+ e->accept ((foregroundRect ().tqcontains (e->pos ()) ||
+ backgroundRect ().tqcontains (e->pos ())) &&
KColorDrag::canDecode (e));
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::dropEvent (TQDropEvent *e)
{
TQColor col;
@@ -216,35 +216,35 @@ void kpDualColorButton::dropEvent (TQDropEvent *e)
if (col.isValid ())
{
- if (foregroundRect ().contains (e->pos ()))
+ if (foregroundRect ().tqcontains (e->pos ()))
setForegroundColor (kpColor (col.rgb ()));
- else if (backgroundRect ().contains (e->pos ()))
+ else if (backgroundRect ().tqcontains (e->pos ()))
setBackgroundColor (kpColor (col.rgb ()));
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
{
int whichColor = -1;
- if (foregroundRect ().contains (e->pos ()))
+ if (foregroundRect ().tqcontains (e->pos ()))
whichColor = 0;
- else if (backgroundRect ().contains (e->pos ()))
+ else if (backgroundRect ().tqcontains (e->pos ()))
whichColor = 1;
if (whichColor == 0 || whichColor == 1)
{
- TQColor col = Qt::black;
+ TQColor col = TQt::black;
if (color (whichColor).isOpaque ())
- col = color (whichColor).toQColor ();
+ col = color (whichColor).toTQColor ();
else
{
// TODO: If you double-click on a transparent color and press OK, you get
@@ -257,16 +257,16 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
// to opaque colors.
}
- // TODO: parent
+ // TODO: tqparent
if (KColorDialog::getColor (col/*ref*/))
setColor (whichColor, kpColor (col.rgb ()));
}
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
{
- if (swapPixmapRect ().contains (e->pos ()) &&
+ if (swapPixmapRect ().tqcontains (e->pos ()) &&
m_color [0] != m_color [1])
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
@@ -288,7 +288,7 @@ void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpDualColorButton::drawContents (TQPainter *p)
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
@@ -318,14 +318,14 @@ void kpDualColorButton::drawContents (TQPainter *p)
else
{
backBufferPainter.fillRect (m_backBuffer->rect (),
- colorGroup ().color (TQColorGroup::Background));
+ tqcolorGroup ().color (TQColorGroup::Background));
}
TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
if (!isEnabled ())
{
- // swapPixmap has a mask after all
- swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark));
+ // swapPixmap has a tqmask after all
+ swapPixmap.fill (tqcolorGroup ().color (TQColorGroup::Dark));
}
backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap);
@@ -337,17 +337,17 @@ void kpDualColorButton::drawContents (TQPainter *p)
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
- kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toQRgb ()
+ kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toTQRgb ()
<< endl;
#endif
if (m_color [1].isOpaque ())
- backBufferPainter.fillRect (bgRectInside, m_color [1].toQColor ());
+ backBufferPainter.fillRect (bgRectInside, m_color [1].toTQColor ());
else
backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button));
- qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (),
+ backBufferPainter.fillRect (bgRectInside, tqcolorGroup ().color (TQColorGroup::Button));
+ qDrawShadePanel (&backBufferPainter, bgRect, tqcolorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -357,17 +357,17 @@ void kpDualColorButton::drawContents (TQPainter *p)
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
- kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toQRgb ()
+ kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toTQRgb ()
<< endl;
#endif
if (m_color [0].isOpaque ())
- backBufferPainter.fillRect (fgRectInside, m_color [0].toQColor ());
+ backBufferPainter.fillRect (fgRectInside, m_color [0].toTQColor ());
else
backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button));
- qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (),
+ backBufferPainter.fillRect (fgRectInside, tqcolorGroup ().color (TQColorGroup::Button));
+ qDrawShadePanel (&backBufferPainter, fgRect, tqcolorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -421,8 +421,8 @@ static TQColor add (const TQColor &a, const TQColor &b)
//
-// make our own colors in case weird ones like "Qt::cyan"
-// (turquoise) get changed by Qt
+// make our own colors in case weird ones like "TQt::cyan"
+// (turquoise) get changed by TQt
//
// primary colors + B&W
@@ -461,10 +461,10 @@ static bool ownColorsInitialised = false;
*/
#define rows 2
#define cols 11
-kpColorCells::kpColorCells (TQWidget *parent,
+kpColorCells::kpColorCells (TQWidget *tqparent,
Qt::Orientation o,
const char *name)
- : KColorCells (parent, rows, cols),
+ : KColorCells (tqparent, rows, cols),
m_mouseButton (-1)
{
setName (name);
@@ -657,7 +657,7 @@ void kpColorCells::mouseReleaseEvent (TQMouseEvent *e)
{
m_mouseButton = -1;
- Qt::ButtonState button = e->button ();
+ TQt::ButtonState button = e->button ();
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpColorCells::mouseReleaseEvent(left="
<< (button & Qt::LeftButton)
@@ -729,7 +729,7 @@ void kpColorCells::slotColorDoubleClicked (int cell)
TQColor color = KColorCells::color (cell);
- // TODO: parent
+ // TODO: tqparent
if (KColorDialog::getColor (color/*ref*/))
KColorCells::setColor (cell, color);
}
@@ -739,8 +739,8 @@ void kpColorCells::slotColorDoubleClicked (int cell)
* kpTransparentColorCell
*/
-kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name)
- : TQFrame (parent, name)
+kpTransparentColorCell::kpTransparentColorCell (TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name)
{
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl;
@@ -767,23 +767,23 @@ kpTransparentColorCell::~kpTransparentColorCell ()
}
-// public virtual [base QWidget]
-TQSize kpTransparentColorCell::sizeHint () const
+// public virtual [base TQWidget]
+TQSize kpTransparentColorCell::tqsizeHint () const
{
return TQSize (m_pixmap.width () + frameWidth () * 2,
m_pixmap.height () + frameWidth () * 2);
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
{
- if (rect ().contains (e->pos ()))
+ if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ()))
{
if (e->button () == Qt::LeftButton)
{
@@ -798,7 +798,7 @@ void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
}
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpTransparentColorCell::drawContents (TQPainter *p)
{
TQFrame::drawContents (p);
@@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (TQPainter *p)
* kpColorPalette
*/
-kpColorPalette::kpColorPalette (TQWidget *parent,
+kpColorPalette::kpColorPalette (TQWidget *tqparent,
Qt::Orientation o,
const char *name)
- : TQWidget (parent, name),
+ : TQWidget (tqparent, name),
m_boxLayout (0)
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -829,7 +829,7 @@ kpColorPalette::kpColorPalette (TQWidget *parent,
#endif
m_transparentColorCell = new kpTransparentColorCell (this);
- m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_transparentColorCell->tqsetSizePolicy (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 &)),
@@ -863,13 +863,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
- m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter);
+ m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignVCenter);
m_boxLayout->addWidget (m_colorCells);
}
else
{
m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
- m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter);
+ m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignHCenter);
m_boxLayout->addWidget (m_colorCells);
}
@@ -882,11 +882,11 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
*/
kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
: kpColorSimilarityCube (kpColorSimilarityCube::Depressed |
kpColorSimilarityCube::DoubleClickInstructions,
- mainWindow, parent, name),
+ mainWindow, tqparent, name),
m_mainWindow (mainWindow),
m_processedColorSimilarity (kpColor::Exact)
{
@@ -912,7 +912,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity)
kpColorSimilarityCube::setColorSimilarity (similarity);
if (similarity > 0)
- TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
+ TQToolTip::add (this, i18n ("Color similarity: %1%").arg (tqRound (similarity * 100)));
else
TQToolTip::add (this, i18n ("Color similarity: Exact"));
@@ -930,13 +930,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
-// private virtual [base QWidget]
+// private virtual [base TQWidget]
void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/)
{
kpColorSimilarityDialog dialog (m_mainWindow, this);
@@ -964,7 +964,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow,
5/*margin*/, (10 * 4)/*spacing*/);
m_dualColorButton = new kpDualColorButton (mainWindow, base);
- m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_dualColorButton->tqsetSizePolicy (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 &)),
@@ -981,7 +981,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow,
m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/);
m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base);
- m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ m_colorSimilarityToolBarItem->tqsetSizePolicy (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*/);
diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h
index 3b50c825..b1e8faa8 100644
--- a/kolourpaint/widgets/kpcolortoolbar.h
+++ b/kolourpaint/widgets/kpcolortoolbar.h
@@ -56,13 +56,14 @@ class kpMainWindow;
// used by kpTransparentColorCell
// - no obscure "current" colour
//
-class kpDualColorButton : public QFrame
+class kpDualColorButton : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
kpDualColorButton (kpMainWindow *mainWindow,
- TQWidget *parent, const char *name = 0);
+ TQWidget *tqparent, const char *name = 0);
virtual ~kpDualColorButton ();
kpColor color (int which) const;
@@ -90,7 +91,7 @@ public:
kpColor oldBackgroundColor () const;
public:
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
protected:
TQRect swapPixmapRect () const;
@@ -118,9 +119,10 @@ protected:
class kpColorCells : public KColorCells
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpColorCells (TQWidget *parent,
+ kpColorCells (TQWidget *tqparent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorCells ();
@@ -152,15 +154,16 @@ protected slots:
};
-class kpTransparentColorCell : public QFrame
+class kpTransparentColorCell : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpTransparentColorCell (TQWidget *parent, const char *name = 0);
+ kpTransparentColorCell (TQWidget *tqparent, const char *name = 0);
virtual ~kpTransparentColorCell ();
- virtual TQSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
signals:
void transparentColorSelected (int mouseButton);
@@ -179,12 +182,13 @@ protected:
};
-class kpColorPalette : public QWidget
+class kpColorPalette : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpColorPalette (TQWidget *parent,
+ kpColorPalette (TQWidget *tqparent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorPalette ();
@@ -208,10 +212,11 @@ protected:
class kpColorSimilarityToolBarItem : public kpColorSimilarityCube
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name = 0);
virtual ~kpColorSimilarityToolBarItem ();
@@ -243,6 +248,7 @@ private:
class kpColorToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0);
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp
index cb5a2311..b62f3679 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.cpp
+++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp
@@ -34,15 +34,15 @@
kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name)
- : TQLabel (string, parent, name)
+ : TQLabel (string, tqparent, name)
{
}
-kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *tqparent,
const char *name)
- : TQLabel (parent, name)
+ : TQLabel (tqparent, name)
{
}
@@ -51,7 +51,7 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel ()
}
-// protected virtual [base QLabel]
+// protected virtual [base TQLabel]
void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_RESIZE_SIGNALLING_LABEL
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h
index 5a53dcf2..88f4477c 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.h
+++ b/kolourpaint/widgets/kpresizesignallinglabel.h
@@ -32,13 +32,14 @@
#include <tqlabel.h>
-class kpResizeSignallingLabel : public QLabel
+class kpResizeSignallingLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0);
- kpResizeSignallingLabel (TQWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (const TQString &string, TQWidget *tqparent, const char *name = 0);
+ kpResizeSignallingLabel (TQWidget *tqparent, const char *name = 0);
virtual ~kpResizeSignallingLabel ();
signals:
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
index 613c93a9..8cd4dfbb 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
@@ -25,7 +25,7 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define DEBUG_KP_SQUEEZED_TEXT_LABEL 0
+#define DEBUG_KP_STQUEEZED_TEXT_LABEL 0
#include <kpsqueezedtextlabel.h>
@@ -38,14 +38,14 @@
#include <klocale.h>
-kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name)
- : TQLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *tqparent, const char *name)
+ : TQLabel (tqparent, name),
m_showEllipsis (true)
{
}
-kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name)
- : TQLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name)
+ : TQLabel (tqparent, name),
m_showEllipsis (true)
{
setText (text);
@@ -53,11 +53,11 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent
// public virtual
-TQSize kpSqueezedTextLabel::minimumSizeHint () const
+TQSize kpSqueezedTextLabel::tqminimumSizeHint () const
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
- kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers"
- << TQLabel::minimumSizeHint () << endl;
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
+ kdDebug () << "kpSqueezedTextLabel::tqminimumSizeHint() qLabel prefers"
+ << TQLabel::tqminimumSizeHint () << endl;
#endif
return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ());
}
@@ -88,7 +88,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes)
}
-// public slots virtual [base QLabel]
+// public slots virtual [base TQLabel]
void kpSqueezedTextLabel::setText (const TQString &text)
{
m_fullText = text;
@@ -96,10 +96,10 @@ void kpSqueezedTextLabel::setText (const TQString &text)
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size ()
<< " oldSize=" << e->oldSize ()
<< endl;
@@ -111,19 +111,19 @@ void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
// protected
TQString kpSqueezedTextLabel::ellipsisText () const
{
- return m_showEllipsis ? i18n ("...") : TQString::null;
+ return m_showEllipsis ? i18n ("...") : TQString();
}
// protected
void kpSqueezedTextLabel::squeezeText ()
{
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl;
#endif
TQFontMetrics fontMetrics (font ());
int fullTextWidth = fontMetrics.width (m_fullText);
-#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText=" << m_fullText
<< " fullTextWidth=" << fullTextWidth
<< " labelWidth=" << width ()
@@ -132,14 +132,14 @@ void kpSqueezedTextLabel::squeezeText ()
if (fullTextWidth <= width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText will fit - display" << endl;
#endif
TQLabel::setText (m_fullText);
}
else
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText won't fit :( - squeeze" << endl;
kdDebug () << "\t\twidth of \"...\"="
<< fontMetrics.width (ellipsisText ())
@@ -148,10 +148,10 @@ void kpSqueezedTextLabel::squeezeText ()
#endif
if (fontMetrics.width (ellipsisText ()) > width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl;
#endif
- TQLabel::setText (TQString::null);
+ TQLabel::setText (TQString());
return;
}
@@ -164,7 +164,7 @@ void kpSqueezedTextLabel::squeezeText ()
{
int numLettersToUseMid = (numLettersToUseLo + numLettersToUseHi) / 2;
int squeezedWidth = fontMetrics.width (m_fullText.left (numLettersToUseMid) + ellipsisText ());
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tbsearch: lo=" << numLettersToUseLo
<< " hi=" << numLettersToUseHi
<< " mid=" << numLettersToUseMid
@@ -175,7 +175,7 @@ void kpSqueezedTextLabel::squeezeText ()
if (squeezedWidth == width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\tperfect match!" << endl;
#endif
numLettersToUse = numLettersToUseMid;
@@ -183,14 +183,14 @@ void kpSqueezedTextLabel::squeezeText ()
}
else if (squeezedWidth < width ())
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\tsmall enough - numLettersToUse="
<< numLettersToUse << endl;
#endif
if (numLettersToUseMid > numLettersToUse)
{
numLettersToUse = numLettersToUseMid;
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tset numLettersToUse="
<< numLettersToUse
<< endl;
@@ -201,7 +201,7 @@ void kpSqueezedTextLabel::squeezeText ()
}
else
{
- #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
+ #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\ttoo big" << endl;
#endif
numLettersToUseHi = numLettersToUseMid - 1;
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h
index f4bd320d..1169be63 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.h
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.h
@@ -34,15 +34,16 @@
// KSqueezedTextLabel done properly - squeeze at the end of the string,
// not the middle.
-class kpSqueezedTextLabel : public QLabel
+class kpSqueezedTextLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpSqueezedTextLabel (TQWidget *parent, const char *name = 0);
- kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (TQWidget *tqparent, const char *name = 0);
+ kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name = 0);
- virtual TQSize minimumSizeHint () const;
+ virtual TQSize tqminimumSizeHint () const;
// TODO: maybe text() should return the full text?
TQString fullText () const;
diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp
index 26c610e9..163a7f49 100644
--- a/kolourpaint/widgets/kptooltoolbar.cpp
+++ b/kolourpaint/widgets/kptooltoolbar.cpp
@@ -55,11 +55,11 @@
#include <kptoolwidgetspraycansize.h>
-class kpToolButton : public QToolButton
+class kpToolButton : public TQToolButton
{
public:
- kpToolButton (kpTool *tool, TQWidget *parent)
- : TQToolButton (parent),
+ kpToolButton (kpTool *tool, TQWidget *tqparent)
+ : TQToolButton (tqparent),
m_tool (tool)
{
}
@@ -69,7 +69,7 @@ public:
}
protected:
- // virtual [base QWidget]
+ // virtual [base TQWidget]
void mouseDoubleClickEvent (TQMouseEvent *e)
{
if (e->button () == Qt::LeftButton && m_tool)
@@ -144,7 +144,7 @@ kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, i
setOrientation (orientation ());
#if DEBUG_KP_TOOL_TOOL_BAR
- kdDebug () << "kpToolToolBar::<ctor> layout tool widgets msec="
+ kdDebug () << "kpToolToolBar::<ctor> tqlayout tool widgets msec="
<< timer.elapsed () << endl;
#endif
@@ -199,7 +199,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0)
{
- // Adapt according to screen geometry
+ // Adapt according to screen tqgeometry
const TQRect desktopSize = KGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl;
@@ -547,7 +547,7 @@ void kpToolToolBar::slotToolActionToolTipChanged ()
}
-// public slot virtual [base QDockWindow]
+// public slot virtual [base TQDockWindow]
void kpToolToolBar::setOrientation (Qt::Orientation o)
{
#if DEBUG_KP_TOOL_TOOL_BAR
@@ -616,7 +616,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
{
m_baseLayout->addWidget (*it,
0/*stretch*/,
- o == Qt::Vertical ? Qt::AlignHCenter : Qt::AlignVCenter);
+ o == Qt::Vertical ? TQt::AlignHCenter : TQt::AlignVCenter);
}
}
diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h
index 417ae022..5005396f 100644
--- a/kolourpaint/widgets/kptooltoolbar.h
+++ b/kolourpaint/widgets/kptooltoolbar.h
@@ -54,6 +54,7 @@ class kpToolWidgetSpraycanSize;
class kpToolToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index 0d0a9245..c230c1ee 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -45,8 +45,8 @@
#include <kpeffectinvert.h>
-kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name)
- : TQFrame (parent, name),
+kpToolWidgetBase::kpToolWidgetBase (TQWidget *tqparent, const char *name)
+ : TQFrame (tqparent, name),
m_invertSelectedPixmap (true),
m_selectedRow (-1), m_selectedCol (-1)
{
@@ -92,9 +92,9 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
<< endl;
#endif
- relayoutOptions ();
+ retqlayoutOptions ();
- const QPair <int, int> rowColPair = defaultSelectedRowAndCol ();
+ const TQPair <int, int> rowColPair = defaultSelectedRowAndCol ();
if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/))
{
if (!setSelected (fallBackRow, fallBackCol))
@@ -166,7 +166,7 @@ TQValueVector <int> kpToolWidgetBase::spreadOutElements (const TQValueVector <in
// public
-QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
+TQPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
{
int row = -1, col = -1;
@@ -175,10 +175,10 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- TQString nameString = TQString::fromLatin1 (name ());
+ TQString nameString = TQString::tqfromLatin1 (name ());
- row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1);
- col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1);
+ row = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Row"), -1);
+ col = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Col"), -1);
}
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -188,7 +188,7 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
<< endl;
#endif
- return qMakePair (row, col);
+ return tqMakePair (row, col);
}
// public
@@ -218,18 +218,18 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- TQString nameString = TQString::fromLatin1 (name ());
- cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow);
- cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol);
+ TQString nameString = TQString::tqfromLatin1 (name ());
+ cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Row"), m_selectedRow);
+ cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Col"), m_selectedCol);
cfg->sync ();
}
// public
-void kpToolWidgetBase::relayoutOptions ()
+void kpToolWidgetBase::retqlayoutOptions ()
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl;
+ kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl;
#endif
while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0)
@@ -536,7 +536,7 @@ bool kpToolWidgetBase::selectNextOption ()
}
-// protected virtual [base QWidget]
+// protected virtual [base TQWidget]
void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
e->ignore ();
@@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
for (int j = 0; j < (int) m_pixmapRects [i].count (); j++)
{
- if (m_pixmapRects [i][j].contains (e->pos ()))
+ if (m_pixmapRects [i][j].tqcontains (e->pos ()))
{
setSelected (i, j);
e->accept ();
@@ -559,7 +559,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
}
}
-// protected virtual [base QFrame]
+// protected virtual [base TQFrame]
void kpToolWidgetBase::drawContents (TQPainter *painter)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
@@ -583,7 +583,7 @@ void kpToolWidgetBase::drawContents (TQPainter *painter)
if (i == m_selectedRow && j == m_selectedCol)
{
- painter->fillRect (rect, Qt::blue/*selection color*/);
+ painter->fillRect (rect, TQt::blue/*selection color*/);
if (m_invertSelectedPixmap)
kpEffectInvertCommand::apply (&pixmap);
diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h
index 1a4c8a6f..033f4946 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.h
+++ b/kolourpaint/widgets/kptoolwidgetbase.h
@@ -40,17 +40,18 @@
class TQPainter;
-// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small
-class kpToolWidgetBase : public QFrame
+// TODO: frame becomes a combobox when its tqparent kpToolToolBar becomes too small
+class kpToolWidgetBase : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work
+ kpToolWidgetBase (TQWidget *tqparent, const char *name); // must provide a name for config to work
virtual ~kpToolWidgetBase ();
public:
- void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null);
+ void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString());
void startNewOptionRow ();
// Call this at the end of your constructor.
@@ -63,13 +64,13 @@ private:
public: // (only have to use these if you don't use finishConstruction())
// (rereads from config file)
- QPair <int, int> defaultSelectedRowAndCol () const;
+ TQPair <int, int> defaultSelectedRowAndCol () const;
int defaultSelectedRow () const;
int defaultSelectedCol () const;
void saveSelectedAsDefault () const;
- void relayoutOptions ();
+ void retqlayoutOptions ();
public:
int selectedRow () const;
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp
index 1e53891e..69445905 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp
@@ -52,14 +52,14 @@ 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 (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
TQPixmap *pm = m_brushBitmaps;
- for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++)
+ for (int tqshape = 0; tqshape < BRUSH_SIZE_NUM_ROWS; tqshape++)
{
for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++)
{
@@ -68,7 +68,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
pm->resize ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
- const int s = brushSize [shape][i];
+ const int s = brushSize [tqshape][i];
TQRect rect;
if (s >= pm->width () || s >= pm->height ())
@@ -85,14 +85,14 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
kdDebug () << "kpToolWidgetBrush::kpToolWidgetBrush() rect=" << rect << endl;
#endif
- pm->fill (Qt::white);
+ pm->fill (TQt::white);
TQPainter painter (pm);
- painter.setPen (Qt::black);
- painter.setBrush (Qt::black);
+ painter.setPen (TQt::black);
+ painter.setBrush (TQt::black);
// sync: <brushes>
- switch (shape)
+ switch (tqshape)
{
case 0:
painter.drawEllipse (rect);
@@ -110,7 +110,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
painter.end ();
pm->setMask (pm->createHeuristicMask ());
- addOption (*pm, brushName (shape, i)/*tooltip*/);
+ addOption (*pm, brushName (tqshape, i)/*tooltip*/);
pm++;
}
@@ -127,38 +127,38 @@ kpToolWidgetBrush::~kpToolWidgetBrush ()
// private
-TQString kpToolWidgetBrush::brushName (int shape, int whichSize)
+TQString kpToolWidgetBrush::brushName (int tqshape, int whichSize)
{
- int s = brushSize [shape][whichSize];
+ int s = brushSize [tqshape][whichSize];
if (s == 1)
return i18n ("1x1");
- TQString shapeName;
+ TQString tqshapeName;
// sync: <brushes>
- switch (shape)
+ switch (tqshape)
{
case 0:
- shapeName = i18n ("Circle");
+ tqshapeName = i18n ("Circle");
break;
case 1:
- shapeName = i18n ("Square");
+ tqshapeName = i18n ("Square");
break;
case 2:
- // TODO: is this really the name of a shape? :)
- shapeName = i18n ("Slash");
+ // TODO: is this really the name of a tqshape? :)
+ tqshapeName = i18n ("Slash");
break;
case 3:
- // TODO: is this really the name of a shape? :)
- shapeName = i18n ("Backslash");
+ // TODO: is this really the name of a tqshape? :)
+ tqshapeName = i18n ("Backslash");
break;
}
- if (shapeName.isEmpty ())
- return TQString::null;
+ if (tqshapeName.isEmpty ())
+ return TQString();
- return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName);
+ return i18n ("%1x%2 %3").arg (s).arg (s).arg (tqshapeName);
}
TQPixmap kpToolWidgetBrush::brush () const
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h
index 563d9625..7fc2ffe0 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.h
+++ b/kolourpaint/widgets/kptoolwidgetbrush.h
@@ -36,13 +36,14 @@
class kpToolWidgetBrush : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetBrush (TQWidget *parent, const char *name);
+ kpToolWidgetBrush (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetBrush ();
private:
- TQString brushName (int shape, int whichSize);
+ TQString brushName (int tqshape, int whichSize);
public:
TQPixmap brush () const;
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
index 9b9ffe8a..effd631f 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
@@ -44,8 +44,8 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29};
static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0]));
-kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -60,29 +60,29 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *na
int s = eraserSizes [i];
cursorPixmap->resize (s, s);
- cursorPixmap->fill (Qt::black);
+ cursorPixmap->fill (TQt::black);
TQPixmap previewPixmap (s, s);
if (i < 3)
{
- // HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing
+ // HACK: kpToolWidgetBase's tqlayout code sucks and gives uneven spacing
previewPixmap.resize ((width () - 4) / 3, 9);
}
TQPainter painter (&previewPixmap);
TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
- painter.fillRect (rect, Qt::black);
+ painter.fillRect (rect, TQt::black);
painter.end ();
- TQBitmap mask (previewPixmap.width (), previewPixmap.height ());
- mask.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ());
+ tqmask.fill (TQt::color0/*transparent*/);
- TQPainter maskPainter (&mask);
- maskPainter.fillRect (rect, Qt::color1/*opaque*/);
- maskPainter.end ();
+ TQPainter tqmaskPainter (&tqmask);
+ tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/);
+ tqmaskPainter.end ();
- previewPixmap.setMask (mask);
+ previewPixmap.setMask (tqmask);
addOption (previewPixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/);
@@ -115,7 +115,7 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
// TODO: why are we even storing m_cursorPixmaps?
TQPixmap pixmap = m_cursorPixmaps [selected ()];
if (color.isOpaque ())
- pixmap.fill (color.toQColor ());
+ pixmap.fill (color.toTQColor ());
bool showBorder = (pixmap.width () > 2 && pixmap.height () > 2);
@@ -123,26 +123,26 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (showBorder)
{
TQPainter painter (&pixmap);
- painter.setPen (Qt::black);
+ painter.setPen (TQt::black);
painter.drawRect (pixmap.rect ());
}
if (color.isTransparent ())
{
- TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
- maskBitmap.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
+ tqmaskBitmap.fill (TQt::color0/*transparent*/);
if (showBorder)
{
- TQPainter maskBitmapPainter (&maskBitmap);
- maskBitmapPainter.setPen (Qt::color1/*opaque*/);
- maskBitmapPainter.drawRect (maskBitmap.rect ());
+ TQPainter tqmaskBitmapPainter (&tqmaskBitmap);
+ tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/);
+ tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ());
}
- pixmap.setMask (maskBitmap);
+ pixmap.setMask (tqmaskBitmap);
}
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h
index 09b8c0f8..1568088d 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.h
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.h
@@ -38,9 +38,10 @@ class kpColor;
class kpToolWidgetEraserSize : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetEraserSize (TQWidget *parent, const char *name);
+ kpToolWidgetEraserSize (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetEraserSize ();
int eraserSize () const;
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
index 9b780b3f..c59b730e 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
@@ -42,8 +42,8 @@
#include <kptool.h>
-kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -71,34 +71,34 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle ()
TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
{
TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
TQPainter painter (&pixmap);
- painter.setPen (TQPen (Qt::black, 2));
+ painter.setPen (TQPen (TQt::black, 2));
painter.setBrush (brushForFillStyle (fs,
- kpColor (Qt::black.rgb ())/*foreground*/,
- kpColor (Qt::gray.rgb ())/*background*/));
+ kpColor (TQt::black.rgb ())/*foreground*/,
+ kpColor (TQt::gray.rgb ())/*background*/));
painter.drawRect (2, 2, w - 3, h - 3);
painter.end ();
- TQBitmap mask (pixmap.width (), pixmap.height ());
- mask.fill (Qt::color0);
+ TQBitmap tqmask (pixmap.width (), pixmap.height ());
+ tqmask.fill (TQt::color0);
- painter.begin (&mask);
- painter.setPen (TQPen (Qt::color1, 2));
+ painter.begin (&tqmask);
+ painter.setPen (TQPen (TQt::color1, 2));
if (fs == FillWithBackground || fs == FillWithForeground)
- painter.setBrush (Qt::color1);
+ painter.setBrush (TQt::color1);
painter.drawRect (2, 2, w - 3, h - 3);
painter.end ();
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
return pixmap;
}
@@ -121,7 +121,7 @@ TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
return i18n ("Fill with Foreground Color");
break;
default:
- return TQString::null;
+ return TQString();
break;
}
}
@@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
}
// public static
-TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush;
break;
case FillWithBackground:
- return TQBrush (backgroundColor.maskColor ());
+ return TQBrush (backgroundColor.tqmaskColor ());
break;
case FillWithForeground:
- return TQBrush (foregroundColor.maskColor ());
+ return TQBrush (foregroundColor.tqmaskColor ());
break;
default:
return Qt::NoBrush;
@@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
}
}
-TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
- return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
+ return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
}
// public static
@@ -186,13 +186,13 @@ TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
break;
case FillWithBackground:
if (backgroundColor.isOpaque ())
- return TQBrush (backgroundColor.toQColor ());
+ return TQBrush (backgroundColor.toTQColor ());
else
return Qt::NoBrush;
break;
case FillWithForeground:
if (foregroundColor.isOpaque ())
- return TQBrush (foregroundColor.toQColor ());
+ return TQBrush (foregroundColor.toTQColor ());
else
return Qt::NoBrush;
break;
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h
index 86a47270..221d0245 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.h
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h
@@ -38,9 +38,10 @@ class kpColor;
class kpToolWidgetFillStyle : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetFillStyle (TQWidget *parent, const char *name);
+ kpToolWidgetFillStyle (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetFillStyle ();
enum FillStyle
@@ -58,10 +59,10 @@ private:
public:
FillStyle fillStyle () const;
- static TQBrush maskBrushForFillStyle (FillStyle fs,
+ static TQBrush tqmaskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- TQBrush maskBrush (const kpColor &foregroundColor,
+ TQBrush tqmaskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
static TQBrush brushForFillStyle (FillStyle fs,
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
index ded51a03..e7804149 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
@@ -36,8 +36,8 @@
static int lineWidths [] = {1, 2, 3, 5, 8};
-kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap ();
@@ -50,24 +50,24 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name
{
TQPixmap pixmap ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
- TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
- maskBitmap.fill (Qt::color0/*transparent*/);
+ TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ());
+ tqmaskBitmap.fill (TQt::color0/*transparent*/);
- TQPainter painter (&pixmap), maskPainter (&maskBitmap);
- painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/);
- painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/);
+ TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap);
+ painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/);
+ painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/);
TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]);
- painter.drawRect (rect), maskPainter.drawRect (rect);
+ painter.drawRect (rect), tqmaskPainter.drawRect (rect);
- painter.end (), maskPainter.end ();
+ painter.end (), tqmaskPainter.end ();
- pixmap.setMask (maskBitmap);
+ pixmap.setMask (tqmaskBitmap);
addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow ();
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h
index 8fa041a0..8ac76909 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.h
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h
@@ -34,9 +34,10 @@
class kpToolWidgetLineWidth : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetLineWidth (TQWidget *parent, const char *name);
+ kpToolWidgetLineWidth (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetLineWidth ();
int lineWidth () const;
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
index 4cd5b6f6..6479d891 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
@@ -35,8 +35,8 @@
#include <klocale.h>
-kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
setInvertSelectedPixmap (false);
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
index 82ea3f50..45e49a2f 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
@@ -35,9 +35,10 @@
class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name);
+ kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetOpaqueOrTransparent ();
bool isOpaque () const;
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
index 2f426df5..cce8f1b5 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
@@ -44,8 +44,8 @@
static int spraycanSizes [] = {9, 17, 29};
-kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!" << endl;
@@ -54,14 +54,14 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{
int s = spraycanSizes [i];
- TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
+ TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl;
#endif
TQPixmap pixmap (s, s);
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
TQPainter painter (&pixmap);
painter.drawPixmap (0, 0, UserIcon (iconName));
@@ -69,24 +69,24 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
TQImage image = kpPixmapFX::convertToImage (pixmap);
- TQBitmap mask (pixmap.width (), pixmap.height ());
- mask.fill (Qt::color0);
+ TQBitmap tqmask (pixmap.width (), pixmap.height ());
+ tqmask.fill (TQt::color0);
- painter.begin (&mask);
- painter.setPen (Qt::color1);
+ painter.begin (&tqmask);
+ painter.setPen (TQt::color1);
for (int y = 0; y < image.height (); y++)
{
for (int x = 0; x < image.width (); x++)
{
- if ((image.pixel (x, y) & RGB_MASK) == 0/*black*/)
+ if ((image.pixel (x, y) & TQRGB_MASK) == 0/*black*/)
painter.drawPoint (x, y); // mark as opaque
}
}
painter.end ();
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
addOption (pixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/);
if (i == 1)
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h
index 6cc7d11e..ef86891f 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.h
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h
@@ -34,9 +34,10 @@
class kpToolWidgetSpraycanSize : public kpToolWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpToolWidgetSpraycanSize (TQWidget *parent, const char *name);
+ kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name);
virtual ~kpToolWidgetSpraycanSize ();
int spraycanSize () const;