summaryrefslogtreecommitdiffstats
path: root/src/gui/kdeext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kdeext')
-rw-r--r--src/gui/kdeext/KLedButton.cpp12
-rw-r--r--src/gui/kdeext/KLedButton.h14
-rw-r--r--src/gui/kdeext/KStartupLogo.cpp46
-rw-r--r--src/gui/kdeext/KStartupLogo.h16
-rw-r--r--src/gui/kdeext/KTmpStatusMsg.cpp14
-rw-r--r--src/gui/kdeext/KTmpStatusMsg.h8
-rw-r--r--src/gui/kdeext/QCanvasGroupableItem.cpp88
-rw-r--r--src/gui/kdeext/QCanvasGroupableItem.h74
-rw-r--r--src/gui/kdeext/QCanvasSimpleSprite.cpp102
-rw-r--r--src/gui/kdeext/QCanvasSimpleSprite.h50
-rw-r--r--src/gui/kdeext/RGLed.cpp104
-rw-r--r--src/gui/kdeext/klearlook.cpp930
-rw-r--r--src/gui/kdeext/klearlook.h100
13 files changed, 779 insertions, 779 deletions
diff --git a/src/gui/kdeext/KLedButton.cpp b/src/gui/kdeext/KLedButton.cpp
index f4e2a95..1f1a3fc 100644
--- a/src/gui/kdeext/KLedButton.cpp
+++ b/src/gui/kdeext/KLedButton.cpp
@@ -29,26 +29,26 @@
#include "KLedButton.h"
#include <kled.h>
-#include <qcolor.h>
-#include <qwidget.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
namespace Rosegarden
{
-KLedButton::KLedButton(const QColor &col, QWidget *parent, const char *name)
+KLedButton::KLedButton(const TQColor &col, TQWidget *parent, const char *name)
: KLed( col, parent, name )
{}
-KLedButton::KLedButton(const QColor& col, KLed::State st, KLed::Look look,
- KLed::Shape shape, QWidget *parent, const char *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 )
{}
KLedButton::~KLedButton()
{}
-void KLedButton::mousePressEvent( QMouseEvent *e )
+void KLedButton::mousePressEvent( TQMouseEvent *e )
{
if (e->button() == LeftButton) {
toggle();
diff --git a/src/gui/kdeext/KLedButton.h b/src/gui/kdeext/KLedButton.h
index e17ecdb..c7810af 100644
--- a/src/gui/kdeext/KLedButton.h
+++ b/src/gui/kdeext/KLedButton.h
@@ -32,9 +32,9 @@
#include <kled.h>
-class QWidget;
-class QMouseEvent;
-class QColor;
+class TQWidget;
+class TQMouseEvent;
+class TQColor;
namespace Rosegarden
@@ -50,16 +50,16 @@ namespace Rosegarden
class KLedButton : public KLed {
Q_OBJECT
public:
- KLedButton(const QColor &col=Qt::green, QWidget *parent=0, const char *name=0);
- KLedButton(const QColor& col, KLed::State st, KLed::Look look, KLed::Shape shape,
- QWidget *parent=0, const char *name=0);
+ 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();
signals:
void stateChanged( bool newState );
protected:
- void mousePressEvent ( QMouseEvent *e );
+ void mousePressEvent ( TQMouseEvent *e );
};
diff --git a/src/gui/kdeext/KStartupLogo.cpp b/src/gui/kdeext/KStartupLogo.cpp
index 9a04d8f..821ebb1 100644
--- a/src/gui/kdeext/KStartupLogo.cpp
+++ b/src/gui/kdeext/KStartupLogo.cpp
@@ -25,8 +25,8 @@
#include <unistd.h>
#include <kapplication.h>
-#include <qpainter.h>
-#include <qfontmetrics.h>
+#include <tqpainter.h>
+#include <tqfontmetrics.h>
#include <kapp.h>
#include <kstddirs.h>
@@ -36,8 +36,8 @@
#include "KStartupLogo.h"
#include "misc/Debug.h"
-KStartupLogo::KStartupLogo(QWidget * parent, const char *name)
- : QWidget(parent, name,
+KStartupLogo::KStartupLogo(TQWidget * parent, const char *name)
+ : TQWidget(parent, name,
WStyle_Customize |
#if QT_VERSION >= 0x030100
WStyle_Splash
@@ -48,13 +48,13 @@ KStartupLogo::KStartupLogo(QWidget * parent, const char *name)
m_readyToHide(false),
m_showTip(true)
{
- QString pixmapFile = locate("appdata", "pixmaps/splash.png");
+ TQString pixmapFile = locate("appdata", "pixmaps/splash.png");
if (!pixmapFile)
return ;
m_pixmap.load(pixmapFile);
setBackgroundPixmap(m_pixmap);
- setGeometry(QApplication::desktop()->width() / 2 - m_pixmap.width() / 2,
- QApplication::desktop()->height() / 2 - m_pixmap.height() / 2,
+ setGeometry(TQApplication::desktop()->width() / 2 - m_pixmap.width() / 2,
+ TQApplication::desktop()->height() / 2 - m_pixmap.height() / 2,
m_pixmap.width(), m_pixmap.height());
}
@@ -64,16 +64,16 @@ KStartupLogo::~KStartupLogo()
m_instance = 0;
}
-void KStartupLogo::paintEvent(QPaintEvent*)
+void KStartupLogo::paintEvent(TQPaintEvent*)
{
// Print version number
- QPainter paint(this);
+ TQPainter paint(this);
- QFont defaultFont;
+ TQFont defaultFont;
defaultFont.setPixelSize(12);
paint.setFont(defaultFont);
- QFontMetrics metrics(defaultFont);
+ TQFontMetrics metrics(defaultFont);
int width = metrics.width(m_statusMessage) + 6;
if (width > 200)
width = 200;
@@ -81,11 +81,11 @@ void KStartupLogo::paintEvent(QPaintEvent*)
int y = m_pixmap.height() - 12;
// grep me: splash color
- // QColor bg(49, 94, 19); // color for 2006 splash
- QColor bg(19, 19, 19); // color for the 2008 splash
+ // TQColor bg(49, 94, 19); // color for 2006 splash
+ TQColor bg(19, 19, 19); // color for the 2008 splash
paint.setPen(bg);
paint.setBrush(bg);
- paint.drawRect(QRect(m_pixmap.width() - 220, m_pixmap.height() - 43,
+ paint.drawRect(TQRect(m_pixmap.width() - 220, m_pixmap.height() - 43,
220, (y + 8) - (m_pixmap.height() - 43)));
// paint.setPen(Qt::black);
@@ -93,10 +93,10 @@ void KStartupLogo::paintEvent(QPaintEvent*)
paint.setPen(Qt::white);
paint.setBrush(Qt::white);
- //QString version(VERSION);
+ //TQString version(VERSION);
//int sepIdx = version.find("-");
- QString versionLabel(VERSION);
- //QString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1));
+ TQString versionLabel(VERSION);
+ //TQString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1));
int versionWidth = metrics.width(versionLabel);
paint.drawText(m_pixmap.width() - versionWidth - 18,
@@ -106,11 +106,11 @@ void KStartupLogo::paintEvent(QPaintEvent*)
paint.drawText(m_pixmap.width() - (width + 10), y, m_statusMessage);
}
-void KStartupLogo::slotShowStatusMessage(QString message)
+void KStartupLogo::slotShowStatusMessage(TQString message)
{
m_statusMessage = message;
paintEvent(0);
- QApplication::flushX();
+ TQApplication::flushX();
}
void KStartupLogo::close()
@@ -123,15 +123,15 @@ void KStartupLogo::close()
}
}
- QWidget::close();
+ TQWidget::close();
}
-void KStartupLogo::mousePressEvent(QMouseEvent*)
+void KStartupLogo::mousePressEvent(TQMouseEvent*)
{
// for the haters of raising startlogos
if (m_readyToHide)
- hide(); // don't close, main() sets up a QTimer for that
+ hide(); // don't close, main() sets up a TQTimer for that
}
KStartupLogo* KStartupLogo::getInstance()
@@ -149,7 +149,7 @@ void KStartupLogo::hideIfStillThere()
{
if (m_instance)
m_instance->hide();
- // don't close, main() sets up a QTimer for that
+ // don't close, main() sets up a TQTimer for that
}
diff --git a/src/gui/kdeext/KStartupLogo.h b/src/gui/kdeext/KStartupLogo.h
index 1af80fa..a588fe4 100644
--- a/src/gui/kdeext/KStartupLogo.h
+++ b/src/gui/kdeext/KStartupLogo.h
@@ -25,8 +25,8 @@
#ifndef KSTARTUPLOGO_H
#define KSTARTUPLOGO_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
class KStartupLogo : public QWidget
{
@@ -41,25 +41,25 @@ public:
void setShowTip(bool showTip) { m_showTip = showTip; };
public slots:
- void slotShowStatusMessage(QString);
+ void slotShowStatusMessage(TQString);
virtual void close();
protected:
- KStartupLogo(QWidget *parent=0, const char *name=0);
+ KStartupLogo(TQWidget *parent=0, const char *name=0);
~KStartupLogo();
- virtual void paintEvent(QPaintEvent*);
- virtual void mousePressEvent( QMouseEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void mousePressEvent( TQMouseEvent*);
bool m_readyToHide;
bool m_showTip;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
static KStartupLogo* m_instance;
static bool m_wasClosed;
- QString m_statusMessage;
+ TQString m_statusMessage;
};
#endif
diff --git a/src/gui/kdeext/KTmpStatusMsg.cpp b/src/gui/kdeext/KTmpStatusMsg.cpp
index 81142d2..620d7c5 100644
--- a/src/gui/kdeext/KTmpStatusMsg.cpp
+++ b/src/gui/kdeext/KTmpStatusMsg.cpp
@@ -19,8 +19,8 @@
COPYING included with this distribution for more information.
*/
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kmainwindow.h>
#include <kstatusbar.h>
@@ -29,11 +29,11 @@
#include "KTmpStatusMsg.h"
#include "gui/application/RosegardenApplication.h"
-KTmpStatusMsg::KTmpStatusMsg(const QString& msg, KMainWindow* window, int id)
+KTmpStatusMsg::KTmpStatusMsg(const TQString& msg, KMainWindow* window, int id)
: m_mainWindow(window),
m_id(id)
{
- m_mainWindow->statusBar()->changeItem(QString(" %1").arg(msg), m_id);
+ m_mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), m_id);
Rosegarden::rgapp->refreshGUI(50);
}
@@ -45,12 +45,12 @@ KTmpStatusMsg::~KTmpStatusMsg()
}
-void KTmpStatusMsg::setDefaultMsg(const QString& m)
+void KTmpStatusMsg::setDefaultMsg(const TQString& m)
{
m_defaultMsg = m;
}
-const QString& KTmpStatusMsg::getDefaultMsg()
+const TQString& KTmpStatusMsg::getDefaultMsg()
{
return m_defaultMsg;
}
@@ -67,4 +67,4 @@ int KTmpStatusMsg::getDefaultId()
int KTmpStatusMsg::m_defaultId = 1;
-QString KTmpStatusMsg::m_defaultMsg = "";
+TQString KTmpStatusMsg::m_defaultMsg = "";
diff --git a/src/gui/kdeext/KTmpStatusMsg.h b/src/gui/kdeext/KTmpStatusMsg.h
index 6fd512c..35e1adb 100644
--- a/src/gui/kdeext/KTmpStatusMsg.h
+++ b/src/gui/kdeext/KTmpStatusMsg.h
@@ -45,7 +45,7 @@ public:
* of the specified KMainWindow.
* The id of the text widget in the status bar can be specified
*/
- KTmpStatusMsg(const QString& msg, KMainWindow*, int id = m_defaultId);
+ KTmpStatusMsg(const TQString& msg, KMainWindow*, int id = m_defaultId);
~KTmpStatusMsg();
@@ -53,13 +53,13 @@ public:
* Sets the message which will replace the temporary one in the
* status bar
*/
- static void setDefaultMsg(const QString&);
+ static void setDefaultMsg(const TQString&);
/**
* Returns the default message which will replace the temporary
* one in the status bar
*/
- static const QString& getDefaultMsg();
+ static const TQString& getDefaultMsg();
/**
* Sets the default id which will be used as the id of the text
@@ -81,7 +81,7 @@ protected:
int m_id;
static int m_defaultId;
- static QString m_defaultMsg;
+ static TQString m_defaultMsg;
};
#endif
diff --git a/src/gui/kdeext/QCanvasGroupableItem.cpp b/src/gui/kdeext/QCanvasGroupableItem.cpp
index 1fc2f2d..2a31934 100644
--- a/src/gui/kdeext/QCanvasGroupableItem.cpp
+++ b/src/gui/kdeext/QCanvasGroupableItem.cpp
@@ -19,12 +19,12 @@
COPYING included with this distribution for more information.
*/
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include "misc/Debug.h"
#include "QCanvasGroupableItem.h"
-QCanvasGroupableItem::QCanvasGroupableItem(QCanvasItem *i,
+QCanvasGroupableItem::QCanvasGroupableItem(TQCanvasItem *i,
QCanvasItemGroup *g,
bool withRelativeCoords)
: m_group(g),
@@ -66,8 +66,8 @@ QCanvasGroupableItem::detach()
//////////////////////////////////////////////////////////////////////
-QCanvasItemGroup::QCanvasItemGroup(QCanvas *c)
- : QCanvasItem(c)
+QCanvasItemGroup::QCanvasItemGroup(TQCanvas *c)
+ : TQCanvasItem(c)
{
// RG_DEBUG << "QCanvasItemGroup() - this : " << this << endl;
}
@@ -77,7 +77,7 @@ QCanvasItemGroup::~QCanvasItemGroup()
// RG_DEBUG << "~QCanvasItemGroup() - this : " << this << endl;
// Tell all our items that we're being destroyed
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i) {
QCanvasGroupableItem *t = dynamic_cast<QCanvasGroupableItem*>(*i);
if (t)
@@ -88,9 +88,9 @@ QCanvasItemGroup::~QCanvasItemGroup()
void
QCanvasItemGroup::moveBy(double dx, double dy)
{
- QCanvasItem::moveBy(dx, dy); // move ourselves
+ TQCanvasItem::moveBy(dx, dy); // move ourselves
- QCanvasItemList::Iterator i; // move group items
+ TQCanvasItemList::Iterator i; // move group items
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->moveBy(dx, dy);
}
@@ -98,15 +98,15 @@ QCanvasItemGroup::moveBy(double dx, double dy)
void
QCanvasItemGroup::advance(int stage)
{
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->advance(stage);
}
bool
-QCanvasItemGroup::collidesWith(const QCanvasItem *item) const
+QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const
{
- QCanvasItemList::ConstIterator i;
+ TQCanvasItemList::ConstIterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
if ((*i)->collidesWith(item))
return true;
@@ -115,13 +115,13 @@ QCanvasItemGroup::collidesWith(const QCanvasItem *item) const
}
void
-QCanvasItemGroup::draw(QPainter&)
+QCanvasItemGroup::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
- // implemented because it's an abstract virtual in QCanvasItem.
+ // implemented because it's an abstract virtual in TQCanvasItem.
- // QCanvasItemList::Iterator i;
+ // TQCanvasItemList::Iterator i;
// for(i = m_items.begin(); i != m_items.end(); ++i)
// (*i)->draw(p);
}
@@ -129,7 +129,7 @@ QCanvasItemGroup::draw(QPainter&)
void
QCanvasItemGroup::setVisible(bool yes)
{
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->setVisible(yes);
}
@@ -137,9 +137,9 @@ QCanvasItemGroup::setVisible(bool yes)
void
QCanvasItemGroup::setSelected(bool yes)
{
- QCanvasItem::setSelected(yes);
+ TQCanvasItem::setSelected(yes);
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->setVisible(yes);
}
@@ -147,9 +147,9 @@ QCanvasItemGroup::setSelected(bool yes)
void
QCanvasItemGroup::setEnabled(bool yes)
{
- QCanvasItem::setEnabled(yes);
+ TQCanvasItem::setEnabled(yes);
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->setEnabled(yes);
}
@@ -157,9 +157,9 @@ QCanvasItemGroup::setEnabled(bool yes)
void
QCanvasItemGroup::setActive(bool yes)
{
- QCanvasItem::setActive(yes);
+ TQCanvasItem::setActive(yes);
- QCanvasItemList::Iterator i;
+ TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->setActive(yes);
}
@@ -173,9 +173,9 @@ QCanvasItemGroup::rtti() const
QRect
QCanvasItemGroup::boundingRect() const
{
- QRect r;
+ TQRect r;
- QCanvasItemList::ConstIterator i;
+ TQCanvasItemList::ConstIterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
r.unite((*i)->boundingRect());
@@ -185,9 +185,9 @@ QCanvasItemGroup::boundingRect() const
QRect
QCanvasItemGroup::boundingRectAdvanced() const
{
- QRect r;
+ TQRect r;
- QCanvasItemList::ConstIterator i;
+ TQCanvasItemList::ConstIterator i;
for (i = m_items.begin(); i != m_items.end(); ++i)
r.unite((*i)->boundingRectAdvanced());
@@ -195,11 +195,11 @@ QCanvasItemGroup::boundingRectAdvanced() const
}
bool
-QCanvasItemGroup::collidesWith(const QCanvasSprite *s,
- const QCanvasPolygonalItem *p,
- const QCanvasRectangle *r,
- const QCanvasEllipse *e,
- const QCanvasText *t) const
+QCanvasItemGroup::collidesWith(const TQCanvasSprite *s,
+ const TQCanvasPolygonalItem *p,
+ const TQCanvasRectangle *r,
+ const TQCanvasEllipse *e,
+ const TQCanvasText *t) const
{
if (s)
return collidesWith(s);
@@ -217,20 +217,20 @@ QCanvasItemGroup::collidesWith(const QCanvasSprite *s,
}
void
-QCanvasItemGroup::addItem(QCanvasItem *i)
+QCanvasItemGroup::addItem(TQCanvasItem *i)
{
m_items.append(i);
}
void
-QCanvasItemGroup::addItemWithRelativeCoords(QCanvasItem *i)
+QCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i)
{
i->moveBy(x(), y());
addItem(i);
}
void
-QCanvasItemGroup::removeItem(QCanvasItem *i)
+QCanvasItemGroup::removeItem(TQCanvasItem *i)
{
// RG_DEBUG << "QCanvasItemGroup::removeItem() - this : "
// << this << " - item : " << i << endl;
@@ -240,40 +240,40 @@ QCanvasItemGroup::removeItem(QCanvasItem *i)
//////////////////////////////////////////////////////////////////////
-QCanvasLineGroupable::QCanvasLineGroupable(QCanvas *c,
+QCanvasLineGroupable::QCanvasLineGroupable(TQCanvas *c,
QCanvasItemGroup *g)
- : QCanvasLine(c),
+ : TQCanvasLine(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasRectangleGroupable::QCanvasRectangleGroupable(QCanvas *c,
+QCanvasRectangleGroupable::QCanvasRectangleGroupable(TQCanvas *c,
QCanvasItemGroup *g)
- : QCanvasRectangle(c),
+ : TQCanvasRectangle(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasTextGroupable::QCanvasTextGroupable(const QString& label,
- QCanvas *c,
+QCanvasTextGroupable::QCanvasTextGroupable(const TQString& label,
+ TQCanvas *c,
QCanvasItemGroup *g)
- : QCanvasText(label, c),
+ : TQCanvasText(label, c),
QCanvasGroupableItem(this, g)
{}
-QCanvasTextGroupable::QCanvasTextGroupable(QCanvas *c,
+QCanvasTextGroupable::QCanvasTextGroupable(TQCanvas *c,
QCanvasItemGroup *g)
- : QCanvasText(c),
+ : TQCanvasText(c),
QCanvasGroupableItem(this, g)
{}
//////////////////////////////////////////////////////////////////////
-QCanvasSpriteGroupable::QCanvasSpriteGroupable(QCanvasPixmapArray *pa,
- QCanvas *c,
+QCanvasSpriteGroupable::QCanvasSpriteGroupable(TQCanvasPixmapArray *pa,
+ TQCanvas *c,
QCanvasItemGroup *g)
- : QCanvasSprite(pa, c),
+ : TQCanvasSprite(pa, c),
QCanvasGroupableItem(this, g)
{}
diff --git a/src/gui/kdeext/QCanvasGroupableItem.h b/src/gui/kdeext/QCanvasGroupableItem.h
index 97d1917..1e54604 100644
--- a/src/gui/kdeext/QCanvasGroupableItem.h
+++ b/src/gui/kdeext/QCanvasGroupableItem.h
@@ -22,12 +22,12 @@
#ifndef QCANVASGROUPABLEITEM_H
#define QCANVASGROUPABLEITEM_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
class QCanvasItemGroup;
/**
- * This class is meant to be inherited by QCanvasItem children to make
+ * This class is meant to be inherited by TQCanvasItem children to make
* them groupable.
*
* On destruction, the item will remove itself from the group it's
@@ -50,7 +50,7 @@ public:
*
* @see QCanvasItemGroup#addItemWithRelativeCoords()
*/
- QCanvasGroupableItem(QCanvasItem*, QCanvasItemGroup*,
+ QCanvasGroupableItem(TQCanvasItem*, QCanvasItemGroup*,
bool withRelativeCoords = false);
virtual ~QCanvasGroupableItem();
@@ -61,8 +61,8 @@ public:
/// Returns the QCanvasItemGroup this groupable item belongs to
const QCanvasItemGroup* group() const { return m_group; }
- /// Returns the QCanvasItem which this groupable item wraps
- QCanvasItem *item() { return m_item; }
+ /// Returns the TQCanvasItem which this groupable item wraps
+ TQCanvasItem *item() { return m_item; }
/**
* Same as moveBy(), except that the move is done relative to the
@@ -83,40 +83,40 @@ private:
//--------------- Data members ---------------------------------
QCanvasItemGroup* m_group;
- QCanvasItem* m_item;
+ TQCanvasItem* m_item;
};
/**
- * This class implements QCanvasItem groups
+ * This class implements TQCanvasItem groups
*
* An item group will keep its items in a fixed relative position when
* moved, just like in a drawing program where you can "bind" several
* items together so that they'll behave as a single item.
*
- * Proper behavior requires collaboration from the QCanvasView,
- * though. When about to move an item, the QCanvasView object should
+ * 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.
*/
class QCanvasItemGroup : public QCanvasItem
{
public:
- QCanvasItemGroup(QCanvas *);
+ QCanvasItemGroup(TQCanvas *);
virtual ~QCanvasItemGroup();
virtual void moveBy(double dx, double dy);
virtual void advance(int stage);
- virtual bool collidesWith(const QCanvasItem*) const;
- virtual void draw(QPainter&);
+ virtual bool collidesWith(const TQCanvasItem*) const;
+ virtual void draw(TQPainter&);
virtual void setVisible(bool yes);
virtual void setSelected(bool yes);
virtual void setEnabled(bool yes);
virtual void setActive(bool yes);
virtual int rtti() const;
- virtual QRect boundingRect() const;
- virtual QRect boundingRectAdvanced() const;
+ virtual TQRect boundingRect() const;
+ virtual TQRect boundingRectAdvanced() const;
/**
* Add a new item to this group.
@@ -125,7 +125,7 @@ public:
*
* @see addItemWithRelativeCoords()
*/
- virtual void addItem(QCanvasItem *);
+ virtual void addItem(TQCanvasItem *);
/**
* Add a new item to this group.
@@ -138,63 +138,63 @@ public:
*
* @see addItem()
*/
- virtual void addItemWithRelativeCoords(QCanvasItem *);
+ virtual void addItemWithRelativeCoords(TQCanvasItem *);
/**
* Remove the specified item from the group
*/
- virtual void removeItem(QCanvasItem*);
+ virtual void removeItem(TQCanvasItem*);
private:
- virtual bool collidesWith(const QCanvasSprite*,
- const QCanvasPolygonalItem*,
- const QCanvasRectangle*,
- const QCanvasEllipse*,
- const QCanvasText* ) const;
+ virtual bool collidesWith(const TQCanvasSprite*,
+ const TQCanvasPolygonalItem*,
+ const TQCanvasRectangle*,
+ const TQCanvasEllipse*,
+ const TQCanvasText* ) const;
protected:
//--------------- Data members ---------------------------------
- QCanvasItemList m_items;
+ TQCanvasItemList m_items;
};
/**
- * A QCanvasLine which can be put in a QCanvasGroup
+ * A TQCanvasLine which can be put in a QCanvasGroup
*/
-class QCanvasLineGroupable : public QCanvasLine, public QCanvasGroupableItem
+class QCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem
{
public:
- QCanvasLineGroupable(QCanvas *c, QCanvasItemGroup *g);
+ QCanvasLineGroupable(TQCanvas *c, QCanvasItemGroup *g);
};
/**
- * A QCanvasRectangle which can be put in a QCanvasGroup
+ * A TQCanvasRectangle which can be put in a QCanvasGroup
*/
-class QCanvasRectangleGroupable : public QCanvasRectangle, public QCanvasGroupableItem
+class QCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem
{
public:
- QCanvasRectangleGroupable(QCanvas *c, QCanvasItemGroup *g);
+ QCanvasRectangleGroupable(TQCanvas *c, QCanvasItemGroup *g);
};
/**
- * A QCanvasText which can be put in a QCanvasGroup
+ * A TQCanvasText which can be put in a QCanvasGroup
*/
-class QCanvasTextGroupable : public QCanvasText, public QCanvasGroupableItem
+class QCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem
{
public:
- QCanvasTextGroupable(QCanvas *c, QCanvasItemGroup *g);
- QCanvasTextGroupable(const QString&, QCanvas *c, QCanvasItemGroup *g);
+ QCanvasTextGroupable(TQCanvas *c, QCanvasItemGroup *g);
+ QCanvasTextGroupable(const TQString&, TQCanvas *c, QCanvasItemGroup *g);
};
/**
- * A QCanvasSprite that can be put in a QCanvasGroup
+ * A TQCanvasSprite that can be put in a QCanvasGroup
*/
-class QCanvasSpriteGroupable : public QCanvasSprite, public QCanvasGroupableItem
+class QCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem
{
public:
- QCanvasSpriteGroupable(QCanvasPixmapArray*,
- QCanvas*,
+ QCanvasSpriteGroupable(TQCanvasPixmapArray*,
+ TQCanvas*,
QCanvasItemGroup*);
};
diff --git a/src/gui/kdeext/QCanvasSimpleSprite.cpp b/src/gui/kdeext/QCanvasSimpleSprite.cpp
index 537cc62..2b03c87 100644
--- a/src/gui/kdeext/QCanvasSimpleSprite.cpp
+++ b/src/gui/kdeext/QCanvasSimpleSprite.cpp
@@ -22,42 +22,42 @@
#include <vector>
#include "misc/Debug.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include "QCanvasSimpleSprite.h"
namespace Rosegarden {
-QCanvasSimpleSprite::QCanvasSimpleSprite(QPixmap *pixmap, QCanvas *canvas)
- : QCanvasSprite(0, canvas),
+QCanvasSimpleSprite::QCanvasSimpleSprite(TQPixmap *pixmap, TQCanvas *canvas)
+ : TQCanvasSprite(0, canvas),
m_pixmapArray(0)
{
m_pixmapArray = makePixmapArray(pixmap);
setSequence(m_pixmapArray);
}
-QCanvasSimpleSprite::QCanvasSimpleSprite(QCanvasPixmap *pixmap, QCanvas *canvas)
- : QCanvasSprite(0, canvas),
+QCanvasSimpleSprite::QCanvasSimpleSprite(TQCanvasPixmap *pixmap, TQCanvas *canvas)
+ : TQCanvasSprite(0, canvas),
m_pixmapArray(0)
{
m_pixmapArray = makePixmapArray(pixmap);
setSequence(m_pixmapArray);
}
-QCanvasSimpleSprite::QCanvasSimpleSprite(const QString &pixmapfile,
- QCanvas *canvas)
- : QCanvasSprite(0, canvas),
+QCanvasSimpleSprite::QCanvasSimpleSprite(const TQString &pixmapfile,
+ TQCanvas *canvas)
+ : TQCanvasSprite(0, canvas),
m_pixmapArray(0)
{
m_pixmapArray = makePixmapArray(pixmapfile);
setSequence(m_pixmapArray);
}
-QCanvasSimpleSprite::QCanvasSimpleSprite(QCanvas *canvas)
- : QCanvasSprite(0, canvas),
+QCanvasSimpleSprite::QCanvasSimpleSprite(TQCanvas *canvas)
+ : TQCanvasSprite(0, canvas),
m_pixmapArray(0)
{
- QCanvasPixmapArray* tmpArray = makePixmapArray(new QPixmap());
+ TQCanvasPixmapArray* tmpArray = makePixmapArray(new TQPixmap());
setSequence(tmpArray);
}
@@ -69,66 +69,66 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
// We can't delete m_pixmapArray or we get a core dump.
//
- // The reason I think is that after the QCanvasSprite is deleted,
- // it is removed from the QCanvas, which therefore needs the
+ // The reason I think is that after the TQCanvasSprite is deleted,
+ // it is removed from the TQCanvas, which therefore needs the
// pixmaps to know how to update itself (the crash is in
- // QCanvas::removeChunks(), usually).
+ // TQCanvas::removeChunks(), usually).
//
// So instead we have to do this GCish
// thingy. PixmapArrayGC::deleteAll() is called by
// NotationView::redoLayout
}
-QCanvasPixmapArray*
-QCanvasSimpleSprite::makePixmapArray(QPixmap *pixmap)
+TQCanvasPixmapArray*
+QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
{
- QList<QPixmap> pixlist;
- pixlist.setAutoDelete(true); // the QCanvasPixmapArray creates its
+ QList<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<QPoint> spotlist;
+ QList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
- spotlist.append(new QPoint(0, 0));
+ spotlist.append(new TQPoint(0, 0));
- return new QCanvasPixmapArray(pixlist, spotlist);
+ return new TQCanvasPixmapArray(pixlist, spotlist);
}
-QCanvasPixmapArray*
-QCanvasSimpleSprite::makePixmapArray(QCanvasPixmap *pixmap)
+TQCanvasPixmapArray*
+QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap)
{
- QList<QPixmap> pixlist;
- pixlist.setAutoDelete(true); // the QCanvasPixmapArray creates its
+ QList<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<QPoint> spotlist;
+ QList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
- spotlist.append(new QPoint(pixmap->offsetX(), pixmap->offsetY()));
+ spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY()));
- return new QCanvasPixmapArray(pixlist, spotlist);
+ return new TQCanvasPixmapArray(pixlist, spotlist);
}
-QCanvasPixmapArray*
-QCanvasSimpleSprite::makePixmapArray(const QString &pixmapfile)
+TQCanvasPixmapArray*
+QCanvasSimpleSprite::makePixmapArray(const TQString &pixmapfile)
{
- return new QCanvasPixmapArray(pixmapfile);
+ return new TQCanvasPixmapArray(pixmapfile);
}
//////////////////////////////////////////////////////////////////////
QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n,
- QPixmap* pixmap,
- QCanvas* canvas)
+ TQPixmap* pixmap,
+ TQCanvas* canvas)
: QCanvasSimpleSprite(pixmap, canvas),
m_notationElement(n)
{}
QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n,
- QCanvasPixmap* pixmap,
- QCanvas* canvas)
+ TQCanvasPixmap* pixmap,
+ TQCanvas* canvas)
: QCanvasSimpleSprite(pixmap, canvas),
m_notationElement(n)
@@ -138,13 +138,13 @@ QCanvasNotationSprite::~QCanvasNotationSprite()
{}
-QCanvasNonElementSprite::QCanvasNonElementSprite(QPixmap *pixmap,
- QCanvas *canvas) :
+QCanvasNonElementSprite::QCanvasNonElementSprite(TQPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasSimpleSprite(pixmap, canvas)
{}
-QCanvasNonElementSprite::QCanvasNonElementSprite(QCanvasPixmap *pixmap,
- QCanvas *canvas) :
+QCanvasNonElementSprite::QCanvasNonElementSprite(TQCanvasPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasSimpleSprite(pixmap, canvas)
{}
@@ -152,15 +152,15 @@ QCanvasNonElementSprite::~QCanvasNonElementSprite()
{}
QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX,
- QPixmap *pixmap,
- QCanvas *canvas) :
+ TQPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasNonElementSprite(pixmap, canvas),
m_layoutX(layoutX)
{}
QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX,
- QCanvasPixmap *pixmap,
- QCanvas *canvas) :
+ TQCanvasPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasNonElementSprite(pixmap, canvas),
m_layoutX(layoutX)
{}
@@ -169,13 +169,13 @@ QCanvasTimeSigSprite::~QCanvasTimeSigSprite()
{}
-QCanvasStaffNameSprite::QCanvasStaffNameSprite(QPixmap *pixmap,
- QCanvas *canvas) :
+QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasNonElementSprite(pixmap, canvas)
{}
-QCanvasStaffNameSprite::QCanvasStaffNameSprite(QCanvasPixmap *pixmap,
- QCanvas *canvas) :
+QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQCanvasPixmap *pixmap,
+ TQCanvas *canvas) :
QCanvasNonElementSprite(pixmap, canvas)
{}
@@ -185,7 +185,7 @@ QCanvasStaffNameSprite::~QCanvasStaffNameSprite()
//////////////////////////////////////////////////////////////////////
-void PixmapArrayGC::registerForDeletion(QCanvasPixmapArray* array)
+void PixmapArrayGC::registerForDeletion(TQCanvasPixmapArray* array)
{
m_pixmapArrays.push_back(array);
}
@@ -198,8 +198,8 @@ void PixmapArrayGC::deleteAll()
static unsigned long total = 0;
for (unsigned int i = 0; i < m_pixmapArrays.size(); ++i) {
- QCanvasPixmapArray *array = m_pixmapArrays[i];
- QPixmap *pixmap = array->image(0);
+ TQCanvasPixmapArray *array = m_pixmapArrays[i];
+ TQPixmap *pixmap = array->image(0);
if (pixmap) {
total += pixmap->width() * pixmap->height();
// NOTATION_DEBUG << "PixmapArrayGC::deleteAll(): " << pixmap->width() << "x" << pixmap->height() << " (" << (pixmap->width()*pixmap->height()) << " px, " << total << " total)" << endl;
@@ -210,7 +210,7 @@ void PixmapArrayGC::deleteAll()
m_pixmapArrays.clear();
}
-std::vector<QCanvasPixmapArray*> PixmapArrayGC::m_pixmapArrays;
+std::vector<TQCanvasPixmapArray*> PixmapArrayGC::m_pixmapArrays;
}
diff --git a/src/gui/kdeext/QCanvasSimpleSprite.h b/src/gui/kdeext/QCanvasSimpleSprite.h
index 15a02f9..7613b64 100644
--- a/src/gui/kdeext/QCanvasSimpleSprite.h
+++ b/src/gui/kdeext/QCanvasSimpleSprite.h
@@ -22,50 +22,50 @@
#ifndef QCANVASSIMPLESPRITE_H
#define QCANVASSIMPLESPRITE_H
-#include <qwmatrix.h>
-#include <qcanvas.h>
+#include <tqwmatrix.h>
+#include <tqcanvas.h>
#include "gui/editors/notation/NotePixmapFactory.h"
namespace Rosegarden {
/**
- * A QCanvasSprite with 1 frame only
+ * A TQCanvasSprite with 1 frame only
*/
class QCanvasSimpleSprite : public QCanvasSprite
{
public:
- QCanvasSimpleSprite(QPixmap*, QCanvas*);
- QCanvasSimpleSprite(QCanvasPixmap*, QCanvas*);
- QCanvasSimpleSprite(const QString &pixmapfile, QCanvas*);
+ QCanvasSimpleSprite(TQPixmap*, TQCanvas*);
+ QCanvasSimpleSprite(TQCanvasPixmap*, TQCanvas*);
+ QCanvasSimpleSprite(const TQString &pixmapfile, TQCanvas*);
// For lazy pixmap rendering, when we get around looking at it
- QCanvasSimpleSprite(QCanvas*);
+ QCanvasSimpleSprite(TQCanvas*);
virtual ~QCanvasSimpleSprite();
protected:
- static QCanvasPixmapArray* makePixmapArray(QPixmap *pixmap);
+ static TQCanvasPixmapArray* makePixmapArray(TQPixmap *pixmap);
- static QCanvasPixmapArray* makePixmapArray(QCanvasPixmap *pixmap);
+ static TQCanvasPixmapArray* makePixmapArray(TQCanvasPixmap *pixmap);
- static QCanvasPixmapArray* makePixmapArray(const QString &pixmapfile);
+ static TQCanvasPixmapArray* makePixmapArray(const TQString &pixmapfile);
//--------------- Data members ---------------------------------
- QCanvasPixmapArray* m_pixmapArray;
+ TQCanvasPixmapArray* m_pixmapArray;
};
class NotationElement;
/**
- * A QCanvasSprite referencing a NotationElement
+ * A TQCanvasSprite referencing a NotationElement
*/
class QCanvasNotationSprite : public QCanvasSimpleSprite
{
public:
- QCanvasNotationSprite(Rosegarden::NotationElement&, QPixmap*, QCanvas*);
- QCanvasNotationSprite(Rosegarden::NotationElement&, QCanvasPixmap*, QCanvas*);
+ QCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*);
+ QCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*);
virtual ~QCanvasNotationSprite();
@@ -80,19 +80,19 @@ protected:
class QCanvasNonElementSprite : public QCanvasSimpleSprite
{
public:
- QCanvasNonElementSprite(QPixmap *, QCanvas *);
- QCanvasNonElementSprite(QCanvasPixmap *, QCanvas *);
+ QCanvasNonElementSprite(TQPixmap *, TQCanvas *);
+ QCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *);
virtual ~QCanvasNonElementSprite();
};
/**
- * A QCanvasSprite used for a time signature
+ * A TQCanvasSprite used for a time signature
*/
class QCanvasTimeSigSprite : public QCanvasNonElementSprite
{
public:
- QCanvasTimeSigSprite(double layoutX, QPixmap *, QCanvas *);
- QCanvasTimeSigSprite(double layoutX, QCanvasPixmap *, QCanvas *);
+ QCanvasTimeSigSprite(double layoutX, TQPixmap *, TQCanvas *);
+ QCanvasTimeSigSprite(double layoutX, TQCanvasPixmap *, TQCanvas *);
virtual ~QCanvasTimeSigSprite();
void setLayoutX(double layoutX) { m_layoutX = layoutX; }
@@ -103,29 +103,29 @@ protected:
};
/**
- * A QCanvasSprite used for a staff name
+ * A TQCanvasSprite used for a staff name
*/
class QCanvasStaffNameSprite : public QCanvasNonElementSprite
{
public:
- QCanvasStaffNameSprite(QPixmap *, QCanvas *);
- QCanvasStaffNameSprite(QCanvasPixmap *, QCanvas *);
+ QCanvasStaffNameSprite(TQPixmap *, TQCanvas *);
+ QCanvasStaffNameSprite(TQCanvasPixmap *, TQCanvas *);
virtual ~QCanvasStaffNameSprite();
};
/**
- * A GC for QCanvasPixmapArray which have to be deleted seperatly
+ * A GC for TQCanvasPixmapArray which have to be deleted seperatly
*/
class PixmapArrayGC
{
public:
- static void registerForDeletion(QCanvasPixmapArray*);
+ static void registerForDeletion(TQCanvasPixmapArray*);
static void deleteAll();
protected:
//--------------- Data members ---------------------------------
- static std::vector<QCanvasPixmapArray*> m_pixmapArrays;
+ static std::vector<TQCanvasPixmapArray*> m_pixmapArrays;
};
}
diff --git a/src/gui/kdeext/RGLed.cpp b/src/gui/kdeext/RGLed.cpp
index 54b91b2..c5e5934 100644
--- a/src/gui/kdeext/RGLed.cpp
+++ b/src/gui/kdeext/RGLed.cpp
@@ -52,7 +52,7 @@
* kapp--
*
* Revision 1.21 2002/01/22 10:23:55 hausmann
- * - minor API fix (don't return a const QColor object)
+ * - minor API fix (don't return a const TQColor object)
*
* Revision 1.20 2001/10/10 17:40:39 mueller
* CVS_SILENT: fixincludes
@@ -131,14 +131,14 @@
#undef PAINT_BENCH
#ifdef PAINT_BENCH
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#endif
-#include <qpainter.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kapplication.h>
#include <kpixmapeffect.h>
#include "kled.h"
@@ -149,20 +149,20 @@ class KLed::KLedPrivate
friend class KLed;
int dark_factor;
- QColor offcolor;
- QPixmap *off_map;
- QPixmap *on_map;
+ TQColor offcolor;
+ TQPixmap *off_map;
+ TQPixmap *on_map;
};
-KLed::KLed(QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
{
- QColor col(green);
+ TQColor col(green);
d = new KLed::KLedPrivate;
d->dark_factor = 300;
d->offcolor = col.dark(300);
@@ -173,8 +173,8 @@ KLed::KLed(QWidget *parent, const char *name)
}
-KLed::KLed(const QColor& col, QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
@@ -189,9 +189,9 @@ KLed::KLed(const QColor& col, QWidget *parent, const char *name)
//setShape(Circular);
}
-KLed::KLed(const QColor& col, KLed::State state,
- KLed::Look look, KLed::Shape shape, QWidget *parent, const char *name )
- : QWidget(parent, name),
+KLed::KLed(const TQColor& col, KLed::State state,
+ KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name )
+ : TQWidget(parent, name),
led_state(state),
led_look(look),
led_shape(shape)
@@ -215,11 +215,11 @@ KLed::~KLed()
}
void
-KLed::paintEvent(QPaintEvent *)
+KLed::paintEvent(TQPaintEvent *)
{
#ifdef PAINT_BENCH
const int rounds = 1000;
- QTime t;
+ TQTime t;
t.start();
for (int i = 0; i < rounds; i++) {
#endif
@@ -269,10 +269,10 @@ KLed::paintEvent(QPaintEvent *)
void
KLed::paintFlat() // paint a ROUND FLAT led lamp
{
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// Initialize coordinates, width, and height of the LED
//
@@ -294,7 +294,7 @@ 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( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
pen.setWidth( 1 );
@@ -315,10 +315,10 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
void
KLed::paintRound() // paint a ROUND RAISED led lamp
{
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// Initialize coordinates, width, and height of the LED
int width = this->width();
@@ -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( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -389,7 +389,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
color = colorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 1, 1, width, width );
@@ -402,10 +402,10 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
void
KLed::paintSunken() // paint a ROUND SUNKEN led lamp
{
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// First of all we want to know what area should be updated
// Initialize coordinates, width, and height of the LED
@@ -421,7 +421,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// maybe we could stop HERE, if width <=0 ?
int scale = 1;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
bool smooth = true;
if (smooth)
@@ -445,7 +445,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
scale = 3;
width *= scale;
- tmpMap = new QPixmap(width, width);
+ tmpMap = new TQPixmap(width, width);
tmpMap->fill(paletteBackgroundColor());
paint.begin(tmpMap);
@@ -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( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -506,7 +506,7 @@ 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( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::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
@@ -531,12 +531,12 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
if (smooth)
{
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -546,10 +546,10 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
void
KLed::paintRect()
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
- QPen pen(led_color.dark(300));
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
+ TQPen pen(led_color.dark(300));
int w = width();
int h = height();
// -----
@@ -577,13 +577,13 @@ KLed::paintRect()
void
KLed::paintRectFrame(bool raised)
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
int w = width();
int h = height();
- QColor black = Qt::black;
- QColor white = Qt::white;
+ TQColor black = Qt::black;
+ TQColor white = Qt::white;
// -----
if (raised) {
painter.setPen(white);
@@ -656,7 +656,7 @@ KLed::setShape(KLed::Shape s)
}
void
-KLed::setColor(const QColor& col)
+KLed::setColor(const TQColor& col)
{
if (led_color != col) {
led_color = col;
@@ -715,13 +715,13 @@ KLed::off()
QSize
KLed::sizeHint() const
{
- return QSize(16, 16);
+ return TQSize(16, 16);
}
QSize
KLed::minimumSizeHint() const
{
- return QSize(16, 16 );
+ return TQSize(16, 16 );
}
void KLed::virtual_hook( int, void* )
diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp
index 3e5b986..7263370 100644
--- a/src/gui/kdeext/klearlook.cpp
+++ b/src/gui/kdeext/klearlook.cpp
@@ -36,47 +36,47 @@ DEALINGS IN THE SOFTWARE.
*/
#include <kdeversion.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qframe.h>
-#include <qpushbutton.h>
-#include <qdrawutil.h>
-#include <qscrollbar.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qguardedptr.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qbitmap.h>
-#include <qcleanuphandler.h>
-#include <qimage.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qstylefactory.h>
-#include <qcleanuphandler.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qprogressbar.h>
-#include <qcursor.h>
-#include <qheader.h>
-#include <qwidgetstack.h>
-#include <qsplitter.h>
+#include <tqmenubar.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqframe.h>
+#include <tqpushbutton.h>
+#include <tqdrawutil.h>
+#include <tqscrollbar.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
+#include <tqguardedptr.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqbitmap.h>
+#include <tqcleanuphandler.h>
+#include <tqimage.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqstylefactory.h>
+#include <tqcleanuphandler.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqprogressbar.h>
+#include <tqcursor.h>
+#include <tqheader.h>
+#include <tqwidgetstack.h>
+#include <tqsplitter.h>
#include <math.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include "klearlook.h"
-#include <qsettings.h>
+#include <tqsettings.h>
#if KDE_VERSION >= 0x30200
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#endif
// Uncomment the following to enable gradients in toolbars and menubars
@@ -105,29 +105,29 @@ static const int rightBorder = 12;
#if KDE_VERSION >= 0x30200
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
-static QString readEnvPath( const char *env ) {
- QCString path = getenv( env );
+static TQString readEnvPath( const char *env ) {
+ TQCString path = getenv( env );
return path.isEmpty()
- ? QString::null
- : QFile::decodeName( path );
+ ? TQString::null
+ : TQFile::decodeName( path );
}
static bool kickerIsTrans() {
- QString kdeHome( readEnvPath( getuid() ? "KDEHOME" : "KDEROOTHOME" ) ),
+ TQString kdeHome( readEnvPath( getuid() ? "KDEHOME" : "KDEROOTHOME" ) ),
cfgFileName;
bool trans = false;
if ( kdeHome.isEmpty() )
- cfgFileName = QDir::homeDirPath() + "/.kde/share/config/kickerrc";
+ cfgFileName = TQDir::homeDirPath() + "/.kde/share/config/kickerrc";
else
- cfgFileName = QString( kdeHome ) + "/share/config/kickerrc";
+ cfgFileName = TQString( kdeHome ) + "/share/config/kickerrc";
- QFile cfgFile( cfgFileName );
+ TQFile cfgFile( cfgFileName );
if ( cfgFile.open( IO_ReadOnly ) ) {
- QTextStream stream( &cfgFile );
- QString line;
+ TQTextStream stream( &cfgFile );
+ TQString line;
bool stop = false,
inGen = false;
@@ -140,7 +140,7 @@ static bool kickerIsTrans() {
if ( -1 != line.find( "true" ) )
trans = true;
stop = true;
- } else if ( line[ 0 ] == QChar( '[' ) ) // Then wasn't in General section...
+ } else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section...
stop = true;
} else if ( 0 == line.find( "[General]" ) )
inGen = true;
@@ -160,27 +160,27 @@ inline int limit( double c ) {
: ( int ) c;
}
-inline QColor midColor( const QColor &a, const QColor &b, double factor = 1.0 ) {
- return QColor( ( a.red() + limit( b.red() * factor ) ) >> 1,
+inline TQColor midColor( const TQColor &a, const TQColor &b, double factor = 1.0 ) {
+ return TQColor( ( a.red() + limit( b.red() * factor ) ) >> 1,
( a.green() + limit( b.green() * factor ) ) >> 1,
( a.blue() + limit( b.blue() * factor ) ) >> 1 );
}
// Copied from Keramik...
-static bool isFormWidget( const QWidget *widget ) {
+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
- QWidget * potentialClipPort = widget->parentWidget();
+ TQWidget * potentialClipPort = widget->parentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
- QWidget *potentialViewPort = potentialClipPort->parentWidget();
+ TQWidget *potentialViewPort = potentialClipPort->parentWidget();
if ( !potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp( potentialViewPort->name(), "qt_viewport" ) )
return false;
- QWidget *potentialKHTML = potentialViewPort->parentWidget();
+ TQWidget *potentialKHTML = potentialViewPort->parentWidget();
if ( !potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp( potentialKHTML->className(), "KHTMLView" ) )
return false;
@@ -337,7 +337,7 @@ static bool equal( double d1, double d2 ) {
return ( fabs( d1 - d2 ) < 0.0001 );
}
-static void shade( const QColor &a, QColor *b, float k ) {
+static void shade( const TQColor &a, TQColor *b, float k ) {
if ( equal( k, 1.0 ) )
* b = a;
@@ -366,7 +366,7 @@ static void shade( const QColor &a, QColor *b, float k ) {
}
}
-static void shadeGradient( const QColor &base, QColor *vals ) {
+static void shadeGradient( const TQColor &base, TQColor *vals ) {
vals[ KlearlookStyle::GRADIENT_BASE ] = base;
shade( vals[ KlearlookStyle::GRADIENT_BASE ],
@@ -381,7 +381,7 @@ static void shadeGradient( const QColor &base, QColor *vals ) {
&( vals[ KlearlookStyle::GRADIENT_DARK ] ), SHADE_GRADIENT_DARK );
}
-static void drawLines( QPainter *p, const QRect &r, bool horiz, int nLines, int offset, const QColor *cols,
+static void drawLines( TQPainter *p, const TQRect &r, bool horiz, int nLines, int offset, const TQColor *cols,
int startOffset, bool etched, bool lightGradient ) {
int space = ( nLines * 2 ) + ( nLines - 1 ),
x = horiz ? r.x() : r.x() + ( ( r.width() - space ) >> 1 ),
@@ -416,16 +416,16 @@ static void drawLines( QPainter *p, const QRect &r, bool horiz, int nLines, int
}
}
-inline QColor getFill( QStyle::SFlags flags, const QColor *use ) {
- return !( flags & QStyle::Style_Enabled )
+inline TQColor getFill( TQStyle::SFlags flags, const TQColor *use ) {
+ return !( flags & TQStyle::Style_Enabled )
? use[ 1 ]
- : flags & QStyle::Style_Down
+ : flags & TQStyle::Style_Down
? use[ 3 ]
- : flags & QStyle::Style_MouseOver
- ? flags & ( QStyle::Style_On | QStyle::Style_Sunken )
+ : flags & TQStyle::Style_MouseOver
+ ? flags & ( TQStyle::Style_On | TQStyle::Style_Sunken )
? use[ 3 ].light( QTC_HIGHLIGHT_FACTOR )
: use[ NUM_SHADES ].light( QTC_HIGHLIGHT_FACTOR )
- : flags & ( QStyle::Style_On | QStyle::Style_Sunken )
+ : flags & ( TQStyle::Style_On | TQStyle::Style_Sunken )
? use[ 3 ]
: use[ NUM_SHADES ];
}
@@ -453,7 +453,7 @@ oldCursor( -1, -1 ),
formMode( false ),
hoverWidget( NULL ),
hoverSect( QTC_NO_SECT ) {
- QSettings s;
+ TQSettings s;
contrast = s.readNumEntry( "/Qt/KDE/contrast", 7 );
if ( contrast < 0 || contrast > 10 )
@@ -466,24 +466,24 @@ hoverSect( QTC_NO_SECT ) {
darkMenubar = s.readBoolEntry( "/klearlookstyle/Settings/darkMenubar", true );
popupmenuHighlightLevel = s.readNumEntry( "/klearlookstyle/Settings/popupmenuHighlightLevel", 3);
- QString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", QString::null );
+ TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString::null );
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", QString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString::null );
sliderThumbs = tmp.isEmpty()
? etched ? GROOVE_SUNKEN : GROOVE_RAISED
: qtc_to_groove( tmp.latin1() );
- tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", QString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString::null );
lvExpander = tmp.isEmpty()
? LV_EXP_ARR
: qtc_to_lv_expander( tmp.latin1() );
- tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", QString::null );
+ tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString::null );
lvLines = tmp.isEmpty()
? LV_LINES_SOLID
: qtc_to_lv_lines( tmp.latin1() );
@@ -518,7 +518,7 @@ hoverSect( QTC_NO_SECT ) {
shadeColors( qApp->palette().active().button(), button );
}
-void KlearlookStyle::polish( QApplication *app ) {
+void KlearlookStyle::polish( TQApplication *app ) {
if ( !qstrcmp( app->argv() [ 0 ], "kicker" ) || !qstrcmp( app->argv() [ 0 ], "appletproxy" ) ) {
themedApp = APP_KICKER;
#if KDE_VERSION >= 0x30200
@@ -537,8 +537,8 @@ void KlearlookStyle::polish( QApplication *app ) {
themedApp = qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE;
}
-void KlearlookStyle::polish( QPalette &pal ) {
- int c = QSettings().readNumEntry( "/Qt/KDE/contrast", 7 );
+void KlearlookStyle::polish( TQPalette &pal ) {
+ int c = TQSettings().readNumEntry( "/Qt/KDE/contrast", 7 );
bool newContrast = false;
if ( c < 0 || c > 10 )
@@ -562,100 +562,100 @@ void KlearlookStyle::polish( QPalette &pal ) {
if ( qApp->palette().active().highlight() != menuPbar[ GRADIENT_BASE ] )
shadeGradient( qApp->palette().active().highlight(), menuPbar );
- const QColorGroup &actGroup = pal.active(),
+ const TQColorGroup &actGroup = pal.active(),
&inactGroup = pal.inactive();
- const QColor *use = backgroundColors( actGroup );
- QColorGroup newAct( actGroup.foreground(), actGroup.button(),
+ const TQColor *use = backgroundColors( actGroup );
+ TQColorGroup newAct( actGroup.foreground(), actGroup.button(),
use[ 0 ], use[ 5 ], actGroup.mid(), actGroup.text(),
actGroup.brightText(), actGroup.base(), actGroup.background() );
- newAct.setColor( QColorGroup::Highlight, actGroup.color( QColorGroup::Highlight ) );
+ newAct.setColor( TQColorGroup::Highlight, actGroup.color( TQColorGroup::Highlight ) );
pal.setActive( newAct );
use = backgroundColors( inactGroup );
- QColorGroup newInact( inactGroup.foreground(), inactGroup.button(),
+ TQColorGroup newInact( inactGroup.foreground(), inactGroup.button(),
use[ 0 ], use[ 5 ], inactGroup.mid(), inactGroup.text(),
inactGroup.brightText(), inactGroup.base(), inactGroup.background() );
- newInact.setColor( QColorGroup::Highlight, inactGroup.color( QColorGroup::Highlight ) );
+ newInact.setColor( TQColorGroup::Highlight, inactGroup.color( TQColorGroup::Highlight ) );
pal.setInactive( newInact );
}
static const char * kdeToolbarWidget = "kde toolbar widget";
-void KlearlookStyle::polish( QWidget *widget ) {
- if ( ::qt_cast<QRadioButton *>( widget )
- || ::qt_cast<QCheckBox *>( widget )
- || ::qt_cast<QSpinWidget *>( 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
widget->setMouseTracking( true );
#endif
widget->installEventFilter( this );
- } else if ( ::qt_cast<QButton *>( widget ) || ::qt_cast<QComboBox *>( widget ) ||
+ } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) ||
widget->inherits( "QToolBarExtensionWidget" ) ) {
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ widget->setBackgroundMode( TQWidget::PaletteBackground );
widget->installEventFilter( this );
- } else if ( ::qt_cast<QMenuBar *>( widget )
- || ::qt_cast<QToolBar *>( widget )
- || ::qt_cast<QPopupMenu *>( widget ) )
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ } 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( QWidget::NoBackground );
+ widget->setBackgroundMode( TQWidget::NoBackground );
widget->installEventFilter( this );
- } else if ( ::qt_cast<QScrollBar *>( widget ) ) {
+ } else if ( tqqt_cast<TQScrollBar *>( widget ) ) {
widget->setMouseTracking( true );
widget->installEventFilter( this );
- widget->setBackgroundMode( QWidget::NoBackground );
+ widget->setBackgroundMode( TQWidget::NoBackground );
- } else if ( ::qt_cast<QSlider *>( widget ) || ::qt_cast<QHeader *>( widget ) ) {
+ } else if ( tqqt_cast<TQSlider *>( widget ) || tqqt_cast<TQHeader *>( widget ) ) {
widget->setMouseTracking( true );
widget->installEventFilter( this );
} else if ( 0 == qstrcmp( widget->name(), kdeToolbarWidget ) ) {
widget->installEventFilter( this );
- widget->setBackgroundMode( QWidget::NoBackground ); // We paint the whole background.
+ widget->setBackgroundMode( TQWidget::NoBackground ); // We paint the whole background.
}
KStyle::polish( widget );
}
-void KlearlookStyle::unPolish( QWidget *widget ) {
- if ( ::qt_cast<QRadioButton *>( widget ) ||
- ::qt_cast<QCheckBox *>( widget ) ||
- ::qt_cast<QSpinWidget *>( 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
widget->setMouseTracking( false );
#endif
widget->removeEventFilter( this );
- } else if ( ::qt_cast<QButton *>( widget ) || ::qt_cast<QComboBox *>( widget ) ||
+ } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) ||
widget->inherits( "QToolBarExtensionWidget" ) ) {
- widget->setBackgroundMode( QWidget::PaletteButton );
+ widget->setBackgroundMode( TQWidget::PaletteButton );
widget->removeEventFilter( this );
- } else if ( ::qt_cast<QMenuBar *>( widget ) ||
- ::qt_cast<QToolBar *>( widget ) ||
- ::qt_cast<QPopupMenu *>( widget ) )
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ } 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 ( ::qt_cast<QScrollBar *>( widget ) ) {
+ } else if ( tqqt_cast<TQScrollBar *>( widget ) ) {
widget->setMouseTracking( false );
widget->removeEventFilter( this );
- widget->setBackgroundMode( QWidget::PaletteButton );
+ widget->setBackgroundMode( TQWidget::PaletteButton );
- } else if ( ::qt_cast<QSlider *>( widget ) ||
- ::qt_cast<QHeader *>( widget ) ) {
+ } else if ( tqqt_cast<TQSlider *>( widget ) ||
+ tqqt_cast<TQHeader *>( widget ) ) {
widget->setMouseTracking( false );
widget->removeEventFilter( this );
@@ -667,12 +667,12 @@ void KlearlookStyle::unPolish( QWidget *widget ) {
KStyle::unPolish( widget );
}
-bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) {
+bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
if ( object->parent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) {
// Draw background for custom widgets in the toolbar that have specified a "kde toolbar widget" name.
- if ( QEvent::Paint == event->type() ) {
- QWidget * widget = static_cast<QWidget*>( object ),
- *parent = static_cast<QWidget*>( object->parent() );
+ if ( TQEvent::Paint == event->type() ) {
+ TQWidget * widget = static_cast<TQWidget*>( object ),
+ *parent = static_cast<TQWidget*>( object->parent() );
#ifdef QTC_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.
@@ -682,37 +682,37 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) {
while ( parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) {
x_offset += parent->x();
y_offset += parent->y();
- parent = static_cast<QWidget*>( parent->parent() );
+ parent = static_cast<TQWidget*>( parent->parent() );
}
- QRect pr( parent->rect() );
+ TQRect pr( parent->rect() );
bool horiz_grad = pr.width() < pr.height();
// Check if the parent is a QToolbar, and use its orientation, else guess.
- QToolBar *toolbar = dynamic_cast<QToolBar*>( parent );
+ TQToolBar *toolbar = dynamic_cast<TQToolBar*>( parent );
if ( toolbar )
horiz_grad = toolbar->orientation() == Qt::Vertical;
- drawBevelGradient( parent->colorGroup().background(), true, 1, &QPainter( widget ),
- QRect( x_offset, y_offset, pr.width(), pr.height() ),
+ drawBevelGradient( parent->colorGroup().background(), true, 1, &TQPainter( widget ),
+ TQRect( x_offset, y_offset, pr.width(), pr.height() ),
horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
#else
- QPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() );
+ TQPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() );
#endif
return false; // Now draw the contents
}
- } else if ( object->inherits( "KToolBarSeparator" ) && QEvent::Paint == event->type() ) {
- QFrame * frame = dynamic_cast<QFrame*>( object );
+ } else if ( object->inherits( "KToolBarSeparator" ) && TQEvent::Paint == event->type() ) {
+ TQFrame * frame = dynamic_cast<TQFrame*>( object );
- if ( frame && QFrame::NoFrame != frame->frameShape() ) {
- QPainter painter( frame );
- if ( QFrame::VLine == frame->frameShape() )
+ if ( frame && TQFrame::NoFrame != frame->frameShape() ) {
+ TQPainter painter( frame );
+ if ( TQFrame::VLine == frame->frameShape() )
drawPrimitive( PE_DockWindowSeparator, &painter,
frame->rect(), frame->colorGroup(), Style_Horizontal );
- else if ( QFrame::HLine == frame->frameShape() )
+ else if ( TQFrame::HLine == frame->frameShape() )
drawPrimitive( PE_DockWindowSeparator, &painter,
frame->rect(), frame->colorGroup() );
else
@@ -721,36 +721,36 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) {
}
}
switch ( event->type() ) {
- case QEvent::Enter:
+ case TQEvent::Enter:
if ( object->isWidgetType() ) {
- hoverWidget = ( QWidget * ) object;
+ hoverWidget = ( TQWidget * ) object;
if ( hoverWidget && hoverWidget->isEnabled() ) {
if ( redrawHoverWidget() ) {
hoverWidget->repaint( false );
if ( APP_KICKER == themedApp )
hover = HOVER_NONE;
}
- oldCursor = QCursor::pos();
+ oldCursor = TQCursor::pos();
} else
hoverWidget = NULL;
}
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
if ( hoverWidget && object == hoverWidget ) {
oldCursor.setX( -1 );
oldCursor.setY( -1 );
hoverWidget = NULL;
- ( ( QWidget * ) object ) ->repaint( false );
+ ( ( TQWidget * ) object ) ->repaint( false );
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( hoverWidget && object->isWidgetType() ) {
if ( redrawHoverWidget() ) {
hoverWidget->repaint( false );
if ( APP_KICKER == themedApp )
hover = HOVER_NONE;
}
- oldCursor = QCursor::pos();
+ oldCursor = TQCursor::pos();
}
break;
default:
@@ -761,18 +761,18 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) {
}
void KlearlookStyle::drawLightBevelButton(
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
- QStyle::SFlags flags,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
+ TQStyle::SFlags flags,
bool useGrad,
ERound round,
- const QColor &fill,
- const QColor *custom,
+ const TQColor &fill,
+ const TQColor *custom,
bool light ) const
{
- QRect br( r );
- bool sunken = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) );
+ TQRect br( r );
+ bool sunken = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) );
int dark = borderButton ? 4 : 5,
c1 = sunken ? dark : light ? 6 : 0;
@@ -781,7 +781,7 @@ void KlearlookStyle::drawLightBevelButton(
if ( !borderButton )
br.addCoords( -1, -1, 1, 1 );
- if ( ( sunken && !borderButton ) || ( !sunken && flags & QStyle::Style_Raised ) ) {
+ if ( ( sunken && !borderButton ) || ( !sunken && flags & TQStyle::Style_Raised ) ) {
p->setPen( custom ? custom[ c1 ] : gray[ c1 ] );
if ( APPEARANCE_LIGHT_GRADIENT != appearance ) {
int c2 = sunken ? 0 : dark;
@@ -809,7 +809,7 @@ void KlearlookStyle::drawLightBevelButton(
// fill
if ( useGrad && APPEARANCE_FLAT != appearance ) {
drawBevelGradient( fill.dark( 100 ), !sunken, 0, p,
- QRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), flags & Style_Horizontal,
+ TQRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), flags & Style_Horizontal,
sunken ?
SHADE_BEVEL_BUTTON_GRAD_LIGHT( appearance ) :
SHADE_BEVEL_BUTTON_GRAD_LIGHT( appearance ),
@@ -823,7 +823,7 @@ void KlearlookStyle::drawLightBevelButton(
if ( rounded && ROUNDED_NONE != round ) {
bool wide = r.width() >= QTC_MIN_BTN_SIZE,
tall = r.height() >= QTC_MIN_BTN_SIZE;
- QColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled
+ TQColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled
? cg.text() : custom ? custom[ 5 ] : gray[ 5 ] );
p->setPen( border.light(80) );
@@ -977,18 +977,18 @@ void KlearlookStyle::drawLightBevelButton(
p->restore();
}
void KlearlookStyle::drawLightBevel(
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
- QStyle::SFlags flags,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
+ TQStyle::SFlags flags,
bool useGrad,
ERound round,
- const QColor &fill,
- const QColor *custom,
+ const TQColor &fill,
+ const TQColor *custom,
bool light ) const
{
- QRect br( r );
- bool sunken = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) );
+ TQRect br( r );
+ bool sunken = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) );
int dark = borderButton ? 4 : 5, c1 = sunken ? dark : light ? 6 : 0;
p->save();
@@ -996,7 +996,7 @@ void KlearlookStyle::drawLightBevel(
if ( !borderButton )
br.addCoords( -1, -1, 1, 1 );
- if ( ( sunken && !borderButton ) || ( !sunken && flags & QStyle::Style_Raised ) ) {
+ if ( ( sunken && !borderButton ) || ( !sunken && flags & TQStyle::Style_Raised ) ) {
p->setPen( custom ? custom[ c1 ] : gray[ c1 ] );
if ( APPEARANCE_LIGHT_GRADIENT != appearance ) {
int c2 = sunken ? 0 : dark;
@@ -1023,7 +1023,7 @@ void KlearlookStyle::drawLightBevel(
// fill
if ( useGrad && APPEARANCE_FLAT != appearance ) {
drawBevelGradient( fill, !sunken, 0, p,
- QRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ),
+ TQRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ),
flags & Style_Horizontal,
sunken ?
SHADE_BEVEL_GRAD_SEL_LIGHT( appearance ) :
@@ -1040,7 +1040,7 @@ void KlearlookStyle::drawLightBevel(
bool wide = r.width() >= QTC_MIN_BTN_SIZE,
tall = r.height() >= QTC_MIN_BTN_SIZE;
- QColor border = menuPbar[ GRADIENT_BASE ].dark( 130 );
+ TQColor border = menuPbar[ GRADIENT_BASE ].dark( 130 );
p->setPen( border );
@@ -1193,10 +1193,10 @@ void KlearlookStyle::drawLightBevel(
p->restore();
}
-void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags,
- QStyle::PrimitiveElement pe, bool small, bool checkActive ) const {
- QPointArray a;
- const QColor &col = flags & Style_Enabled
+void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags,
+ TQStyle::PrimitiveElement pe, bool small, bool checkActive ) const {
+ TQPointArray a;
+ const TQColor &col = flags & Style_Enabled
? checkActive && flags & Style_Active
? cg.highlightedText()
: cg.text()
@@ -1205,16 +1205,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &
if ( vArrow )
if ( small )
switch ( pe ) {
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( 7, 2, 1, 2, 0, 0, -2, -2, 0, -2, 1, -2, 0, 2, 0 );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( 7, 2, -1, 2, 0, 0, 2, -2, 0, -2, -1, -2, 0, 2, 0 );
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints( 7, 1, -2, 0, -2, -2, 0, 0, 2, 1, 2, 0, 2, 0, -2 );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( 7, -1, -2, 0, -2, 2, 0, 0, 2, -1, 2, 0, 2, 0, -2 );
break;
default:
@@ -1222,16 +1222,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &
}
else
switch ( pe ) {
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( 7, 3, 1, 0, -2, -3, 1, -2, 2, -1, 1, 1, 1, 2, 2 );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( 7, 3, -1, 0, 2, -3, -1, -2, -2, -1, -1, 1, -1, 2, -2 );
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints( 7, -1, -3, 2, 0, -1, 3, -2, 2, -1, 1, -1, -1, -2, -2 );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( 7, 1, -3, -2, 0, 1, 3, 2, 2, 1, 1, 1, -1, 2, -2 );
break;
default:
@@ -1240,16 +1240,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &
else
if ( small )
switch ( pe ) {
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( 4, 2, 0, 0, -2, -2, 0, 2, 0 );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( 4, 2, 0, 0, 2, -2, 0, 2, 0 );
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints( 4, 0, -2, -2, 0, 0, 2, 0, -2 );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( 4, 0, -2, 2, 0, 0, 2, 0, -2 );
break;
default:
@@ -1257,16 +1257,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &
}
else
switch ( pe ) {
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( 4, 3, 1, 0, -2, -3, 1, 3, 1 );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( 4, 3, -1, 0, 2, -3, -1, 3, -1 );
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints( 4, -1, -3, 2, 0, -1, 3, -1, -3 );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( 4, 1, -3, -2, 0, 1, 3, 1, -3 );
break;
default:
@@ -1284,13 +1284,13 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &
p->restore();
}
-void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, const QStyleOption &data ) const {
+void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, const TQStyleOption &data ) const {
switch ( pe ) {
case PE_CheckMark:
if ( flags & Style_On || !( flags & Style_Off ) ) // !(flags&Style_Off) is for tri-state
{
- QPointArray check;
+ TQPointArray check;
int x = r.center().x() - 3,
y = r.center().y() - 3;
@@ -1323,15 +1323,15 @@ void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, QPainter *p, const
}
}
-void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, const QStyleOption &data ) const {
+void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, const TQStyleOption &data ) const {
int x, y, w, h;
r.rect(&x, &y, &w, &h);
switch ( pe ) {
case PE_HeaderSection: {
- const QColor * use = buttonColors( cg );
+ const TQColor * use = buttonColors( cg );
if ( APP_KICKER == themedApp ) {
@@ -1359,7 +1359,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
flags = ( ( flags | Style_Sunken ) ^ Style_Sunken ) | Style_Raised;
if ( QTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) {
- QHeader * hd = dynamic_cast<QHeader *>( hoverWidget );
+ TQHeader * hd = dynamic_cast<TQHeader *>( hoverWidget );
if ( hd && hd->isClickEnabled( hoverSect ) && r == hd->sectionRect( hoverSect ) )
flags |= Style_MouseOver;
@@ -1376,10 +1376,10 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
case PE_ButtonBevel:
case PE_ButtonTool:
case PE_ButtonDropDown: {
- const QColor *use = buttonColors( cg );
+ const TQColor *use = buttonColors( cg );
- if ( !( flags & QStyle::Style_Sunken ) ) // If its not sunken, its raised-don't want flat buttons.
- flags |= QStyle::Style_Raised;
+ if ( !( flags & TQStyle::Style_Sunken ) ) // If its not sunken, its raised-don't want flat buttons.
+ flags |= TQStyle::Style_Raised;
drawLightBevelButton( p, r, cg, flags | Style_Horizontal, true,
r.width() < 16 || r.height() < 16
@@ -1396,7 +1396,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
p->setBrush( NoBrush );
if ( rounded ) // borderButton) CPD Only use color[4] for rounded def buttons!
{
- const QColor * use = buttonColors( cg );
+ 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;
@@ -1413,9 +1413,9 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
break;
case IND_CORNER: {
- const QColor *use = buttonColors( cg );
- QPointArray points;
- bool sunken = flags & Style_Down || flags & QStyle::Style_Sunken;
+ const TQColor *use = buttonColors( cg );
+ TQPointArray points;
+ bool sunken = flags & Style_Down || flags & TQStyle::Style_Sunken;
int offset = sunken ? 4 : 3;
points.setPoints( 3, r.x() + offset, r.y() + offset, r.x() + offset + 6, r.y() + offset,
@@ -1445,7 +1445,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
case PE_CheckMark:
if ( flags & Style_On || !( flags & Style_Off ) ) // !(flags&Style_Off) is for tri-state
{
- QPointArray check;
+ TQPointArray check;
int x = r.center().x() - 3,
y = r.center().y() - 3;
@@ -1472,66 +1472,66 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
break;
case PE_CheckListController: {
- QCheckListItem *item = data.checkListItem();
+ TQCheckListItem *item = data.checkListItem();
if ( item ) {
- QListView * lv = item->listView();
+ TQListView * lv = item->listView();
int x = r.x(), y = r.y(), w = r.width(), h = r.height(), marg = lv->itemMargin();
- p->setPen( QPen( flags & Style_Enabled ? cg.text()
- : lv->palette().color( QPalette::Disabled, QColorGroup::Text ) ) );
+ p->setPen( TQPen( flags & Style_Enabled ? cg.text()
+ : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ) ) );
if ( flags & Style_Selected && !lv->rootIsDecorated() &&
!( ( item->parent() && 1 == item->parent() ->rtti() &&
- QCheckListItem::Controller == ( ( QCheckListItem* ) item->parent() ) ->type() ) )) {
+ TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->parent() ) ->type() ) )) {
p->fillRect( 0, 0, x + marg + w + 4, item->height(),
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
if ( item->isEnabled() )
- p->setPen( QPen( cg.highlightedText() ) );
+ p->setPen( TQPen( cg.highlightedText() ) );
}
if ( flags & Style_NoChange )
- p->setBrush( cg.brush( QColorGroup::Button ) );
+ p->setBrush( cg.brush( TQColorGroup::Button ) );
p->drawRect( x + marg + 2, y + 4 + 2, w - 7, h - 8 );
p->drawRect( x + marg, y + 4, w - 7, h - 8 );
}
break;
}
case PE_CheckListIndicator: {
- QCheckListItem *item = data.checkListItem();
+ TQCheckListItem *item = data.checkListItem();
if ( item ) {
- QListView * lv = item->listView();
+ TQListView * lv = item->listView();
- p->setPen( QPen( flags & Style_Enabled ? cg.text()
- : lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( flags & Style_Enabled ? cg.text()
+ : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
if ( flags & Style_Selected ) {
flags -= Style_Selected;
if ( !lv->rootIsDecorated() &&
!( ( item->parent() && 1 == item->parent() ->rtti() &&
- QCheckListItem::Controller ==
- ( ( QCheckListItem* ) item->parent() ) ->type() ) ) ) {
+ TQCheckListItem::Controller ==
+ ( ( TQCheckListItem* ) item->parent() ) ->type() ) ) ) {
p->fillRect( 0, 0, r.x() + lv->itemMargin() + r.width() + 4, item->height(),
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
if ( item->isEnabled() ) {
- p->setPen( QPen( cg.highlightedText(), 2 ) );
+ p->setPen( TQPen( cg.highlightedText(), 2 ) );
flags += Style_Selected;
}
}
}
if ( flags & Style_NoChange )
- p->setBrush( cg.brush( QColorGroup::Button ) );
+ p->setBrush( cg.brush( TQColorGroup::Button ) );
p->drawRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 );
- if ( flags & QStyle::Style_On || !( flags & Style_Off ) )
- drawPrimitive( PE_CheckMark, p, QRect( r.x() + lv->itemMargin(),
+ if ( flags & TQStyle::Style_On || !( flags & Style_Off ) )
+ drawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(),
r.y() + 2, r.width() - 4, r.width() - 4 ), cg, flags );
}
break;
}
case PE_Indicator: {
- const QColor *use = buttonColors( cg );
- bool on = flags & QStyle::Style_On || !( flags & Style_Off );
+ const TQColor *use = buttonColors( cg );
+ bool on = flags & TQStyle::Style_On || !( flags & Style_Off );
if ( APPEARANCE_FLAT != appearance )
drawPrimitive( PE_ButtonTool, p, r, cg, flags );
@@ -1563,16 +1563,16 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
}
case PE_CheckListExclusiveIndicator: {
- QCheckListItem *item = data.checkListItem();
+ TQCheckListItem *item = data.checkListItem();
if ( item ) {
- const QColor & bgnd = cg.background(),
+ const TQColor & bgnd = cg.background(),
&on = flags & Style_Enabled
? cg.text()
: cg.mid();
bool set
- = flags & QStyle::Style_On;
- QPointArray outer,
+ = flags & TQStyle::Style_On;
+ TQPointArray outer,
inner,
aa;
int x = r.x(), y = r.y() + 2;
@@ -1615,7 +1615,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
case PE_ExclusiveIndicator:
case PE_ExclusiveIndicatorMask: {
int x = r.x(), y = r.y();
- QPointArray outer;
+ TQPointArray outer;
outer.setPoints( 24, x, y + 8, x, y + 4, x + 1, y + 3, x + 1, y + 2,
x + 2, y + 1, x + 3, y + 1, x + 4, y, x + 8, y,
x + 9, y + 1, x + 10, y + 1, x + 11, y + 2, x + 11, y + 3,
@@ -1629,21 +1629,21 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
p->setBrush( Qt::color1 );
p->drawPolygon( outer );
} else {
- QPointArray shadow;
- const QColor &bgnd = flags & Style_Enabled ? cg.base() : cg.background(),
+ TQPointArray shadow;
+ const TQColor &bgnd = flags & Style_Enabled ? cg.base() : cg.background(),
&on = flags & Style_Enabled
? flags & Style_Selected
? cg.highlightedText()
: cg.text()
: cg.mid();
- QColor indBgnd = bgnd;
- const QColor *use = buttonColors( cg );
- QColor leftShadowColor,
+ TQColor indBgnd = bgnd;
+ const TQColor *use = buttonColors( cg );
+ TQColor leftShadowColor,
rightShadowColor,
outerLeftColor,
outerRightColor;
bool set
- = flags & QStyle::Style_On;
+ = flags & TQStyle::Style_On;
if ( APPEARANCE_FLAT != appearance && !borderButton )
shadow.setPoints( 14, x + 1, y + 10, x + 1, y + 9, x, y + 8, x, y + 4,
@@ -1660,9 +1660,9 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
if ( APPEARANCE_FLAT != appearance ) {
indBgnd = getFill( flags, use );
- p->setClipRegion( QRegion( outer ) );
+ p->setClipRegion( TQRegion( outer ) );
drawBevelGradient( indBgnd, !set, 0, p,
- QRect( x + 1, y + 1, r.width() - 2, r.height() - 2 ), true,
+ TQRect( x + 1, y + 1, r.width() - 2, r.height() - 2 ), true,
set ? SHADE_BEVEL_GRAD_SEL_LIGHT( appearance ) : SHADE_BEVEL_GRAD_LIGHT( appearance ),
set ? SHADE_BEVEL_GRAD_SEL_DARK( appearance ) : SHADE_BEVEL_GRAD_DARK( appearance ) );
@@ -1726,7 +1726,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
if ( !formMode ) {
- QPointArray outerAaLeft,
+ TQPointArray outerAaLeft,
outerAaRight;
outerAaLeft.setPoints( 8, x, y + 3, x + 1, y + 1, x + 3, y,
@@ -1746,7 +1746,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
p->setPen( midColor( use[ 5 ], indBgnd, 1.5 ) );
if ( APPEARANCE_FLAT != appearance ) {
- QPointArray innerAa;
+ TQPointArray innerAa;
if ( !set
&& !( flags & Style_Down ) ) {
@@ -1762,7 +1762,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
}
} else {
- QPointArray innerAa;
+ TQPointArray innerAa;
innerAa.setPoints( 6, x + 4, y + 11, x + 8, y + 11, x + 10, y + 10,
x + 11, y + 8, x + 11, y + 4, x + 10, y + 2 );
@@ -1773,20 +1773,20 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
}
case PE_DockWindowSeparator: {
- QPoint p1,
+ TQPoint p1,
p2;
- //const QColor *use=backgroundColors(cg);
+ //const TQColor *use=backgroundColors(cg);
if ( flags & Style_Horizontal ) {
int offset = r.height() > 18 ? 6 : r.height() > 12 ? 4 : r.height() > 6 ? 2 : 0;
- p1 = QPoint( r.width() >> 1, 0 + offset );
- p2 = QPoint( p1.x(), r.height() - offset );
+ p1 = TQPoint( r.width() >> 1, 0 + offset );
+ p2 = TQPoint( p1.x(), r.height() - offset );
} else {
int offset = r.width() > 18 ? 6 : r.width() > 12 ? 4 : r.width() > 6 ? 2 : 0;
- p1 = QPoint( 0 + offset, r.height() >> 1 );
- p2 = QPoint( r.width() - offset, p1.y() );
+ p1 = TQPoint( 0 + offset, r.height() >> 1 );
+ p2 = TQPoint( r.width() - offset, p1.y() );
}
p->fillRect( r, cg.background() );
p->setPen( cg.background().dark( 111 ) );
@@ -1795,17 +1795,17 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
}
case PE_Splitter: {
- const QColor *use = buttonColors( cg );
+ const TQColor *use = buttonColors( cg );
if ( hoverWidget && hoverWidget == p->device() )
flags |= Style_MouseOver;
if ( borderSplitter )
- drawLightBevelButton( p, r, cg, QStyle::Style_Raised, false,
+ drawLightBevelButton( p, r, cg, TQStyle::Style_Raised, false,
ROUNDED_NONE, getFill( flags, use ), use );
else {
p->fillRect( r,
- QColor( flags & Style_MouseOver ?
+ TQColor( flags & Style_MouseOver ?
cg.background().light( QTC_HIGHLIGHT_FACTOR ) :
cg.background() ) );
drawLines( p, r, flags & Style_Horizontal, 70, 1, use, 0, TRUE,
@@ -1839,14 +1839,14 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
case PE_PanelLineEdit: {
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
p->setPen( use[ 4 ].light(80) );
p->drawRect( r );
break;
}
case PE_PanelPopup: {
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
if ( borderFrame && ( data.isDefault() || data.lineWidth() > 1 ) ) {
p->setPen( use[ 4 ].light(70) );
@@ -1856,7 +1856,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
#ifdef MENU_POPUP_SHADOW
qDrawShadePanel( p, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2,
- QColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ],
+ 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 );
@@ -1864,7 +1864,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
} else
qDrawShadePanel( p, r,
- QColorGroup(
+ TQColorGroup(
use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ]
),
@@ -1872,7 +1872,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
}
case PE_PanelTabWidget: {
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
if ( borderFrame && ( data.isDefault() || data.lineWidth() > 1 ) ) {
p->setPen( use[ 4 ] );
@@ -1881,7 +1881,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
#ifdef MENU_POPUP_SHADOW
qDrawShadePanel( p, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2,
- QColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ],
+ 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 );
@@ -1889,7 +1889,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
} else
qDrawShadePanel( p, r,
- QColorGroup(
+ TQColorGroup(
use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ]
),
@@ -1898,12 +1898,12 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
case PE_PanelDockWindow:
case PE_PanelMenuBar: {
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
switch ( toolbarBorders ) {
case TB_DARK:
qDrawShadePanel( p,
r.x(), r.y(), r.width(), r.height(),
- QColorGroup(
+ TQColorGroup(
use[ 5 ].dark( 120 ), use[ NUM_SHADES ], use[ 0 ],
use[ 5 ].dark( 120 ), use[ 2 ],
cg.text(), use[ NUM_SHADES ] ),
@@ -1923,7 +1923,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
case TB_LIGHT:
qDrawShadePanel( p,
r.x(), r.y(), r.width(), r.height(),
- QColorGroup(
+ TQColorGroup(
use[ 3 ], use[ NUM_SHADES ], use[ 0 ],
use[ 3 ], use[ 2 ],
cg.text(), use[ NUM_SHADES ]
@@ -1949,8 +1949,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
case PE_ScrollBarAddLine:
case PE_ScrollBarSubLine: {
- bool down = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) );
- const QColor *use = buttonColors( cg );
+ bool down = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) );
+ const TQColor *use = buttonColors( cg );
pe = flags & Style_Horizontal
? PE_ScrollBarAddLine == pe
@@ -1973,7 +1973,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
case PE_ScrollBarSubPage:
case PE_ScrollBarAddPage: {
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
if ( borderButton ) {
if ( flags & Style_Horizontal ) {
@@ -1992,7 +1992,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
}
case PE_ScrollBarSlider: {
- const QColor *use = buttonColors( cg );
+ const TQColor *use = buttonColors( cg );
@@ -2020,8 +2020,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
break;
case PE_SpinWidgetUp:
case PE_SpinWidgetDown: {
- QRect sr( r );
- const QColor *use = buttonColors( cg );
+ TQRect sr( r );
+ const TQColor *use = buttonColors( cg );
drawLightBevelButton( p, sr, cg,
flags | Style_Horizontal, true, PE_SpinWidgetDown == pe ? ROUNDED_BOTTOM : ROUNDED_TOP,
@@ -2041,8 +2041,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec
}
}
-void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, const QWidget *widget, const QRect &r,
- const QColorGroup &cg, SFlags flags, const QStyleOption &opt ) const {
+void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const {
switch ( kpe ) {
case KPE_ToolBarHandle:
case KPE_GeneralHandle:
@@ -2059,7 +2059,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
break;
case KPE_ListViewExpander: {
int lvSize = QTC_LV_SIZE( lvExpander );
- QRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ),
+ TQRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ),
r.y() + ( ( r.height() - ( lvSize + 4 ) ) >> 1 ), lvSize + 4, lvSize + 4 );
p->setPen( /*lvDark ? cg.text() : */cg.mid() );
@@ -2090,7 +2090,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
if ( LV_EXP_ARR == lvExpander )
drawArrow( p, ar, cg, flags | Style_Enabled, flags & Style_On // Collapsed = On
- ? QApplication::reverseLayout()
+ ? TQApplication::reverseLayout()
? PE_ArrowLeft
: PE_ArrowRight
: PE_ArrowDown );
@@ -2116,17 +2116,17 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
// Taken and modified (colour wise) from kstyle.cpp - which in turn comes from
// qwindowsstyl.cpp
{
- static QBitmap *verticalLine = 0,
+ static TQBitmap *verticalLine = 0,
*horizontalLine = 0;
- static QCleanupHandler<QBitmap> lvCleanupBitmap;
+ static TQCleanupHandler<TQBitmap> lvCleanupBitmap;
// Create the dotline pixmaps if not already created
if ( !verticalLine ) {
// make 128*1 and 1*128 bitmaps that can be used for drawing the right sort of lines.
- verticalLine = new QBitmap( 1, 129, true );
- horizontalLine = new QBitmap( 128, 1, true );
- QPointArray a( 64 );
- QPainter p2;
+ verticalLine = new TQBitmap( 1, 129, true );
+ horizontalLine = new TQBitmap( 128, 1, true );
+ TQPointArray a( 64 );
+ TQPainter p2;
p2.begin( verticalLine );
@@ -2137,7 +2137,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
verticalLine->setMask( *verticalLine );
p2.begin( horizontalLine );
@@ -2148,7 +2148,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
horizontalLine->setMask( *horizontalLine );
lvCleanupBitmap.add( &verticalLine );
@@ -2202,22 +2202,22 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons
void KlearlookStyle::drawControl(
ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg, SFlags flags, const QStyleOption &data ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg, SFlags flags, const TQStyleOption &data ) const
{
if ( widget == hoverWidget )
flags |= Style_MouseOver;
switch ( control ) {
case CE_TabBarTab: {
- const QTabBar * tb = ( const QTabBar * ) widget;
+ const TQTabBar * tb = ( const TQTabBar * ) widget;
bool cornerWidget = false,
firstTab = 0 == tb->indexOf( data.tab() ->identifier() );
- if ( ::qt_cast<const QTabWidget *>( tb->parent() ) ) {
- const QTabWidget * tw = ( const QTabWidget* ) tb->parent();
+ if ( tqqt_cast<const TQTabWidget *>( tb->parent() ) ) {
+ const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent();
// is there a corner widget in the (top) left edge?
if ( tw->cornerWidget( Qt::TopLeft ) )
@@ -2225,13 +2225,13 @@ void KlearlookStyle::drawControl(
}
if ( borderFrame ) {
- QRect tr( r ),
+ TQRect tr( r ),
fr( r );
int offset = rounded ? 2 : 0;
switch ( tb->shape() ) {
- case QTabBar::TriangularAbove:
- case QTabBar::RoundedAbove:
+ case TQTabBar::TriangularAbove:
+ case TQTabBar::RoundedAbove:
if ( flags & Style_Selected ) {
tr.addCoords( 0, 0, 0, -1 );
fr.addCoords( 2, 2, -2, -2 );
@@ -2317,8 +2317,8 @@ void KlearlookStyle::drawControl(
p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] );
break;
- case QTabBar::TriangularBelow:
- case QTabBar::RoundedBelow:
+ case TQTabBar::TriangularBelow:
+ case TQTabBar::RoundedBelow:
if ( flags & Style_Selected ) {
fr.addCoords( 3, 2, -3, -3 );
p->setPen( gray[ 5 ] );
@@ -2382,11 +2382,11 @@ void KlearlookStyle::drawControl(
KStyle::drawControl( control, p, widget, r, cg, flags, data );
}
} else {
- QRect br( r );
+ TQRect br( r );
switch ( tb->shape() ) {
- case QTabBar::TriangularAbove:
- case QTabBar::RoundedAbove:
+ case TQTabBar::TriangularAbove:
+ case TQTabBar::RoundedAbove:
if ( flags & Style_Selected ) {
p->setPen( cg.background() );
p->drawLine( br.bottomLeft(), br.bottomRight() );
@@ -2419,8 +2419,8 @@ void KlearlookStyle::drawControl(
else
p->fillRect( br, flags & Style_Selected ? cg.background() : gray[ 2 ] );
break;
- case QTabBar::TriangularBelow:
- case QTabBar::RoundedBelow:
+ case TQTabBar::TriangularBelow:
+ case TQTabBar::RoundedBelow:
if ( flags & Style_Selected ) {
p->setPen( cg.background() );
p->drawLine( br.topLeft(), br.topRight() );
@@ -2465,16 +2465,16 @@ void KlearlookStyle::drawControl(
if ( data.isDefault() )
break;
- const QTabBar *tb = ( const QTabBar * ) widget;
- QTab *t = data.tab();
- QRect tr = r;
+ const TQTabBar *tb = ( const TQTabBar * ) widget;
+ TQTab *t = data.tab();
+ TQRect tr = r;
if ( t->identifier() == tb->currentTab() ) {
- if ( QTabBar::RoundedAbove == tb->shape() || QTabBar::TriangularAbove == tb->shape() )
- tr.setBottom( tr.bottom() - pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) );
+ if ( TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() )
+ tr.setBottom( tr.bottom() - pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
} else
- if ( QTabBar::RoundedBelow == tb->shape() || QTabBar::TriangularBelow == tb->shape() )
- tr.setTop( tr.top() + pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) );
+ if ( TQTabBar::RoundedBelow == tb->shape() || TQTabBar::TriangularBelow == tb->shape() )
+ tr.setTop( tr.top() + pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() );
@@ -2489,7 +2489,7 @@ void KlearlookStyle::drawControl(
r.rect( &x, &y, &w, &h );
- const QPushButton *button = static_cast<const QPushButton *>( widget );
+ const TQPushButton *button = static_cast<const TQPushButton *>( widget );
bool active = button->isOn() || button->isDown(),
cornArrow = false;
@@ -2506,12 +2506,12 @@ void KlearlookStyle::drawControl(
margin = pixelMetric( PM_ButtonMargin, widget );
if ( button->iconSet() && !button->iconSet() ->isNull() &&
- ( dx + button->iconSet() ->pixmap ( QIconSet::Small, QIconSet::Normal,
- QIconSet::Off ).width() ) >= w )
+ ( 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( QRect(
+ p, visualRect( TQRect(
( x + w ) - ( dx + margin ), y, dx,
h ), r ), cg, flags, data );
@@ -2521,15 +2521,15 @@ void KlearlookStyle::drawControl(
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet() ->isNull() ) {
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( button->isEnabled() )
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( button->isToggleButton() && button->isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet() ->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet() ->pixmap( TQIconSet::Small, mode, state );
static const int constSpace = 2;
@@ -2553,7 +2553,7 @@ void KlearlookStyle::drawControl(
}
if ( cornArrow ) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect( x + w - 6, x + h - 6, 7, 7 ), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ),
cg, flags, data );
if ( xo && iw ) {
@@ -2570,7 +2570,7 @@ void KlearlookStyle::drawControl(
j = boldDefText && button->isDefault() ? 2 : 1;
for ( i = 0; i < j; i++ )
- drawItem( p, QRect( x + i, y, w, h ),
+ drawItem( p, TQRect( x + i, y, w, h ),
AlignCenter | ShowPrefix,
button->colorGroup(),
button->isEnabled(),
@@ -2581,7 +2581,7 @@ void KlearlookStyle::drawControl(
//Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags );
+ TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags );
break;
}
@@ -2589,8 +2589,8 @@ void KlearlookStyle::drawControl(
if ( !widget || data.isDefault() )
break;
- const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget;
- QMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget;
+ TQMenuItem *mi = data.menuItem();
int tab = data.tabWidth(),
maxpmw = data.maxIconWidth(),
x, y, w, h;
@@ -2610,7 +2610,7 @@ void KlearlookStyle::drawControl(
break;
if ( mi->isSeparator() ) {
- const QColor * use = backgroundColors( cg );
+ const TQColor * use = backgroundColors( cg );
p->setPen( cg.background().dark(105) );
p->drawLine( r.left() + 5, r.top() + 3, r.right() - 5, r.top() + 3 );
break;
@@ -2618,7 +2618,7 @@ void KlearlookStyle::drawControl(
maxpmw = QMAX( maxpmw, 16 );
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
if (menuIcons) {
// check column
cr.setRect( r.left(), r.top(), maxpmw, r.height() );
@@ -2639,7 +2639,7 @@ void KlearlookStyle::drawControl(
tr.setCoords( sr.left() - tab - 4, r.top(), sr.left(), r.bottom() );
}
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
cr = visualRect( cr, r );
@@ -2650,26 +2650,26 @@ void KlearlookStyle::drawControl(
if ( mi->iconSet() && menuIcons ) {
// Select the correct icon from the iconset
- QIconSet::Mode mode = flags & Style_Active
- ? ( mi->isEnabled() ? QIconSet::Active : QIconSet::Disabled )
- : ( mi->isEnabled() ? QIconSet::Normal : QIconSet::Disabled );
- cr = visualRect( QRect( x, y, maxpmw, h ), r );
+ 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 );
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( popupmenu->isCheckable() && mi->isChecked() ) {
- QBrush brush( gray[ 3 ] );
+ TQBrush brush( gray[ 3 ] );
qDrawShadePanel( p,
cr.x() + 1, cr.y() + 2, cr.width() - 2, cr.height() - 4,
- QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ],
+ TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ],
gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ),
true, 1, &brush );
}
// Draw the icon
- QPixmap pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode );
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
@@ -2685,12 +2685,12 @@ void KlearlookStyle::drawControl(
// item column
ir.setCoords( cr.right() + 2, r.top(), tr.right() - 4, r.bottom() );
- QBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() );
+ TQBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() );
drawPrimitiveMenu( PE_CheckMark, p, cr, cg,
( flags & ( Style_Enabled | Style_Active ) ) | Style_On );
}
- QColor textcolor, embosscolor;
+ TQColor textcolor, embosscolor;
if ( flags & Style_Active ) {
if ( !( flags & Style_Enabled ) ) {
@@ -2721,7 +2721,7 @@ void KlearlookStyle::drawControl(
p->restore();
}
- QString text = mi->text();
+ TQString text = mi->text();
if ( !text.isNull() ) {
int t = text.find( '\t' );
@@ -2757,7 +2757,7 @@ void KlearlookStyle::drawControl(
p->drawText( ir, alignFlag, text, t );
} else if ( mi->pixmap() ) {
- QPixmap pixmap = *mi->pixmap();
+ TQPixmap pixmap = *mi->pixmap();
if ( 1 == pixmap.depth() )
p->setBackgroundMode( OpaqueMode );
@@ -2774,7 +2774,7 @@ void KlearlookStyle::drawControl(
if ( ( flags & Style_Enabled ) &&
( flags & Style_Active ) &&
( flags & Style_Down ) ) {
- drawPBarOrMenu2( p, QRect(r.x(), r.y(), r.width(), r.height()),
+ drawPBarOrMenu2( p, TQRect(r.x(), r.y(), r.width(), r.height()),
true, cg, true );
} else
#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
@@ -2786,7 +2786,7 @@ void KlearlookStyle::drawControl(
#endif
if (darkMenubar) {
drawBevelGradient( cg.background(), true, 1, p,
- QRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2),
+ TQRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2),
true,
SHADE_BEVEL_MENU_GRAD_LIGHT( appearance ), SHADE_BEVEL_MENU_GRAD_DARK( appearance ));
} else
@@ -2795,7 +2795,7 @@ void KlearlookStyle::drawControl(
if ( data.isDefault() )
break;
- QMenuItem *mi = data.menuItem();
+ TQMenuItem *mi = data.menuItem();
if ( flags & Style_Active && ( flags & Style_Down ) )
drawItem( p, r, AlignCenter | ShowPrefix | DontClip | SingleLine,
@@ -2808,10 +2808,10 @@ void KlearlookStyle::drawControl(
case CE_MenuBarEmptyArea:
if (darkMenubar) {
//p->fillRect( r, cg.background().dark( 106 ) );
- QColor b;
+ TQColor b;
b.setRgb(cg.background().red(), cg.background().green(), cg.background().blue());
drawBevelGradient( b, true, 1, p,
- QRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2 ),
+ TQRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2 ),
true,
SHADE_BEVEL_MENU_GRAD_LIGHT( appearance ), SHADE_BEVEL_MENU_GRAD_DARK( appearance ));
} else
@@ -2832,17 +2832,17 @@ void KlearlookStyle::drawControl(
p->setBrush( gray[ NUM_SHADES ] );
p->drawRect( r );
qDrawShadePanel( p, r,
- QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ],
+ TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ],
cg.text(), gray[ NUM_SHADES ] ), true, 1 );
break;
case CE_ProgressBarContents: {
// ### Take into account totalSteps()for busy indicator
- const QProgressBar *pb = ( const QProgressBar* ) widget;
- QRect cr = subRect( SR_ProgressBarContents, widget );
+ const TQProgressBar *pb = ( const TQProgressBar* ) widget;
+ TQRect cr = subRect( SR_ProgressBarContents, widget );
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if ( cr.isValid() && ( progress > 0 || steps == 0 ) ) {
@@ -2868,23 +2868,23 @@ void KlearlookStyle::drawControl(
}
if ( reverse )
- drawPBarOrMenu( p, QRect( cr.x() + cr.width() - width - pstep,
+ drawPBarOrMenu( p, TQRect( cr.x() + cr.width() - width - pstep,
cr.y(), width, cr.height() ), true, cg );
else
- drawPBarOrMenu( p, QRect( cr.x() + pstep, cr.y(), width,
+ drawPBarOrMenu( p, TQRect( cr.x() + pstep, cr.y(), width,
cr.height() ), true, cg );
} else
if ( reverse )
- drawPBarOrMenu( p, QRect( cr.x() + ( cr.width() - width ),
+ drawPBarOrMenu( p, TQRect( cr.x() + ( cr.width() - width ),
cr.y(), width, cr.height() ), true, cg );
else
- drawPBarOrMenu( p, QRect( cr.x(), cr.y(), width, cr.height() ), true, cg );
+ drawPBarOrMenu( p, TQRect( cr.x(), cr.y(), width, cr.height() ), true, cg );
}
break;
}
case CE_PushButton: {
- const QPushButton *button = static_cast<const QPushButton *>( widget );
- QRect br( r );
+ const TQPushButton *button = static_cast<const TQPushButton *>( widget );
+ TQRect br( r );
int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget );
if ( rounded && isFormWidget( widget ) )
@@ -2913,7 +2913,7 @@ void KlearlookStyle::drawControl(
break;
case CE_CheckBoxLabel:
if ( crLabelHighlight ) {
- const QCheckBox * checkbox = ( const QCheckBox * ) widget;
+ const TQCheckBox * checkbox = ( const TQCheckBox * ) widget;
if ( flags & Style_MouseOver &&
#if QT_VERSION >= 0x030200
@@ -2921,14 +2921,14 @@ void KlearlookStyle::drawControl(
#endif
!isFormWidget( widget ) ) {
#if QT_VERSION >= 0x030200
- QRect cr( checkbox->rect() );
- QRegion r( QRect( cr.x(), cr.y(),
+ TQRect cr( checkbox->rect() );
+ TQRegion r( TQRect( cr.x(), cr.y(),
visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() +
pixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) );
#else
- QRegion r( checkbox->rect() );
+ TQRegion r( checkbox->rect() );
#endif
r -= visualRect( subRect( SR_CheckBoxIndicator, widget ), widget );
@@ -2936,7 +2936,7 @@ void KlearlookStyle::drawControl(
p->fillRect( checkbox->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) );
p->setClipping( false );
}
- int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, checkbox->pixmap(), checkbox->text() );
@@ -2954,7 +2954,7 @@ void KlearlookStyle::drawControl(
break;
case CE_RadioButtonLabel:
if ( crLabelHighlight ) {
- const QRadioButton * radiobutton = ( const QRadioButton * ) widget;
+ const TQRadioButton * radiobutton = ( const TQRadioButton * ) widget;
if ( flags & Style_MouseOver &&
#if QT_VERSION >= 0x030200
@@ -2962,13 +2962,13 @@ void KlearlookStyle::drawControl(
#endif
!isFormWidget( widget ) ) {
#if QT_VERSION >= 0x030200
- QRect rb( radiobutton->rect() );
- QRegion r( QRect( rb.x(), rb.y(),
+ 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
- QRegion r( radiobutton->rect() );
+ TQRegion r( radiobutton->rect() );
#endif
r -= visualRect( subRect( SR_RadioButtonIndicator, widget ), widget );
@@ -2977,7 +2977,7 @@ void KlearlookStyle::drawControl(
p->setClipping( false );
}
- int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text() );
@@ -2992,8 +2992,8 @@ void KlearlookStyle::drawControl(
}
}
-void KlearlookStyle::drawControlMask( ControlElement control, QPainter *p, const QWidget *widget, const QRect &r,
- const QStyleOption &data ) const {
+void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQStyleOption &data ) const {
switch ( control ) {
case CE_PushButton:
if ( rounded ) {
@@ -3016,8 +3016,8 @@ void KlearlookStyle::drawControlMask( ControlElement control, QPainter *p, const
}
}
-void KlearlookStyle::drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r,
- const QStyleOption &data ) const {
+void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQStyleOption &data ) const {
switch ( control ) {
case CC_ToolButton:
case CC_ComboBox:
@@ -3028,13 +3028,13 @@ void KlearlookStyle::drawComplexControlMask( ComplexControl control, QPainter *p
}
}
-QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const {
- QRect rect,
+TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const {
+ TQRect rect,
wrect( widget->rect() );
switch ( subrect ) {
case SR_PushButtonFocusRect: {
- // const QPushButton *button=(const QPushButton *)widget;
+ // const TQPushButton *button=(const TQPushButton *)widget;
int dbw1 = 0,
dbw2 = 0;
@@ -3068,7 +3068,7 @@ QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const {
break;
}
case SR_ProgressBarContents:
- rect = QRect( wrect.x() + 1,
+ rect = TQRect( wrect.x() + 1,
wrect.y() + 1,
wrect.width() - 2,
wrect.height() - 2 );
@@ -3082,14 +3082,14 @@ QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const {
void KlearlookStyle::drawComplexControl(
ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
if ( widget == hoverWidget )
flags |= Style_MouseOver;
@@ -3097,8 +3097,8 @@ void KlearlookStyle::drawComplexControl(
switch ( control ) {
case CC_ToolButton: {
- const QToolButton * toolbutton = ( const QToolButton * ) widget;
- QRect button ( querySubControlMetrics( control, widget, SC_ToolButton, data ) ),
+ const TQToolButton * toolbutton = ( const TQToolButton * ) widget;
+ TQRect button ( querySubControlMetrics( control, widget, SC_ToolButton, data ) ),
menuarea( querySubControlMetrics( control, widget, SC_ToolButtonMenu, data ) );
SFlags bflags = flags, mflags = flags;
@@ -3109,11 +3109,11 @@ void KlearlookStyle::drawComplexControl(
}
bool onControlButtons = false,
- onToolbar = widget->parentWidget() && ::qt_cast<QToolBar *>( widget->parentWidget() ),
+ onToolbar = widget->parentWidget() && tqqt_cast<TQToolBar *>( widget->parentWidget() ),
onExtender = !onToolbar &&
widget->parentWidget() &&
widget->parentWidget() ->inherits( "QToolBarExtensionWidget" ) &&
- ::qt_cast<QToolBar *>( widget->parentWidget() ->parentWidget() );
+ tqqt_cast<TQToolBar *>( widget->parentWidget() ->parentWidget() );
if ( !onToolbar && !onExtender && widget->parentWidget() &&
!qstrcmp( widget->parentWidget() ->name(), "qt_maxcontrols" ) )
@@ -3149,8 +3149,8 @@ void KlearlookStyle::drawComplexControl(
p->drawTiledPixmap( r,
*( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() );
} else if ( widget->parent() ) {
- if ( ::qt_cast<const QToolBar *>( widget->parent() ) ) {
- QToolBar * parent = ( QToolBar* ) widget->parent();
+ if ( tqqt_cast<const TQToolBar *>( widget->parent() ) ) {
+ TQToolBar * parent = ( TQToolBar* ) widget->parent();
#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
@@ -3162,8 +3162,8 @@ void KlearlookStyle::drawComplexControl(
p->fillRect( parent->rect(), cg.background() );
} else if ( widget->parent() ->inherits( "QToolBarExtensionWidget" ) ) {
- QWidget * parent = ( QWidget* ) widget->parent();
- QToolBar *toolbar = ( QToolBar* ) parent->parent();
+ TQWidget * parent = ( TQWidget* ) widget->parent();
+ TQToolBar *toolbar = ( TQToolBar* ) parent->parent();
#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS
@@ -3185,33 +3185,33 @@ void KlearlookStyle::drawComplexControl(
}
if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) {
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords( 3, 3, -3, -3 );
drawPrimitive( PE_FocusRect, p, fr, cg );
}
break;
}
case CC_ComboBox: {
- const QComboBox *combobox = ( const QComboBox * ) widget;
+ const TQComboBox *combobox = ( const TQComboBox * ) widget;
- QRect frame( QStyle::visualRect( querySubControlMetrics( CC_ComboBox,
+ TQRect frame( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxFrame,data ),widget ) ),
- arrow( QStyle::visualRect( querySubControlMetrics( CC_ComboBox,
+ arrow( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxArrow,data),widget)),
- field( QStyle::visualRect( querySubControlMetrics(CC_ComboBox,
+ field( TQStyle::visualRect( querySubControlMetrics(CC_ComboBox,
widget,SC_ComboBoxEditField,data),widget));
- const QColor *use = buttonColors( cg );
+ const TQColor *use = buttonColors( cg );
if ( rounded && isFormWidget( widget ) )
formMode = true;
if ( controls & SC_ComboBoxFrame && frame.isValid() ) {
if ( controls & SC_ComboBoxEditField && field.isValid() && combobox->editable() ) {
- QRect f2( field );
- QRegion reg( r );
+ TQRect f2( field );
+ TQRegion reg( r );
f2.addCoords( -1, -1, 1, 1 );
reg -= f2;
@@ -3232,11 +3232,11 @@ void KlearlookStyle::drawComplexControl(
if ( controls & SC_ComboBoxEditField && field.isValid() ) {
if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) {
- QRect fr = QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget );
+ TQRect fr = TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget );
fr.addCoords( 0, 0, -2, 0 );
drawPrimitive( PE_FocusRect,
- p, fr, cg, flags | Style_FocusAtBorder, QStyleOption( cg.highlight() ) );
+ p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption( cg.highlight() ) );
}
}
@@ -3245,8 +3245,8 @@ void KlearlookStyle::drawComplexControl(
break;
}
case CC_SpinWidget: {
- const QSpinWidget *spinwidget = ( const QSpinWidget * ) widget;
- QRect frame( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetFrame, data ) ),
+ const TQSpinWidget *spinwidget = ( const TQSpinWidget * ) widget;
+ TQRect frame( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetFrame, data ) ),
up( spinwidget->upRect() ),
down( spinwidget->downRect() );
@@ -3255,7 +3255,7 @@ void KlearlookStyle::drawComplexControl(
if ( ( controls & SC_SpinWidgetFrame ) && frame.isValid() )
qDrawShadePanel(
- p, r, QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ],
+ p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ],
gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ),
true, pixelMetric( PM_SpinBoxFrameWidth )
);
@@ -3264,7 +3264,7 @@ void KlearlookStyle::drawComplexControl(
PrimitiveElement pe = PE_SpinWidgetUp;
SFlags upflags = flags;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
if ( !spinwidget->isUpEnabled() )
upflags ^= Style_Enabled;
@@ -3278,7 +3278,7 @@ void KlearlookStyle::drawComplexControl(
PrimitiveElement pe = PE_SpinWidgetDown;
SFlags downflags = flags;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
if ( !spinwidget->isDownEnabled() )
downflags ^= Style_Enabled;
@@ -3287,15 +3287,15 @@ void KlearlookStyle::drawComplexControl(
downflags | ( ( active == SC_SpinWidgetDown ) ? Style_On | Style_Sunken : Style_Raised )
);
}
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
p->setPen( use[ 4 ].light(80) );
p->drawRect( r );
break;
}
case CC_ScrollBar: {
- const QScrollBar *scrollbar = ( const QScrollBar * ) widget;
+ const TQScrollBar *scrollbar = ( const TQScrollBar * ) widget;
bool hw = hoverWidget == scrollbar;
- QRect subline( querySubControlMetrics( control, widget, SC_ScrollBarSubLine, data ) ),
+ TQRect subline( querySubControlMetrics( control, widget, SC_ScrollBarSubLine, data ) ),
addline( querySubControlMetrics( control, widget, SC_ScrollBarAddLine, data ) ),
subpage( querySubControlMetrics( control, widget, SC_ScrollBarSubPage, data ) ),
addpage( querySubControlMetrics( control, widget, SC_ScrollBarAddPage, data ) ),
@@ -3349,13 +3349,13 @@ void KlearlookStyle::drawComplexControl(
// ### perhaps this should not be able to accept focus if maxedOut?
if ( scrollbar->hasFocus() )
drawPrimitive( PE_FocusRect, p,
- QRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ),
+ TQRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ),
cg, Style_Default );
}
break;
}
case CC_Slider: {
- QRect groove = querySubControlMetrics( CC_Slider, widget, SC_SliderGroove, data ),
+ TQRect groove = querySubControlMetrics( CC_Slider, widget, SC_SliderGroove, data ),
handle = querySubControlMetrics( CC_Slider, widget, SC_SliderHandle, data );
if ( ( controls & SC_SliderGroove ) && groove.isValid() )
@@ -3363,7 +3363,7 @@ void KlearlookStyle::drawComplexControl(
if ( ( controls & SC_SliderHandle ) && handle.isValid() )
drawSliderHandle( p, handle, cg, flags );
if ( controls & SC_SliderTickmarks )
- QCommonStyle::drawComplexControl(
+ TQCommonStyle::drawComplexControl(
control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data
);
break;
@@ -3373,21 +3373,21 @@ void KlearlookStyle::drawComplexControl(
}
}
-QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl sc,
- const QStyleOption &data ) const {
+TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc,
+ const TQStyleOption &data ) const {
switch ( control ) {
case CC_SpinWidget: {
if ( !widget )
- return QRect();
+ return TQRect();
int fw = pixelMetric( PM_SpinBoxFrameWidth, 0 );
- QSize bs;
+ 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 = bs.expandedTo( QApplication::globalStrut() );
+ bs = bs.expandedTo( TQApplication::globalStrut() );
if ( !( bs.width() % 2 ) )
bs.setWidth( bs.width() + 1 );
@@ -3400,15 +3400,15 @@ QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWid
switch ( sc ) {
case SC_SpinWidgetUp:
- return QRect( x, y, bs.width(), bs.height() );
+ return TQRect( x, y, bs.width(), bs.height() );
case SC_SpinWidgetDown:
- return QRect( x, y + bs.height(), bs.width(), bs.height() + extra );
+ return TQRect( x, y + bs.height(), bs.width(), bs.height() + extra );
case SC_SpinWidgetButtonField:
- return QRect( x, y, bs.width(), widget->height() - 2 * fw );
+ return TQRect( x, y, bs.width(), widget->height() - 2 * fw );
case SC_SpinWidgetEditField:
- return QRect( lx, fw, rx, widget->height() - 2 * fw );
+ return TQRect( lx, fw, rx, widget->height() - 2 * fw );
case SC_SpinWidgetFrame:
- return QRect( widget->x(), widget->y(), widget->width() - bs.width(), widget->height() );
+ return TQRect( widget->x(), widget->y(), widget->width() - bs.width(), widget->height() );
}
}
default:
@@ -3416,7 +3416,7 @@ QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWid
}
}
-int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) const {
+int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) const {
switch ( metric ) {
case PM_MenuButtonIndicator:
return 7;
@@ -3428,9 +3428,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con
#if QT_VERSION >= 0x030200
case PM_TabBarTabShiftVertical: {
- const QTabBar *tb = ::qt_cast<const QTabBar *>( widget );
+ const TQTabBar *tb = tqqt_cast<const TQTabBar *>( widget );
- return QTabBar::RoundedAbove == tb->shape() || QTabBar::TriangularAbove == tb->shape()
+ return TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape()
? 1
: -1;
}
@@ -3439,9 +3439,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con
#endif
case PM_TabBarTabVSpace: {
- const QTabBar * tb = ( const QTabBar * ) widget;
- if ( tb->shape() == QTabBar::RoundedAbove ||
- tb->shape() == QTabBar::RoundedBelow )
+ const TQTabBar * tb = ( const TQTabBar * ) widget;
+ if ( tb->shape() == TQTabBar::RoundedAbove ||
+ tb->shape() == TQTabBar::RoundedBelow )
return 12;
else
return 4;
@@ -3454,9 +3454,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con
case PM_ButtonDefaultIndicator:
return IND_BORDER == defBtnIndicator ? 1 : 0;
case PM_DefaultFrameWidth:
- return borderFrame && widget && ( ::qt_cast<const QTabBar *>( widget ) ||
- ::qt_cast<const QWidgetStack *>( widget ) ||
- ::qt_cast<const QPopupMenu *>( widget ) )
+ return borderFrame && widget && ( tqqt_cast<const TQTabBar *>( widget ) ||
+ tqqt_cast<const TQWidgetStack *>( widget ) ||
+ tqqt_cast<const TQPopupMenu *>( widget ) )
? 2
: QTC_DEF_FRAME_WIDTH;
case PM_SpinBoxFrameWidth:
@@ -3494,7 +3494,7 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con
}
}
-int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) const {
+int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const {
switch ( kpm ) {
case KPM_MenuItemSeparatorHeight:
return 4;
@@ -3503,17 +3503,17 @@ int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widget )
}
}
-QSize KlearlookStyle::sizeFromContents( ContentsType t,
- const QWidget *widget,
- const QSize &s,
- const QStyleOption &opt ) const {
+TQSize KlearlookStyle::sizeFromContents( ContentsType t,
+ const TQWidget *widget,
+ const TQSize &s,
+ const TQStyleOption &opt ) const {
switch ( t ) {
case CT_PopupMenuItem: {
if ( !widget || opt.isDefault() )
return s;
- const QPopupMenu *popup = dynamic_cast<const QPopupMenu *>( widget );
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popup = dynamic_cast<const TQPopupMenu *>( widget );
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = s.width(), h = s.height();
bool checkable = popup->isCheckable();
@@ -3533,7 +3533,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t,
h = QMAX( h, mi->pixmap() ->height() + 2 );
} else {
h = QMAX( h, 21 );
- QSettings s;
+ TQSettings s;
if ( menuIcons )
h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI );
else
@@ -3541,7 +3541,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t,
}
if ( mi->iconSet() ) {
- h = QMAX( h, mi->iconSet() ->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2 );
+ h = QMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 );
}
}
@@ -3563,23 +3563,23 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t,
w += rightBorder;
- return QSize( w-25, h );
+ return TQSize( w-25, h );
}
case CT_PushButton: {
- const QPushButton* btn = static_cast<const QPushButton*>( widget );
+ 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 );
if ( btn->text().isEmpty() && s.width() < 32 )
- return QSize( w, h );
+ return TQSize( w, h );
// return button size
- return QSize( w + 25, h + 3 );
+ return TQSize( w + 25, h + 3 );
}
case CT_ToolButton: {
- if ( widget->parent() && ::qt_cast<QToolBar*>( widget->parent() ) )
- return QSize( s.width() + 2 * 4, s.height() + 2 * 4 );
+ if ( widget->parent() && tqqt_cast<TQToolBar*>( widget->parent() ) )
+ return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 );
else {
return KStyle::sizeFromContents ( t, widget, s, opt );
}
@@ -3594,7 +3594,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t,
-int KlearlookStyle::styleHint( StyleHint stylehint, const QWidget *widget, const QStyleOption &option, QStyleHintReturn *returnData ) const {
+int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, QStyleHintReturn *returnData ) const {
switch ( stylehint ) {
case SH_EtchDisabledText:
case SH_Slider_SnapToValue:
@@ -3621,10 +3621,10 @@ int KlearlookStyle::styleHint( StyleHint stylehint, const QWidget *widget, const
}
void KlearlookStyle::drawPBarOrMenu(
- QPainter *p,
- QRect const &r,
+ TQPainter *p,
+ TQRect const &r,
bool horiz,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool menu ) const
{
switch ( pmProfile ) {
@@ -3632,7 +3632,7 @@ void KlearlookStyle::drawPBarOrMenu(
drawGradientWithBorder( p, r, horiz );
break;
case PROFILE_RAISED: {
- int flags = QStyle::Style_Raised;
+ int flags = TQStyle::Style_Raised;
if ( horiz )
flags |= Style_Horizontal;
@@ -3652,10 +3652,10 @@ void KlearlookStyle::drawPBarOrMenu(
}
}
void KlearlookStyle::drawPBarOrMenu2(
- QPainter *p,
- QRect const &r,
+ TQPainter *p,
+ TQRect const &r,
bool horiz,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool menu ) const
{
switch ( pmProfile ) {
@@ -3663,7 +3663,7 @@ void KlearlookStyle::drawPBarOrMenu2(
drawGradientWithBorder( p, r, horiz );
break;
case PROFILE_RAISED: {
- int flags = QStyle::Style_Raised;
+ int flags = TQStyle::Style_Raised;
if ( horiz )
flags |= Style_Horizontal;
@@ -3684,11 +3684,11 @@ void KlearlookStyle::drawPBarOrMenu2(
}
void KlearlookStyle::drawGradientWithBorder(
- QPainter *p,
- QRect const &r,
+ TQPainter *p,
+ TQRect const &r,
bool horiz ) const
{
- QRect r2( r );
+ TQRect r2( r );
drawGradient( menuPbar[ GRADIENT_TOP ],
menuPbar[ GRADIENT_BOTTOM ], true, borderFrame ? 2 : 1, p, r, horiz );
@@ -3709,15 +3709,15 @@ void KlearlookStyle::drawGradientWithBorder(
}
void KlearlookStyle::drawBevelGradient(
- const QColor &base,
+ const TQColor &base,
bool increase,
int border,
- QPainter *p,
- QRect const &r,
+ TQPainter *p,
+ TQRect const &r,
bool horiz, double shadeTop, double shadeBot )
const {
//CPD TODO: Store last settings to make faster!
- QColor top, bot;
+ TQColor top, bot;
if ( equal( 1.0, shadeTop ) )
top = base;
@@ -3732,16 +3732,16 @@ const {
}
void KlearlookStyle::drawGradient(
- const QColor &top,
- const QColor &bot,
+ const TQColor &top,
+ const TQColor &bot,
bool increase,
int border,
- QPainter *p,
- QRect const &r,
+ TQPainter *p,
+ TQRect const &r,
bool horiz ) const
{
if ( r.width() > 0 && r.height() > 0 ) {
- QRect grad(
+ TQRect grad(
r.left() + border,
r.top() + border,
r.width() - ( border * 2 ),
@@ -3751,7 +3751,7 @@ void KlearlookStyle::drawGradient(
if ( top == bot )
p->fillRect( grad, top );
else {
- QRect grad(
+ TQRect grad(
r.left() + border,
r.top() + border,
r.width() - ( border * 2 ),
@@ -3770,7 +3770,7 @@ void KlearlookStyle::drawGradient(
if ( increase )
for ( i = s; i <= e ; i++ ) {
- p->setPen( QColor(
+ p->setPen( TQColor(
limit( top.red() + rc ),
limit( top.green() + gc ),
limit( top.blue() + bc )
@@ -3787,7 +3787,7 @@ void KlearlookStyle::drawGradient(
else
for ( i = e; i >= s; i-- ) {
p->setPen(
- QColor(
+ TQColor(
limit( top.red() + rc ),
limit( top.green() + gc ),
limit( top.blue() + bc )
@@ -3808,21 +3808,21 @@ void KlearlookStyle::drawGradient(
}
-void KlearlookStyle::drawPopupRect( QPainter *p, const QRect &r, const QColorGroup &cg ) const
+void KlearlookStyle::drawPopupRect( TQPainter *p, const TQRect &r, const TQColorGroup &cg ) const
{
- const QColor *use = backgroundColors( cg );
+ const TQColor *use = backgroundColors( cg );
p->setPen( use[ 4 ].light(70) );
p->setBrush( NoBrush );
p->drawRect( r );
}
void KlearlookStyle::drawSliderHandle(
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg, QStyle::SFlags flags
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg, TQStyle::SFlags flags
) const
{
- const QColor * use = buttonColors( cg );
+ const TQColor * use = buttonColors( cg );
if ( r.width() > r.height() )
flags |= Style_Horizontal;
@@ -3840,19 +3840,19 @@ void KlearlookStyle::drawSliderHandle(
}
void KlearlookStyle::drawSliderGroove
- ( QPainter *p,
- const QRect &r,
- QStyle::SFlags flags,
- const QWidget *widget ) const
+ ( TQPainter *p,
+ const TQRect &r,
+ TQStyle::SFlags flags,
+ const TQWidget *widget ) const
{
- const QSlider * slider = ( const QSlider * ) widget;
- QRect groove( r );
+ const TQSlider * slider = ( const TQSlider * ) widget;
+ TQRect groove( r );
if ( flags & Style_HasFocus ) {
- QRect fr( groove );
+ TQRect fr( groove );
fr.addCoords( -1, -1, 1, 1 );
- drawPrimitive( PE_FocusRect, p, fr, QColorGroup() );
+ drawPrimitive( PE_FocusRect, p, fr, TQColorGroup() );
}
if ( Qt::Horizontal == slider->orientation() ) {
@@ -3872,7 +3872,7 @@ void KlearlookStyle::drawSliderGroove
p->drawLine( groove.x() + 1, groove.y() + 1, groove.x() + 1, groove.y() + groove.height() - 2 );
}
-void KlearlookStyle::shadeColors( const QColor &base, QColor *vals ) const {
+void KlearlookStyle::shadeColors( const TQColor &base, TQColor *vals ) const {
QTC_SHADES
int i;
@@ -3883,7 +3883,7 @@ void KlearlookStyle::shadeColors( const QColor &base, QColor *vals ) const {
vals[ NUM_SHADES ] = base;
}
-const QColor * KlearlookStyle::buttonColors( const QColorGroup &cg ) const {
+const TQColor * KlearlookStyle::buttonColors( const TQColorGroup &cg ) const {
if ( cg.button() != button[ NUM_SHADES ] ) {
shadeColors( cg.button(), buttonColoured );
return buttonColoured;
@@ -3892,7 +3892,7 @@ const QColor * KlearlookStyle::buttonColors( const QColorGroup &cg ) const {
return button;
}
-const QColor * KlearlookStyle::backgroundColors( const QColorGroup &cg ) const {
+const TQColor * KlearlookStyle::backgroundColors( const TQColorGroup &cg ) const {
if ( cg.background() != gray[ NUM_SHADES ] ) {
shadeColors( cg.background(), backgroundColoured );
return backgroundColoured;
@@ -3905,8 +3905,8 @@ bool KlearlookStyle::redrawHoverWidget() {
if ( !hoverWidget )
return false;
- QPoint cursor( QCursor::pos() ),
- widgetZero( hoverWidget->mapToGlobal( QPoint( 0, 0 ) ) );
+ TQPoint cursor( TQCursor::pos() ),
+ widgetZero( hoverWidget->mapToGlobal( TQPoint( 0, 0 ) ) );
#if QT_VERSION >= 0x030200
@@ -3916,10 +3916,10 @@ bool KlearlookStyle::redrawHoverWidget() {
// the widget can ocupy a larger area - and this whole are will react to mouse over.
// This needs to be coounteracted
// so that it looks as if only the sensitive area mouse-overs...
- QRadioButton *rb = dynamic_cast<QRadioButton *>( hoverWidget );
+ TQRadioButton *rb = dynamic_cast<TQRadioButton *>( hoverWidget );
if ( rb ) {
- QRect rect( widgetZero.x(), widgetZero.y(),
+ TQRect rect( widgetZero.x(), widgetZero.y(),
visualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() +
pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() );
@@ -3927,10 +3927,10 @@ bool KlearlookStyle::redrawHoverWidget() {
return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
( HOVER_NONE == hover && rect.contains( oldCursor ) );
} else {
- QCheckBox *cb = dynamic_cast<QCheckBox *>( hoverWidget );
+ TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget );
if ( cb ) {
- QRect rect( widgetZero.x(), widgetZero.y(),
+ TQRect rect( widgetZero.x(), widgetZero.y(),
visualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() +
pixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() );
@@ -3939,11 +3939,11 @@ bool KlearlookStyle::redrawHoverWidget() {
( HOVER_NONE == hover && rect.contains( oldCursor ) );
} else {
#endif
- QScrollBar *sb = dynamic_cast<QScrollBar *>( hoverWidget );
+ TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget );
if ( sb ) // So, are we over add button, sub button, slider, or none?
{
- QRect subline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSubLine ) ),
+ TQRect subline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSubLine ) ),
addline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarAddLine ) ),
slider( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSlider ) );
@@ -3971,20 +3971,20 @@ bool KlearlookStyle::redrawHoverWidget() {
( HOVER_SB_ADD != hover && addline.contains( oldCursor ) );
} else {
#if KDE_VERSION >= 0x30400
- QToolButton *tb = dynamic_cast<QToolButton *>( hoverWidget );
+ TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
if ( tb ) {
hover = APP_KICKER == themedApp ? HOVER_KICKER : HOVER_NONE;
return HOVER_KICKER == hover;
} else {
#endif
- QHeader *hd = dynamic_cast<QHeader *>( hoverWidget );
+ TQHeader *hd = dynamic_cast<TQHeader *>( hoverWidget );
if ( hd ) {
// Hmm... this ones tricky, as there's only 1 widget - but it has different sections...
// and the ones that aren't clickable should not highlight on mouse over!
- QRect rect(
+ TQRect rect(
widgetZero.x(),
widgetZero.y(),
hoverWidget->width(),
@@ -3998,7 +3998,7 @@ bool KlearlookStyle::redrawHoverWidget() {
hoverSect = QTC_NO_SECT;
for ( s = 0; s < hd->count() && ( QTC_NO_SECT == hoverSect || !redraw ); ++s ) {
- QRect r( hd->sectionRect( s ) );
+ TQRect r( hd->sectionRect( s ) );
r.moveLeft( r.x() + widgetZero.x() );
r.moveTop( r.y() + widgetZero.y() );
@@ -4017,7 +4017,7 @@ bool KlearlookStyle::redrawHoverWidget() {
}
return redraw;
} else
- return oldCursor == QPoint( -1, -1 );
+ return oldCursor == TQPoint( -1, -1 );
#if KDE_VERSION >= 0x30400
}
diff --git a/src/gui/kdeext/klearlook.h b/src/gui/kdeext/klearlook.h
index dd3ab74..26775c5 100644
--- a/src/gui/kdeext/klearlook.h
+++ b/src/gui/kdeext/klearlook.h
@@ -40,8 +40,8 @@
#include <kdeversion.h>
#include <kstyle.h>
-#include <qcolor.h>
-#include <qpoint.h>
+#include <tqcolor.h>
+#include <tqpoint.h>
#define QTC_CHECK_SIZE 13
#define QTC_RADIO_SIZE 13
@@ -243,71 +243,71 @@ class KlearlookStyle : public KStyle {
virtual ~KlearlookStyle() {}
- void polish( QApplication *app );
- void polish( QPalette &pal );
- void polish( QWidget *widget );
- void unPolish( QWidget *widget );
- void drawLightBevel( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, bool useGrad, ERound round,
- const QColor &fill, const QColor *custom = NULL, bool light = false ) const;
- void drawLightBevelButton( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, bool useGrad, ERound round,
- const QColor &fill, const QColor *custom = NULL, bool light = false ) const;
- void drawArrow( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, QStyle::PrimitiveElement pe,
+ void polish( TQApplication *app );
+ void polish( TQPalette &pal );
+ void polish( TQWidget *widget );
+ void unPolish( TQWidget *widget );
+ void drawLightBevel( 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 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,
bool small = false, bool checkActive = false ) const;
- void drawPrimitive( PrimitiveElement, QPainter *, const QRect &, const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawPrimitiveMenu( PrimitiveElement, QPainter *, const QRect &, const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r,
- const QColorGroup &cg, SFlags flags, const QStyleOption &opt ) const;
- void drawControl( ControlElement, QPainter *, const QWidget *, const QRect &, const QColorGroup &,
- SFlags = Style_Default, const QStyleOption & = QStyleOption::Default ) const;
- void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r,
- const QStyleOption &data ) const;
- QRect subRect( SubRect, const QWidget * ) const;
- void drawComplexControl( ComplexControl, QPainter *, const QWidget *, const QRect &, const QColorGroup &,
+ void drawPrimitive( 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,
+ 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 &,
+ SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawComplexControlMask( 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 &,
SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption & = QStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default ) const;
- int pixelMetric( PixelMetric, const QWidget *widget = 0 ) const;
- int kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) const;
- QSize sizeFromContents( ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default ) const;
- int styleHint( StyleHint, const QWidget *widget = 0, const QStyleOption & = QStyleOption::Default,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ TQRect querySubControlMetrics( ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ int pixelMetric( PixelMetric, const TQWidget *widget = 0 ) const;
+ int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const;
+ TQSize sizeFromContents( 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;
protected:
- bool eventFilter( QObject *object, QEvent *event );
- void drawPBarOrMenu( QPainter *p, QRect const &r, bool horiz, const QColorGroup &cg, bool menu = false ) const;
- void drawPBarOrMenu2( QPainter *p, QRect const &r, bool horiz, const QColorGroup &cg, bool menu = false ) const;
- void drawGradientWithBorder( QPainter *p, QRect const &r, bool horiz = true ) const;
- void drawBevelGradient( const QColor &base, bool increase, int border, QPainter *p, QRect const &r, bool horiz,
+ bool eventFilter( TQObject *object, TQEvent *event );
+ void drawPBarOrMenu( TQPainter *p, TQRect const &r, bool horiz, const TQColorGroup &cg, bool menu = false ) const;
+ void drawPBarOrMenu2( TQPainter *p, TQRect const &r, bool horiz, const TQColorGroup &cg, bool menu = false ) const;
+ void drawGradientWithBorder( TQPainter *p, TQRect const &r, bool horiz = true ) const;
+ void drawBevelGradient( const TQColor &base, bool increase, int border, TQPainter *p, TQRect const &r, bool horiz,
double shadeTop, double shadeBot ) const;
- void drawGradient( const QColor &top, const QColor &bot, bool increase, int border, QPainter *p, QRect const &r,
+ void drawGradient( const TQColor &top, const TQColor &bot, bool increase, int border, TQPainter *p, TQRect const &r,
bool horiz = true ) const;
- void drawSliderHandle( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags ) const;
- void drawPopupRect( QPainter *p, const QRect &r, const QColorGroup &cg) const ;
+ void drawSliderHandle( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags ) const;
+ void drawPopupRect( TQPainter *p, const TQRect &r, const TQColorGroup &cg) const ;
- void drawSliderGroove( QPainter *p, const QRect &r, QStyle::SFlags flags, const QWidget *widget ) const;
+ void drawSliderGroove( TQPainter *p, const TQRect &r, TQStyle::SFlags flags, const TQWidget *widget ) const;
private:
- void shadeColors( const QColor &base, QColor *vals ) const;
- const QColor * buttonColors( const QColorGroup &cg ) const;
- const QColor * backgroundColors( const QColorGroup &cg ) const;
+ void shadeColors( const TQColor &base, TQColor *vals ) const;
+ const TQColor * buttonColors( const TQColorGroup &cg ) const;
+ const TQColor * backgroundColors( const TQColorGroup &cg ) const;
bool redrawHoverWidget();
private:
- QColor menuPbar[ GRADIENT_NUM_COLS < NUM_SHADES + 1 ? NUM_SHADES + 1 : GRADIENT_NUM_COLS ],
+ TQColor menuPbar[ GRADIENT_NUM_COLS < NUM_SHADES + 1 ? NUM_SHADES + 1 : GRADIENT_NUM_COLS ],
gray[ NUM_SHADES + 1 ],
button[ NUM_SHADES + 1 ]; // Last color = base color, for comparisons!
- mutable QColor buttonColoured[ NUM_SHADES + 1 ];
- mutable QColor backgroundColoured[ NUM_SHADES + 1 ];
+ mutable TQColor buttonColoured[ NUM_SHADES + 1 ];
+ mutable TQColor backgroundColoured[ NUM_SHADES + 1 ];
EApp themedApp;
int popupmenuHighlightLevel;
bool borderButton,
@@ -335,9 +335,9 @@ class KlearlookStyle : public KStyle {
EHover hover;
int contrast;
- QPoint oldCursor;
+ TQPoint oldCursor;
mutable bool formMode;
- QWidget *hoverWidget;
+ TQWidget *hoverWidget;
int hoverSect;
};