summaryrefslogtreecommitdiffstats
path: root/src/gui/kdeext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kdeext')
-rw-r--r--src/gui/kdeext/KLedButton.cpp10
-rw-r--r--src/gui/kdeext/KLedButton.h7
-rw-r--r--src/gui/kdeext/KStartupLogo.cpp20
-rw-r--r--src/gui/kdeext/KStartupLogo.h5
-rw-r--r--src/gui/kdeext/KTmpStatusMsg.cpp2
-rw-r--r--src/gui/kdeext/QCanvasGroupableItem.cpp70
-rw-r--r--src/gui/kdeext/QCanvasGroupableItem.h62
-rw-r--r--src/gui/kdeext/QCanvasSimpleSprite.cpp40
-rw-r--r--src/gui/kdeext/QCanvasSimpleSprite.h46
-rw-r--r--src/gui/kdeext/RGLed.cpp86
-rw-r--r--src/gui/kdeext/klearlook.cpp623
-rw-r--r--src/gui/kdeext/klearlook.h39
12 files changed, 490 insertions, 520 deletions
diff --git a/src/gui/kdeext/KLedButton.cpp b/src/gui/kdeext/KLedButton.cpp
index 1f1a3fc..03945b0 100644
--- a/src/gui/kdeext/KLedButton.cpp
+++ b/src/gui/kdeext/KLedButton.cpp
@@ -36,13 +36,13 @@
namespace Rosegarden
{
-KLedButton::KLedButton(const TQColor &col, TQWidget *parent, const char *name)
- : KLed( col, parent, name )
+KLedButton::KLedButton(const TQColor &col, TQWidget *tqparent, const char *name)
+ : KLed( col, tqparent, name )
{}
KLedButton::KLedButton(const TQColor& col, KLed::State st, KLed::Look look,
- KLed::Shape shape, TQWidget *parent, const char *name)
- : KLed( col, st, look, shape, parent, name )
+ KLed::Shape tqshape, TQWidget *tqparent, const char *name)
+ : KLed( col, st, look, tqshape, tqparent, name )
{}
KLedButton::~KLedButton()
@@ -50,7 +50,7 @@ KLedButton::~KLedButton()
void KLedButton::mousePressEvent( TQMouseEvent *e )
{
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
toggle();
emit stateChanged( state() );
}
diff --git a/src/gui/kdeext/KLedButton.h b/src/gui/kdeext/KLedButton.h
index c7810af..3bd8c5c 100644
--- a/src/gui/kdeext/KLedButton.h
+++ b/src/gui/kdeext/KLedButton.h
@@ -49,10 +49,11 @@ namespace Rosegarden
*/
class KLedButton : public KLed {
Q_OBJECT
+ TQ_OBJECT
public:
- KLedButton(const TQColor &col=Qt::green, TQWidget *parent=0, const char *name=0);
- KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape shape,
- TQWidget *parent=0, const char *name=0);
+ KLedButton(const TQColor &col=TQt::green, TQWidget *tqparent=0, const char *name=0);
+ KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape tqshape,
+ TQWidget *tqparent=0, const char *name=0);
~KLedButton();
signals:
diff --git a/src/gui/kdeext/KStartupLogo.cpp b/src/gui/kdeext/KStartupLogo.cpp
index 821ebb1..e3edd9d 100644
--- a/src/gui/kdeext/KStartupLogo.cpp
+++ b/src/gui/kdeext/KStartupLogo.cpp
@@ -36,14 +36,10 @@
#include "KStartupLogo.h"
#include "misc/Debug.h"
-KStartupLogo::KStartupLogo(TQWidget * parent, const char *name)
- : TQWidget(parent, name,
+KStartupLogo::KStartupLogo(TQWidget * tqparent, const char *name)
+ : TQWidget(tqparent, name,
WStyle_Customize |
-#if QT_VERSION >= 0x030100
WStyle_Splash
-#else
- WStyle_NoBorder | WStyle_StaysOnTop | WStyle_Tool | WX11BypassWM | WWinOwnDC
-#endif
),
m_readyToHide(false),
m_showTip(true)
@@ -88,15 +84,15 @@ void KStartupLogo::paintEvent(TQPaintEvent*)
paint.drawRect(TQRect(m_pixmap.width() - 220, m_pixmap.height() - 43,
220, (y + 8) - (m_pixmap.height() - 43)));
- // paint.setPen(Qt::black);
- // paint.setBrush(Qt::black);
- paint.setPen(Qt::white);
- paint.setBrush(Qt::white);
+ // paint.setPen(TQt::black);
+ // paint.setBrush(TQt::black);
+ paint.setPen(TQt::white);
+ paint.setBrush(TQt::white);
//TQString version(VERSION);
- //int sepIdx = version.find("-");
+ //int sepIdx = version.tqfind("-");
TQString versionLabel(VERSION);
- //TQString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1));
+ //TQString("R%1 v%2").tqarg(version.left(sepIdx)).tqarg(version.mid(sepIdx + 1));
int versionWidth = metrics.width(versionLabel);
paint.drawText(m_pixmap.width() - versionWidth - 18,
diff --git a/src/gui/kdeext/KStartupLogo.h b/src/gui/kdeext/KStartupLogo.h
index a588fe4..154a749 100644
--- a/src/gui/kdeext/KStartupLogo.h
+++ b/src/gui/kdeext/KStartupLogo.h
@@ -28,9 +28,10 @@
#include <tqwidget.h>
#include <tqpixmap.h>
-class KStartupLogo : public QWidget
+class KStartupLogo : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
static KStartupLogo* getInstance();
@@ -46,7 +47,7 @@ public slots:
protected:
- KStartupLogo(TQWidget *parent=0, const char *name=0);
+ KStartupLogo(TQWidget *tqparent=0, const char *name=0);
~KStartupLogo();
virtual void paintEvent(TQPaintEvent*);
diff --git a/src/gui/kdeext/KTmpStatusMsg.cpp b/src/gui/kdeext/KTmpStatusMsg.cpp
index 620d7c5..8977c74 100644
--- a/src/gui/kdeext/KTmpStatusMsg.cpp
+++ b/src/gui/kdeext/KTmpStatusMsg.cpp
@@ -33,7 +33,7 @@ KTmpStatusMsg::KTmpStatusMsg(const TQString& msg, KMainWindow* window, int id)
: m_mainWindow(window),
m_id(id)
{
- m_mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), m_id);
+ m_mainWindow->statusBar()->changeItem(TQString(" %1").tqarg(msg), m_id);
Rosegarden::rgapp->refreshGUI(50);
}
diff --git a/src/gui/kdeext/QCanvasGroupableItem.cpp b/src/gui/kdeext/QCanvasGroupableItem.cpp
index 2a31934..818004b 100644
--- a/src/gui/kdeext/QCanvasGroupableItem.cpp
+++ b/src/gui/kdeext/QCanvasGroupableItem.cpp
@@ -25,7 +25,7 @@
#include "QCanvasGroupableItem.h"
QCanvasGroupableItem::QCanvasGroupableItem(TQCanvasItem *i,
- QCanvasItemGroup *g,
+ TQCanvasItemGroup *g,
bool withRelativeCoords)
: m_group(g),
m_item(i)
@@ -66,15 +66,15 @@ QCanvasGroupableItem::detach()
//////////////////////////////////////////////////////////////////////
-QCanvasItemGroup::QCanvasItemGroup(TQCanvas *c)
+TQCanvasItemGroup::TQCanvasItemGroup(TQCanvas *c)
: TQCanvasItem(c)
{
- // RG_DEBUG << "QCanvasItemGroup() - this : " << this << endl;
+ // RG_DEBUG << "TQCanvasItemGroup() - this : " << this << endl;
}
-QCanvasItemGroup::~QCanvasItemGroup()
+TQCanvasItemGroup::~TQCanvasItemGroup()
{
- // RG_DEBUG << "~QCanvasItemGroup() - this : " << this << endl;
+ // RG_DEBUG << "~TQCanvasItemGroup() - this : " << this << endl;
// Tell all our items that we're being destroyed
TQCanvasItemList::Iterator i;
@@ -86,7 +86,7 @@ QCanvasItemGroup::~QCanvasItemGroup()
}
void
-QCanvasItemGroup::moveBy(double dx, double dy)
+TQCanvasItemGroup::moveBy(double dx, double dy)
{
TQCanvasItem::moveBy(dx, dy); // move ourselves
@@ -96,7 +96,7 @@ QCanvasItemGroup::moveBy(double dx, double dy)
}
void
-QCanvasItemGroup::advance(int stage)
+TQCanvasItemGroup::advance(int stage)
{
TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
@@ -104,7 +104,7 @@ QCanvasItemGroup::advance(int stage)
}
bool
-QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const
+TQCanvasItemGroup::collidesWith(const TQCanvasItem *item) const
{
TQCanvasItemList::ConstIterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
@@ -115,7 +115,7 @@ QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const
}
void
-QCanvasItemGroup::draw(TQPainter&)
+TQCanvasItemGroup::draw(TQPainter&)
{
// There isn't anything to do - all the items will be drawn
// seperately by the canvas anyway. However the function has to be
@@ -127,25 +127,25 @@ QCanvasItemGroup::draw(TQPainter&)
}
void
-QCanvasItemGroup::setVisible(bool yes)
+TQCanvasItemGroup::setVisible(bool yes)
{
TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
- (*i)->setVisible(yes);
+ (*i)->tqsetVisible(yes);
}
void
-QCanvasItemGroup::setSelected(bool yes)
+TQCanvasItemGroup::setSelected(bool yes)
{
TQCanvasItem::setSelected(yes);
TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
- (*i)->setVisible(yes);
+ (*i)->tqsetVisible(yes);
}
void
-QCanvasItemGroup::setEnabled(bool yes)
+TQCanvasItemGroup::setEnabled(bool yes)
{
TQCanvasItem::setEnabled(yes);
@@ -155,7 +155,7 @@ QCanvasItemGroup::setEnabled(bool yes)
}
void
-QCanvasItemGroup::setActive(bool yes)
+TQCanvasItemGroup::setActive(bool yes)
{
TQCanvasItem::setActive(yes);
@@ -165,13 +165,13 @@ QCanvasItemGroup::setActive(bool yes)
}
int
-QCanvasItemGroup::rtti() const
+TQCanvasItemGroup::rtti() const
{
return 10002;
}
-QRect
-QCanvasItemGroup::boundingRect() const
+TQRect
+TQCanvasItemGroup::boundingRect() const
{
TQRect r;
@@ -182,8 +182,8 @@ QCanvasItemGroup::boundingRect() const
return r;
}
-QRect
-QCanvasItemGroup::boundingRectAdvanced() const
+TQRect
+TQCanvasItemGroup::boundingRectAdvanced() const
{
TQRect r;
@@ -195,7 +195,7 @@ QCanvasItemGroup::boundingRectAdvanced() const
}
bool
-QCanvasItemGroup::collidesWith(const TQCanvasSprite *s,
+TQCanvasItemGroup::collidesWith(const TQCanvasSprite *s,
const TQCanvasPolygonalItem *p,
const TQCanvasRectangle *r,
const TQCanvasEllipse *e,
@@ -217,22 +217,22 @@ QCanvasItemGroup::collidesWith(const TQCanvasSprite *s,
}
void
-QCanvasItemGroup::addItem(TQCanvasItem *i)
+TQCanvasItemGroup::addItem(TQCanvasItem *i)
{
m_items.append(i);
}
void
-QCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i)
+TQCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i)
{
i->moveBy(x(), y());
addItem(i);
}
void
-QCanvasItemGroup::removeItem(TQCanvasItem *i)
+TQCanvasItemGroup::removeItem(TQCanvasItem *i)
{
- // RG_DEBUG << "QCanvasItemGroup::removeItem() - this : "
+ // RG_DEBUG << "TQCanvasItemGroup::removeItem() - this : "
// << this << " - item : " << i << endl;
m_items.remove(i);
}
@@ -240,40 +240,40 @@ QCanvasItemGroup::removeItem(TQCanvasItem *i)
//////////////////////////////////////////////////////////////////////
-QCanvasLineGroupable::QCanvasLineGroupable(TQCanvas *c,
- QCanvasItemGroup *g)
+TQCanvasLineGroupable::TQCanvasLineGroupable(TQCanvas *c,
+ TQCanvasItemGroup *g)
: TQCanvasLine(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasRectangleGroupable::QCanvasRectangleGroupable(TQCanvas *c,
- QCanvasItemGroup *g)
+TQCanvasRectangleGroupable::TQCanvasRectangleGroupable(TQCanvas *c,
+ TQCanvasItemGroup *g)
: TQCanvasRectangle(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasTextGroupable::QCanvasTextGroupable(const TQString& label,
+TQCanvasTextGroupable::TQCanvasTextGroupable(const TQString& label,
TQCanvas *c,
- QCanvasItemGroup *g)
+ TQCanvasItemGroup *g)
: TQCanvasText(label, c),
QCanvasGroupableItem(this, g)
{}
-QCanvasTextGroupable::QCanvasTextGroupable(TQCanvas *c,
- QCanvasItemGroup *g)
+TQCanvasTextGroupable::TQCanvasTextGroupable(TQCanvas *c,
+ TQCanvasItemGroup *g)
: TQCanvasText(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasSpriteGroupable::QCanvasSpriteGroupable(TQCanvasPixmapArray *pa,
+TQCanvasSpriteGroupable::TQCanvasSpriteGroupable(TQCanvasPixmapArray *pa,
TQCanvas *c,
- QCanvasItemGroup *g)
+ TQCanvasItemGroup *g)
: TQCanvasSprite(pa, c),
QCanvasGroupableItem(this, g)
{}
diff --git a/src/gui/kdeext/QCanvasGroupableItem.h b/src/gui/kdeext/QCanvasGroupableItem.h
index 1e54604..b7d4fbb 100644
--- a/src/gui/kdeext/QCanvasGroupableItem.h
+++ b/src/gui/kdeext/QCanvasGroupableItem.h
@@ -19,47 +19,47 @@
COPYING included with this distribution for more information.
*/
-#ifndef QCANVASGROUPABLEITEM_H
-#define QCANVASGROUPABLEITEM_H
+#ifndef TQCANVASGROUPABLEITEM_H
+#define TQCANVASGROUPABLEITEM_H
#include <tqcanvas.h>
-class QCanvasItemGroup;
+class TQCanvasItemGroup;
/**
- * This class is meant to be inherited by TQCanvasItem children to make
+ * This class is meant to be inherited by TQCanvasItem tqchildren to make
* them groupable.
*
* On destruction, the item will remove itself from the group it's
* attached to.
*
* @see QCanvasSpriteGroupable
- * @see QCanvasLineGroupable
+ * @see TQCanvasLineGroupable
*/
class QCanvasGroupableItem
{
- friend class QCanvasItemGroup;
+ friend class TQCanvasItemGroup;
public:
/**
* Create a groupable item, e.g. put the item in the specified
- * QCanvasItemGroup. If withRelativeCoords is true, the item's
+ * TQCanvasItemGroup. If withRelativeCoords is true, the item's
* position will be translated so that it's coordinates are
* relative to those of the item group.
*
- * @see QCanvasItemGroup#addItemWithRelativeCoords()
+ * @see TQCanvasItemGroup#addItemWithRelativeCoords()
*/
- QCanvasGroupableItem(TQCanvasItem*, QCanvasItemGroup*,
+ QCanvasGroupableItem(TQCanvasItem*, TQCanvasItemGroup*,
bool withRelativeCoords = false);
virtual ~QCanvasGroupableItem();
- /// Returns the QCanvasItemGroup this groupable item belongs to
- QCanvasItemGroup* group() { return m_group; }
+ /// Returns the TQCanvasItemGroup this groupable item belongs to
+ TQCanvasItemGroup* group() { return m_group; }
- /// Returns the QCanvasItemGroup this groupable item belongs to
- const QCanvasItemGroup* group() const { return m_group; }
+ /// Returns the TQCanvasItemGroup this groupable item belongs to
+ const TQCanvasItemGroup* group() const { return m_group; }
/// Returns the TQCanvasItem which this groupable item wraps
TQCanvasItem *item() { return m_item; }
@@ -72,7 +72,7 @@ public:
protected:
/**
- * Detach item from the item group - called by QCanvasItemGroup only
+ * Detach item from the item group - called by TQCanvasItemGroup only
*
* Set m_group to 0, so that on destruction the item won't try to
* remove itself from the group
@@ -82,7 +82,7 @@ protected:
private:
//--------------- Data members ---------------------------------
- QCanvasItemGroup* m_group;
+ TQCanvasItemGroup* m_group;
TQCanvasItem* m_item;
};
@@ -98,13 +98,13 @@ private:
* Proper behavior requires collaboration from the TQCanvasView,
* though. When about to move an item, the TQCanvasView object should
* first check if it's not a groupable item, and if so fetch its
- * QCanvasItemGroup and move it instead.
+ * TQCanvasItemGroup and move it instead.
*/
-class QCanvasItemGroup : public QCanvasItem
+class TQCanvasItemGroup : public TQCanvasItem
{
public:
- QCanvasItemGroup(TQCanvas *);
- virtual ~QCanvasItemGroup();
+ TQCanvasItemGroup(TQCanvas *);
+ virtual ~TQCanvasItemGroup();
virtual void moveBy(double dx, double dy);
virtual void advance(int stage);
@@ -131,7 +131,7 @@ public:
* Add a new item to this group.
*
* The item's coordinates are considered relative to the group.
- * For example, suppose you have a QCanvasItemGroup whose coords
+ * For example, suppose you have a TQCanvasItemGroup whose coords
* are 10,10. If you call addItemWithRelativeCoords() with an item
* whose coords are 5,5, the item is moved so that its coords
* will be 5,5 relative to the group (e.g. 15,15).
@@ -162,40 +162,40 @@ protected:
/**
* A TQCanvasLine which can be put in a QCanvasGroup
*/
-class QCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem
+class TQCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem
{
public:
- QCanvasLineGroupable(TQCanvas *c, QCanvasItemGroup *g);
+ TQCanvasLineGroupable(TQCanvas *c, TQCanvasItemGroup *g);
};
/**
* A TQCanvasRectangle which can be put in a QCanvasGroup
*/
-class QCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem
+class TQCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem
{
public:
- QCanvasRectangleGroupable(TQCanvas *c, QCanvasItemGroup *g);
+ TQCanvasRectangleGroupable(TQCanvas *c, TQCanvasItemGroup *g);
};
/**
* A TQCanvasText which can be put in a QCanvasGroup
*/
-class QCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem
+class TQCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem
{
public:
- QCanvasTextGroupable(TQCanvas *c, QCanvasItemGroup *g);
- QCanvasTextGroupable(const TQString&, TQCanvas *c, QCanvasItemGroup *g);
+ TQCanvasTextGroupable(TQCanvas *c, TQCanvasItemGroup *g);
+ TQCanvasTextGroupable(const TQString&, TQCanvas *c, TQCanvasItemGroup *g);
};
/**
- * A TQCanvasSprite that can be put in a QCanvasGroup
+ * A QCanvasSprite that can be put in a QCanvasGroup
*/
-class QCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem
+class TQCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem
{
public:
- QCanvasSpriteGroupable(TQCanvasPixmapArray*,
+ TQCanvasSpriteGroupable(TQCanvasPixmapArray*,
TQCanvas*,
- QCanvasItemGroup*);
+ TQCanvasItemGroup*);
};
#endif
diff --git a/src/gui/kdeext/QCanvasSimpleSprite.cpp b/src/gui/kdeext/QCanvasSimpleSprite.cpp
index 2b03c87..74d4366 100644
--- a/src/gui/kdeext/QCanvasSimpleSprite.cpp
+++ b/src/gui/kdeext/QCanvasSimpleSprite.cpp
@@ -69,7 +69,7 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
// We can't delete m_pixmapArray or we get a core dump.
//
- // The reason I think is that after the TQCanvasSprite is deleted,
+ // The reason I think is that after the QCanvasSprite is deleted,
// it is removed from the TQCanvas, which therefore needs the
// pixmaps to know how to update itself (the crash is in
// TQCanvas::removeChunks(), usually).
@@ -82,13 +82,13 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
{
- QList<TQPixmap> pixlist;
+ TQList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we
// can delete the one we're passed
pixlist.append(pixmap);
- QList<TQPoint> spotlist;
+ TQList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(0, 0));
@@ -98,13 +98,13 @@ QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap)
{
- QList<TQPixmap> pixlist;
+ TQList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we
// can delete the one we're passed
pixlist.append(pixmap);
- QList<TQPoint> spotlist;
+ TQList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY()));
@@ -119,14 +119,14 @@ QCanvasSimpleSprite::makePixmapArray(const TQString &pixmapfile)
//////////////////////////////////////////////////////////////////////
-QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n,
+TQCanvasNotationSprite::TQCanvasNotationSprite(NotationElement& n,
TQPixmap* pixmap,
TQCanvas* canvas)
: QCanvasSimpleSprite(pixmap, canvas),
m_notationElement(n)
{}
-QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n,
+TQCanvasNotationSprite::TQCanvasNotationSprite(NotationElement& n,
TQCanvasPixmap* pixmap,
TQCanvas* canvas)
: QCanvasSimpleSprite(pixmap, canvas),
@@ -134,49 +134,49 @@ QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n,
{}
-QCanvasNotationSprite::~QCanvasNotationSprite()
+TQCanvasNotationSprite::~TQCanvasNotationSprite()
{}
-QCanvasNonElementSprite::QCanvasNonElementSprite(TQPixmap *pixmap,
+TQCanvasNonElementSprite::TQCanvasNonElementSprite(TQPixmap *pixmap,
TQCanvas *canvas) :
QCanvasSimpleSprite(pixmap, canvas)
{}
-QCanvasNonElementSprite::QCanvasNonElementSprite(TQCanvasPixmap *pixmap,
+TQCanvasNonElementSprite::TQCanvasNonElementSprite(TQCanvasPixmap *pixmap,
TQCanvas *canvas) :
QCanvasSimpleSprite(pixmap, canvas)
{}
-QCanvasNonElementSprite::~QCanvasNonElementSprite()
+TQCanvasNonElementSprite::~TQCanvasNonElementSprite()
{}
-QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX,
+TQCanvasTimeSigSprite::TQCanvasTimeSigSprite(double tqlayoutX,
TQPixmap *pixmap,
TQCanvas *canvas) :
- QCanvasNonElementSprite(pixmap, canvas),
- m_layoutX(layoutX)
+ TQCanvasNonElementSprite(pixmap, canvas),
+ m_tqlayoutX(tqlayoutX)
{}
-QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX,
+TQCanvasTimeSigSprite::TQCanvasTimeSigSprite(double tqlayoutX,
TQCanvasPixmap *pixmap,
TQCanvas *canvas) :
- QCanvasNonElementSprite(pixmap, canvas),
- m_layoutX(layoutX)
+ TQCanvasNonElementSprite(pixmap, canvas),
+ m_tqlayoutX(tqlayoutX)
{}
-QCanvasTimeSigSprite::~QCanvasTimeSigSprite()
+TQCanvasTimeSigSprite::~TQCanvasTimeSigSprite()
{}
QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQPixmap *pixmap,
TQCanvas *canvas) :
- QCanvasNonElementSprite(pixmap, canvas)
+ TQCanvasNonElementSprite(pixmap, canvas)
{}
QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQCanvasPixmap *pixmap,
TQCanvas *canvas) :
- QCanvasNonElementSprite(pixmap, canvas)
+ TQCanvasNonElementSprite(pixmap, canvas)
{}
QCanvasStaffNameSprite::~QCanvasStaffNameSprite()
diff --git a/src/gui/kdeext/QCanvasSimpleSprite.h b/src/gui/kdeext/QCanvasSimpleSprite.h
index 7613b64..77f64f0 100644
--- a/src/gui/kdeext/QCanvasSimpleSprite.h
+++ b/src/gui/kdeext/QCanvasSimpleSprite.h
@@ -19,8 +19,8 @@
COPYING included with this distribution for more information.
*/
-#ifndef QCANVASSIMPLESPRITE_H
-#define QCANVASSIMPLESPRITE_H
+#ifndef TQCANVASSIMPLESPRITE_H
+#define TQCANVASSIMPLESPRITE_H
#include <tqwmatrix.h>
#include <tqcanvas.h>
@@ -30,9 +30,9 @@
namespace Rosegarden {
/**
- * A TQCanvasSprite with 1 frame only
+ * A QCanvasSprite with 1 frame only
*/
-class QCanvasSimpleSprite : public QCanvasSprite
+class QCanvasSimpleSprite : public TQCanvasSprite
{
public:
QCanvasSimpleSprite(TQPixmap*, TQCanvas*);
@@ -59,15 +59,15 @@ protected:
class NotationElement;
/**
- * A TQCanvasSprite referencing a NotationElement
+ * A QCanvasSprite referencing a NotationElement
*/
-class QCanvasNotationSprite : public QCanvasSimpleSprite
+class TQCanvasNotationSprite : public QCanvasSimpleSprite
{
public:
- QCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*);
- QCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*);
+ TQCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*);
+ TQCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*);
- virtual ~QCanvasNotationSprite();
+ virtual ~TQCanvasNotationSprite();
Rosegarden::NotationElement& getNotationElement() { return m_notationElement; }
@@ -77,35 +77,35 @@ protected:
Rosegarden::NotationElement& m_notationElement;
};
-class QCanvasNonElementSprite : public QCanvasSimpleSprite
+class TQCanvasNonElementSprite : public QCanvasSimpleSprite
{
public:
- QCanvasNonElementSprite(TQPixmap *, TQCanvas *);
- QCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *);
- virtual ~QCanvasNonElementSprite();
+ TQCanvasNonElementSprite(TQPixmap *, TQCanvas *);
+ TQCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *);
+ virtual ~TQCanvasNonElementSprite();
};
/**
- * A TQCanvasSprite used for a time signature
+ * A QCanvasSprite used for a time signature
*/
-class QCanvasTimeSigSprite : public QCanvasNonElementSprite
+class TQCanvasTimeSigSprite : public TQCanvasNonElementSprite
{
public:
- QCanvasTimeSigSprite(double layoutX, TQPixmap *, TQCanvas *);
- QCanvasTimeSigSprite(double layoutX, TQCanvasPixmap *, TQCanvas *);
- virtual ~QCanvasTimeSigSprite();
+ TQCanvasTimeSigSprite(double tqlayoutX, TQPixmap *, TQCanvas *);
+ TQCanvasTimeSigSprite(double tqlayoutX, TQCanvasPixmap *, TQCanvas *);
+ virtual ~TQCanvasTimeSigSprite();
- void setLayoutX(double layoutX) { m_layoutX = layoutX; }
- double getLayoutX() const { return m_layoutX; }
+ void setLayoutX(double tqlayoutX) { m_tqlayoutX = tqlayoutX; }
+ double getLayoutX() const { return m_tqlayoutX; }
protected:
- double m_layoutX;
+ double m_tqlayoutX;
};
/**
- * A TQCanvasSprite used for a staff name
+ * A QCanvasSprite used for a staff name
*/
-class QCanvasStaffNameSprite : public QCanvasNonElementSprite
+class QCanvasStaffNameSprite : public TQCanvasNonElementSprite
{
public:
QCanvasStaffNameSprite(TQPixmap *, TQCanvas *);
diff --git a/src/gui/kdeext/RGLed.cpp b/src/gui/kdeext/RGLed.cpp
index c5e5934..9d34dcb 100644
--- a/src/gui/kdeext/RGLed.cpp
+++ b/src/gui/kdeext/RGLed.cpp
@@ -4,7 +4,7 @@
KDE libraries. The modifications (for "brute-force" antialiasing)
were carried out by Chris Cannam, April 2004.
- Copyright (C) 1998 J�rg Habenicht ([email protected])
+ Copyright (C) 1998 J�rg Habenicht ([email protected])
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -59,7 +59,7 @@
*
* Revision 1.19 2001/08/08 14:35:12 hausmann
* - removed empty KActionCollection::childEvent
- * - added sizeHint() and minimumSizeHint() methods to KLed, as advised by
+ * - added tqsizeHint() and tqminimumSizeHint() methods to KLed, as advised by
* Rik in the comment in kled.h
* - removed unused mousePressEvent, mouseMoveEvent and mouseReleaseEvent
* handlers from KPassDlg
@@ -81,7 +81,7 @@
*
* Revision 1.14 2000/06/03 01:04:42 gehrmab
* * Made drawing routines available for overriding
- * * Added a parent/name constructor
+ * * Added a tqparent/name constructor
* * Propertyfication
*
* Revision 1.13 2000/05/08 19:38:49 sschiman
@@ -119,7 +119,7 @@
* It does not yet work reliably.
*
* Revision 1.6 1999/03/01 23:34:49 kulow
- * CVS_SILENT ported to Qt 2.0
+ * CVS_SILENT ported to TQt 2.0
*
* Revision 1.5 1999/02/19 08:52:42 habenich
* ID und LOG tags included
@@ -156,11 +156,11 @@ class KLed::KLedPrivate
-KLed::KLed(TQWidget *parent, const char *name)
- : TQWidget( parent, name),
+KLed::KLed(TQWidget *tqparent, const char *name)
+ : TQWidget( tqparent, name),
led_state(On),
led_look(Raised),
- led_shape(Circular)
+ led_tqshape(Circular)
{
TQColor col(green);
d = new KLed::KLedPrivate;
@@ -173,11 +173,11 @@ KLed::KLed(TQWidget *parent, const char *name)
}
-KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
- : TQWidget( parent, name),
+KLed::KLed(const TQColor& col, TQWidget *tqparent, const char *name)
+ : TQWidget( tqparent, name),
led_state(On),
led_look(Raised),
- led_shape(Circular)
+ led_tqshape(Circular)
{
d = new KLed::KLedPrivate;
d->dark_factor = 300;
@@ -190,11 +190,11 @@ KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
}
KLed::KLed(const TQColor& col, KLed::State state,
- KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name )
- : TQWidget(parent, name),
+ KLed::Look look, KLed::Shape tqshape, TQWidget *tqparent, const char *name )
+ : TQWidget(tqparent, name),
led_state(state),
led_look(look),
- led_shape(shape)
+ led_tqshape(tqshape)
{
d = new KLed::KLedPrivate;
d->dark_factor = 300;
@@ -202,7 +202,7 @@ KLed::KLed(const TQColor& col, KLed::State state,
d->off_map = 0;
d->on_map = 0;
- //setShape(shape);
+ //setShape(tqshape);
setColor(col);
}
@@ -223,7 +223,7 @@ KLed::paintEvent(TQPaintEvent *)
t.start();
for (int i = 0; i < rounds; i++) {
#endif
- switch (led_shape) {
+ switch (led_tqshape) {
case Rectangular:
switch (led_look) {
case Sunken :
@@ -236,7 +236,7 @@ KLed::paintEvent(TQPaintEvent *)
paintRect();
break;
default :
- qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]);
}
break;
case Circular:
@@ -251,11 +251,11 @@ KLed::paintEvent(TQPaintEvent *)
paintSunken();
break;
default:
- qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]);
}
break;
default:
- qWarning("%s: in class KLed: no KLed::Shape set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Shape set", tqApp->argv()[0]);
break;
}
#ifdef PAINT_BENCH
@@ -294,11 +294,11 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn with a thin grey "border" (pen)
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
pen.setWidth( 1 );
- color = colorGroup().dark();
+ color = tqcolorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
@@ -339,7 +339,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -347,7 +347,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
paint.drawEllipse( 1, 1, width, width );
// Draw the bright light spot of the LED now, using modified "old"
- // painter routine taken from KDEUI�s KLed widget:
+ // painter routine taken from KDEUI�s KLed widget:
// Setting the new width of the pen is essential to avoid "pixelized"
// shadow like it can be observed with the old LED code
@@ -359,7 +359,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
light_width *= 2;
light_width /= 3;
- // Calculate the LED�s "light factor":
+ // Calculate the LED�s "light factor":
int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100;
// Now draw the bright spot on the LED:
@@ -386,10 +386,10 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// avoid that the border can be erased by the bright spot of the LED
pen.setWidth( 1 );
- color = colorGroup().dark();
+ color = tqcolorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( Qt::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 1, 1, width, width );
@@ -459,7 +459,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -467,7 +467,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
paint.drawEllipse( scale, scale, width - scale*2, width - scale*2 );
// Draw the bright light spot of the LED now, using modified "old"
- // painter routine taken from KDEUI�s KLed widget:
+ // painter routine taken from KDEUI�s KLed widget:
// Setting the new width of the pen is essential to avoid "pixelized"
// shadow like it can be observed with the old LED code
@@ -479,7 +479,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
light_width *= 2;
light_width /= 3;
- // Calculate the LED�s "light factor":
+ // Calculate the LED�s "light factor":
int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100;
// Now draw the bright spot on the LED:
@@ -506,14 +506,14 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// from the upper left.
pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs?
- brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( Qt::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
- // Set the initial color value to colorGroup().light() (bright) and start
- // drawing the shadow border at 45� (45*16 = 720).
+ // Set the initial color value to tqcolorGroup().light() (bright) and start
+ // drawing the shadow border at 45� (45*16 = 720).
int angle = -720;
- color = colorGroup().light();
+ color = tqcolorGroup().light();
for ( int arc = 120; arc < 2880; arc += 240 )
{
@@ -582,8 +582,8 @@ KLed::paintRectFrame(bool raised)
TQBrush darkBrush(d->offcolor);
int w = width();
int h = height();
- TQColor black = Qt::black;
- TQColor white = Qt::white;
+ TQColor black = TQt::black;
+ TQColor white = TQt::white;
// -----
if (raised) {
painter.setPen(white);
@@ -612,12 +612,12 @@ KLed::state() const
}
KLed::Shape
-KLed::shape() const
+KLed::tqshape() const
{
- return led_shape;
+ return led_tqshape;
}
-QColor
+TQColor
KLed::color() const
{
return led_color;
@@ -649,8 +649,8 @@ KLed::toggleState()
void
KLed::setShape(KLed::Shape s)
{
- if (led_shape != s) {
- led_shape = s;
+ if (led_tqshape != s) {
+ led_tqshape = s;
update();
}
}
@@ -712,14 +712,14 @@ KLed::off()
setState(Off);
}
-QSize
-KLed::sizeHint() const
+TQSize
+KLed::tqsizeHint() const
{
return TQSize(16, 16);
}
-QSize
-KLed::minimumSizeHint() const
+TQSize
+KLed::tqminimumSizeHint() const
{
return TQSize(16, 16 );
}
diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp
index 7263370..698620f 100644
--- a/src/gui/kdeext/klearlook.cpp
+++ b/src/gui/kdeext/klearlook.cpp
@@ -4,7 +4,7 @@ Klearlook (C) Joerg C. Koenig, 2005 [email protected]
----
-Based upon QtCurve (C) Craig Drummond, 2003 [email protected]
+Based upon TQtCurve (C) Craig Drummond, 2003 [email protected]
Bernhard Rosenkr�zer <bero@r?dh?t.com>
Preston Brown <pbrown@r?dh?t.com>
Than Ngo <than@r?dh?t.com>
@@ -81,15 +81,15 @@ DEALINGS IN THE SOFTWARE.
// Uncomment the following to enable gradients in toolbars and menubars
// NOTE: Not yet complete!!!
-//#define QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+//#define TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
//static int HIGH_LIGHT_FACTORS[]={ 100, 100, 100, 101, 102, 103, 104, 105 /*def*/, 106, 107, 108 };
//#define HIGHLIGHT_FACTOR(X) (X<0||X>10) ? 105 : HIGH_LIGHT_FACTORS[X]
-#define QTC_HIGHLIGHT_FACTOR 105
-#define QTC_BORDERED_FRAME_WIDTH 2
-#define QTC_DEF_FRAME_WIDTH 1
-//#define QTC_MIN_BTN_SIZE 10
-#define QTC_NO_SECT -1
+#define TQTC_HIGHLIGHT_FACTOR 105
+#define TQTC_BORDERED_FRAME_WIDTH 2
+#define TQTC_DEF_FRAME_WIDTH 1
+//#define TQTC_MIN_BTN_SIZE 10
+#define TQTC_NO_SECT -1
#define MENU_POPUP_ITEM_HIGH_HI 7
#define MENU_POPUP_ITEM_HIGH_LO 5
@@ -109,7 +109,7 @@ static TQString readEnvPath( const char *env ) {
TQCString path = getenv( env );
return path.isEmpty()
- ? TQString::null
+ ? TQString()
: TQFile::decodeName( path );
}
@@ -135,14 +135,14 @@ static bool kickerIsTrans() {
line = stream.readLine();
if ( inGen ) {
- if ( 0 == line.find( "Transparent=" ) ) // Found it!
+ if ( 0 == line.tqfind( "Transparent=" ) ) // Found it!
{
- if ( -1 != line.find( "true" ) )
+ if ( -1 != line.tqfind( "true" ) )
trans = true;
stop = true;
} else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section...
stop = true;
- } else if ( 0 == line.find( "[General]" ) )
+ } else if ( 0 == line.tqfind( "[General]" ) )
inGen = true;
}
cfgFile.close();
@@ -169,18 +169,18 @@ inline TQColor midColor( const TQColor &a, const TQColor &b, double factor = 1.0
// Copied from Keramik...
static bool isFormWidget( const TQWidget *widget ) {
//Form widgets are in the KHTMLView, but that has 2 further inner levels
- //of widgets - QClipperWidget, and outside of that, QViewportWidget
- TQWidget * potentialClipPort = widget->parentWidget();
+ //of widgets - TQClipperWidget, and outside of that, TQViewportWidget
+ TQWidget * potentialClipPort = widget->tqparentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
- TQWidget *potentialViewPort = potentialClipPort->parentWidget();
+ TQWidget *potentialViewPort = potentialClipPort->tqparentWidget();
if ( !potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp( potentialViewPort->name(), "qt_viewport" ) )
return false;
- TQWidget *potentialKHTML = potentialViewPort->parentWidget();
+ TQWidget *potentialKHTML = potentialViewPort->tqparentWidget();
if ( !potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp( potentialKHTML->className(), "KHTMLView" ) )
return false;
@@ -423,8 +423,8 @@ inline TQColor getFill( TQStyle::SFlags flags, const TQColor *use ) {
? use[ 3 ]
: flags & TQStyle::Style_MouseOver
? flags & ( TQStyle::Style_On | TQStyle::Style_Sunken )
- ? use[ 3 ].light( QTC_HIGHLIGHT_FACTOR )
- : use[ NUM_SHADES ].light( QTC_HIGHLIGHT_FACTOR )
+ ? TQColor(use[ 3 ].light( TQTC_HIGHLIGHT_FACTOR ))
+ : TQColor(use[ NUM_SHADES ].light( TQTC_HIGHLIGHT_FACTOR ))
: flags & ( TQStyle::Style_On | TQStyle::Style_Sunken )
? use[ 3 ]
: use[ NUM_SHADES ];
@@ -452,10 +452,10 @@ hover( HOVER_NONE ),
oldCursor( -1, -1 ),
formMode( false ),
hoverWidget( NULL ),
-hoverSect( QTC_NO_SECT ) {
+hoverSect( TQTC_NO_SECT ) {
TQSettings s;
- contrast = s.readNumEntry( "/Qt/KDE/contrast", 7 );
+ contrast = s.readNumEntry( "/TQt/KDE/contrast", 7 );
if ( contrast < 0 || contrast > 10 )
contrast = 7;
#ifdef USE_SINGLE_STYLE
@@ -466,24 +466,24 @@ hoverSect( QTC_NO_SECT ) {
darkMenubar = s.readBoolEntry( "/klearlookstyle/Settings/darkMenubar", true );
popupmenuHighlightLevel = s.readNumEntry( "/klearlookstyle/Settings/popupmenuHighlightLevel", 3);
- TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString::null );
+ TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString() );
toolbarBorders = tmp.isEmpty()
? TB_LIGHT
: qtc_to_tbar_border( tmp.latin1() );
bool etched = s.readBoolEntry( "/klearlookstyle/Settings/etched", true );
- tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString() );
sliderThumbs = tmp.isEmpty()
? etched ? GROOVE_SUNKEN : GROOVE_RAISED
: qtc_to_groove( tmp.latin1() );
- tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString() );
lvExpander = tmp.isEmpty()
? LV_EXP_ARR
: qtc_to_lv_expander( tmp.latin1() );
- tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString() );
lvLines = tmp.isEmpty()
? LV_LINES_SOLID
: qtc_to_lv_lines( tmp.latin1() );
@@ -511,11 +511,11 @@ hoverSect( QTC_NO_SECT ) {
#endif
if ( PROFILE_RAISED != pmProfile )
- shadeColors( qApp->palette().active().highlight(), menuPbar );
+ shadeColors( tqApp->tqpalette().active().highlight(), menuPbar );
else
- shadeGradient( qApp->palette().active().highlight(), menuPbar );
- shadeColors( qApp->palette().active().background(), gray );
- shadeColors( qApp->palette().active().button(), button );
+ shadeGradient( tqApp->tqpalette().active().highlight(), menuPbar );
+ shadeColors( tqApp->tqpalette().active().background(), gray );
+ shadeColors( tqApp->tqpalette().active().button(), button );
}
void KlearlookStyle::polish( TQApplication *app ) {
@@ -534,11 +534,11 @@ void KlearlookStyle::polish( TQApplication *app ) {
#endif
} else
- themedApp = qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE;
+ themedApp = qstrcmp( tqApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE;
}
void KlearlookStyle::polish( TQPalette &pal ) {
- int c = TQSettings().readNumEntry( "/Qt/KDE/contrast", 7 );
+ int c = TQSettings().readNumEntry( "/TQt/KDE/contrast", 7 );
bool newContrast = false;
if ( c < 0 || c > 10 )
@@ -549,18 +549,18 @@ void KlearlookStyle::polish( TQPalette &pal ) {
newContrast = true;
}
- if ( newContrast || gray[ NUM_SHADES ] != qApp->palette().active().background() )
- shadeColors( qApp->palette().active().background(), gray );
+ if ( newContrast || gray[ NUM_SHADES ] != tqApp->tqpalette().active().background() )
+ shadeColors( tqApp->tqpalette().active().background(), gray );
- if ( newContrast || button[ NUM_SHADES ] != qApp->palette().active().button() )
- shadeColors( qApp->palette().active().button(), button );
+ if ( newContrast || button[ NUM_SHADES ] != tqApp->tqpalette().active().button() )
+ shadeColors( tqApp->tqpalette().active().button(), button );
if ( PROFILE_RAISED == pmProfile ) {
- if ( newContrast || menuPbar[ NUM_SHADES ] != qApp->palette().active().highlight() )
- shadeColors( qApp->palette().active().highlight(), menuPbar );
+ if ( newContrast || menuPbar[ NUM_SHADES ] != tqApp->tqpalette().active().highlight() )
+ shadeColors( tqApp->tqpalette().active().highlight(), menuPbar );
} else
- if ( qApp->palette().active().highlight() != menuPbar[ GRADIENT_BASE ] )
- shadeGradient( qApp->palette().active().highlight(), menuPbar );
+ if ( tqApp->tqpalette().active().highlight() != menuPbar[ GRADIENT_BASE ] )
+ shadeGradient( tqApp->tqpalette().active().highlight(), menuPbar );
const TQColorGroup &actGroup = pal.active(),
&inactGroup = pal.inactive();
@@ -585,35 +585,33 @@ void KlearlookStyle::polish( TQPalette &pal ) {
static const char * kdeToolbarWidget = "kde toolbar widget";
void KlearlookStyle::polish( TQWidget *widget ) {
- if ( tqqt_cast<TQRadioButton *>( widget )
- || tqqt_cast<TQCheckBox *>( widget )
- || tqqt_cast<TQSpinWidget *>( widget )
- || widget->inherits( "QSplitterHandle" ) ) {
-#if QT_VERSION >= 0x030200
+ if ( ::tqqt_cast<TQRadioButton *>( widget )
+ || ::tqqt_cast<TQCheckBox *>( widget )
+ || ::tqqt_cast<TQSpinWidget *>( widget )
+ || widget->inherits( TQSPLITTERHANDLE_OBJECT_NAME_STRING ) ) {
widget->setMouseTracking( true );
-#endif
widget->installEventFilter( this );
- } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) ||
- widget->inherits( "QToolBarExtensionWidget" ) ) {
+ } else if ( ::tqqt_cast<TQButton *>( widget ) || ::tqqt_cast<TQComboBox *>( widget ) ||
+ widget->inherits( "TQToolBarExtensionWidget" ) ) {
widget->setBackgroundMode( TQWidget::PaletteBackground );
widget->installEventFilter( this );
- } else if ( tqqt_cast<TQMenuBar *>( widget )
- || tqqt_cast<TQToolBar *>( widget )
- || tqqt_cast<TQPopupMenu *>( widget ) )
+ } else if ( ::tqqt_cast<TQMenuBar *>( widget )
+ || ::tqqt_cast<TQToolBar *>( widget )
+ || ::tqqt_cast<TQPopupMenu *>( widget ) )
widget->setBackgroundMode( TQWidget::PaletteBackground );
else if ( widget->inherits( "KToolBarSeparator" ) ) {
widget->setBackgroundMode( TQWidget::NoBackground );
widget->installEventFilter( this );
- } else if ( tqqt_cast<TQScrollBar *>( widget ) ) {
+ } else if ( ::tqqt_cast<TQScrollBar *>( widget ) ) {
widget->setMouseTracking( true );
widget->installEventFilter( this );
widget->setBackgroundMode( TQWidget::NoBackground );
- } else if ( tqqt_cast<TQSlider *>( widget ) || tqqt_cast<TQHeader *>( widget ) ) {
+ } else if ( ::tqqt_cast<TQSlider *>( widget ) || ::tqqt_cast<TQHeader *>( widget ) ) {
widget->setMouseTracking( true );
widget->installEventFilter( this );
@@ -626,36 +624,34 @@ void KlearlookStyle::polish( TQWidget *widget ) {
}
void KlearlookStyle::unPolish( TQWidget *widget ) {
- if ( tqqt_cast<TQRadioButton *>( widget ) ||
- tqqt_cast<TQCheckBox *>( widget ) ||
- tqqt_cast<TQSpinWidget *>( widget ) ||
- widget->inherits( "QSplitterHandle" ) ) {
-#if QT_VERSION >= 0x030200
+ if ( ::tqqt_cast<TQRadioButton *>( widget ) ||
+ ::tqqt_cast<TQCheckBox *>( widget ) ||
+ ::tqqt_cast<TQSpinWidget *>( widget ) ||
+ widget->inherits( TQSPLITTERHANDLE_OBJECT_NAME_STRING ) ) {
widget->setMouseTracking( false );
-#endif
widget->removeEventFilter( this );
- } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) ||
- widget->inherits( "QToolBarExtensionWidget" ) ) {
+ } else if ( ::tqqt_cast<TQButton *>( widget ) || ::tqqt_cast<TQComboBox *>( widget ) ||
+ widget->inherits( "TQToolBarExtensionWidget" ) ) {
widget->setBackgroundMode( TQWidget::PaletteButton );
widget->removeEventFilter( this );
- } else if ( tqqt_cast<TQMenuBar *>( widget ) ||
- tqqt_cast<TQToolBar *>( widget ) ||
- tqqt_cast<TQPopupMenu *>( widget ) )
+ } else if ( ::tqqt_cast<TQMenuBar *>( widget ) ||
+ ::tqqt_cast<TQToolBar *>( widget ) ||
+ ::tqqt_cast<TQPopupMenu *>( widget ) )
widget->setBackgroundMode( TQWidget::PaletteBackground );
else if ( widget->inherits( "KToolBarSeparator" ) ) {
widget->setBackgroundMode( PaletteBackground );
widget->removeEventFilter( this );
- } else if ( tqqt_cast<TQScrollBar *>( widget ) ) {
+ } else if ( ::tqqt_cast<TQScrollBar *>( widget ) ) {
widget->setMouseTracking( false );
widget->removeEventFilter( this );
widget->setBackgroundMode( TQWidget::PaletteButton );
- } else if ( tqqt_cast<TQSlider *>( widget ) ||
- tqqt_cast<TQHeader *>( widget ) ) {
+ } else if ( ::tqqt_cast<TQSlider *>( widget ) ||
+ ::tqqt_cast<TQHeader *>( widget ) ) {
widget->setMouseTracking( false );
widget->removeEventFilter( this );
@@ -668,38 +664,38 @@ void KlearlookStyle::unPolish( TQWidget *widget ) {
}
bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
- if ( object->parent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) {
+ if ( object->tqparent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) {
// Draw background for custom widgets in the toolbar that have specified a "kde toolbar widget" name.
if ( TQEvent::Paint == event->type() ) {
- TQWidget * widget = static_cast<TQWidget*>( object ),
- *parent = static_cast<TQWidget*>( object->parent() );
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+ TQWidget * widget = TQT_TQWIDGET( object ),
+ *tqparent = TQT_TQWIDGET( object->tqparent() );
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
int x_offset = widget->x(),
y_offset = widget->y();
- while ( parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) {
- x_offset += parent->x();
- y_offset += parent->y();
- parent = static_cast<TQWidget*>( parent->parent() );
+ while ( tqparent && tqparent->tqparent() && !qstrcmp( tqparent->name(), kdeToolbarWidget ) ) {
+ x_offset += tqparent->x();
+ y_offset += tqparent->y();
+ tqparent = TQT_TQWIDGET( tqparent->tqparent() );
}
- TQRect pr( parent->rect() );
+ TQRect pr( tqparent->rect() );
bool horiz_grad = pr.width() < pr.height();
- // Check if the parent is a QToolbar, and use its orientation, else guess.
- TQToolBar *toolbar = dynamic_cast<TQToolBar*>( parent );
+ // Check if the tqparent is a TQToolbar, and use its orientation, else guess.
+ TQToolBar *toolbar = dynamic_cast<TQToolBar*>( tqparent );
if ( toolbar )
- horiz_grad = toolbar->orientation() == Qt::Vertical;
+ horiz_grad = toolbar->orientation() == TQt::Vertical;
- drawBevelGradient( parent->colorGroup().background(), true, 1, &TQPainter( widget ),
+ drawBevelGradient( tqparent->tqcolorGroup().background(), true, 1, &TQPainter( widget ),
TQRect( x_offset, y_offset, pr.width(), pr.height() ),
horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
#else
- TQPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() );
+ TQPainter( widget ).fillRect( widget->rect(), tqparent->tqcolorGroup().background() );
#endif
return false; // Now draw the contents
@@ -710,11 +706,11 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
if ( frame && TQFrame::NoFrame != frame->frameShape() ) {
TQPainter painter( frame );
if ( TQFrame::VLine == frame->frameShape() )
- drawPrimitive( PE_DockWindowSeparator, &painter,
- frame->rect(), frame->colorGroup(), Style_Horizontal );
+ tqdrawPrimitive( PE_DockWindowSeparator, &painter,
+ frame->rect(), frame->tqcolorGroup(), Style_Horizontal );
else if ( TQFrame::HLine == frame->frameShape() )
- drawPrimitive( PE_DockWindowSeparator, &painter,
- frame->rect(), frame->colorGroup() );
+ tqdrawPrimitive( PE_DockWindowSeparator, &painter,
+ frame->rect(), frame->tqcolorGroup() );
else
return false;
return true; // been drawn!
@@ -726,7 +722,7 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
hoverWidget = ( TQWidget * ) object;
if ( hoverWidget && hoverWidget->isEnabled() ) {
if ( redrawHoverWidget() ) {
- hoverWidget->repaint( false );
+ hoverWidget->tqrepaint( false );
if ( APP_KICKER == themedApp )
hover = HOVER_NONE;
}
@@ -736,17 +732,17 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
}
break;
case TQEvent::Leave:
- if ( hoverWidget && object == hoverWidget ) {
+ if ( hoverWidget && TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget) ) {
oldCursor.setX( -1 );
oldCursor.setY( -1 );
hoverWidget = NULL;
- ( ( TQWidget * ) object ) ->repaint( false );
+ ( ( TQWidget * ) object ) ->tqrepaint( false );
}
break;
case TQEvent::MouseMove:
if ( hoverWidget && object->isWidgetType() ) {
if ( redrawHoverWidget() ) {
- hoverWidget->repaint( false );
+ hoverWidget->tqrepaint( false );
if ( APP_KICKER == themedApp )
hover = HOVER_NONE;
}
@@ -821,8 +817,8 @@ void KlearlookStyle::drawLightBevelButton(
if ( borderButton )
if ( rounded && ROUNDED_NONE != round ) {
- bool wide = r.width() >= QTC_MIN_BTN_SIZE,
- tall = r.height() >= QTC_MIN_BTN_SIZE;
+ bool wide = r.width() >= TQTC_MIN_BTN_SIZE,
+ tall = r.height() >= TQTC_MIN_BTN_SIZE;
TQColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled
? cg.text() : custom ? custom[ 5 ] : gray[ 5 ] );
@@ -1037,8 +1033,8 @@ void KlearlookStyle::drawLightBevel(
if ( borderButton )
if ( rounded && ROUNDED_NONE != round ) {
- bool wide = r.width() >= QTC_MIN_BTN_SIZE,
- tall = r.height() >= QTC_MIN_BTN_SIZE;
+ bool wide = r.width() >= TQTC_MIN_BTN_SIZE,
+ tall = r.height() >= TQTC_MIN_BTN_SIZE;
TQColor border = menuPbar[ GRADIENT_BASE ].dark( 130 );
@@ -1194,7 +1190,7 @@ void KlearlookStyle::drawLightBevel(
}
void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags,
- TQStyle::PrimitiveElement pe, bool small, bool checkActive ) const {
+ TQStyle::TQ_PrimitiveElement pe, bool small, bool checkActive ) const {
TQPointArray a;
const TQColor &col = flags & Style_Enabled
? checkActive && flags & Style_Active
@@ -1284,7 +1280,7 @@ void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGrou
p->restore();
}
-void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void KlearlookStyle::tqdrawPrimitiveMenu( TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, const TQStyleOption &data ) const {
switch ( pe ) {
case PE_CheckMark:
@@ -1319,11 +1315,11 @@ void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const
break;
default:
- KStyle::drawPrimitive( pe, p, r, cg, flags, data );
+ KStyle::tqdrawPrimitive( pe, p, r, cg, flags, data );
}
}
-void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, const TQStyleOption &data ) const {
int x, y, w, h;
@@ -1358,7 +1354,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
} else {
flags = ( ( flags | Style_Sunken ) ^ Style_Sunken ) | Style_Raised;
- if ( QTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) {
+ if ( TQTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) {
TQHeader * hd = dynamic_cast<TQHeader *>( hoverWidget );
if ( hd && hd->isClickEnabled( hoverSect ) && r == hd->sectionRect( hoverSect ) )
@@ -1399,7 +1395,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
const TQColor * use = buttonColors( cg );
p->setPen( use[ 4 ] );
- int offset = r.width() >= QTC_MIN_BTN_SIZE && r.height() >= QTC_MIN_BTN_SIZE ? 4 : 3;
+ int offset = r.width() >= TQTC_MIN_BTN_SIZE && r.height() >= TQTC_MIN_BTN_SIZE ? 4 : 3;
p->drawLine( r.x() + offset, r.y(), r.x() + r.width() - ( 1 + offset ), r.y() );
p->drawLine( r.x() + offset, r.y() + r.height() - 1,
@@ -1479,11 +1475,11 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
int x = r.x(), y = r.y(), w = r.width(), h = r.height(), marg = lv->itemMargin();
p->setPen( TQPen( flags & Style_Enabled ? cg.text()
- : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ) ) );
+ : lv->tqpalette().color( TQPalette::Disabled, TQColorGroup::Text ) ) );
if ( flags & Style_Selected && !lv->rootIsDecorated() &&
- !( ( item->parent() && 1 == item->parent() ->rtti() &&
- TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->parent() ) ->type() ) )) {
+ !( ( item->tqparent() && 1 == item->tqparent() ->rtti() &&
+ TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) )) {
p->fillRect( 0, 0, x + marg + w + 4, item->height(),
cg.brush( TQColorGroup::Highlight ) );
if ( item->isEnabled() )
@@ -1504,13 +1500,13 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
TQListView * lv = item->listView();
p->setPen( TQPen( flags & Style_Enabled ? cg.text()
- : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
+ : lv->tqpalette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
if ( flags & Style_Selected ) {
flags -= Style_Selected;
if ( !lv->rootIsDecorated() &&
- !( ( item->parent() && 1 == item->parent() ->rtti() &&
+ !( ( item->tqparent() && 1 == item->tqparent() ->rtti() &&
TQCheckListItem::Controller ==
- ( ( TQCheckListItem* ) item->parent() ) ->type() ) ) ) {
+ ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) ) ) {
p->fillRect( 0, 0, r.x() + lv->itemMargin() + r.width() + 4, item->height(),
cg.brush( TQColorGroup::Highlight ) );
if ( item->isEnabled() ) {
@@ -1524,7 +1520,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
p->setBrush( cg.brush( TQColorGroup::Button ) );
p->drawRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 );
if ( flags & TQStyle::Style_On || !( flags & Style_Off ) )
- drawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(),
+ tqdrawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(),
r.y() + 2, r.width() - 4, r.width() - 4 ), cg, flags );
}
break;
@@ -1534,13 +1530,13 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
bool on = flags & TQStyle::Style_On || !( flags & Style_Off );
if ( APPEARANCE_FLAT != appearance )
- drawPrimitive( PE_ButtonTool, p, r, cg, flags );
+ tqdrawPrimitive( PE_ButtonTool, p, r, cg, flags );
else {
- p->fillRect( r.x() + 1, r.y() + 2, QTC_CHECK_SIZE - 2, QTC_CHECK_SIZE - 2,
+ p->fillRect( r.x() + 1, r.y() + 2, TQTC_CHECK_SIZE - 2, TQTC_CHECK_SIZE - 2,
flags & Style_Enabled ? cg.base() : cg.background() );
p->setPen( use[ 4 ] );
- p->drawLine( r.x() + 1, r.y() + QTC_CHECK_SIZE - 1, r.x() + 1, r.y() + 1 );
- p->drawLine( r.x() + 1, r.y() + 1, r.x() + QTC_CHECK_SIZE - 2, r.y() + 1 );
+ p->drawLine( r.x() + 1, r.y() + TQTC_CHECK_SIZE - 1, r.x() + 1, r.y() + 1 );
+ p->drawLine( r.x() + 1, r.y() + 1, r.x() + TQTC_CHECK_SIZE - 2, r.y() + 1 );
}
p->setPen( use[ 5 ] );
p->setBrush( NoBrush );
@@ -1556,10 +1552,10 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
p->drawPoint( r.x() + r.height() - 1, r.y() );
p->drawPoint( r.x() + r.height() - 1, r.y() + r.width() - 1 );
} else if ( APPEARANCE_FLAT == appearance || borderButton )
- p->drawRect( r.x(), r.y(), QTC_CHECK_SIZE, QTC_CHECK_SIZE );
+ p->drawRect( r.x(), r.y(), TQTC_CHECK_SIZE, TQTC_CHECK_SIZE );
if ( on )
- drawPrimitive( PE_CheckMark, p, r, cg, flags );
+ tqdrawPrimitive( PE_CheckMark, p, r, cg, flags );
break;
}
case PE_CheckListExclusiveIndicator: {
@@ -1625,8 +1621,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
if ( PE_ExclusiveIndicatorMask == pe ) {
p->fillRect( r, color0 );
- p->setPen( Qt::color1 );
- p->setBrush( Qt::color1 );
+ p->setPen( TQt::color1 );
+ p->setBrush( TQt::color1 );
p->drawPolygon( outer );
} else {
TQPointArray shadow;
@@ -1656,7 +1652,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
x + 8, y + 1 );
p->fillRect( r, crLabelHighlight && flags & Style_MouseOver
- ? cg.background().light( QTC_HIGHLIGHT_FACTOR ) : cg.background() );
+ ? TQColor(cg.background().light( TQTC_HIGHLIGHT_FACTOR )) : cg.background() );
if ( APPEARANCE_FLAT != appearance ) {
indBgnd = getFill( flags, use );
@@ -1699,7 +1695,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
rightShadowColor = bgnd;
p->setBrush( bgnd );
p->setPen( bgnd );
- p->drawEllipse( x, y, QTC_RADIO_SIZE, QTC_RADIO_SIZE );
+ p->drawEllipse( x, y, TQTC_RADIO_SIZE, TQTC_RADIO_SIZE );
p->setPen( use[ 4 ] );
leftShadowColor = use[ 4 ];
p->drawPolyline( shadow );
@@ -1806,7 +1802,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
else {
p->fillRect( r,
TQColor( flags & Style_MouseOver ?
- cg.background().light( QTC_HIGHLIGHT_FACTOR ) :
+ TQColor(cg.background().light( TQTC_HIGHLIGHT_FACTOR )) :
cg.background() ) );
drawLines( p, r, flags & Style_Horizontal, 70, 1, use, 0, TRUE,
APPEARANCE_LIGHT_GRADIENT == appearance );
@@ -1859,7 +1855,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ] ),
flags & Style_Sunken,
- data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 );
+ data.isDefault() ? TQTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 );
#endif
} else
@@ -1868,7 +1864,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ]
),
- flags & Style_Sunken, data.isDefault() ? QTC_DEF_FRAME_WIDTH : data.lineWidth() );
+ flags & Style_Sunken, data.isDefault() ? TQTC_DEF_FRAME_WIDTH : data.lineWidth() );
break;
}
case PE_PanelTabWidget: {
@@ -1884,7 +1880,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ] ),
flags & Style_Sunken,
- data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 );
+ data.isDefault() ? TQTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 );
#endif
} else
@@ -1893,7 +1889,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ]
),
- flags & Style_Sunken, data.isDefault() ? QTC_DEF_FRAME_WIDTH : data.lineWidth() );
+ flags & Style_Sunken, data.isDefault() ? TQTC_DEF_FRAME_WIDTH : data.lineWidth() );
break;
}
case PE_PanelDockWindow:
@@ -1910,7 +1906,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
flags & Style_Sunken, 1
);
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( use[ NUM_SHADES ],
@@ -1931,7 +1927,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
flags & Style_Sunken, 1
);
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( use[ NUM_SHADES ],
@@ -1968,7 +1964,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
PE_ArrowDown == pe ? ROUNDED_BOTTOM :
PE_ArrowUp == pe ? ROUNDED_TOP : ROUNDED_NONE,
getFill( flags, use ), use );
- drawPrimitive( pe, p, r, cg, flags );
+ tqdrawPrimitive( pe, p, r, cg, flags );
break;
}
case PE_ScrollBarSubPage:
@@ -2037,7 +2033,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR
break;
}
default:
- KStyle::drawPrimitive( pe, p, r, cg, flags, data );
+ KStyle::tqdrawPrimitive( pe, p, r, cg, flags, data );
}
}
@@ -2058,7 +2054,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, con
drawSliderHandle( p, r, cg, flags );
break;
case KPE_ListViewExpander: {
- int lvSize = QTC_LV_SIZE( lvExpander );
+ int lvSize = TQTC_LV_SIZE( lvExpander );
TQRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ),
r.y() + ( ( r.height() - ( lvSize + 4 ) ) >> 1 ), lvSize + 4, lvSize + 4 );
@@ -2200,7 +2196,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, con
}
}
-void KlearlookStyle::drawControl(
+void KlearlookStyle::tqdrawControl(
ControlElement control,
TQPainter *p,
const TQWidget *widget,
@@ -2216,11 +2212,11 @@ void KlearlookStyle::drawControl(
bool cornerWidget = false,
firstTab = 0 == tb->indexOf( data.tab() ->identifier() );
- if ( tqqt_cast<const TQTabWidget *>( tb->parent() ) ) {
- const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent();
+ if ( ::tqqt_cast<const TQTabWidget *>( tb->tqparent() ) ) {
+ const TQTabWidget * tw = ( const TQTabWidget* ) tb->tqparent();
// is there a corner widget in the (top) left edge?
- if ( tw->cornerWidget( Qt::TopLeft ) )
+ if ( tw->cornerWidget( TQt::TopLeft ) )
cornerWidget = true;
}
@@ -2229,7 +2225,7 @@ void KlearlookStyle::drawControl(
fr( r );
int offset = rounded ? 2 : 0;
- switch ( tb->shape() ) {
+ switch ( tb->tqshape() ) {
case TQTabBar::TriangularAbove:
case TQTabBar::RoundedAbove:
if ( flags & Style_Selected ) {
@@ -2379,12 +2375,12 @@ void KlearlookStyle::drawControl(
p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] );
break;
default:
- KStyle::drawControl( control, p, widget, r, cg, flags, data );
+ KStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
}
} else {
TQRect br( r );
- switch ( tb->shape() ) {
+ switch ( tb->tqshape() ) {
case TQTabBar::TriangularAbove:
case TQTabBar::RoundedAbove:
if ( flags & Style_Selected ) {
@@ -2460,7 +2456,6 @@ void KlearlookStyle::drawControl(
}
break;
}
-#if QT_VERSION >= 0x030200
case CE_TabBarLabel: {
if ( data.isDefault() )
break;
@@ -2470,19 +2465,18 @@ void KlearlookStyle::drawControl(
TQRect tr = r;
if ( t->identifier() == tb->currentTab() ) {
- if ( TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() )
- tr.setBottom( tr.bottom() - pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
+ if ( TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape() )
+ tr.setBottom( tr.bottom() - tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
} else
- if ( TQTabBar::RoundedBelow == tb->shape() || TQTabBar::TriangularBelow == tb->shape() )
- tr.setTop( tr.top() + pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
+ if ( TQTabBar::RoundedBelow == tb->tqshape() || TQTabBar::TriangularBelow == tb->tqshape() )
+ tr.setTop( tr.top() + tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() );
if ( ( flags & Style_HasFocus ) && !t->text().isEmpty() )
- drawPrimitive( PE_FocusRect, p, r, cg );
+ tqdrawPrimitive( PE_FocusRect, p, r, cg );
break;
}
-#endif
case CE_PushButtonLabel: // Taken from Highcolour and Plastik...
{
int x, y, w, h;
@@ -2495,23 +2489,23 @@ void KlearlookStyle::drawControl(
// Shift button contents if pushed.
if ( active ) {
- x += pixelMetric( PM_ButtonShiftHorizontal, widget );
- y += pixelMetric( PM_ButtonShiftVertical, widget );
+ x += tqpixelMetric( PM_ButtonShiftHorizontal, widget );
+ y += tqpixelMetric( PM_ButtonShiftVertical, widget );
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() ) {
- int dx = pixelMetric( PM_MenuButtonIndicator, widget ),
- margin = pixelMetric( PM_ButtonMargin, widget );
+ int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ),
+ margin = tqpixelMetric( PM_ButtonMargin, widget );
if ( button->iconSet() && !button->iconSet() ->isNull() &&
( dx + button->iconSet() ->pixmap ( TQIconSet::Small, TQIconSet::Normal,
TQIconSet::Off ).width() ) >= w )
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
else {
- drawPrimitive( PE_ArrowDown,
- p, visualRect( TQRect(
+ tqdrawPrimitive( PE_ArrowDown,
+ p, tqvisualRect( TQRect(
( x + w ) - ( dx + margin ), y, dx,
h ), r ), cg, flags, data );
@@ -2543,7 +2537,7 @@ void KlearlookStyle::drawControl(
pixmap );
else {
iw = button->pixmap() ? button->pixmap() ->width()
- : widget->fontMetrics().size( Qt::ShowPrefix, button->text() ).width();
+ : widget->fontMetrics().size( TQt::ShowPrefix, button->text() ).width();
int cw = iw + pw + constSpace;
@@ -2553,7 +2547,7 @@ void KlearlookStyle::drawControl(
}
if ( cornArrow ) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, visualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ),
+ tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ),
cg, flags, data );
if ( xo && iw ) {
@@ -2572,16 +2566,16 @@ void KlearlookStyle::drawControl(
for ( i = 0; i < j; i++ )
drawItem( p, TQRect( x + i, y, w, h ),
AlignCenter | ShowPrefix,
- button->colorGroup(),
+ button->tqcolorGroup(),
button->isEnabled(),
button->pixmap(),
button->text(), -1,
- &button->colorGroup().buttonText() );
+ &button->tqcolorGroup().buttonText() );
//Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
- drawPrimitive( PE_FocusRect, p,
- TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags );
+ tqdrawPrimitive( PE_FocusRect, p,
+ TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags );
break;
}
@@ -2616,7 +2610,7 @@ void KlearlookStyle::drawControl(
break;
}
- maxpmw = QMAX( maxpmw, 16 );
+ maxpmw = TQMAX( maxpmw, 16 );
TQRect cr, ir, tr, sr;
if (menuIcons) {
@@ -2642,10 +2636,10 @@ void KlearlookStyle::drawControl(
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = visualRect( cr, r );
- sr = visualRect( sr, r );
- tr = visualRect( tr, r );
- ir = visualRect( ir, r );
+ cr = tqvisualRect( cr, r );
+ sr = tqvisualRect( sr, r );
+ tr = tqvisualRect( tr, r );
+ ir = tqvisualRect( ir, r );
}
if ( mi->iconSet() && menuIcons ) {
@@ -2653,7 +2647,7 @@ void KlearlookStyle::drawControl(
TQIconSet::Mode mode = flags & Style_Active
? ( mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled )
: ( mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled );
- cr = visualRect( TQRect( x, y, maxpmw, h ), r );
+ cr = tqvisualRect( TQRect( x, y, maxpmw, h ), r );
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
@@ -2686,7 +2680,7 @@ void KlearlookStyle::drawControl(
ir.setCoords( cr.right() + 2, r.top(), tr.right() - 4, r.bottom() );
TQBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() );
- drawPrimitiveMenu( PE_CheckMark, p, cr, cg,
+ tqdrawPrimitiveMenu( PE_CheckMark, p, cr, cg,
( flags & ( Style_Enabled | Style_Active ) ) | Style_On );
}
@@ -2724,7 +2718,7 @@ void KlearlookStyle::drawControl(
TQString text = mi->text();
if ( !text.isNull() ) {
- int t = text.find( '\t' );
+ int t = text.tqfind( '\t' );
// draw accelerator/tab-text
if ( t >= 0 ) {
@@ -2760,10 +2754,10 @@ void KlearlookStyle::drawControl(
TQPixmap pixmap = *mi->pixmap();
if ( 1 == pixmap.depth() )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
p->drawPixmap( ir.x(), ( ir.height() - pixmap.height() ) >> 1, pixmap );
if ( pixmap.depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
if ( mi->popup() )
@@ -2777,7 +2771,7 @@ void KlearlookStyle::drawControl(
drawPBarOrMenu2( p, TQRect(r.x(), r.y(), r.width(), r.height()),
true, cg, true );
} else
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( cg.background(), true, 0, p,
r,
@@ -2819,7 +2813,7 @@ void KlearlookStyle::drawControl(
break;
case CE_DockWindowEmptyArea:
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( cg.background(), true, 1, p, r, true, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
@@ -2847,7 +2841,7 @@ void KlearlookStyle::drawControl(
if ( cr.isValid() && ( progress > 0 || steps == 0 ) ) {
double pg = ( steps == 0 ) ? 0.1 : progress / steps;
- int width = QMIN( cr.width(), ( int ) ( pg * cr.width() ) );
+ int width = TQMIN( cr.width(), ( int ) ( pg * cr.width() ) );
if ( 0 == steps ) //Busy indicator
{
@@ -2885,7 +2879,7 @@ void KlearlookStyle::drawControl(
case CE_PushButton: {
const TQPushButton *button = static_cast<const TQPushButton *>( widget );
TQRect br( r );
- int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget );
+ int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget );
if ( rounded && isFormWidget( widget ) )
formMode = true;
@@ -2901,55 +2895,47 @@ void KlearlookStyle::drawControl(
p->save();
p->setBrushOrigin( -widget->backgroundOffset().x(), -widget->backgroundOffset().y() );
// draw button
- drawPrimitive( PE_ButtonCommand, p, br, cg, flags );
+ tqdrawPrimitive( PE_ButtonCommand, p, br, cg, flags );
if ( button->isDefault() && IND_FONT_COLOUR != defBtnIndicator )
- drawPrimitive( PE_ButtonDefault, p, r, cg, flags );
+ tqdrawPrimitive( PE_ButtonDefault, p, r, cg, flags );
p->restore();
formMode = false;
break;
}
case CE_CheckBox:
- drawPrimitive( PE_Indicator, p, r, cg, flags, data );
+ tqdrawPrimitive( PE_Indicator, p, r, cg, flags, data );
break;
case CE_CheckBoxLabel:
if ( crLabelHighlight ) {
const TQCheckBox * checkbox = ( const TQCheckBox * ) widget;
if ( flags & Style_MouseOver &&
-#if QT_VERSION >= 0x030200
HOVER_CHECK == hover && hoverWidget == widget &&
-#endif
!isFormWidget( widget ) ) {
-#if QT_VERSION >= 0x030200
TQRect cr( checkbox->rect() );
TQRegion r( TQRect( cr.x(), cr.y(),
- visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() +
- pixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) );
+ tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() +
+ tqpixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) );
-#else
-
- TQRegion r( checkbox->rect() );
-#endif
-
- r -= visualRect( subRect( SR_CheckBoxIndicator, widget ), widget );
+ r -= tqvisualRect( subRect( SR_CheckBoxIndicator, widget ), widget );
p->setClipRegion( r );
- p->fillRect( checkbox->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) );
+ p->fillRect( checkbox->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) );
p->setClipping( false );
}
- int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int tqalignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
- drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg,
+ drawItem( p, r, tqalignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, checkbox->pixmap(), checkbox->text() );
if ( checkbox->hasFocus() )
- drawPrimitive( PE_FocusRect, p,
- visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags );
+ tqdrawPrimitive( PE_FocusRect, p,
+ tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags );
} else
- KStyle::drawControl( control, p, widget, r, cg, flags, data );
+ KStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
break;
case CE_RadioButton:
formMode = isFormWidget( widget );
- drawPrimitive( PE_ExclusiveIndicator, p, r, cg, flags, data );
+ tqdrawPrimitive( PE_ExclusiveIndicator, p, r, cg, flags, data );
formMode = false;
break;
case CE_RadioButtonLabel:
@@ -2957,47 +2943,40 @@ void KlearlookStyle::drawControl(
const TQRadioButton * radiobutton = ( const TQRadioButton * ) widget;
if ( flags & Style_MouseOver &&
-#if QT_VERSION >= 0x030200
HOVER_RADIO == hover && hoverWidget == widget &&
-#endif
!isFormWidget( widget ) ) {
-#if QT_VERSION >= 0x030200
TQRect rb( radiobutton->rect() );
TQRegion r( TQRect( rb.x(), rb.y(),
- visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() +
- pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) );
-#else
-
- TQRegion r( radiobutton->rect() );
-#endif
+ tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() +
+ tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) );
- r -= visualRect( subRect( SR_RadioButtonIndicator, widget ), widget );
+ r -= tqvisualRect( subRect( SR_RadioButtonIndicator, widget ), widget );
p->setClipRegion( r );
- p->fillRect( radiobutton->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) );
+ p->fillRect( radiobutton->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) );
p->setClipping( false );
}
- int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int tqalignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
- drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg,
+ drawItem( p, r, tqalignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text() );
if ( radiobutton->hasFocus() )
- drawPrimitive( PE_FocusRect, p,
- visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags );
+ tqdrawPrimitive( PE_FocusRect, p,
+ tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags );
break;
}
default:
- KStyle::drawControl( control, p, widget, r, cg, flags, data );
+ KStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
}
}
-void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r,
+void KlearlookStyle::tqdrawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const {
switch ( control ) {
case CE_PushButton:
if ( rounded ) {
- int offset = r.width() < QTC_MIN_BTN_SIZE || r.height() < QTC_MIN_BTN_SIZE ? 1 : 2;
+ int offset = r.width() < TQTC_MIN_BTN_SIZE || r.height() < TQTC_MIN_BTN_SIZE ? 1 : 2;
p->fillRect( r, color0 );
p->fillRect( r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, color1 );
@@ -3012,19 +2991,19 @@ void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, cons
p->fillRect( r, color1 );
break;
default:
- KStyle::drawControlMask( control, p, widget, r, data );
+ KStyle::tqdrawControlMask( control, p, widget, r, data );
}
}
-void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
+void KlearlookStyle::tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const {
switch ( control ) {
case CC_ToolButton:
case CC_ComboBox:
- drawControlMask( CE_PushButton, p, widget, r, data );
+ tqdrawControlMask( CE_PushButton, p, widget, r, data );
break;
default:
- KStyle::drawComplexControlMask( control, p, widget, r, data );
+ KStyle::tqdrawComplexControlMask( control, p, widget, r, data );
}
}
@@ -3040,7 +3019,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
// if(button->isDefault() || button->autoDefault())
// {
- dbw1 = pixelMetric( PM_ButtonDefaultIndicator, widget );
+ dbw1 = tqpixelMetric( PM_ButtonDefaultIndicator, widget );
dbw2 = dbw1 * 2;
// }
@@ -3051,20 +3030,20 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
break;
}
case SR_CheckBoxIndicator: {
- int h = pixelMetric( PM_IndicatorHeight );
+ int h = tqpixelMetric( PM_IndicatorHeight );
rect.setRect( ( widget->rect().height() - h ) >> 1,
( widget->rect().height() - h ) >> 1,
- pixelMetric( PM_IndicatorWidth ),
+ tqpixelMetric( PM_IndicatorWidth ),
h );
break;
}
case SR_RadioButtonIndicator: {
- int h = pixelMetric( PM_ExclusiveIndicatorHeight );
+ int h = tqpixelMetric( PM_ExclusiveIndicatorHeight );
rect.setRect( ( widget->rect().height() - h ) >> 1,
( widget->rect().height() - h ) >> 1,
- pixelMetric( PM_ExclusiveIndicatorWidth ), h );
+ tqpixelMetric( PM_ExclusiveIndicatorWidth ), h );
break;
}
case SR_ProgressBarContents:
@@ -3080,7 +3059,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
return rect;
}
-void KlearlookStyle::drawComplexControl(
+void KlearlookStyle::tqdrawComplexControl(
ComplexControl control,
TQPainter *p,
const TQWidget *widget,
@@ -3104,19 +3083,19 @@ void KlearlookStyle::drawComplexControl(
SFlags bflags = flags, mflags = flags;
if ( APP_KORN == themedApp ) {
- drawPrimitive( PE_ButtonTool, p, button, cg, bflags, data );
+ tqdrawPrimitive( PE_ButtonTool, p, button, cg, bflags, data );
break;
}
bool onControlButtons = false,
- onToolbar = widget->parentWidget() && tqqt_cast<TQToolBar *>( widget->parentWidget() ),
+ onToolbar = widget->tqparentWidget() && ::tqqt_cast<TQToolBar *>( widget->tqparentWidget() ),
onExtender = !onToolbar &&
- widget->parentWidget() &&
- widget->parentWidget() ->inherits( "QToolBarExtensionWidget" ) &&
- tqqt_cast<TQToolBar *>( widget->parentWidget() ->parentWidget() );
+ widget->tqparentWidget() &&
+ widget->tqparentWidget() ->inherits( "TQToolBarExtensionWidget" ) &&
+ ::tqqt_cast<TQToolBar *>( widget->tqparentWidget() ->tqparentWidget() );
- if ( !onToolbar && !onExtender && widget->parentWidget() &&
- !qstrcmp( widget->parentWidget() ->name(), "qt_maxcontrols" ) )
+ if ( !onToolbar && !onExtender && widget->tqparentWidget() &&
+ !qstrcmp( widget->tqparentWidget() ->name(), "qt_maxcontrols" ) )
onControlButtons = true;
if ( active & SC_ToolButton )
@@ -3139,33 +3118,33 @@ void KlearlookStyle::drawComplexControl(
if ( !onToolbar && !onControlButtons )
bflags |= Style_Horizontal;
- drawPrimitive( PE_ButtonTool, p, button, cg, bflags, data );
+ tqdrawPrimitive( PE_ButtonTool, p, button, cg, bflags, data );
}
// Check whether to draw a background pixmap
- else if ( toolbutton->parentWidget() &&
- toolbutton->parentWidget() ->backgroundPixmap() &&
- !toolbutton->parentWidget() ->backgroundPixmap() ->isNull() ) {
+ else if ( toolbutton->tqparentWidget() &&
+ toolbutton->tqparentWidget() ->backgroundPixmap() &&
+ !toolbutton->tqparentWidget() ->backgroundPixmap() ->isNull() ) {
p->drawTiledPixmap( r,
- *( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() );
- } else if ( widget->parent() ) {
- if ( tqqt_cast<const TQToolBar *>( widget->parent() ) ) {
- TQToolBar * parent = ( TQToolBar* ) widget->parent();
+ *( toolbutton->tqparentWidget() ->backgroundPixmap() ), toolbutton->pos() );
+ } else if ( widget->tqparent() ) {
+ if ( ::tqqt_cast<const TQToolBar *>( widget->tqparent() ) ) {
+ TQToolBar * tqparent = ( TQToolBar* ) widget->tqparent();
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( cg.background(), true, 0,
- p, parent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
+ p, tqparent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
else
#endif
- p->fillRect( parent->rect(), cg.background() );
- } else if ( widget->parent() ->inherits( "QToolBarExtensionWidget" ) ) {
- TQWidget * parent = ( TQWidget* ) widget->parent();
- TQToolBar *toolbar = ( TQToolBar* ) parent->parent();
+ p->fillRect( tqparent->rect(), cg.background() );
+ } else if ( widget->tqparent() ->inherits( "TQToolBarExtensionWidget" ) ) {
+ TQWidget * tqparent = ( TQWidget* ) widget->tqparent();
+ TQToolBar *toolbar = ( TQToolBar* ) tqparent->tqparent();
-#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
+#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS
if ( APPEARANCE_FLAT != appearance )
drawBevelGradient( cg.background(), true, 0, p, toolbar->rect(),
@@ -3180,27 +3159,27 @@ void KlearlookStyle::drawComplexControl(
if ( controls & SC_ToolButtonMenu ) {
if ( mflags & ( Style_Down | Style_On | Style_Raised ) )
- drawPrimitive( PE_ButtonDropDown, p, menuarea, cg, mflags, data );
- drawPrimitive( PE_ArrowDown, p, menuarea, cg, mflags, data );
+ tqdrawPrimitive( PE_ButtonDropDown, p, menuarea, cg, mflags, data );
+ tqdrawPrimitive( PE_ArrowDown, p, menuarea, cg, mflags, data );
}
if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) {
TQRect fr = toolbutton->rect();
fr.addCoords( 3, 3, -3, -3 );
- drawPrimitive( PE_FocusRect, p, fr, cg );
+ tqdrawPrimitive( PE_FocusRect, p, fr, cg );
}
break;
}
case CC_ComboBox: {
const TQComboBox *combobox = ( const TQComboBox * ) widget;
- TQRect frame( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
+ TQRect frame( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxFrame,data ),widget ) ),
- arrow( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
+ arrow( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxArrow,data),widget)),
- field( TQStyle::visualRect( querySubControlMetrics(CC_ComboBox,
+ field( TQStyle::tqvisualRect( querySubControlMetrics(CC_ComboBox,
widget,SC_ComboBoxEditField,data),widget));
const TQColor *use = buttonColors( cg );
@@ -3224,7 +3203,7 @@ void KlearlookStyle::drawComplexControl(
}
if ( controls & SC_ComboBoxArrow && arrow.isValid() ) {
- drawPrimitive( PE_ArrowDown, p, arrow, cg, flags & ~Style_MouseOver );
+ tqdrawPrimitive( PE_ArrowDown, p, arrow, cg, flags & ~Style_MouseOver );
p->setPen( use[ 4 ].light(70) );
arrow.addCoords( -1, -1, -1, 1 );
p->drawLine( arrow.left(), arrow.top(), arrow.left(), arrow.bottom() );
@@ -3232,10 +3211,10 @@ void KlearlookStyle::drawComplexControl(
if ( controls & SC_ComboBoxEditField && field.isValid() ) {
if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) {
- TQRect fr = TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget );
+ TQRect fr = TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), widget );
fr.addCoords( 0, 0, -2, 0 );
- drawPrimitive( PE_FocusRect,
+ tqdrawPrimitive( PE_FocusRect,
p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption( cg.highlight() ) );
}
}
@@ -3257,32 +3236,32 @@ void KlearlookStyle::drawComplexControl(
qDrawShadePanel(
p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ],
gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ),
- true, pixelMetric( PM_SpinBoxFrameWidth )
+ true, tqpixelMetric( PM_SpinBoxFrameWidth )
);
if ( ( controls & SC_SpinWidgetUp ) && up.isValid() ) {
- PrimitiveElement pe = PE_SpinWidgetUp;
+ TQ_PrimitiveElement pe = PE_SpinWidgetUp;
SFlags upflags = flags;
if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
if ( !spinwidget->isUpEnabled() )
upflags ^= Style_Enabled;
- drawPrimitive(
+ tqdrawPrimitive(
pe, p, up, cg,
upflags | ( ( active == SC_SpinWidgetUp ) ? Style_On | Style_Sunken : Style_Raised )
);
}
if ( ( controls & SC_SpinWidgetDown ) && down.isValid() ) {
- PrimitiveElement pe = PE_SpinWidgetDown;
+ TQ_PrimitiveElement pe = PE_SpinWidgetDown;
SFlags downflags = flags;
if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
if ( !spinwidget->isDownEnabled() )
downflags ^= Style_Enabled;
- drawPrimitive(
+ tqdrawPrimitive(
pe, p, down, cg,
downflags | ( ( active == SC_SpinWidgetDown ) ? Style_On | Style_Sunken : Style_Raised )
);
@@ -3304,7 +3283,7 @@ void KlearlookStyle::drawComplexControl(
last( querySubControlMetrics( control, widget, SC_ScrollBarLast, data ) );
if ( ( controls & SC_ScrollBarSubLine ) && subline.isValid() )
- drawPrimitive(
+ tqdrawPrimitive(
PE_ScrollBarSubLine, p, subline, cg,
( hw && HOVER_SB_SUB == hover ? Style_MouseOver : Style_Default ) |
Style_Enabled |
@@ -3312,7 +3291,7 @@ void KlearlookStyle::drawComplexControl(
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default )
);
if ( ( controls & SC_ScrollBarAddLine ) && addline.isValid() )
- drawPrimitive(
+ tqdrawPrimitive(
PE_ScrollBarAddLine, p, addline, cg,
( hw && HOVER_SB_ADD == hover ? Style_MouseOver : Style_Default ) |
Style_Enabled |
@@ -3320,27 +3299,27 @@ void KlearlookStyle::drawComplexControl(
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default )
);
if ( ( controls & SC_ScrollBarSubPage ) && subpage.isValid() )
- drawPrimitive( PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive( PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled |
( ( active == SC_ScrollBarSubPage ) ? Style_Down : Style_Default ) |
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
if ( ( controls & SC_ScrollBarAddPage ) && addpage.isValid() )
- drawPrimitive( PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive( PE_ScrollBarAddPage, p, addpage, cg,
( ( scrollbar->minValue() == scrollbar->maxValue() ) ? Style_Default : Style_Enabled ) |
( ( active == SC_ScrollBarAddPage ) ? Style_Down : Style_Default ) |
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
if ( ( controls & SC_ScrollBarFirst ) && first.isValid() )
- drawPrimitive( PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive( PE_ScrollBarFirst, p, first, cg,
Style_Enabled |
( ( active == SC_ScrollBarFirst ) ? Style_Down : Style_Default ) |
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
if ( ( controls & SC_ScrollBarLast ) && last.isValid() )
- drawPrimitive( PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive( PE_ScrollBarLast, p, last, cg,
Style_Enabled |
( ( active == SC_ScrollBarLast ) ? Style_Down : Style_Default ) |
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
if ( ( controls & SC_ScrollBarSlider ) && slider.isValid() ) {
- drawPrimitive( PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive( PE_ScrollBarSlider, p, slider, cg,
( hw && HOVER_SB_SLIDER == hover ? Style_MouseOver : Style_Default ) |
Style_Enabled |
( ( active == SC_ScrollBarSlider ) ? Style_Down : Style_Default ) |
@@ -3348,7 +3327,7 @@ void KlearlookStyle::drawComplexControl(
// ### perhaps this should not be able to accept focus if maxedOut?
if ( scrollbar->hasFocus() )
- drawPrimitive( PE_FocusRect, p,
+ tqdrawPrimitive( PE_FocusRect, p,
TQRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ),
cg, Style_Default );
}
@@ -3363,30 +3342,30 @@ void KlearlookStyle::drawComplexControl(
if ( ( controls & SC_SliderHandle ) && handle.isValid() )
drawSliderHandle( p, handle, cg, flags );
if ( controls & SC_SliderTickmarks )
- TQCommonStyle::drawComplexControl(
+ TQCommonStyle::tqdrawComplexControl(
control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data
);
break;
}
default:
- KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, data );
+ KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, data );
}
}
-TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc,
+TQRect KlearlookStyle::querySubControlMetrics( TQ_ComplexControl control, const TQWidget *widget, SubControl sc,
const TQStyleOption &data ) const {
switch ( control ) {
case CC_SpinWidget: {
if ( !widget )
return TQRect();
- int fw = pixelMetric( PM_SpinBoxFrameWidth, 0 );
+ int fw = tqpixelMetric( PM_SpinBoxFrameWidth, 0 );
TQSize bs;
bs.setHeight( widget->height() >> 1 );
if ( bs.height() < 8 )
bs.setHeight( 8 );
- bs.setWidth( QMIN( bs.height() * 8 / 6, widget->width() / 4 ) );
+ bs.setWidth( TQMIN( bs.height() * 8 / 6, widget->width() / 4 ) );
bs = bs.expandedTo( TQApplication::globalStrut() );
if ( !( bs.width() % 2 ) )
@@ -3416,7 +3395,7 @@ TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQW
}
}
-int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) const {
+int KlearlookStyle::tqpixelMetric( PixelMetric metric, const TQWidget *widget ) const {
switch ( metric ) {
case PM_MenuButtonIndicator:
return 7;
@@ -3425,23 +3404,21 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co
}
case PM_ButtonMargin:
return 5;
-#if QT_VERSION >= 0x030200
case PM_TabBarTabShiftVertical: {
- const TQTabBar *tb = tqqt_cast<const TQTabBar *>( widget );
+ const TQTabBar *tb = ::tqqt_cast<const TQTabBar *>( widget );
- return TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape()
+ return TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape()
? 1
: -1;
}
case PM_TabBarTabShiftHorizontal:
return 0;
-#endif
case PM_TabBarTabVSpace: {
const TQTabBar * tb = ( const TQTabBar * ) widget;
- if ( tb->shape() == TQTabBar::RoundedAbove ||
- tb->shape() == TQTabBar::RoundedBelow )
+ if ( tb->tqshape() == TQTabBar::RoundedAbove ||
+ tb->tqshape() == TQTabBar::RoundedBelow )
return 12;
else
return 4;
@@ -3454,21 +3431,21 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co
case PM_ButtonDefaultIndicator:
return IND_BORDER == defBtnIndicator ? 1 : 0;
case PM_DefaultFrameWidth:
- return borderFrame && widget && ( tqqt_cast<const TQTabBar *>( widget ) ||
- tqqt_cast<const TQWidgetStack *>( widget ) ||
- tqqt_cast<const TQPopupMenu *>( widget ) )
+ return borderFrame && widget && ( ::tqqt_cast<const TQTabBar *>( widget ) ||
+ ::tqqt_cast<const TQWidgetStack *>( widget ) ||
+ ::tqqt_cast<const TQPopupMenu *>( widget ) )
? 2
- : QTC_DEF_FRAME_WIDTH;
+ : TQTC_DEF_FRAME_WIDTH;
case PM_SpinBoxFrameWidth:
return 1;
case PM_MenuBarFrameWidth:
return 1;
case PM_IndicatorWidth:
case PM_IndicatorHeight:
- return QTC_CHECK_SIZE;
+ return TQTC_CHECK_SIZE;
case PM_ExclusiveIndicatorWidth:
case PM_ExclusiveIndicatorHeight:
- return QTC_RADIO_SIZE;
+ return TQTC_RADIO_SIZE;
case PM_TabBarTabOverlap:
return 1;
case PM_ProgressBarChunkWidth:
@@ -3490,7 +3467,7 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co
case PM_MaximumDragDistance:
return -1;
default:
- return KStyle::pixelMetric( metric, widget );
+ return KStyle::tqpixelMetric( metric, widget );
}
}
@@ -3503,7 +3480,7 @@ int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget
}
}
-TQSize KlearlookStyle::sizeFromContents( ContentsType t,
+TQSize KlearlookStyle::tqsizeFromContents( ContentsType t,
const TQWidget *widget,
const TQSize &s,
const TQStyleOption &opt ) const {
@@ -3519,8 +3496,8 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t,
bool checkable = popup->isCheckable();
if ( mi->custom() ) {
- w = mi->custom() ->sizeHint().width();
- h = mi->custom() ->sizeHint().height();
+ w = mi->custom() ->tqsizeHint().width();
+ h = mi->custom() ->tqsizeHint().height();
if ( !mi->custom() ->fullSpan() )
h += 4;
} else if ( mi->widget() ) {
@@ -3530,22 +3507,22 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t,
h = 8;
} else {
if ( mi->pixmap() ) {
- h = QMAX( h, mi->pixmap() ->height() + 2 );
+ h = TQMAX( h, mi->pixmap() ->height() + 2 );
} else {
- h = QMAX( h, 21 );
+ h = TQMAX( h, 21 );
TQSettings s;
if ( menuIcons )
- h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI );
+ h = TQMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI );
else
- h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_LO );
+ h = TQMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_LO );
}
if ( mi->iconSet() ) {
- h = QMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 );
+ h = TQMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 );
}
}
- if ( !mi->text().isNull() && ( mi->text().find( '\t' ) >= 0 ) ) {
+ if ( !mi->text().isNull() && ( mi->text().tqfind( '\t' ) >= 0 ) ) {
w += itemHMargin + itemFrame * 2 + 7;
} else if ( mi->popup() ) {
w += 2 * arrowHMargin;
@@ -3569,8 +3546,8 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t,
case CT_PushButton: {
const TQPushButton* btn = static_cast<const TQPushButton*>( widget );
- int w = s.width() + 2 * pixelMetric( PM_ButtonMargin, widget );
- int h = s.height() + 2 * pixelMetric( PM_ButtonMargin, widget );
+ int w = s.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
+ int h = s.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
if ( btn->text().isEmpty() && s.width() < 32 )
return TQSize( w, h );
// return button size
@@ -3578,23 +3555,23 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t,
}
case CT_ToolButton: {
- if ( widget->parent() && tqqt_cast<TQToolBar*>( widget->parent() ) )
+ if ( widget->tqparent() && ::tqqt_cast<TQToolBar*>( widget->tqparent() ) )
return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 );
else {
- return KStyle::sizeFromContents ( t, widget, s, opt );
+ return KStyle::tqsizeFromContents ( t, widget, s, opt );
}
}
default:
- return KStyle::sizeFromContents ( t, widget, s, opt );
+ return KStyle::tqsizeFromContents ( t, widget, s, opt );
}
- return KStyle::sizeFromContents ( t, widget, s, opt );
+ return KStyle::tqsizeFromContents ( t, widget, s, opt );
}
-int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, QStyleHintReturn *returnData ) const {
+int KlearlookStyle::tqstyleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData ) const {
switch ( stylehint ) {
case SH_EtchDisabledText:
case SH_Slider_SnapToValue:
@@ -3616,7 +3593,7 @@ int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, cons
case SH_PopupMenu_AllowActiveAndDisabled:
return 0;
default:
- return KStyle::styleHint( stylehint, widget, option, returnData );
+ return KStyle::tqstyleHint( stylehint, widget, option, returnData );
}
}
@@ -3852,7 +3829,7 @@ void KlearlookStyle::drawSliderGroove
TQRect fr( groove );
fr.addCoords( -1, -1, 1, 1 );
- drawPrimitive( PE_FocusRect, p, fr, TQColorGroup() );
+ tqdrawPrimitive( PE_FocusRect, p, fr, TQColorGroup() );
}
if ( Qt::Horizontal == slider->orientation() ) {
@@ -3873,12 +3850,12 @@ void KlearlookStyle::drawSliderGroove
}
void KlearlookStyle::shadeColors( const TQColor &base, TQColor *vals ) const {
- QTC_SHADES
+ TQTC_SHADES
int i;
for ( i = 0; i < NUM_SHADES; ++i )
- shade( base, &vals[ i ], QTC_SHADE( appearance, contrast, i ) );
+ shade( base, &vals[ i ], TQTC_SHADE( appearance, contrast, i ) );
vals[ NUM_SHADES ] = base;
}
@@ -3908,10 +3885,8 @@ bool KlearlookStyle::redrawHoverWidget() {
TQPoint cursor( TQCursor::pos() ),
widgetZero( hoverWidget->mapToGlobal( TQPoint( 0, 0 ) ) );
-#if QT_VERSION >= 0x030200
-
//
- // Qt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else
+ // TQt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else
// is not sensitive. But,
// the widget can ocupy a larger area - and this whole are will react to mouse over.
// This needs to be coounteracted
@@ -3920,25 +3895,24 @@ bool KlearlookStyle::redrawHoverWidget() {
if ( rb ) {
TQRect rect( widgetZero.x(), widgetZero.y(),
- visualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() +
- pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() );
+ tqvisualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() +
+ tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() );
- hover = rect.contains( cursor ) ? HOVER_RADIO : HOVER_NONE;
- return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
- ( HOVER_NONE == hover && rect.contains( oldCursor ) );
+ hover = rect.tqcontains( cursor ) ? HOVER_RADIO : HOVER_NONE;
+ return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) ||
+ ( HOVER_NONE == hover && rect.tqcontains( oldCursor ) );
} else {
TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget );
if ( cb ) {
TQRect rect( widgetZero.x(), widgetZero.y(),
- visualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() +
- pixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() );
+ tqvisualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() +
+ tqpixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() );
- hover = rect.contains( cursor ) ? HOVER_CHECK : HOVER_NONE;
- return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
- ( HOVER_NONE == hover && rect.contains( oldCursor ) );
+ hover = rect.tqcontains( cursor ) ? HOVER_CHECK : HOVER_NONE;
+ return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) ||
+ ( HOVER_NONE == hover && rect.tqcontains( oldCursor ) );
} else {
-#endif
TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget );
if ( sb ) // So, are we over add button, sub button, slider, or none?
@@ -3954,21 +3928,21 @@ bool KlearlookStyle::redrawHoverWidget() {
slider.moveLeft( slider.x() + widgetZero.x() );
slider.moveTop( slider.y() + widgetZero.y() );
- if ( slider.contains( cursor ) )
+ if ( slider.tqcontains( cursor ) )
hover = HOVER_SB_SLIDER;
- else if ( subline.contains( cursor ) )
+ else if ( subline.tqcontains( cursor ) )
hover = HOVER_SB_SUB;
- else if ( addline.contains( cursor ) )
+ else if ( addline.tqcontains( cursor ) )
hover = HOVER_SB_ADD;
else
hover = HOVER_NONE;
- return ( HOVER_SB_SLIDER == hover && !slider.contains( oldCursor ) ) ||
- ( HOVER_SB_SLIDER != hover && slider.contains( oldCursor ) ) ||
- ( HOVER_SB_SUB == hover && !subline.contains( oldCursor ) ) ||
- ( HOVER_SB_SUB != hover && subline.contains( oldCursor ) ) ||
- ( HOVER_SB_ADD == hover && !addline.contains( oldCursor ) ) ||
- ( HOVER_SB_ADD != hover && addline.contains( oldCursor ) );
+ return ( HOVER_SB_SLIDER == hover && !slider.tqcontains( oldCursor ) ) ||
+ ( HOVER_SB_SLIDER != hover && slider.tqcontains( oldCursor ) ) ||
+ ( HOVER_SB_SUB == hover && !subline.tqcontains( oldCursor ) ) ||
+ ( HOVER_SB_SUB != hover && subline.tqcontains( oldCursor ) ) ||
+ ( HOVER_SB_ADD == hover && !addline.tqcontains( oldCursor ) ) ||
+ ( HOVER_SB_ADD != hover && addline.tqcontains( oldCursor ) );
} else {
#if KDE_VERSION >= 0x30400
TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
@@ -3994,22 +3968,22 @@ bool KlearlookStyle::redrawHoverWidget() {
int s = 0;
bool redraw = false;
- hover = rect.contains( cursor ) ? HOVER_HEADER : HOVER_NONE;
- hoverSect = QTC_NO_SECT;
+ hover = rect.tqcontains( cursor ) ? HOVER_HEADER : HOVER_NONE;
+ hoverSect = TQTC_NO_SECT;
- for ( s = 0; s < hd->count() && ( QTC_NO_SECT == hoverSect || !redraw ); ++s ) {
+ for ( s = 0; s < hd->count() && ( TQTC_NO_SECT == hoverSect || !redraw ); ++s ) {
TQRect r( hd->sectionRect( s ) );
r.moveLeft( r.x() + widgetZero.x() );
r.moveTop( r.y() + widgetZero.y() );
- bool hasNew = r.contains( cursor );
+ bool hasNew = r.tqcontains( cursor );
if ( hasNew )
hoverSect = s;
if ( !redraw ) {
- bool hasOld = r.contains( oldCursor );
+ bool hasOld = r.tqcontains( oldCursor );
if ( ( hasNew && !hasOld ) || ( !hasNew && hasOld ) )
redraw = true;
@@ -4024,11 +3998,8 @@ bool KlearlookStyle::redrawHoverWidget() {
#endif
}
-#if QT_VERSION >= 0x030200
-
}
}
-#endif
return false;
}
diff --git a/src/gui/kdeext/klearlook.h b/src/gui/kdeext/klearlook.h
index 26775c5..fc666f3 100644
--- a/src/gui/kdeext/klearlook.h
+++ b/src/gui/kdeext/klearlook.h
@@ -7,7 +7,7 @@
----
- Based upon QtCurve (C) Craig Drummond, 2003 [email protected]
+ Based upon TQtCurve (C) Craig Drummond, 2003 [email protected]
Bernhard Rosenkränzer <bero@r?dh?t.com>
Preston Brown <pbrown@r?dh?t.com>
Than Ngo <than@r?dh?t.com>
@@ -43,10 +43,10 @@
#include <tqcolor.h>
#include <tqpoint.h>
-#define QTC_CHECK_SIZE 13
-#define QTC_RADIO_SIZE 13
-#define QTC_MIN_BTN_SIZE 10
-#define QTC_LV_SIZE(X) LV_EXP_ARR==(X) ? 7 : 5
+#define TQTC_CHECK_SIZE 13
+#define TQTC_RADIO_SIZE 13
+#define TQTC_MIN_BTN_SIZE 10
+#define TQTC_LV_SIZE(X) LV_EXP_ARR==(X) ? 7 : 5
#define NUM_SHADES 7
@@ -57,7 +57,7 @@
#define SHADE_GRADIENT_DARK 1.05
/* 3d effect - i.e. buttons, etc */
-#define QTC_SHADES \
+#define TQTC_SHADES \
double shades[2][11][NUM_SHADES]=\
{ \
{ \
@@ -88,7 +88,7 @@
} \
};
-#define QTC_SHADE(a, c, s) \
+#define TQTC_SHADE(a, c, s) \
(c>10 || c<0 || s>=NUM_SHADES || s<0 ? 1.0 : shades[APPEARANCE_LIGHT_GRADIENT!=(a) ? 0 : 1][c][s])
/* Shades used when gradient effect is selected */
@@ -186,6 +186,7 @@ extern "C" {
class KlearlookStyle : public KStyle {
Q_OBJECT
+ TQ_OBJECT
public:
@@ -251,32 +252,32 @@ class KlearlookStyle : public KStyle {
const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const;
void drawLightBevelButton( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, bool useGrad, ERound round,
const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const;
- void drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, TQStyle::PrimitiveElement pe,
+ void drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, TQStyle::TQ_PrimitiveElement pe,
bool small = false, bool checkActive = false ) const;
- void drawPrimitive( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default,
+ void tqdrawPrimitive( TQ_PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawPrimitiveMenu( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default,
+ void tqdrawPrimitiveMenu( TQ_PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const;
- void drawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
+ void tqdrawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
+ void tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const;
TQRect subRect( SubRect, const TQWidget * ) const;
- void drawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
+ void tqdrawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const;
- TQRect querySubControlMetrics( ComplexControl, const TQWidget *, SubControl,
+ TQRect querySubControlMetrics( TQ_ComplexControl, const TQWidget *, SubControl,
const TQStyleOption & = TQStyleOption::Default ) const;
- int pixelMetric( PixelMetric, const TQWidget *widget = 0 ) const;
+ int tqpixelMetric( PixelMetric, const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const;
- TQSize sizeFromContents( ContentsType, const TQWidget *, const TQSize &,
+ TQSize tqsizeFromContents( ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default,
- QStyleHintReturn *returnData = 0 ) const;
+ int tqstyleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default,
+ TQStyleHintReturn *returnData = 0 ) const;
protected: