summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-26 23:48:12 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 23:48:12 +0100
commit6be98faf5bf1704e91e9e805cea06d32df258898 (patch)
tree82a0e12560a9e80f8de4b6d5edaaae5bc1749c4a
parent46ccd436f56c5f6bc27981ad085f731b2731f797 (diff)
downloadtde-style-ia-ora-6be98faf.tar.gz
tde-style-ia-ora-6be98faf.zip
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--src/kwin/Makefile.am2
-rw-r--r--src/kwin/config/Makefile.am2
-rw-r--r--src/kwin/config/config.cpp18
-rw-r--r--src/kwin/config/config.h10
-rw-r--r--src/kwin/config/configdialog.ui6
-rw-r--r--src/kwin/iaora.cpp222
-rw-r--r--src/kwin/iaora.h30
-rw-r--r--src/kwin/iaorabutton.cpp58
-rw-r--r--src/kwin/iaorabutton.h18
-rw-r--r--src/kwin/iaoraclient.cpp88
-rw-r--r--src/kwin/iaoraclient.h24
-rw-r--r--src/kwin/misc.cpp18
-rw-r--r--src/kwin/misc.h2
-rw-r--r--src/widget/Makefile.am2
-rw-r--r--src/widget/bitmaps.h24
-rw-r--r--src/widget/ia_ora.cpp944
-rw-r--r--src/widget/ia_ora.h204
17 files changed, 836 insertions, 836 deletions
diff --git a/src/kwin/Makefile.am b/src/kwin/Makefile.am
index 5e52b07..89c4748 100644
--- a/src/kwin/Makefile.am
+++ b/src/kwin/Makefile.am
@@ -12,7 +12,7 @@ kwin_DATA = iaora.desktop
kde_module_LTLIBRARIES = kwin3_iaora.la
kwin3_iaora_la_SOURCES = iaora.cpp iaoraclient.cpp iaorabutton.cpp misc.cpp
kwin3_iaora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-kwin3_iaora_la_LIBADD = $(LIB_KDEUI) -lkdecorations -lqt-mt -lkdecore -lkdefx
+kwin3_iaora_la_LIBADD = $(LIB_KDEUI) -lkdecorations $(LIB_QT) $(LIB_KDECORE) -lkdefx
kwin3_iaora_la_METASOURCES = AUTO
DISTCLEANFILES = $(kwin3_iaora_la_METASOURCES)
diff --git a/src/kwin/config/Makefile.am b/src/kwin/config/Makefile.am
index e4f9c03..4cf8d6d 100644
--- a/src/kwin/config/Makefile.am
+++ b/src/kwin/config/Makefile.am
@@ -4,7 +4,7 @@ kde_module_LTLIBRARIES = kwin_iaora_config.la
kwin_iaora_config_la_SOURCES = config.cpp configdialog.ui
kwin_iaora_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-kwin_iaora_config_la_LIBADD = $(LIB_KDEUI) -lqt-mt -lkdecore
+kwin_iaora_config_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE)
METASOURCES = AUTO
noinst_HEADERS = config.h
diff --git a/src/kwin/config/config.cpp b/src/kwin/config/config.cpp
index 6320c23..7b0fdd9 100644
--- a/src/kwin/config/config.cpp
+++ b/src/kwin/config/config.cpp
@@ -22,12 +22,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
#include "config.h"
#include "configdialog.h"
-IaOraConfig::IaOraConfig(KConfig* config, QWidget* parent)
- : QObject(parent), m_config(0), m_dialog(0)
+IaOraConfig::IaOraConfig(KConfig* config, TQWidget* parent)
+ : TQObject(parent), m_config(0), m_dialog(0)
{
// create the configuration object
m_config = new KConfig("kwiniaorarc");
@@ -94,7 +94,7 @@ void IaOraConfig::defaults()
extern "C"
{
- KDE_EXPORT QObject* allocate_config(KConfig* config, QWidget* parent) {
+ KDE_EXPORT TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return (new IaOraConfig(config, parent));
}
}
diff --git a/src/kwin/config/config.h b/src/kwin/config/config.h
index 9be0ea5..513b83c 100644
--- a/src/kwin/config/config.h
+++ b/src/kwin/config/config.h
@@ -25,18 +25,18 @@
#ifndef KNIFTYCONFIG_H
#define KNIFTYCONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
-class QButtonGroup;
-class QGroupBox;
+class TQButtonGroup;
+class TQGroupBox;
class KConfig;
class ConfigDialog;
-class IaOraConfig : public QObject
+class IaOraConfig : public TQObject
{
Q_OBJECT
public:
- IaOraConfig(KConfig* config, QWidget* parent);
+ IaOraConfig(KConfig* config, TQWidget* parent);
~IaOraConfig();
signals:
diff --git a/src/kwin/config/configdialog.ui b/src/kwin/config/configdialog.ui
index a6167b4..58f7e56 100644
--- a/src/kwin/config/configdialog.ui
+++ b/src/kwin/config/configdialog.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialog</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>titleShadow</cstring>
</property>
@@ -33,7 +33,7 @@
<string>Check this option if you want the titlebar text to have a 3D look with a shadow behind it.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>menuClose</cstring>
</property>
diff --git a/src/kwin/iaora.cpp b/src/kwin/iaora.cpp
index 887baff..d827141 100644
--- a/src/kwin/iaora.cpp
+++ b/src/kwin/iaora.cpp
@@ -22,10 +22,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include <kconfig.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
@@ -41,8 +41,8 @@ namespace KWinIaOra
IaOraHandler::IaOraHandler()
{
- memset(m_pixmaps, 0, sizeof(QPixmap*)*NumPixmaps*2*2); // set elements to 0
- memset(m_bitmaps, 0, sizeof(QBitmap*)*NumButtonIcons*2);
+ memset(m_pixmaps, 0, sizeof(TQPixmap*)*NumPixmaps*2*2); // set elements to 0
+ memset(m_bitmaps, 0, sizeof(TQBitmap*)*NumButtonIcons*2);
reset(0);
}
@@ -66,7 +66,7 @@ bool IaOraHandler::reset(unsigned long changed)
m_titleFontTool = KDecoration::options()->font(true, true); // small
// check if we are in reverse layout mode
- m_reverse = QApplication::reverseLayout();
+ m_reverse = TQApplication::reverseLayout();
// read in the configuration
readConfig();
@@ -146,18 +146,18 @@ void IaOraHandler::readConfig()
// grab settings
m_titleShadow = config.readBoolEntry("TitleShadow", true);
- QFontMetrics fm(m_titleFont); // active font = inactive font
+ TQFontMetrics fm(m_titleFont); // active font = inactive font
int titleHeightMin = config.readNumEntry("MinTitleHeight", 22);
// The title should strech with bigger font sizes!
- m_titleHeight = QMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
+ m_titleHeight = TQMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
// have an even title/button size so the button icons are fully centered...
if ( m_titleHeight%2 == 0)
m_titleHeight++;
- fm = QFontMetrics(m_titleFontTool); // active font = inactive font
+ fm = TQFontMetrics(m_titleFontTool); // active font = inactive font
int titleHeightToolMin = config.readNumEntry("MinTitleHeightTool", 22);
// The title should strech with bigger font sizes!
- m_titleHeightTool = QMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
+ m_titleHeightTool = TQMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
// have an even title/button size so the button icons are fully centered...
if ( m_titleHeightTool%2 == 0)
m_titleHeightTool++;
@@ -165,157 +165,157 @@ void IaOraHandler::readConfig()
m_menuClose = config.readBoolEntry("CloseOnMenuDoubleClick", true);
}
-QColor IaOraHandler::getBorderColor( KWinIaOra::ColorType type, const bool active)
+TQColor IaOraHandler::getBorderColor( KWinIaOra::ColorType type, const bool active)
{
//Force colors
switch (type) {
case Border1:
- return QColor( "#EFF3F7" );
+ return TQColor( "#EFF3F7" );
break;
case Border2:
- return QColor( "#DFE7EF" );
+ return TQColor( "#DFE7EF" );
break;
case Border3:
- return QColor( "#C7D3DF" );
+ return TQColor( "#C7D3DF" );
break;
default:
- return Qt::black;
+ return TQt::black;
}
- return Qt::black;
+ return TQt::black;
}
-QColor IaOraHandler::getShadowColor()
+TQColor IaOraHandler::getShadowColor()
{
- QColor col = KDecoration::options()->color(ColorTitleBar, true);
- if ( col == QColor("#4964AE") )
+ TQColor col = KDecoration::options()->color(ColorTitleBar, true);
+ if ( col == TQColor("#4964AE") )
{
- return QColor( "#000000" );
+ return TQColor( "#000000" );
}
//default Arctic color
- else if ( col == QColor("#8ec7ff") )
+ else if ( col == TQColor("#8ec7ff") )
{
- return QColor( "#666666" );
+ return TQColor( "#666666" );
}
- else if ( col == QColor("7BAAE7") )
+ else if ( col == TQColor("7BAAE7") )
{
- return QColor( "#666666" );
+ return TQColor( "#666666" );
}
//default Orange color
- else if ( col == QColor("#F7B610") )
+ else if ( col == TQColor("#F7B610") )
{
- return QColor( "#666666" );
+ return TQColor( "#666666" );
}
//default Gray color
- else if ( col == QColor("#c7d3df") )
+ else if ( col == TQColor("#c7d3df") )
{
- return QColor( "#333333" );
+ return TQColor( "#333333" );
}
- return QColor( "#666666" );
+ return TQColor( "#666666" );
}
-QColor IaOraHandler::getGradientColor( KWinIaOra::ColorType type, const bool active)
+TQColor IaOraHandler::getGradientColor( KWinIaOra::ColorType type, const bool active)
{
- QColor col = KDecoration::options()->color(ColorTitleBar, active);
+ TQColor col = KDecoration::options()->color(ColorTitleBar, active);
//default Blue color
if ( active )
{
- if ( col == QColor("#4964AE") )
+ if ( col == TQColor("#4964AE") )
{
switch (type) {
case TitleGradient1:
- return QColor("#8EA2CF");
+ return TQColor("#8EA2CF");
break;
case TitleGradient2:
- return QColor("#415DA6");
+ return TQColor("#415DA6");
break;
case TitleGradient4:
- return QColor("#4964AE");
+ return TQColor("#4964AE");
break;
case TitleGradient3:
- return QColor("#21459C");
+ return TQColor("#21459C");
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
//default Smooth color
- else if ( col == QColor("#7BAAE7") )
+ else if ( col == TQColor("#7BAAE7") )
{
switch (type) {
case TitleGradient1:
- return QColor("#ADCFFF");
+ return TQColor("#ADCFFF");
break;
case TitleGradient2:
- return QColor("#5A8AD6");
+ return TQColor("#5A8AD6");
break;
case TitleGradient4:
- return QColor("#7BAAE7");
+ return TQColor("#7BAAE7");
break;
case TitleGradient3:
- return QColor("#427DC6");
+ return TQColor("#427DC6");
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
//default Orange color
- else if ( col == QColor("#F7B610") )
+ else if ( col == TQColor("#F7B610") )
{
switch (type) {
case TitleGradient1:
- return QColor("#FFCB10");
+ return TQColor("#FFCB10");
break;
case TitleGradient2:
- return QColor("#ffa208");
+ return TQColor("#ffa208");
break;
case TitleGradient4:
- return QColor("#f7b610");
+ return TQColor("#f7b610");
break;
case TitleGradient3:
- return QColor("#f79600");
+ return TQColor("#f79600");
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
//default Arctic color
- else if ( col == QColor("#8ec7ff") )
+ else if ( col == TQColor("#8ec7ff") )
{
switch (type) {
case TitleGradient1:
- return QColor("#c7dfff");
+ return TQColor("#c7dfff");
break;
case TitleGradient2:
- return QColor("#79beff");
+ return TQColor("#79beff");
break;
case TitleGradient4:
- return QColor("#8ec7ff");
+ return TQColor("#8ec7ff");
break;
case TitleGradient3:
- return QColor("#69b6ff");
+ return TQColor("#69b6ff");
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
//default Gray color
- else if ( col == QColor("#c7d3df") )
+ else if ( col == TQColor("#c7d3df") )
{
switch (type) {
case TitleGradient1:
- return QColor("#cfd7df");
+ return TQColor("#cfd7df");
break;
case TitleGradient2:
- return QColor("#a6b2c7");
+ return TQColor("#a6b2c7");
break;
case TitleGradient4:
- return QColor("#c7d3df");
+ return TQColor("#c7d3df");
break;
case TitleGradient3:
- return QColor("#8692a6");
+ return TQColor("#8692a6");
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
else
@@ -334,29 +334,29 @@ QColor IaOraHandler::getGradientColor( KWinIaOra::ColorType type, const bool act
return col.dark( 130 );
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
}
else
{
- if ( col == QColor( "#EFF3F7" ) )
+ if ( col == TQColor( "#EFF3F7" ) )
{
switch (type) {
case TitleGradient1:
- return QColor( "#DFE7EF" );
+ return TQColor( "#DFE7EF" );
break;
case TitleGradient2:
- return QColor( "#C7D3DF" );
+ return TQColor( "#C7D3DF" );
break;
case TitleGradient4:
- return QColor( "#CFD7DF" );
+ return TQColor( "#CFD7DF" );
break;
case TitleGradient3:
- return QColor( "#B6C3CF" );
+ return TQColor( "#B6C3CF" );
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
else
@@ -376,15 +376,15 @@ QColor IaOraHandler::getGradientColor( KWinIaOra::ColorType type, const bool act
return col.dark( 131 );
break;
default:
- return Qt::black;
+ return TQt::black;
}
}
}
- return Qt::black;
+ return TQt::black;
}
-QColor IaOraHandler::getColor(KWinIaOra::ColorType type, const bool active)
+TQColor IaOraHandler::getColor(KWinIaOra::ColorType type, const bool active)
{
switch (type) {
case TitleBorder:
@@ -400,28 +400,28 @@ QColor IaOraHandler::getColor(KWinIaOra::ColorType type, const bool active)
return getBorderColor( type, active);
case ShadeTitleLight:
return alphaBlendColors(KDecoration::options()->color(ColorTitleBar, active),
- Qt::white, active?205:215);
+ TQt::white, active?205:215);
//todo verify
case ShadeTitleDark:
return alphaBlendColors(KDecoration::options()->color(ColorTitleBar, active),
- Qt::black, active?205:215);
+ TQt::black, active?205:215);
break;
case TitleFont:
return KDecoration::options()->color(ColorFont, active);
default:
- return Qt::black;
+ return TQt::black;
}
}
-void IaOraHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir ) const
+void IaOraHandler::pretile( TQPixmap *&pix, int size, TQt::Orientation dir ) const
{
- QPixmap *newpix;
- QPainter p;
+ TQPixmap *newpix;
+ TQPainter p;
- if ( dir == Qt::Horizontal )
- newpix = new QPixmap( size, pix->height() );
+ if ( dir == TQt::Horizontal )
+ newpix = new TQPixmap( size, pix->height() );
else
- newpix = new QPixmap( pix->width(), size );
+ newpix = new TQPixmap( pix->width(), size );
p.begin( newpix );
p.drawTiledPixmap( newpix->rect(), *pix ) ;
@@ -431,24 +431,24 @@ void IaOraHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir ) const
pix = newpix;
}
-const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
+const TQPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
{
if (m_pixmaps[toolWindow][active][type])
return *m_pixmaps[toolWindow][active][type];
- QPixmap *pm = 0;
+ TQPixmap *pm = 0;
switch (type) {
case TitleBarTileTop:
{
- pm = new QPixmap(1, 3);
- QPainter painter(pm);
+ pm = new TQPixmap(1, 3);
+ TQPainter painter(pm);
painter.setPen(getColor(TitleBorder, active));
painter.drawPoint(0,0);
painter.fillRect(0,1,pm->width(),pm->height()-1,getColor(TitleGradient1, active));
painter.end();
- pretile(pm, 64, Qt::Horizontal);
+ pretile(pm, 64, TQt::Horizontal);
break;
}
case TitleBarTile:
@@ -456,8 +456,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
const int titleBarTileHeight = (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
// gradient used as well in TitleBarTileTop as TitleBarTile
const int gradientHeight = 2 + titleBarTileHeight;
- QPixmap gradient(1, gradientHeight);
- QPainter painter(&gradient);
+ TQPixmap gradient(1, gradientHeight);
+ TQPainter painter(&gradient);
KPixmap tempPixmap;
tempPixmap.resize(1, gradientHeight/2);
KPixmapEffect::gradient(tempPixmap,
@@ -473,7 +473,7 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
painter.drawPixmap(0,gradientHeight/2, tempPixmap);
painter.end();
- pm = new QPixmap(1, titleBarTileHeight);
+ pm = new TQPixmap(1, titleBarTileHeight);
painter.begin(pm);
painter.drawPixmap(0, 0, gradient, 0,2);
painter.setPen(getColor(TitleGradient3, active).dark(110) );
@@ -481,7 +481,7 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
painter.end();
- pretile(pm, 64, Qt::Horizontal);
+ pretile(pm, 64, TQt::Horizontal);
break;
}
@@ -490,8 +490,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
{
const int h = 4 + (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
- pm = new QPixmap(3, h);
- QPainter painter(pm);
+ pm = new TQPixmap(3, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0, 3, 3, pixmap(TitleBarTileTop, active, toolWindow) );
painter.drawTiledPixmap(0,3, 3, h-3, pixmap(TitleBarTile, active, toolWindow) );
@@ -505,8 +505,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
{
const int h = 4 + (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
- pm = new QPixmap(3, h);
- QPainter painter(pm);
+ pm = new TQPixmap(3, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0, 3, 3, pixmap(TitleBarTileTop, active, toolWindow) );
painter.drawTiledPixmap(0,3, 3, h-3, pixmap(TitleBarTile, active, toolWindow) );
@@ -519,8 +519,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
case BorderLeftTile:
{
- pm = new QPixmap(3, 1);
- QPainter painter(pm);
+ pm = new TQPixmap(3, 1);
+ TQPainter painter(pm);
painter.setPen(getColor(Border3, active) );
painter.drawPoint(0, 0);
painter.setPen(getColor(Border2, active) );
@@ -529,15 +529,15 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
painter.setPen(getColor(Border1, active) );
painter.drawPoint(2,0);
painter.end();
- pretile(pm, 64, Qt::Vertical);
+ pretile(pm, 64, TQt::Vertical);
break;
}
case BorderRightTile:
{
- pm = new QPixmap(3, 1);
- QPainter painter(pm);
+ pm = new TQPixmap(3, 1);
+ TQPainter painter(pm);
painter.setPen(getColor(Border1, active) );
painter.drawPoint(0,0);
painter.setPen(getColor(Border2, active) );
@@ -545,15 +545,15 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
painter.setPen(getColor(Border3, active) );
painter.drawPoint(2, 0);
painter.end();
- pretile(pm, 64, Qt::Vertical);
+ pretile(pm, 64, TQt::Vertical);
break;
}
case BorderBottomLeft:
{
- pm = new QPixmap(3, 3);
- QPainter painter(pm);
+ pm = new TQPixmap(3, 3);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0,3,3, pixmap(BorderBottomTile, active, toolWindow) );
painter.setPen(getColor(Border3, active) );
painter.drawLine(0,0, 0,3);
@@ -568,8 +568,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
case BorderBottomRight:
{
- pm = new QPixmap(3, 3);
- QPainter painter(pm);
+ pm = new TQPixmap(3, 3);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0,3,3, pixmap(BorderBottomTile, active, toolWindow) );
painter.setPen(getColor(Border3, active) );
painter.drawLine(2,0, 2,3);
@@ -587,8 +587,8 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
case BorderBottomTile:
default:
{
- pm = new QPixmap(1, 3);
- QPainter painter(pm);
+ pm = new TQPixmap(1, 3);
+ TQPainter painter(pm);
painter.setPen(getColor(Border1, active) );
painter.drawPoint(0,0);
@@ -598,7 +598,7 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
painter.drawPoint(0, 2);
painter.end();
- pretile(pm, 64, Qt::Horizontal);
+ pretile(pm, 64, TQt::Horizontal);
break;
}
@@ -608,7 +608,7 @@ const QPixmap &IaOraHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
return *pm;
}
-const QBitmap &IaOraHandler::buttonBitmap(ButtonIcon type, const QSize &size, bool toolWindow)
+const TQBitmap &IaOraHandler::buttonBitmap(ButtonIcon type, const TQSize &size, bool toolWindow)
{
int typeIndex = type;
@@ -627,7 +627,7 @@ const QBitmap &IaOraHandler::buttonBitmap(ButtonIcon type, const QSize &size, bo
int w = size.width() - reduceW;
int h = size.height() - reduceH;
- if (m_bitmaps[toolWindow][typeIndex] && m_bitmaps[toolWindow][typeIndex]->size()==QSize(w,h) )
+ if (m_bitmaps[toolWindow][typeIndex] && m_bitmaps[toolWindow][typeIndex]->size()==TQSize(w,h) )
return *m_bitmaps[toolWindow][typeIndex];
// no matching pixmap found, create a new one...
@@ -635,8 +635,8 @@ const QBitmap &IaOraHandler::buttonBitmap(ButtonIcon type, const QSize &size, bo
delete m_bitmaps[toolWindow][typeIndex];
m_bitmaps[toolWindow][typeIndex] = 0;
- QBitmap bmp = IconEngine::icon(type /*icon*/, QMIN(w,h) );
- QBitmap *bitmap = new QBitmap(bmp);
+ TQBitmap bmp = IconEngine::icon(type /*icon*/, TQMIN(w,h) );
+ TQBitmap *bitmap = new TQBitmap(bmp);
m_bitmaps[toolWindow][typeIndex] = bitmap;
return *bitmap;
}
diff --git a/src/kwin/iaora.h b/src/kwin/iaora.h
index 3f8d757..b79d229 100644
--- a/src/kwin/iaora.h
+++ b/src/kwin/iaora.h
@@ -24,7 +24,7 @@
#ifndef IAORA_H
#define IAORA_H
-#include <qfont.h>
+#include <tqfont.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -75,7 +75,7 @@ enum ButtonIcon {
NumButtonIcons
};
-class IaOraHandler: public QObject, public KDecorationFactory
+class IaOraHandler: public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -86,37 +86,37 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool supports( Ability ability );
- const QPixmap &pixmap(Pixmaps type, bool active, bool toolWindow);
- const QBitmap &buttonBitmap(ButtonIcon type, const QSize &size, bool toolWindow);
+ const TQPixmap &pixmap(Pixmaps type, bool active, bool toolWindow);
+ const TQBitmap &buttonBitmap(ButtonIcon type, const TQSize &size, bool toolWindow);
int titleHeight()const { return m_titleHeight; }
int titleHeightTool()const { return m_titleHeightTool; }
- const QFont &titleFont() { return m_titleFont; }
- const QFont &titleFontTool() { return m_titleFontTool; }
+ const TQFont &titleFont() { return m_titleFont; }
+ const TQFont &titleFontTool() { return m_titleFontTool; }
bool titleShadow()const { return m_titleShadow; }
bool menuClose()const { return m_menuClose; }
bool reverseLayout()const { return m_reverse; }
- QColor getColor(KWinIaOra::ColorType type, const bool active = true);
- QColor getGradientColor( KWinIaOra::ColorType type, const bool active);
- QColor getBorderColor( KWinIaOra::ColorType type, const bool active);
- QColor getShadowColor();
+ TQColor getColor(KWinIaOra::ColorType type, const bool active = true);
+ TQColor getGradientColor( KWinIaOra::ColorType type, const bool active);
+ TQColor getBorderColor( KWinIaOra::ColorType type, const bool active);
+ TQColor getShadowColor();
private:
void readConfig();
- void pretile(QPixmap *&pix, int size, Qt::Orientation dir) const;
+ void pretile(TQPixmap *&pix, int size, TQt::Orientation dir) const;
bool m_titleShadow;
bool m_menuClose;
bool m_reverse;
int m_titleHeight;
int m_titleHeightTool;
- QFont m_titleFont;
- QFont m_titleFontTool;
+ TQFont m_titleFont;
+ TQFont m_titleFontTool;
// pixmap cache
- QPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
- QBitmap *m_bitmaps[2][NumButtonIcons];
+ TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
+ TQBitmap *m_bitmaps[2][NumButtonIcons];
};
IaOraHandler* Handler();
diff --git a/src/kwin/iaorabutton.cpp b/src/kwin/iaorabutton.cpp
index fe9c3a6..508f6af 100644
--- a/src/kwin/iaorabutton.cpp
+++ b/src/kwin/iaorabutton.cpp
@@ -22,12 +22,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "iaorabutton.h"
#include "iaorabutton.moc"
@@ -110,38 +110,38 @@ void IaOraButton::reset(unsigned long changed)
}
-void IaOraButton::enterEvent(QEvent *e)
+void IaOraButton::enterEvent(TQEvent *e)
{
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
hover = true;
repaint(false);
}
-void IaOraButton::leaveEvent(QEvent *e)
+void IaOraButton::leaveEvent(TQEvent *e)
{
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
hover = false;
repaint(false);
}
-void IaOraButton::drawButton(QPainter *painter)
+void IaOraButton::drawButton(TQPainter *painter)
{
- QRect r(0,0,width(),height());
+ TQRect r(0,0,width(),height());
bool active = m_client->isActive();
KPixmap tempKPixmap;
- QPixmap buffer;
+ TQPixmap buffer;
buffer.resize(width(), height());
- QPainter bP(&buffer);
+ TQPainter bP(&buffer);
// fake the titlebar background
bP.drawTiledPixmap(0, 0, width(), width(), /*define color*/m_client->getTitleBarTile(active) );
if (type() == MenuButton)
{
- QPixmap menuIcon(m_client->icon().pixmap( QIconSet::Small, QIconSet::Normal));
+ TQPixmap menuIcon(m_client->icon().pixmap( TQIconSet::Small, TQIconSet::Normal));
if (width() < menuIcon.width() || height() < menuIcon.height() ) {
menuIcon.convertFromImage( menuIcon.convertToImage().smoothScale(width(), height()));
}
@@ -150,7 +150,7 @@ void IaOraButton::drawButton(QPainter *painter)
else
{
int dX,dY;
- const QBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() );
+ const TQBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() );
dX = r.x()+(r.width()-icon.width())/2;
dY = r.y()+(r.height()-icon.height())/2;
if (isDown() ) {
@@ -158,36 +158,36 @@ void IaOraButton::drawButton(QPainter *painter)
}
#if 0
if(!isDown() && Handler()->titleShadow() ) {
- QColor shadowColor;
- if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
- shadowColor = QColor(255, 255, 255);
+ TQColor shadowColor;
+ if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
+ shadowColor = TQColor(255, 255, 255);
else
- shadowColor = QColor(0,0,0);
+ shadowColor = TQColor(0,0,0);
//bP.setPen(alphaBlendColors(sourfaceTop, shadowColor, 180) );
bP.drawPixmap(dX+1, dY+1, icon);
}
#endif
bP.setPen(Handler()->getColor(TitleFont,hover ? false : active) );
bP.drawPixmap(dX, dY, icon,0,0,icon.width(),icon.height()/2);
- bP.setPen(QColor("#CFD7DF") );
+ bP.setPen(TQColor("#CFD7DF") );
bP.drawPixmap(dX, dY+icon.height()/2, icon,0,icon.height()/2,icon.width(),icon.height());
}
bP.end();
painter->drawPixmap(0, 0, buffer);
}
-QBitmap IconEngine::icon(ButtonIcon icon, int size)
+TQBitmap IconEngine::icon(ButtonIcon icon, int size)
{
if (size%2 == 0)
--size;
- QBitmap bitmap(size,size);
- bitmap.fill(Qt::color0);
- QPainter p(&bitmap);
+ TQBitmap bitmap(size,size);
+ bitmap.fill(TQt::color0);
+ TQPainter p(&bitmap);
- p.setPen(Qt::color1);
+ p.setPen(TQt::color1);
- QRect r = bitmap.rect();
+ TQRect r = bitmap.rect();
// line widths
int lwTitleBar = 1;
@@ -203,8 +203,8 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size)
lwArrow = 2;
}
- //QColor col1( "#FFFFFF" );
- //QColor col2( "#CFD7DF" );
+ //TQColor col1( "#FFFFFF" );
+ //TQColor col2( "#CFD7DF" );
switch(icon) {
case CloseIcon:
@@ -430,7 +430,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size)
lw2 = 1;
}
- int h = QMAX( (r.width()/2), (lw1+2*lw2) );
+ int h = TQMAX( (r.width()/2), (lw1+2*lw2) );
// horizontal bars
drawObject(p, HorizontalLine, r.x(), r.y(), r.width(), lw1);
@@ -453,7 +453,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size)
return bitmap;
}
-void IconEngine::drawObject(QPainter &p, Object object, int x, int y, int length, int lineWidth)
+void IconEngine::drawObject(TQPainter &p, Object object, int x, int y, int length, int lineWidth)
{
switch(object) {
case DiagonalLine:
diff --git a/src/kwin/iaorabutton.h b/src/kwin/iaorabutton.h
index 12e9a53..8b4237b 100644
--- a/src/kwin/iaorabutton.h
+++ b/src/kwin/iaorabutton.h
@@ -23,13 +23,13 @@
#ifndef IAORABUTTON_H
#define IAORABUTTON_H
-#include <qbutton.h>
-#include <qimage.h>
+#include <tqbutton.h>
+#include <tqimage.h>
#include "iaora.h"
#include <kcommondecoration.h>
-class QTimer;
+class TQTimer;
namespace KWinIaOra {
@@ -47,9 +47,9 @@ public:
private:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
- void drawButton(QPainter *painter);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
+ void drawButton(TQPainter *painter);
private:
IaOraClient *m_client;
@@ -60,14 +60,14 @@ private:
/**
* This class creates bitmaps which can be used as icons on buttons. The icons
* are "hardcoded".
- * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->QPixmap" solution
+ * Over the previous "Gimp->xpm->TQImage->recolor->SmoothScale->TQPixmap" solution
* it has the important advantage that icons are more scalable and at the same
* time sharp and not blurred.
*/
class IconEngine
{
public:
- static QBitmap icon(ButtonIcon icon, int size);
+ static TQBitmap icon(ButtonIcon icon, int size);
private:
enum Object {
@@ -77,7 +77,7 @@ class IconEngine
CrossDiagonalLine
};
- static void drawObject(QPainter &p, Object object, int x, int y, int length, int lineWidth);
+ static void drawObject(TQPainter &p, Object object, int x, int y, int length, int lineWidth);
};
} // namespace KWinIaOra
diff --git a/src/kwin/iaoraclient.cpp b/src/kwin/iaoraclient.cpp
index 7c1af84..73f523f 100644
--- a/src/kwin/iaoraclient.cpp
+++ b/src/kwin/iaoraclient.cpp
@@ -24,15 +24,15 @@
#include <klocale.h>
-#include <qbitmap.h>
-#include <qdatetime.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qdesktopwidget.h>
+#include <tqbitmap.h>
+#include <tqdatetime.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqdesktopwidget.h>
#include "iaoraclient.h"
#include "iaorabutton.h"
@@ -43,9 +43,9 @@ namespace KWinIaOra
IaOraClient::IaOraClient(KDecorationBridge* bridge, KDecorationFactory* factory)
: KCommonDecoration (bridge, factory),
- s_titleFont(QFont() )
+ s_titleFont(TQFont() )
{
- memset(m_captionPixmaps, 0, sizeof(QPixmap*)*2);
+ memset(m_captionPixmaps, 0, sizeof(TQPixmap*)*2);
}
IaOraClient::~IaOraClient()
@@ -53,17 +53,17 @@ IaOraClient::~IaOraClient()
clearCaptionPixmaps();
}
-QString IaOraClient::visibleName() const
+TQString IaOraClient::visibleName() const
{
return i18n("Ia Ora");
}
-QString IaOraClient::defaultButtonsLeft() const
+TQString IaOraClient::defaultButtonsLeft() const
{
return "M";
}
-QString IaOraClient::defaultButtonsRight() const
+TQString IaOraClient::defaultButtonsRight() const
{
return "IAX";
}
@@ -199,7 +199,7 @@ void IaOraClient::init()
KCommonDecoration::init();
}
-QRegion IaOraClient::cornerShape(WindowCorner corner)
+TQRegion IaOraClient::cornerShape(WindowCorner corner)
{
int w = widget()->width();
int h = widget()->height();
@@ -207,37 +207,37 @@ QRegion IaOraClient::cornerShape(WindowCorner corner)
switch (corner) {
case WC_TopLeft:
if (layoutMetric(LM_TitleEdgeLeft) > 0)
- return QRegion(0, 0, 1, 1);// + QRegion(1, 0, 1, 1);
+ return TQRegion(0, 0, 1, 1);// + TQRegion(1, 0, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_TopRight:
if (layoutMetric(LM_TitleEdgeRight) > 0)
- return QRegion(w-1, 0, 1, 1);// + QRegion(w-2, 0, 1, 1);
+ return TQRegion(w-1, 0, 1, 1);// + TQRegion(w-2, 0, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_BottomLeft:
if (layoutMetric(LM_BorderBottom) > 0)
- return QRegion(0, h-1, 1, 1);
+ return TQRegion(0, h-1, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_BottomRight:
if (layoutMetric(LM_BorderBottom) > 0)
- return QRegion(w-1, h-1, 1, 1);
+ return TQRegion(w-1, h-1, 1, 1);
else
- return QRegion();
+ return TQRegion();
default:
- return QRegion();
+ return TQRegion();
}
}
-void IaOraClient::paintEvent(QPaintEvent *e)
+void IaOraClient::paintEvent(TQPaintEvent *e)
{
- QRegion region = e->region();
+ TQRegion region = e->region();
IaOraHandler *handler = Handler();
@@ -247,10 +247,10 @@ void IaOraClient::paintEvent(QPaintEvent *e)
bool active = isActive();
bool toolWindow = isToolWindow();
- QPainter painter(widget() );
+ TQPainter painter(widget() );
// often needed coordinates
- QRect r = widget()->rect();
+ TQRect r = widget()->rect();
int r_w = r.width();
// int r_h = r.height();
@@ -272,11 +272,11 @@ void IaOraClient::paintEvent(QPaintEvent *e)
const int sideHeight = borderBottomTop-titleEdgeBottomBottom-1;
- QRect Rtitle = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
+ TQRect Rtitle = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
- QRect tempRect;
+ TQRect tempRect;
// topSpacer
if(titleEdgeTop > 0)
@@ -310,7 +310,7 @@ void IaOraClient::paintEvent(QPaintEvent *e)
}
// titleSpacer
- const QPixmap &caption = captionPixmap();
+ const TQPixmap &caption = captionPixmap();
if(Rtitle.width() > 0)
{
m_captionRect = captionRect(); // also update m_captionRect!
@@ -378,10 +378,10 @@ void IaOraClient::paintEvent(QPaintEvent *e)
}
}
-QRect IaOraClient::captionRect() const
+TQRect IaOraClient::captionRect() const
{
- const QPixmap &caption = captionPixmap();
- QRect r = widget()->rect();
+ const TQPixmap &caption = captionPixmap();
+ TQRect r = widget()->rect();
const int titleHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom);
@@ -408,12 +408,12 @@ QRect IaOraClient::captionRect() const
}
else
tX = titleLeft+(titleWidth- caption.width() )/2;
- return QRect(tX, r.top()+titleEdgeTop, tW, titleHeight+titleEdgeBottom);
+ return TQRect(tX, r.top()+titleEdgeTop, tW, titleHeight+titleEdgeBottom);
}
void IaOraClient::updateCaption()
{
- QRect oldCaptionRect = m_captionRect;
+ TQRect oldCaptionRect = m_captionRect;
if (oldCaption != caption() )
clearCaptionPixmaps();
@@ -448,12 +448,12 @@ void IaOraClient::reset( unsigned long changed )
KCommonDecoration::reset(changed);
}
-const QPixmap &IaOraClient::getTitleBarTile(bool active) const
+const TQPixmap &IaOraClient::getTitleBarTile(bool active) const
{
return Handler()->pixmap(TitleBarTile, active, isToolWindow() );
}
-const QPixmap &IaOraClient::captionPixmap() const
+const TQPixmap &IaOraClient::captionPixmap() const
{
bool active = isActive();
@@ -464,34 +464,34 @@ const QPixmap &IaOraClient::captionPixmap() const
// not found, create new pixmap...
const uint maxCaptionLength = 300; // truncate captions longer than this!
- QString c(caption() );
+ TQString c(caption() );
if (c.length() > maxCaptionLength) {
c.truncate(maxCaptionLength);
c.append(" [...]");
}
- QFontMetrics fm(s_titleFont);
+ TQFontMetrics fm(s_titleFont);
int captionWidth = fm.width(c);
int captionHeight = fm.height();
const int th = layoutMetric(LM_TitleHeight, false) + layoutMetric(LM_TitleEdgeBottom, false);
- QPainter painter;
+ TQPainter painter;
const int thickness = 2;
- QPixmap *captionPixmap = new QPixmap(captionWidth+2*thickness, th);
+ TQPixmap *captionPixmap = new TQPixmap(captionWidth+2*thickness, th);
painter.begin(captionPixmap);
painter.drawTiledPixmap(captionPixmap->rect(),
Handler()->pixmap(TitleBarTile, active, isToolWindow()) );
painter.setFont(s_titleFont);
- QPoint tp(1, captionHeight-1);
+ TQPoint tp(1, captionHeight-1);
// if(Handler()->titleShadow())
// {
// painter.setPen(Handler()->getShadowColor());
-// painter.drawText(tp+QPoint(2,2), c);
+// painter.drawText(tp+TQPoint(2,2), c);
// }
painter.setPen(Handler()->getColor(TitleFont,active) );
painter.drawText(tp, c );
diff --git a/src/kwin/iaoraclient.h b/src/kwin/iaoraclient.h
index 5c66194..d85494f 100644
--- a/src/kwin/iaoraclient.h
+++ b/src/kwin/iaoraclient.h
@@ -37,35 +37,35 @@ public:
IaOraClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~IaOraClient();
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
- virtual QRegion cornerShape(WindowCorner corner);
+ virtual TQRegion cornerShape(WindowCorner corner);
virtual KCommonDecorationButton *createButton(ButtonType type);
virtual void init();
virtual void reset( unsigned long changed );
- virtual void paintEvent(QPaintEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
virtual void updateCaption();
- const QPixmap &getTitleBarTile(bool active) const;
+ const TQPixmap &getTitleBarTile(bool active) const;
private:
- QRect captionRect() const;
+ TQRect captionRect() const;
- const QPixmap &captionPixmap() const;
+ const TQPixmap &captionPixmap() const;
void clearCaptionPixmaps();
- mutable QPixmap *m_captionPixmaps[2];
+ mutable TQPixmap *m_captionPixmaps[2];
- QRect m_captionRect;
- QString oldCaption;
+ TQRect m_captionRect;
+ TQString oldCaption;
// settings...
- QFont s_titleFont;
+ TQFont s_titleFont;
};
} // KwinIaora
diff --git a/src/kwin/misc.cpp b/src/kwin/misc.cpp
index f050975..2da6b5b 100644
--- a/src/kwin/misc.cpp
+++ b/src/kwin/misc.cpp
@@ -23,26 +23,26 @@
#include <kpixmap.h>
#include <kpixmapeffect.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include "misc.h"
-QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
+TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a)
{
// normal button...
- QRgb rgb = bgColor.rgb();
- QRgb rgb_b = fgColor.rgb();
+ TQRgb rgb = bgColor.rgb();
+ TQRgb rgb_b = fgColor.rgb();
int alpha = a;
if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
- qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
- qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
+ TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255,
+ tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255,
+ tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) );
return result;
}
diff --git a/src/kwin/misc.h b/src/kwin/misc.h
index b304513..bce0e06 100644
--- a/src/kwin/misc.h
+++ b/src/kwin/misc.h
@@ -23,6 +23,6 @@
#ifndef MISC_H
#define MISC_H
-QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha);
+TQColor alphaBlendColors(const TQColor &backgroundColor, const TQColor &foregroundColor, const int alpha);
#endif // MISC_H
diff --git a/src/widget/Makefile.am b/src/widget/Makefile.am
index 50d677f..5609a26 100644
--- a/src/widget/Makefile.am
+++ b/src/widget/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = $(all_includes)
noinst_HEADERS = ia_ora.h bitmaps.h
kde_style_LTLIBRARIES = ia_ora.la
ia_ora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-ia_ora_la_LIBADD = -lkdefx -lkdecore -lqt-mt
+ia_ora_la_LIBADD = -lkdefx $(LIB_KDECORE) $(LIB_QT)
ia_ora_la_SOURCES = ia_ora.cpp
ia_ora_la_METASOURCES = AUTO
diff --git a/src/widget/bitmaps.h b/src/widget/bitmaps.h
index 8744288..58bd4b9 100644
--- a/src/widget/bitmaps.h
+++ b/src/widget/bitmaps.h
@@ -1,7 +1,7 @@
#ifndef __BITMAPS_H
#define __BITMAPS_H
-// Fix Qt's wacky image positions
+// Fix TQt's wacky image positions
static const char * const hc_minimize_toto_xpm[] = {
"12 12 2 1",
"# c #000000",
@@ -38,41 +38,41 @@ static const char * const hc_close_toto_xpm[] = {
"..##....##.."};
-static const QCOORD s_arrowUp[]={0,4,5,0,
+static const TQCOORD s_arrowUp[]={0,4,5,0,
1,3,6,1,
2,4,7,2,
3,1,8,3,
4,0,9,4};
-static const QCOORD s_arrowDown[]={0,0,9,0,
+static const TQCOORD s_arrowDown[]={0,0,9,0,
1,1,8,1,
2,2,7,2,
3,3,6,3,
4,4,5,4};
-static const QCOORD c_edit_arrow[]={-4,-5, 4, -5,
+static const TQCOORD c_edit_arrow[]={-4,-5, 4, -5,
-4 ,-2, 4, -2,
-3 ,-1, 3, -1,
-2 ,0, 2, 0,
-1, 1, 1, 1,
0, 2, 0, 2};
-static const QCOORD c_arrow[]={-4 ,-2, 4, -2,
+static const TQCOORD c_arrow[]={-4 ,-2, 4, -2,
-3 ,-1, 3, -1,
-2 ,0, 2, 0,
-1, 1, 1, 1,
0, 2, 0, 2};
-const QCOORD u_spinarrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0 };
-const QCOORD d_spinarrow[]={ -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
+const TQCOORD u_spinarrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0 };
+const TQCOORD d_spinarrow[]={ -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
-const QCOORD u_arrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0, -3,1, 3,1 };
-const QCOORD d_arrow[]={ -3,-2, 3,-2, -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
-const QCOORD l_arrow[]={ 1,-3, 1,-3, 0,-2, 1,-2, -1,-1, 1,-1, -2,0, 1,0, -1,1, 1,1, 0,2, 1,2, 1,3, 1,3 };
-const QCOORD r_arrow[]={ -2,-3, -2,-3, -2,-2, -1,-2, -2,-1, 0,-1, -2,0, 1,0, -2,1, 0,1, -2,2, -1,2, -2,3, -2,3 };
+const TQCOORD u_arrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0, -3,1, 3,1 };
+const TQCOORD d_arrow[]={ -3,-2, 3,-2, -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
+const TQCOORD l_arrow[]={ 1,-3, 1,-3, 0,-2, 1,-2, -1,-1, 1,-1, -2,0, 1,0, -1,1, 1,1, 0,2, 1,2, 1,3, 1,3 };
+const TQCOORD r_arrow[]={ -2,-3, -2,-3, -2,-2, -1,-2, -2,-1, 0,-1, -2,0, 1,0, -2,1, 0,1, -2,2, -1,2, -2,3, -2,3 };
-#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
diff --git a/src/widget/ia_ora.cpp b/src/widget/ia_ora.cpp
index a508738..0e3e5d2 100644
--- a/src/widget/ia_ora.cpp
+++ b/src/widget/ia_ora.cpp
@@ -29,50 +29,50 @@
* Boston, MA 02111-1307, USA.
*/
-#include <qdict.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qstyleplugin.h>
-#include <qprogressbar.h>
-
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qmenubar.h>
-#include <qpushbutton.h>
-#include <qscrollbar.h>
-#include <qslider.h>
-#include <qtabbar.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqdict.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqstyleplugin.h>
+#include <tqprogressbar.h>
+
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqmenubar.h>
+#include <tqpushbutton.h>
+#include <tqscrollbar.h>
+#include <tqslider.h>
+#include <tqtabbar.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#include <kstandarddirs.h>
#include <kdrawutil.h>
#include <kpixmapeffect.h>
-#include <qradiobutton.h>
-#include <qimage.h>
-#include <qcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqimage.h>
+#include <tqcheckbox.h>
#include "ia_ora.h"
#include "ia_ora.moc"
#include "bitmaps.h"
-#include <qlistview.h>
-#include <qlistbox.h>
+#include <tqlistview.h>
+#include <tqlistbox.h>
#include <kdebug.h>
//#define USE_CROSS 1
// -- Style Plugin Interface -------------------------
-class ThemeMdvStylePlugin : public QStylePlugin
+class ThemeMdvStylePlugin : public TQStylePlugin
{
public:
ThemeMdvStylePlugin() {}
~ThemeMdvStylePlugin() {}
- QStringList keys() const
+ TQStringList keys() const
{
- return QStringList() << "ia_ora";
+ return TQStringList() << "ia_ora";
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
if ( key == "ia_ora" )
return new MandrivaStyle( );
@@ -85,7 +85,7 @@ Q_EXPORT_PLUGIN( ThemeMdvStylePlugin )
// ### Remove globals
-QBitmap menuBmp;
+TQBitmap menuBmp;
static bool scrollmin = false;
static bool scrollmax = false;
@@ -118,7 +118,7 @@ MandrivaStyle::MandrivaStyle( )
verticalLine = 0;
// setup pixmap cache...
- pixmapCache = new QIntCache<CacheEntry>(150000, 499);
+ pixmapCache = new TQIntCache<CacheEntry>(150000, 499);
pixmapCache->setAutoDelete(true);
}
@@ -131,7 +131,7 @@ MandrivaStyle::~MandrivaStyle()
}
-MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const QColorGroup &cg) const
+MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const TQColorGroup &cg) const
{
MandrivaColorData *cdata;
//define mandriva color
@@ -143,16 +143,16 @@ MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const QColorGroup
//G0 gb.background()
//B2 gb.hightlight
//Hardcode
- if ( cg.background() == QColor( "#EFF3F7" ) )
+ if ( cg.background() == TQColor( "#EFF3F7" ) )
{
//Be sure to use design color
- cdata->shades[0]=QColor( "#EFF3F7" );
- cdata->shades[1]=QColor( "#DFE7EF" );
- cdata->shades[2]=QColor( "#CFD7DF" );
- cdata->shades[3]=QColor( "#C7D3DF" );
- cdata->shades[4]=QColor( "#B6C3CF" );
- cdata->shades[5]=QColor( "#A6B2C7" );
- cdata->shades[6]=QColor( "#8692A6" );
+ cdata->shades[0]=TQColor( "#EFF3F7" );
+ cdata->shades[1]=TQColor( "#DFE7EF" );
+ cdata->shades[2]=TQColor( "#CFD7DF" );
+ cdata->shades[3]=TQColor( "#C7D3DF" );
+ cdata->shades[4]=TQColor( "#B6C3CF" );
+ cdata->shades[5]=TQColor( "#A6B2C7" );
+ cdata->shades[6]=TQColor( "#8692A6" );
}
else
{
@@ -166,39 +166,39 @@ MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const QColorGroup
cdata->shades[6]=cdata->shades[0].dark(178);
}
- if ( cg.highlight() == QColor("#4965AE" ) ) // Blue
+ if ( cg.highlight() == TQColor("#4965AE" ) ) // Blue
{
- cdata->blueMdkColor[0]=QColor("#A6B6E7" );
- cdata->blueMdkColor[1]=QColor("#8EA2CF" );
- cdata->blueMdkColor[2]=QColor("#4965AE" );
- cdata->blueMdkColor[3]=QColor("#415DA6" );
- cdata->blueMdkColor[4]=QColor("#21459C" );
+ cdata->blueMdkColor[0]=TQColor("#A6B6E7" );
+ cdata->blueMdkColor[1]=TQColor("#8EA2CF" );
+ cdata->blueMdkColor[2]=TQColor("#4965AE" );
+ cdata->blueMdkColor[3]=TQColor("#415DA6" );
+ cdata->blueMdkColor[4]=TQColor("#21459C" );
}
- else if ( cg.highlight() == QColor("#8EC7FF" ) ) // Arctic
+ else if ( cg.highlight() == TQColor("#8EC7FF" ) ) // Arctic
{
- cdata->blueMdkColor[0]=QColor("#EFF7FF" );
- cdata->blueMdkColor[1]=QColor("#C7DFFF" );
- cdata->blueMdkColor[2]=QColor("#8EC7FF" );
- cdata->blueMdkColor[3]=QColor("#79BEFF" );
- cdata->blueMdkColor[4]=QColor("#69B6FF" );
+ cdata->blueMdkColor[0]=TQColor("#EFF7FF" );
+ cdata->blueMdkColor[1]=TQColor("#C7DFFF" );
+ cdata->blueMdkColor[2]=TQColor("#8EC7FF" );
+ cdata->blueMdkColor[3]=TQColor("#79BEFF" );
+ cdata->blueMdkColor[4]=TQColor("#69B6FF" );
}
- else if ( cg.highlight() == QColor("#7BAAE7" ) ) // Smooth
+ else if ( cg.highlight() == TQColor("#7BAAE7" ) ) // Smooth
{
- cdata->blueMdkColor[0]=QColor("#CEE3FF" );
- cdata->blueMdkColor[1]=QColor("#ADCFFF" );
- cdata->blueMdkColor[2]=QColor("#7BAAE7" );
- cdata->blueMdkColor[3]=QColor("#5A8AD6" );
- cdata->blueMdkColor[4]=QColor("#427DC6" );
+ cdata->blueMdkColor[0]=TQColor("#CEE3FF" );
+ cdata->blueMdkColor[1]=TQColor("#ADCFFF" );
+ cdata->blueMdkColor[2]=TQColor("#7BAAE7" );
+ cdata->blueMdkColor[3]=TQColor("#5A8AD6" );
+ cdata->blueMdkColor[4]=TQColor("#427DC6" );
}
- else if ( cg.highlight() == QColor("#F7B610" ) ) // Orange
+ else if ( cg.highlight() == TQColor("#F7B610" ) ) // Orange
{
- cdata->blueMdkColor[0]=QColor("#FFDF10" );
- cdata->blueMdkColor[1]=QColor("#FFCB10" );
- cdata->blueMdkColor[2]=QColor("#F7B610" );
- cdata->blueMdkColor[3]=QColor("#FFA208" );
- cdata->blueMdkColor[4]=QColor("#F79600" );
+ cdata->blueMdkColor[0]=TQColor("#FFDF10" );
+ cdata->blueMdkColor[1]=TQColor("#FFCB10" );
+ cdata->blueMdkColor[2]=TQColor("#F7B610" );
+ cdata->blueMdkColor[3]=TQColor("#FFA208" );
+ cdata->blueMdkColor[4]=TQColor("#F79600" );
}
- else if ( cg.highlight() == QColor("#CFD7DF" ) ) // Gray
+ else if ( cg.highlight() == TQColor("#CFD7DF" ) ) // Gray
{
cdata->blueMdkColor[0]=cdata->shades[1];
cdata->blueMdkColor[1]=cdata->shades[2];
@@ -221,16 +221,16 @@ MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const QColorGroup
for (int i=0; i < 7; ++i)
cdata->buttonColor[i] = cdata->shades[i];
}
- else if ( cg.button() == QColor( "#EFF3F7" ) )
+ else if ( cg.button() == TQColor( "#EFF3F7" ) )
{
//Be sure to use design color
- cdata->buttonColor[0]=QColor( "#EFF3F7" );
- cdata->buttonColor[1]=QColor( "#DFE7EF" );
- cdata->buttonColor[2]=QColor( "#CFD7DF" );
- cdata->buttonColor[3]=QColor( "#C7D3DF" );
- cdata->buttonColor[4]=QColor( "#B6C3CF" );
- cdata->buttonColor[5]=QColor( "#A6B2C7" );
- cdata->buttonColor[6]=QColor( "#8692A6" );
+ cdata->buttonColor[0]=TQColor( "#EFF3F7" );
+ cdata->buttonColor[1]=TQColor( "#DFE7EF" );
+ cdata->buttonColor[2]=TQColor( "#CFD7DF" );
+ cdata->buttonColor[3]=TQColor( "#C7D3DF" );
+ cdata->buttonColor[4]=TQColor( "#B6C3CF" );
+ cdata->buttonColor[5]=TQColor( "#A6B2C7" );
+ cdata->buttonColor[6]=TQColor( "#8692A6" );
}
else
{
@@ -247,23 +247,23 @@ MandrivaStyle::MandrivaColorData *MandrivaStyle::realizeData (const QColorGroup
}
/* We assume this seldom collides, since we can only cache one at a time */
-static long hashColorGroup (const QColorGroup &cg)
+static long hashColorGroup (const TQColorGroup &cg)
{
return cg.button().rgb();// << 8 ^ cg.button().rgb();
}
-const MandrivaStyle::MandrivaColorData *MandrivaStyle::lookupData (const QColorGroup &cg) const
+const MandrivaStyle::MandrivaColorData *MandrivaStyle::lookupData (const TQColorGroup &cg) const
{
MandrivaColorData *cdata;
long h;
- QIntCache<MandrivaColorData> *cache;
+ TQIntCache<MandrivaColorData> *cache;
h = hashColorGroup (cg);
// Cast away the const crap
// Nasty, but how else would i do it?
- cache = (QIntCache<MandrivaColorData> *)&m_dataCache;
+ cache = (TQIntCache<MandrivaColorData> *)&m_dataCache;
cdata = cache->find(h);
@@ -281,25 +281,25 @@ const MandrivaStyle::MandrivaColorData *MandrivaStyle::lookupData (const QColorG
return cdata;
}
-void MandrivaStyle::getShade (const QColorGroup &cg, int shadenr, QColor &res) const
+void MandrivaStyle::getShade (const TQColorGroup &cg, int shadenr, TQColor &res) const
{
const MandrivaColorData *cdata = lookupData(cg);
res = cdata->shades[shadenr];
}
-void MandrivaStyle::updateHoverControl(const QPoint &pos)
+void MandrivaStyle::updateHoverControl(const TQPoint &pos)
{
- QRegion repaint;
+ TQRegion repaint;
enum Hover oldControl = hoverControl;
hoverControl = HoverNone;
if (!hoverWidget)
return;
- if (hoverWidget->inherits("QScrollBar"))
+ if (hoverWidget->inherits("TQScrollBar"))
{
- QRect subline(querySubControlMetrics(CC_ScrollBar, hoverWidget,
+ TQRect subline(querySubControlMetrics(CC_ScrollBar, hoverWidget,
SC_ScrollBarSubLine)),
addline(querySubControlMetrics(CC_ScrollBar, hoverWidget,
SC_ScrollBarAddLine)),
@@ -322,14 +322,14 @@ void MandrivaStyle::updateHoverControl(const QPoint &pos)
|| oldControl == HoverScrollBarSlider)
repaint += slider;
}
- else if (hoverWidget->inherits("QComboBox"))
+ else if (hoverWidget->inherits("TQComboBox"))
{
- QComboBox *cb = static_cast<QComboBox*>(hoverWidget);
+ TQComboBox *cb = static_cast<TQComboBox*>(hoverWidget);
// for not editable combo, this is not necessary
if (!cb->editable())
return;
- QRect comboArrow(querySubControlMetrics(CC_ComboBox, hoverWidget,
+ TQRect comboArrow(querySubControlMetrics(CC_ComboBox, hoverWidget,
SC_ComboBoxArrow)),
comboEditField(querySubControlMetrics(CC_ComboBox, hoverWidget,
SC_ComboBoxEditField));
@@ -351,49 +351,49 @@ void MandrivaStyle::updateHoverControl(const QPoint &pos)
hoverWidget->repaint(repaint, false);
}
-void MandrivaStyle::polish(QApplication* app)
+void MandrivaStyle::polish(TQApplication* app)
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
}
-void MandrivaStyle::polish(QWidget* widget)
+void MandrivaStyle::polish(TQWidget* widget)
{
// Put in order of highest occurance to maximize hit rate
- if ( widget->inherits( "QComboBox" )
- || widget->inherits("QScrollBar")
- || widget->inherits("QHeader")
- || widget->inherits( "QSlider" )
- || widget->inherits( "QCheckBox" )
- || widget->inherits("QSplitterHandle"))
+ if ( widget->inherits( "TQComboBox" )
+ || widget->inherits("TQScrollBar")
+ || widget->inherits("TQHeader")
+ || widget->inherits( "TQSlider" )
+ || widget->inherits( "TQCheckBox" )
+ || widget->inherits("TQSplitterHandle"))
{
widget->installEventFilter(this);
- if (widget->inherits( "QScrollBar" ) || widget->inherits( "QComboBox" ))
+ if (widget->inherits( "TQScrollBar" ) || widget->inherits( "TQComboBox" ))
widget->setMouseTracking( true );
}
- else if (widget->inherits("QMenuBar")
- || widget->inherits("QPopupMenu") )
+ else if (widget->inherits("TQMenuBar")
+ || widget->inherits("TQPopupMenu") )
{
- widget->setBackgroundMode(QWidget::NoBackground);
+ widget->setBackgroundMode(TQWidget::NoBackground);
}
- else if (widget->inherits("QPushButton") )
+ else if (widget->inherits("TQPushButton") )
{
widget->installEventFilter(this);
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ widget->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "QToolBarSeparator" ) )
+ else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
{
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ widget->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if (widget->inherits("QToolBarExtensionWidget"))
+ else if (widget->inherits("TQToolBarExtensionWidget"))
{
widget->installEventFilter(this);
}
else if ( widget->parentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) )
+ ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) )
|| widget->inherits( "KCompletionBox" ) ) )
{
- QListBox* listbox = (QListBox*) widget;
+ TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
listbox->setBackgroundMode( NoBackground );
widget->installEventFilter( this );
@@ -407,47 +407,47 @@ void MandrivaStyle::polish(QWidget* widget)
}
-void MandrivaStyle::unPolish(QWidget* widget)
+void MandrivaStyle::unPolish(TQWidget* widget)
{
- QFont f = QApplication::font();
- QApplication::setFont( f, TRUE ); // get rid of the special fonts for special widget classes
+ TQFont f = TQApplication::font();
+ TQApplication::setFont( f, TRUE ); // get rid of the special fonts for special widget classes
- if ( widget->inherits( "QComboBox" )
- || widget->inherits("QScrollBar")
- || widget->inherits("QHeader")
- || widget->inherits( "QSlider" )
- || widget->inherits( "QCheckBox" )
- || widget->inherits("QSplitterHandle"))
+ if ( widget->inherits( "TQComboBox" )
+ || widget->inherits("TQScrollBar")
+ || widget->inherits("TQHeader")
+ || widget->inherits( "TQSlider" )
+ || widget->inherits( "TQCheckBox" )
+ || widget->inherits("TQSplitterHandle"))
{
widget->removeEventFilter(this);
}
- else if ( widget->inherits("QMenuBar")
- || widget->inherits("QPopupMenu"))
+ else if ( widget->inherits("TQMenuBar")
+ || widget->inherits("TQPopupMenu"))
{
- widget->setBackgroundMode(QWidget::PaletteBackground);
+ widget->setBackgroundMode(TQWidget::PaletteBackground);
}
- else if ( widget->inherits("QPushButton") )
+ else if ( widget->inherits("TQPushButton") )
{
widget->removeEventFilter(this);
}
- else if (widget->inherits("QToolBarExtensionWidget"))
+ else if (widget->inherits("TQToolBarExtensionWidget"))
{
widget->removeEventFilter(this);
}
else if ( widget->parentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) )
+ ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) )
|| widget->inherits( "KCompletionBox" ) ) )
{
- QListBox* listbox = (QListBox*) widget;
+ TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
listbox->setBackgroundMode( PaletteBackground );
widget->removeEventFilter( this );
widget->clearMask();
}
- //For toolbar internal separators, return to button, too (can't use qt_cast here since don't have access to the class)
- else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "QToolBarSeparator" ) )
+ //For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class)
+ else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
{
- widget->setBackgroundMode( QWidget::PaletteBackground );
+ widget->setBackgroundMode( TQWidget::PaletteBackground );
}
else if ( !qstrcmp( widget->name(), kdeToolbarWidget) )
{
@@ -459,13 +459,13 @@ void MandrivaStyle::unPolish(QWidget* widget)
}
/* reimp. */
-void MandrivaStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void MandrivaStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
- QColor col = cg.background();
+ TQColor col = cg.background();
//FIXME !!!!!!!!!!!!!!!
#ifdef Q_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals
- if ( QPaintDevice::x11AppDepth() >= 24 )
+ if ( TQPaintDevice::x11AppDepth() >= 24 )
KPixmapEffect::gradient( pix, col.light(120), col.dark(115),
KPixmapEffect::HorizontalGradient );
else
@@ -475,11 +475,11 @@ void MandrivaStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
void MandrivaStyle::drawHandle( const MandrivaColorData *cdata,
- QPainter *p,
- const QRect &r,
- const QColorGroup & /*cg*/,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup & /*cg*/,
SFlags flags,
- const QStyleOption& /*opt*/,
+ const TQStyleOption& /*opt*/,
bool /*drawBorder*/ /*for the future remove it*/, bool drawGradient) const
{
int x,y,width,height;
@@ -491,7 +491,7 @@ void MandrivaStyle::drawHandle( const MandrivaColorData *cdata,
{
if ( drawGradient )
- renderGradient( p, QRect(x+2,y+2,width-4, height-4),
+ renderGradient( p, TQRect(x+2,y+2,width-4, height-4),
cdata->shades[2], cdata->shades[0],false);
if(width > 30)
{
@@ -499,19 +499,19 @@ void MandrivaStyle::drawHandle( const MandrivaColorData *cdata,
for(i = 0; i < 3; i++)
{
drawHandlePoint (cdata,p, (delta + 9*i),
- y + QMAX((height-4)/2,0));
+ y + TQMAX((height-4)/2,0));
}
}
else
{
drawHandlePoint (cdata, p, x + (width-4)/2 ,
- y + QMAX((height-4)/2,0));
+ y + TQMAX((height-4)/2,0));
}
}
else
{
if( drawGradient )
- renderGradient(p, QRect(x+2,y+2,width-4, height-4),
+ renderGradient(p, TQRect(x+2,y+2,width-4, height-4),
cdata->shades[0],cdata->shades[2], true);
if(height > 30)
@@ -519,19 +519,19 @@ void MandrivaStyle::drawHandle( const MandrivaColorData *cdata,
delta = y + (height / 2) - 11;
for(i = 0; i < 3; i++)
{
- drawHandlePoint (cdata, p, x + QMAX((width-4)/2,0),
+ drawHandlePoint (cdata, p, x + TQMAX((width-4)/2,0),
delta+9*i);
}
}
else
{
- drawHandlePoint (cdata,p, x + QMAX((width-4)/2,0),
+ drawHandlePoint (cdata,p, x + TQMAX((width-4)/2,0),
y + (height-4) / 2);
}
}
}
-void MandrivaStyle::drawGroupBox(const MandrivaColorData *cdata, const QColorGroup & cg, QPainter *p, const QRect & r, bool /*active*/, bool sunken)const
+void MandrivaStyle::drawGroupBox(const MandrivaColorData *cdata, const TQColorGroup & cg, TQPainter *p, const TQRect & r, bool /*active*/, bool sunken)const
{
int x,y,w,h;
x=r.x(); y=r.y(); w=r.width(); h=r.height();
@@ -560,12 +560,12 @@ void MandrivaStyle::drawGroupBox(const MandrivaColorData *cdata, const QColorGro
}
void MandrivaStyle::drawLineSeparator(const MandrivaColorData *cdata,
- const QColorGroup & cg, QPainter *p,
- const QRect & r, bool horizontal,
+ const TQColorGroup & cg, TQPainter *p,
+ const TQRect & r, bool horizontal,
bool /*active*/, bool /*sunken*/,
bool skipOffset )const
{
- QRect line1, line2;
+ TQRect line1, line2;
p->fillRect(r, cg.background());
if (horizontal)
@@ -578,8 +578,8 @@ void MandrivaStyle::drawLineSeparator(const MandrivaColorData *cdata,
// draw the separator in the middle of the given rect
int middle = (r.top() + r.bottom()) / 2;
- line1 = QRect(r.x() + offset, middle, r.width() - 2*offset, 1);
- line2 = QRect(r.x() + offset, middle+1, r.width() - 2*offset, 1);
+ line1 = TQRect(r.x() + offset, middle, r.width() - 2*offset, 1);
+ line2 = TQRect(r.x() + offset, middle+1, r.width() - 2*offset, 1);
}
else
{
@@ -591,8 +591,8 @@ void MandrivaStyle::drawLineSeparator(const MandrivaColorData *cdata,
// draw the separator in the middle of the given rect
int middle = (r.left() + r.right()) / 2;
- line1 = QRect(middle, r.y() + offset, 1, r.height() - 2*offset);
- line2 = QRect(middle+1, r.y() + offset, 1, r.height() - 2*offset);
+ line1 = TQRect(middle, r.y() + offset, 1, r.height() - 2*offset);
+ line2 = TQRect(middle+1, r.y() + offset, 1, r.height() - 2*offset);
}
p->setPen(cdata->shades[2]);
@@ -603,7 +603,7 @@ void MandrivaStyle::drawLineSeparator(const MandrivaColorData *cdata,
}
-void MandrivaStyle::drawFrame( const MandrivaColorData *cdata, const QColorGroup & cg, QPainter *p, const QRect & r, bool active )const
+void MandrivaStyle::drawFrame( const MandrivaColorData *cdata, const TQColorGroup & cg, TQPainter *p, const TQRect & r, bool active )const
{
//use by checkbox,lineedit,spinbox,combobox
int x,y,w,h;
@@ -628,11 +628,11 @@ void MandrivaStyle::drawFrame( const MandrivaColorData *cdata, const QColorGroup
}
// This function draws primitive elements as well as their masks.
void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
int x, y, xw, yh;
x= r.x();
@@ -665,7 +665,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
case PE_PanelMenuBar: // Menu
{
//FIXME
- p->fillRect(r, cg.brush(QColorGroup::Background));
+ p->fillRect(r, cg.brush(TQColorGroup::Background));
int x2 = r.x()+r.width()-1;
int y2 = r.y()+r.height()-1;
@@ -693,8 +693,8 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
{
//Gradient border colors.
//(Same as in gradients.cpp)
- QColor gradTop = cg.base();
- QColor gradBot = cdata->shades[2];
+ TQColor gradTop = cg.base();
+ TQColor gradBot = cdata->shades[2];
if (horiz)
{
//Top line
@@ -729,9 +729,9 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowResizeHandle:
case PE_Splitter:
{
- QRect real(r);
+ TQRect real(r);
real.addCoords( 1, 0,0 ,0);
- QColor color = (hoverWidget == p->device())?cdata->shades[1]:cg.background();
+ TQColor color = (hoverWidget == p->device())?cdata->shades[1]:cg.background();
p->fillRect( r, color );
p->setPen( cg.background() );
p->drawPoint( r.x(), 0 );
@@ -747,7 +747,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
drawFrame( cdata, cg, p, r, true );
break;
}
- case PE_Panel: //QListBox and co
+ case PE_Panel: //TQListBox and co
{
if(kickerMode)
break;
@@ -769,7 +769,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
: opt.lineWidth()*/1;
if (lw == 1 || lw == 2)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x,y,w,h;
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
@@ -830,8 +830,8 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
{
bool horizontal = true;
bool isFirst = false;
- if (p && p->device()->devType() == QInternal::Widget) {
- QHeader* hdr = dynamic_cast<QHeader*>(p->device());
+ if (p && p->device()->devType() == TQInternal::Widget) {
+ TQHeader* hdr = dynamic_cast<TQHeader*>(p->device());
if (hdr)
{
horizontal = ( hdr->orientation() == Horizontal );
@@ -840,26 +840,26 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
}
int x,y,w,h;
r.rect(&x, &y, &w, &h);
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
//TODO verify it
if (flags & Style_MouseOver)
- renderGradient( p, QRect(x, y, w, h-1),
+ renderGradient( p, TQRect(x, y, w, h-1),
cdata->shades[0],cdata->shades[2], !horizontal );
else if ( on )
- renderGradient(p, QRect(x, y, w, h-1),
+ renderGradient(p, TQRect(x, y, w, h-1),
cdata->shades[0],cdata->shades[2], !horizontal );
else if ( down )
- renderGradient(p, QRect(x, y, w, h-1),
+ renderGradient(p, TQRect(x, y, w, h-1),
cdata->shades[2],cdata->shades[1], !horizontal );
else
- renderGradient( p, QRect(x, y, w, h-1),
+ renderGradient( p, TQRect(x, y, w, h-1),
cdata->shades[0],cdata->shades[2], !horizontal );
//don't draw separator for first eleemtn
if ( !isFirst )
{
- drawLineSeparator(cdata, cg, p, QRect(x,y,2,h), false, true, false, false);
+ drawLineSeparator(cdata, cg, p, TQRect(x,y,2,h), false, true, false, false);
}
p->setPen( oldPen );
break;
@@ -868,7 +868,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
{ //radiobutton
bool enabled = flags & Style_Enabled;
p->setPen( cdata->shades[4] );
- p->setBrush( QBrush( enabled ? cg.base() : cdata->shades[0] ) );
+ p->setBrush( TQBrush( enabled ? cg.base() : cdata->shades[0] ) );
p->drawEllipse( r );
bool specificBackground = excludeColor( cg.highlight(), enabled );
@@ -899,11 +899,11 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
}
case PE_CheckListIndicator:
{
- QCheckListItem *item = opt.checkListItem();
+ TQCheckListItem *item = opt.checkListItem();
if(!item)
return;
int x = r.x(), y = r.y(), w = r.width(), h = r.width();
- drawPrimitive(PE_Indicator, p, QRect(x-2, y-2 , w+3, h+3 ) , cg, flags );
+ drawPrimitive(PE_Indicator, p, TQRect(x-2, y-2 , w+3, h+3 ) , cg, flags );
break;
}
//case PE_IndicatorMask:
@@ -912,7 +912,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
bool enabled = flags & Style_Enabled;
//draw background use base color
- QRect ar( x+1, y+1, x+11, y+10 );
+ TQRect ar( x+1, y+1, x+11, y+10 );
p->fillRect (ar, enabled ? cg.base() : cdata->shades[0]);
bool specificBackground = excludeColor( cg.highlight(), enabled );
//TODO mouse over
@@ -940,7 +940,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine( x+8, y+8, x+10, y+8 );
p->drawLine( x+7, y+7, x+9, y+7 );
#else
- if (QApplication::reverseLayout() )
+ if (TQApplication::reverseLayout() )
{
if ( specificBackground )
p->setPen( enabled ? cdata->shades[6]:cdata->shades[3] );
@@ -956,7 +956,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine( x+9,y+6,x+10,y+6 );
if ( specificBackground )
- p->setPen( enabled ? Qt::black : cdata->shades[4]);
+ p->setPen( enabled ? TQt::black : cdata->shades[4]);
else
p->setPen( enabled ? cdata->blueMdkColor[4] : cdata->shades[4]);
p->drawLine( x+5,y+7,x+10,y+7 );
@@ -979,7 +979,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine( x+2,y+6,x+3,y+6 );
if ( specificBackground )
- p->setPen( enabled ? Qt::black : cdata->shades[4]);
+ p->setPen( enabled ? TQt::black : cdata->shades[4]);
else
p->setPen( enabled ? cdata->blueMdkColor[4] : cdata->shades[4]);
@@ -999,7 +999,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine( x+4, y+5, x+8, y+5 );
p->drawLine( x+3, y+6, x+9, y+6 );
if ( specificBackground )
- p->setPen( enabled ? Qt::black : cdata->shades[5]);
+ p->setPen( enabled ? TQt::black : cdata->shades[5]);
else
p->setPen( enabled ? cdata->blueMdkColor[4] : cdata->shades[5]);
p->drawLine( x+4, y+7, x+8, y+7 );
@@ -1052,8 +1052,8 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
case PE_SpinWidgetDown:
{
p->save();
- QRect br;
- QRect re( r );
+ TQRect br;
+ TQRect re( r );
br.setRect( r.x() , r.y(), r.width()+1, r.height() );
bool down = flags & Style_Down;
@@ -1074,7 +1074,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine( br.x()-1, br.y(), br.x()-1, br.x()+r.height() ); //TODO verify +1 ???
if ( pe == PE_SpinWidgetUp )
{
- QRect tmp( re );
+ TQRect tmp( re );
tmp.addCoords( -1, -2, 1, 1 );
p->drawRect( tmp );
//p->drawLine(br.x()-1, br.y()+br.height(), br.x()+br.width()-1, br.y()+br.height() ); //TODO verify +1 ???
@@ -1083,7 +1083,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
}
else
{
- QRect tmp( re );
+ TQRect tmp( re );
tmp.addCoords( -1, 0, 1, 1 );
p->drawRect( tmp );
@@ -1101,14 +1101,14 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
//TODO don't use same color for active/inactive
p->setPen( cg.buttonText() );
p->setBrush( cg.buttonText() );
- QPointArray a;
+ TQPointArray a;
if ( pe == PE_SpinWidgetDown )
- a.setPoints(QCOORDARRLEN(d_spinarrow), d_spinarrow);
+ a.setPoints(TQCOORDARRLEN(d_spinarrow), d_spinarrow);
else
{
//move one pixel up
re.addCoords( 0, 1,0,0);
- a.setPoints(QCOORDARRLEN(u_spinarrow), u_spinarrow);
+ a.setPoints(TQCOORDARRLEN(u_spinarrow), u_spinarrow);
}
drawMandrivaArrow( a, p, re, cg, flags, opt );
p->restore();
@@ -1121,7 +1121,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->setPen( cdata->shades[5]);
if( scrollmin && scrollmax )
{
- QRect tmpRect(r);
+ TQRect tmpRect(r);
if( !horizontal )
tmpRect.addCoords(0,0,0,1);
else
@@ -1146,19 +1146,19 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
// if the mouse is over the slider, the first half of the gradient changes
bool mouseover = flags & Style_MouseOver;
- QRect tmpRect(r), firstHalf, secondHalf;
+ TQRect tmpRect(r), firstHalf, secondHalf;
if (horizontal)
{
tmpRect.addCoords( 0, 1, 0, -1 );
- firstHalf = QRect(tmpRect.x(), tmpRect.y(), tmpRect.width(), tmpRect.height()/2);
- secondHalf = QRect(tmpRect.x(), tmpRect.height()/2 + 1,
+ firstHalf = TQRect(tmpRect.x(), tmpRect.y(), tmpRect.width(), tmpRect.height()/2);
+ secondHalf = TQRect(tmpRect.x(), tmpRect.height()/2 + 1,
tmpRect.width(), tmpRect.height() - (tmpRect.height()/2));
}
else
{
tmpRect.addCoords( 1, 0, -1, 0 );
- firstHalf = QRect(tmpRect.x(), tmpRect.y(), tmpRect.width()/2, tmpRect.height());
- secondHalf = QRect(tmpRect.width()/2 + 1, tmpRect.y(),
+ firstHalf = TQRect(tmpRect.x(), tmpRect.y(), tmpRect.width()/2, tmpRect.height());
+ secondHalf = TQRect(tmpRect.width()/2 + 1, tmpRect.y(),
tmpRect.width() - (tmpRect.width()/2), tmpRect.height());
}
@@ -1217,11 +1217,11 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_Horizontal) {
p->drawLine(x, y, x2, y);
p->drawLine(x, y2, x2, y2);
- p->fillRect( QRect( x, y+1, w, h-2),cdata->shades[0] );
+ p->fillRect( TQRect( x, y+1, w, h-2),cdata->shades[0] );
} else {
p->drawLine(x, y, x, y2);
p->drawLine(x2, y, x2, y2);
- p->fillRect( QRect( x+1, y, w-2, h),cdata->shades[0] );
+ p->fillRect( TQRect( x+1, y, w-2, h),cdata->shades[0] );
}
break;
}
@@ -1243,10 +1243,10 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
if (w > 4 && h > 4)
{
if (sunken)
- renderGradient(p, QRect(x+1, y+1, w-2, h-2),
+ renderGradient(p, TQRect(x+1, y+1, w-2, h-2),
cdata->shades[2],cdata->shades[1], !horizontal);
else if ( flags & Style_Enabled )
- renderGradient(p, QRect(x+1, y+1, w-2, h-2),
+ renderGradient(p, TQRect(x+1, y+1, w-2, h-2),
cdata->shades[0], mouseover ? cdata->shades[1] : cdata->shades[2], !horizontal );
}
@@ -1301,7 +1301,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
{
if (menuBmp.isNull())
{
- menuBmp = QBitmap( 12 , 12, menu_check_bits, true);
+ menuBmp = TQBitmap( 12 , 12, menu_check_bits, true);
menuBmp.setMask(menuBmp);
}
int x,y;
@@ -1340,7 +1340,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+2, y+2, w-4, h-4, cg.button());
/*else
- renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), flags & Style_Horizontal );*/
}
break;
@@ -1350,23 +1350,23 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
{
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft)
{
- QPointArray a;
+ TQPointArray a;
//array point define into bitmap.h
switch(pe) {
case PE_ArrowUp:
- a.setPoints(QCOORDARRLEN(u_arrow), u_arrow);
+ a.setPoints(TQCOORDARRLEN(u_arrow), u_arrow);
break;
case PE_ArrowDown:
- a.setPoints(QCOORDARRLEN(d_arrow), d_arrow);
+ a.setPoints(TQCOORDARRLEN(d_arrow), d_arrow);
break;
case PE_ArrowLeft:
- a.setPoints(QCOORDARRLEN(l_arrow), l_arrow);
+ a.setPoints(TQCOORDARRLEN(l_arrow), l_arrow);
break;
default:
- a.setPoints(QCOORDARRLEN(r_arrow), r_arrow);
+ a.setPoints(TQCOORDARRLEN(r_arrow), r_arrow);
}
drawMandrivaArrow( a, p, r, cg, flags, opt );
}
@@ -1376,13 +1376,13 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
} //switch
}
-void MandrivaStyle::drawMandrivaArrow( QPointArray a, QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+void MandrivaStyle::drawMandrivaArrow( TQPointArray a, TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& /*opt*/ ) const
+ const TQStyleOption& /*opt*/ ) const
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
a.translate( r.x() + r.width() / 2, r.y() + r.height() / 2 );
p->setPen(flags & Style_Enabled ? cg.buttonText() : cg.mid() );
p->drawLineSegments( a );
@@ -1390,12 +1390,12 @@ void MandrivaStyle::drawMandrivaArrow( QPointArray a, QPainter *p,
}
void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
const MandrivaColorData *cdata = lookupData(cg);
switch(pe)
@@ -1412,7 +1412,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
// -------------------------------------------------------------------
case KPE_ToolBarHandle:
{
- QRect real(r);
+ TQRect real(r);
real.addCoords( -1, 0,0,0);
drawHandle( cdata, p,r,cg,flags,opt,true );
break;
@@ -1421,10 +1421,10 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
// -------------------------------------------------------------------
case KPE_SliderGroove:
{
- const QSlider* sl = static_cast< const QSlider* >( widget );
+ const TQSlider* sl = static_cast< const TQSlider* >( widget );
bool horizontal = sl->orientation() == Horizontal;
//TODO fixme
- p->fillRect( QRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2 ),cdata->shades[0] );
+ p->fillRect( TQRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2 ),cdata->shades[0] );
p->setPen( cdata->shades[1] );
int pos = sl->sliderStart();
@@ -1432,10 +1432,10 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
if ( horizontal )
{
//bidi
- if (QApplication::reverseLayout() )
- p->fillRect( QRect( pos, 1, r.right(), r.height()-2 ),cdata->shades[3] );
+ if (TQApplication::reverseLayout() )
+ p->fillRect( TQRect( pos, 1, r.right(), r.height()-2 ),cdata->shades[3] );
else
- p->fillRect( QRect( 1, 1, pos, r.height()-2 ),cdata->shades[3] );
+ p->fillRect( TQRect( 1, 1, pos, r.height()-2 ),cdata->shades[3] );
for ( int i = 12; i < r.width() ; )
{
p->drawLine( i, r.y()+1, i, r.height()-2 );
@@ -1444,7 +1444,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
}
else
{
- p->fillRect( QRect( 1, pos, r.width()-2, r.height() ),cdata->shades[3] );
+ p->fillRect( TQRect( 1, pos, r.width()-2, r.height() ),cdata->shades[3] );
for ( int i = 12; i < r.height() ; )
{
p->drawLine( r.x(), i, r.width(), i );
@@ -1459,7 +1459,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
// -------------------------------------------------------------------
case KPE_SliderHandle:
{
- const QSlider* sl = static_cast< const QSlider* >( widget );
+ const TQSlider* sl = static_cast< const TQSlider* >( widget );
bool horizontal = sl->orientation() == Horizontal;
bool mouseOver = (widget == hoverWidget);
int x = r.x();
@@ -1524,10 +1524,10 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
{
// 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 );
int i;
@@ -1536,7 +1536,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
p2.setPen( cdata->shades[4] );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
verticalLine->setMask( *verticalLine );
p2.begin( horizontalLine );
@@ -1545,7 +1545,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
p2.setPen( cdata->shades[4] );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
horizontalLine->setMask( *horizontalLine );
}
@@ -1594,12 +1594,12 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
}
void MandrivaStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
const MandrivaColorData *cdata = lookupData(cg);
switch (element)
@@ -1612,10 +1612,10 @@ void MandrivaStyle::drawControl( ControlElement element,
//progressbar
case CE_ProgressBarContents:
{
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect backend = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect backend = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!pb || !backend.isValid())
@@ -1627,16 +1627,16 @@ void MandrivaStyle::drawControl( ControlElement element,
//draw border
drawPrimitive( PE_PanelLineEdit, p, r, cg );
- QRect cr(backend);
+ TQRect cr(backend);
cr.addCoords( 1, 1, -2, -2 );
// Draw progress bar gradient
if (progress > 0 || steps == 0)
{
double pg = (steps == 0) ? 0.1 : progress / steps;
- int width = QMIN(cr.width(), (int)(pg * cr.width()));
+ int width = TQMIN(cr.width(), (int)(pg * cr.width()));
if (steps == 0)
- width = QMIN(width,20); //Don't cross squares
+ width = TQMIN(width,20); //Don't cross squares
if (steps == 0)
{ //Busy indicator
@@ -1655,7 +1655,7 @@ void MandrivaStyle::drawControl( ControlElement element,
pstep = - (pstep - 2 * remWidth );
}
if( reverse )
- renderGradient(p, QRect(cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height()),
+ renderGradient(p, TQRect(cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height()),
cdata->shades[2],cdata->shades[1], false);
else
renderGradient(p, cr,
@@ -1670,8 +1670,8 @@ void MandrivaStyle::drawControl( ControlElement element,
{
//convert it as after
//TODO Verify it
- QPixmap gradient(1, cr.height()+1);
- QPainter painter(&gradient);
+ TQPixmap gradient(1, cr.height()+1);
+ TQPainter painter(&gradient);
KPixmap tempPixmap;
tempPixmap.resize(1, cr.height()/2+1);
KPixmapEffect::gradient(tempPixmap,
@@ -1686,7 +1686,7 @@ void MandrivaStyle::drawControl( ControlElement element,
KPixmapEffect::VerticalGradient);
painter.drawPixmap(0, cr.height()/2 +1, tempPixmap);
painter.end();
- QRect tmp( cr.width()-width+1, cr.y(),width+1,cr.height() );
+ TQRect tmp( cr.width()-width+1, cr.y(),width+1,cr.height() );
tmp.addCoords( 0, 0, 0, 1 );
p->drawTiledPixmap( tmp , gradient );
bool changed = false;
@@ -1708,8 +1708,8 @@ void MandrivaStyle::drawControl( ControlElement element,
}
else
{
- QPixmap gradient(1, cr.height()+1);
- QPainter painter(&gradient);
+ TQPixmap gradient(1, cr.height()+1);
+ TQPainter painter(&gradient);
KPixmap tempPixmap;
tempPixmap.resize(1, cr.height()/2+1);
KPixmapEffect::gradient(tempPixmap,
@@ -1724,7 +1724,7 @@ void MandrivaStyle::drawControl( ControlElement element,
KPixmapEffect::VerticalGradient);
painter.drawPixmap(0, cr.height()/2 +1, tempPixmap);
painter.end();
- QRect tmp( cr.x(), cr.y(),width-1,cr.height() );
+ TQRect tmp( cr.x(), cr.y(),width-1,cr.height() );
tmp.addCoords( 0, 0, 0, 1 );
p->drawTiledPixmap( tmp , gradient );
bool changed = false;
@@ -1748,7 +1748,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
case CE_ProgressBarLabel:
{
- const QProgressBar * pb = (const QProgressBar *) widget;
+ const TQProgressBar * pb = (const TQProgressBar *) widget;
const int unit_width = pixelMetric( PM_ProgressBarChunkWidth, pb );
int u = r.width() / unit_width;
int p_v = pb->progress();
@@ -1759,17 +1759,17 @@ void MandrivaStyle::drawControl( ControlElement element,
p_v /= u;
t_s /= u;
}
- // QColor("#4965AE" ) powerpack
+ // TQColor("#4965AE" ) powerpack
if ( pb->percentageVisible() && pb->totalSteps() )
{
int nu = ( u * p_v + t_s/2 ) / t_s;
int x = unit_width * nu;
if (pb->indicatorFollowsStyle() || pb->centerIndicator())
{
- if(cg.highlight() == QColor("#4965AE" ))
- p->setPen( QColor("#FFFFFF"));
+ if(cg.highlight() == TQColor("#4965AE" ))
+ p->setPen( TQColor("#FFFFFF"));
else
- p->setPen( QColor( "#000000" ) );
+ p->setPen( TQColor( "#000000" ) );
p->setClipRect( r.x(), r.y(), x, r.height() );
p->drawText( r, AlignCenter | SingleLine, pb->progressString() );
@@ -1778,16 +1778,16 @@ void MandrivaStyle::drawControl( ControlElement element,
{
p->setClipRect( r.x() + x, r.y(), r.width() - x, r.height() );
//second part of progress bar => black
- p->setPen( /*cg.highlight()*/QColor( "#000000" ) );
+ p->setPen( /*cg.highlight()*/TQColor( "#000000" ) );
p->drawText( r, AlignCenter | SingleLine, pb->progressString() );
}
}
else
{
- if(cg.highlight() == QColor("#4965AE" ))
- p->setPen( QColor("#FFFFFF"));
+ if(cg.highlight() == TQColor("#4965AE" ))
+ p->setPen( TQColor("#FFFFFF"));
else
- p->setPen( QColor( "#000000" ) );
+ p->setPen( TQColor( "#000000" ) );
p->drawText( r, AlignCenter | SingleLine, pb->progressString() );
}
}
@@ -1807,7 +1807,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
case CE_TabBarTab:
{
- const QTabBar* tb = static_cast< const QTabBar* >( widget );
+ const TQTabBar* tb = static_cast< const TQTabBar* >( widget );
int x, y, xw, yh;
int offset= 0;
x= r.x();
@@ -1827,14 +1827,14 @@ void MandrivaStyle::drawControl( ControlElement element,
else
pos = Middle;
- bool bottom = tb->shape() == QTabBar::RoundedBelow ||
- tb->shape() == QTabBar::TriangularBelow;
+ bool bottom = tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow;
if ( !bottom )
{
if (flags & Style_Selected )
{
- p->fillRect( r, tb->palette().active().brush( QColorGroup::Background ));
+ p->fillRect( r, tb->palette().active().brush( TQColorGroup::Background ));
//blue-2
p->setPen( cdata->blueMdkColor[2]);
p->drawLine( x+2, y, xw-2, y );
@@ -1847,14 +1847,14 @@ void MandrivaStyle::drawControl( ControlElement element,
p->drawLine( xw,y+4,xw,yh);
if ( pos==First )
p->drawLine( x,y+4,x,yh);
- else if ( ( pos==Last || pos == Single ) && QApplication::reverseLayout() )
+ else if ( ( pos==Last || pos == Single ) && TQApplication::reverseLayout() )
p->drawLine( xw, y+4, xw, yh );
}
else
{
offset = 3;
//grey1
- p->fillRect( QRect(x,y+offset,r.width()-1,yh), cdata->shades[1]);
+ p->fillRect( TQRect(x,y+offset,r.width()-1,yh), cdata->shades[1]);
//grey5
p->setPen( cdata->shades[5]);
p->drawLine( x+2,y+offset-1,xw-2,y+offset-1);
@@ -1870,7 +1870,7 @@ void MandrivaStyle::drawControl( ControlElement element,
{
if (flags & Style_Selected )
{
- p->fillRect( r, tb->palette().active().brush( QColorGroup::Background ));
+ p->fillRect( r, tb->palette().active().brush( TQColorGroup::Background ));
p->setPen( cdata->blueMdkColor[2] );
p->drawLine( x, yh-3, xw, yh-3 );
@@ -1883,14 +1883,14 @@ void MandrivaStyle::drawControl( ControlElement element,
p->drawLine( xw,y,xw,yh-4);
if ( pos==First )
p->drawLine( x,y,x,yh-4);
- else if ( ( pos==Last || pos == Single ) && QApplication::reverseLayout() )
+ else if ( ( pos==Last || pos == Single ) && TQApplication::reverseLayout() )
p->drawLine( x, y, x, yh-4 ); //CHECK
}
else
{
offset = 3;
//grey1
- p->fillRect( QRect(x,y,r.width()-1,yh-offset), cdata->shades[1]);
+ p->fillRect( TQRect(x,y,r.width()-1,yh-offset), cdata->shades[1]);
//grey5
p->setPen( cdata->shades[5]);
@@ -1908,19 +1908,19 @@ void MandrivaStyle::drawControl( ControlElement element,
//CHECK
case CE_MenuBarItem:
{
- QMenuBar *mb = (QMenuBar*)widget;
- QMenuItem *mi = opt.menuItem();
- QRect pr = mb->rect();
+ TQMenuBar *mb = (TQMenuBar*)widget;
+ TQMenuItem *mi = opt.menuItem();
+ TQRect pr = mb->rect();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
bool down = flags & Style_Down;
- QColor textColor = cg.text();
+ TQColor textColor = cg.text();
if ( active && focused && down )
{
//top half
- QRect half_rect = r;
+ TQRect half_rect = r;
half_rect.setHeight(r.height()/2);
renderGradient(p, half_rect, cdata->blueMdkColor[1], cdata->blueMdkColor[3], false);
//bottom half
@@ -1929,7 +1929,7 @@ void MandrivaStyle::drawControl( ControlElement element,
renderGradient(p, half_rect, cdata->blueMdkColor[4], cdata->blueMdkColor[2], false);
textColor = cg.highlightedText();
// create the fake rounded corners
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
p->setPen(cg.background());
p->drawPoint(r.topLeft());
p->drawPoint(r.topRight());
@@ -1952,15 +1952,15 @@ void MandrivaStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_PopupMenuItem:
{
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
if ( !mi )
{
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! (widget->erasePixmap() && !widget->erasePixmap()->isNull()) )
- p->fillRect(r, cg.brush(QColorGroup::Background) );
+ p->fillRect(r, cg.brush(TQColorGroup::Background) );
break;
}
@@ -1970,12 +1970,12 @@ void MandrivaStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
if ( checkable )
- checkcol = QMAX( checkcol, 20 );
+ checkcol = TQMAX( checkcol, 20 );
// Are we a menu item separator?
if ( mi->isSeparator() )
@@ -1987,7 +1987,7 @@ void MandrivaStyle::drawControl( ControlElement element,
if( active && (flags & Style_Enabled))
{
//top half
- QRect half_rect = r;
+ TQRect half_rect = r;
half_rect.setHeight(r.height()/2);
renderGradient(p, half_rect, cdata->blueMdkColor[1], cdata->blueMdkColor[3], false);
//bottom half
@@ -1995,7 +1995,7 @@ void MandrivaStyle::drawControl( ControlElement element,
half_rect.moveBottom(r.bottom());
renderGradient(p, half_rect, cdata->blueMdkColor[4], cdata->blueMdkColor[2], false);
// create the fake rounded corners
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
p->setPen(cg.background());
p->drawPoint(r.topLeft());
p->drawPoint(r.topRight());
@@ -2020,21 +2020,21 @@ void MandrivaStyle::drawControl( ControlElement element,
#endif
if( mi->iconSet() )
{
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect(x, y, checkcol, h), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
#if 0 //don't check menu
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && !active && mi->isChecked() )
{
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
}
#endif
//TEST IT !!!!!!!!!!!!!!
@@ -2044,14 +2044,14 @@ void MandrivaStyle::drawControl( ControlElement element,
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame*2, h - itemFrame*2), cg, cflags );
}
else
{
// 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 );
}
@@ -2065,12 +2065,12 @@ void MandrivaStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
if ( ! active )
qDrawShadePanel( p, cx, y, checkcol, h, cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
#endif
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame*2, h - itemFrame*2), cg, cflags );
}
@@ -2092,7 +2092,7 @@ void MandrivaStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
// Does the menu item draw it's own label?
if ( mi->custom() )
@@ -2100,7 +2100,7 @@ void MandrivaStyle::drawControl( ControlElement element,
int m = itemVMargin;
// Save the painter state in case the custom
// paint method changes it in some way
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Draw etched text if we're inactive and the menu item is disabled
@@ -2117,7 +2117,7 @@ void MandrivaStyle::drawControl( ControlElement element,
else
{
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() )
@@ -2127,8 +2127,8 @@ void MandrivaStyle::drawControl( ControlElement element,
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
- //QColor draw = cg.text();
- QColor draw = (active && enabled) ? cg.highlightedText () : cg.text();
+ //TQColor draw = cg.text();
+ TQColor draw = (active && enabled) ? cg.highlightedText () : cg.text();
p->setPen(draw);
@@ -2167,7 +2167,7 @@ void MandrivaStyle::drawControl( ControlElement element,
// Check if it has a pixmap instead
else if ( mi->pixmap() )
{
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -2187,7 +2187,7 @@ void MandrivaStyle::drawControl( ControlElement element,
{
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator)- itemFrame;
- QRect vr = visualRect( QRect( x + w - arrowHMargin - itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -2196,7 +2196,7 @@ void MandrivaStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( cg.highlightedText ()/*white*/, cg.highlight(), /*white*/cg.highlightedText (), /*white*/cg.highlightedText (),
+ TQColorGroup g2( cg.highlightedText ()/*white*/, cg.highlight(), /*white*/cg.highlightedText (), /*white*/cg.highlightedText (),
enabled ? cg.highlightedText () : discol, /*discol*/cg.highlightedText (), cg.highlightedText () );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -2209,7 +2209,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
case CE_PushButtonLabel:
{
- const QPushButton* button = (const QPushButton*)widget;
+ const TQPushButton* button = (const TQPushButton*)widget;
bool active = button->isOn() || button->isDown();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -2226,7 +2226,7 @@ void MandrivaStyle::drawControl( ControlElement element,
if ( button->isMenuButton() )
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, QRect(x + w - dx - 2, y + 2, dx, h - 4),
+ drawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4),
cg, flags, opt );
w -= dx;
}
@@ -2234,15 +2234,15 @@ void MandrivaStyle::drawControl( ControlElement element,
// 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 );
// Center the iconset if there's no text or pixmap
if (button->text().isEmpty() && !button->pixmap())
@@ -2259,10 +2259,10 @@ void MandrivaStyle::drawControl( ControlElement element,
if ( active || button->isDefault() )
{
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in QPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
//change color of text
- drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix,
button->colorGroup(),
button->isEnabled(),
button->pixmap(),
@@ -2272,7 +2272,7 @@ void MandrivaStyle::drawControl( ControlElement element,
#if 0
// Normal Text
for(i=0; i<2; i++)
- drawItem( p, QRect(x+i, y, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix,
button->colorGroup(),
button->isEnabled(),
i == 0 ? button->pixmap() : NULL,
@@ -2282,7 +2282,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
else
{
- drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix,
button->colorGroup(),
button->isEnabled(), button->pixmap(),
button->text(), -1,
@@ -2291,13 +2291,13 @@ void MandrivaStyle::drawControl( ControlElement element,
// Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
+ TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
cg, flags );
break;
}
case CE_PushButton:
{
- const QPushButton* btn = static_cast< const QPushButton* >( widget );
+ const TQPushButton* btn = static_cast< const TQPushButton* >( widget );
if ( widget == hoverWidget )
flags |= Style_MouseOver;
if (isFormWidget(btn))
@@ -2312,10 +2312,10 @@ void MandrivaStyle::drawControl( ControlElement element,
}
void MandrivaStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
switch (element)
{
@@ -2330,14 +2330,14 @@ void MandrivaStyle::drawControlMask( ControlElement element,
}
}
-void MandrivaStyle::drawComboboxArrow( QPainter *p,
- const QWidget *widget,
- const QRect &ar,
- const QColorGroup &cg,
+void MandrivaStyle::drawComboboxArrow( TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &ar,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags active)const
{
- const QComboBox * cb = (const QComboBox *) widget;
+ const TQComboBox * cb = (const TQComboBox *) widget;
bool editableCombo = cb->editable();
// Are we enabled?
if ( widget->isEnabled() )
@@ -2350,11 +2350,11 @@ void MandrivaStyle::drawComboboxArrow( QPainter *p,
//Don't apply background color otherwise it
//destroys gradient.
//p->setBackgroundColor( cg.button() );
- QPointArray a;
+ TQPointArray a;
if ( editableCombo )
- a.setPoints(QCOORDARRLEN(c_edit_arrow), c_edit_arrow);
+ a.setPoints(TQCOORDARRLEN(c_edit_arrow), c_edit_arrow);
else
- a.setPoints(QCOORDARRLEN(c_arrow), c_arrow);
+ a.setPoints(TQCOORDARRLEN(c_arrow), c_arrow);
if ( flags & Style_Down )
p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
@@ -2362,7 +2362,7 @@ void MandrivaStyle::drawComboboxArrow( QPainter *p,
if ( flags & Style_Enabled )
{
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
a.translate( editableCombo ? ar.x() + ar.width() / 2 +1 : ar.x() + ar.width() / 2 +4 ,
editableCombo ? ar.y() + ar.height() / 2 + 1 : ar.y() + ar.height() / 2 );
@@ -2377,7 +2377,7 @@ void MandrivaStyle::drawComboboxArrow( QPainter *p,
}
else
{
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
a.translate( editableCombo ? ar.x() + ar.width() / 2 + 1 : ar.x() + ar.width() / 2 +4,
editableCombo ? ar.y() + ar.height() / 2 + 1: ar.y() + ar.height() / 2 );
@@ -2396,22 +2396,22 @@ void MandrivaStyle::drawComboboxArrow( QPainter *p,
}
void MandrivaStyle::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& opt ) const
+ const TQStyleOption& opt ) const
{
const MandrivaColorData *cdata = lookupData(cg);
switch(control)
{
case CC_SpinWidget:
{
- const QSpinWidget* sw = static_cast< const QSpinWidget* >( widget );
- QRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
+ const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget );
+ TQRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
//FIXME
p->fillRect( r, widget->isEnabled() ? cg.base() : cg.background() );
@@ -2419,14 +2419,14 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
{
if ( controls & SC_SpinWidgetUp)
{
- QColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled();
- drawPrimitive( PE_SpinWidgetUp,p, QRect(br.x()+1 , br.y()+1 , br.width()-2 , br.height() / 2 ), ucg, flags, opt);
+ TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled();
+ drawPrimitive( PE_SpinWidgetUp,p, TQRect(br.x()+1 , br.y()+1 , br.width()-2 , br.height() / 2 ), ucg, flags, opt);
}
if ( controls & SC_SpinWidgetDown)
{
- QColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled();
+ TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled();
- drawPrimitive( PE_SpinWidgetDown,p, QRect( br.x()+1 , br.y() + br.height() / 2 , br.width()-2, br.height()/ 2 -1 ), dcg, flags, opt);
+ drawPrimitive( PE_SpinWidgetDown,p, TQRect( br.x()+1 , br.y() + br.height() / 2 , br.width()-2, br.height()/ 2 -1 ), dcg, flags, opt);
}
}
if ( controls & SC_SpinWidgetFrame )
@@ -2436,9 +2436,9 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
}
case CC_ToolButton:
{
- const QToolButton *tb = (const QToolButton *) widget;
+ const TQToolButton *tb = (const TQToolButton *) widget;
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -2466,7 +2466,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
tb->parentWidget()->backgroundPixmap() &&
!tb->parentWidget()->backgroundPixmap()->isNull())
{
- QPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
}
}
@@ -2482,7 +2482,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
if (tb->hasFocus() && !tb->focusProxy())
{
- QRect fr = tb->rect();
+ TQRect fr = tb->rect();
fr.addCoords(2, 2, -2, -2);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -2495,8 +2495,8 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
- QRect addline, subline, addpage, subpage, slider, first, last;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
+ TQRect addline, subline, addpage, subpage, slider, first, last;
bool maxedOut = (scrollbar->minValue() == scrollbar->maxValue());
scrollmin = ( scrollbar->minValue() == scrollbar->value() );
scrollmax = (( scrollbar->maxValue() == scrollbar->value() )|| maxedOut);
@@ -2514,7 +2514,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
int flags = Style_Enabled;
if (active == SC_ScrollBarSubLine)
flags |= Style_Down;
- if (scrollbar->orientation() == Qt::Horizontal)
+ if (scrollbar->orientation() == TQt::Horizontal)
flags |= Style_Horizontal;
if (hoverWidget == widget && hoverControl == HoverScrollBarSubLine)
flags |= Style_MouseOver;
@@ -2525,7 +2525,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
int flags = Style_Enabled;
if (active == SC_ScrollBarAddLine)
flags |= Style_Down;
- if (scrollbar->orientation() == Qt::Horizontal)
+ if (scrollbar->orientation() == TQt::Horizontal)
flags |= Style_Horizontal;
if (hoverWidget == widget && hoverControl == HoverScrollBarAddLine)
flags |= Style_MouseOver;
@@ -2535,33 +2535,33 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default) |
- ((scrollbar->orientation() == Qt::Horizontal) ?
+ ((scrollbar->orientation() == TQt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
((maxedOut) ? Style_Default : Style_Enabled) |
((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default) |
- ((scrollbar->orientation() == Qt::Horizontal) ?
+ ((scrollbar->orientation() == TQt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarFirst) && first.isValid())
drawPrimitive(PE_ScrollBarFirst, p, first, cg,
Style_Enabled | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default) |
- ((scrollbar->orientation() == Qt::Horizontal) ?
+ ((scrollbar->orientation() == TQt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarLast) && last.isValid())
drawPrimitive(PE_ScrollBarLast, p, last, cg,
Style_Enabled | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default) |
- ((scrollbar->orientation() == Qt::Horizontal) ?
+ ((scrollbar->orientation() == TQt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSlider) && slider.isValid())
{
int flags = Style_Enabled;
if (active == SC_ScrollBarSlider)
flags |= Style_Down;
- if (scrollbar->orientation() == Qt::Horizontal)
+ if (scrollbar->orientation() == TQt::Horizontal)
flags |= Style_Horizontal;
if (hoverWidget == widget && hoverControl == HoverScrollBarSlider)
flags |= Style_MouseOver;
@@ -2570,7 +2570,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
// ### perhaps this should not be able to accept focus if maxedOut?
if (scrollbar->hasFocus())
{
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -2581,11 +2581,11 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
// -------------------------------------------------------------------
case CC_ComboBox:
{
- const QComboBox * cb = (const QComboBox *) widget;
+ const TQComboBox * cb = (const TQComboBox *) widget;
if (isFormWidget(cb))
formMode = true;
// Draw box and arrow
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( widget == hoverWidget )
flags |= Style_MouseOver;
bool widgetEnabled = ( widget->isEnabled() );
@@ -2601,7 +2601,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
if( (controls & SC_ComboBoxEditField ))
{
- QRect ar = QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField), widget );
+ TQRect ar = TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField), widget );
drawPrimitive( PE_PanelLineEdit, p, ar, cg );
}
@@ -2611,14 +2611,14 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
//}
if( (controls & SC_ComboBoxArrow ))
{
- QRect ar = QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget );
+ TQRect ar = TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget );
bool mouseOver = (flags & Style_MouseOver) && (hoverControl == HoverComboBoxArrow);
if ( sunken )
- renderGradient(p, QRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), cdata->shades[2], cdata->shades[0], false);
+ renderGradient(p, TQRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), cdata->shades[2], cdata->shades[0], false);
else if ( mouseOver ) // FIXME: should highlight only when the mouse is over the arrow
- renderGradient(p, QRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), Qt::white, cdata->shades[1], false);
+ renderGradient(p, TQRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), TQt::white, cdata->shades[1], false);
else
- renderGradient(p, QRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), cdata->shades[0],cdata->shades[2], false);
+ renderGradient(p, TQRect(ar.x()+1, ar.y()+1, ar.width()-1, ar.height()-2), cdata->shades[0],cdata->shades[2], false);
if ( widgetEnabled )
{
@@ -2654,10 +2654,10 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
}
else
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Get the button bounding box
- QRect ar = QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget );
+ TQRect ar = TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget );
drawButton( cdata,r,p,cg,flags | (sunken ? Style_Down : Style_Default));
//test reverse !
@@ -2688,10 +2688,10 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
}
}
-QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch (control)
{
@@ -2700,7 +2700,7 @@ QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
switch ( subcontrol )
{
case SC_SpinWidgetButtonField:
- return QRect( widget->width() -14 , 0, 14, widget->height() );
+ return TQRect( widget->width() -14 , 0, 14, widget->height() );
default:
return KStyle::querySubControlMetrics( control, widget, subcontrol, opt );
}
@@ -2713,20 +2713,20 @@ QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
switch ( subcontrol )
{
case SC_ComboBoxFrame:
- return QRect( 0, 0, widget->width(), widget->height() );
+ return TQRect( 0, 0, widget->width(), widget->height() );
case SC_ComboBoxArrow:
{
- const QComboBox * cb = (const QComboBox *) widget;
- return QRect( cb->editable() ? ( widget->width() - arrow - 11 ) : ( widget->width() - arrow- 7 ) , 0, arrow+10 , widget->height() );
+ const TQComboBox * cb = (const TQComboBox *) widget;
+ return TQRect( cb->editable() ? ( widget->width() - arrow - 11 ) : ( widget->width() - arrow- 7 ) , 0, arrow+10 , widget->height() );
}
case SC_ComboBoxEditField:
{
if ( widget->width() < 36 || widget->height() < 22 )
- return QRect( 5, 1, widget->width() - arrow-12, widget->height());
- else if ( static_cast< const QComboBox* >( widget )->editable() )
- return QRect( 1,1, widget->width() - arrow-12, widget->height() - 2 );
+ return TQRect( 5, 1, widget->width() - arrow-12, widget->height());
+ else if ( static_cast< const TQComboBox* >( widget )->editable() )
+ return TQRect( 1,1, widget->width() - arrow-12, widget->height() - 2 );
else //TODO verify it
- return QRect( 5, 1, widget->width() - arrow-12, widget->height() - 2);
+ return TQRect( 5, 1, widget->width() - arrow-12, widget->height() - 2);
}
default:
return KStyle::querySubControlMetrics( control, widget, subcontrol, opt );
@@ -2735,9 +2735,9 @@ QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
}
case CC_Slider:
{
- const QSlider* sl = static_cast< const QSlider* >( widget );
+ const TQSlider* sl = static_cast< const TQSlider* >( widget );
bool horizontal = sl->orientation() == Horizontal;
- QSlider::TickSetting ticks = sl->tickmarks();
+ TQSlider::TickSetting ticks = sl->tickmarks();
int pos = sl->sliderStart();
int handleSize = pixelMetric( PM_SliderThickness, widget );
int len = pixelMetric( PM_SliderLength, widget );
@@ -2746,19 +2746,19 @@ QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
case SC_SliderHandle:
if ( horizontal )
{
- if ( ticks == QSlider::Both )
- return QRect( pos, ( sl->height() - handleSize ) / 2, len, handleSize );
- else if ( ticks == QSlider::Above )
- return QRect( pos, sl->height() - handleSize, len, handleSize );
- return QRect( pos, 0, len, handleSize );
+ if ( ticks == TQSlider::Both )
+ return TQRect( pos, ( sl->height() - handleSize ) / 2, len, handleSize );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( pos, sl->height() - handleSize, len, handleSize );
+ return TQRect( pos, 0, len, handleSize );
}
else
{
- if ( ticks == QSlider::Both )
- return QRect( ( sl->width() - handleSize ) / 2, pos, handleSize, len );
- else if ( ticks == QSlider::Above )
- return QRect( sl->width() - handleSize, pos, handleSize, len );
- return QRect( 0, pos, handleSize, len );
+ if ( ticks == TQSlider::Both )
+ return TQRect( ( sl->width() - handleSize ) / 2, pos, handleSize, len );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( sl->width() - handleSize, pos, handleSize, len );
+ return TQRect( 0, pos, handleSize, len );
}
default:
break;
@@ -2772,10 +2772,10 @@ QRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
}
void MandrivaStyle::drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
//TODO verify
//#if 0
@@ -2788,10 +2788,10 @@ void MandrivaStyle::drawComplexControlMask( ComplexControl control,
{
int x1, y1, x2, y2;
r.coords( &x1, &y1, &x2, &y2 );
- QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
+ TQCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
- p->drawPoints( QPointArray(4, corners) );
+ p->drawPoints( TQPointArray(4, corners) );
break;
}
@@ -2803,7 +2803,7 @@ void MandrivaStyle::drawComplexControlMask( ComplexControl control,
}
-int MandrivaStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int MandrivaStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -2846,33 +2846,33 @@ int MandrivaStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-QSize MandrivaStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize MandrivaStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch (contents)
{
//define progressbar default size
case CT_ProgressBar:
- return QSize( contentSize.width(), 20 ) ;
+ return TQSize( contentSize.width(), 20 ) ;
case CT_SpinBox:
- return QSize( contentSize.width(), contentSize.height()+1);
+ return TQSize( contentSize.width(), contentSize.height()+1);
case CT_LineEdit: {
- return contentSize + QSize (1, 1); //add +1 to rect
+ return contentSize + TQSize (1, 1); //add +1 to rect
}
case CT_SizeGrip:
{
- return QSize( 15, 15 );
+ return TQSize( 15, 15 );
}
case CT_ToolButton:
{
- bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "TQToolBar" );
if (!onToolbar) //Behaves like a button, so scale appropriately to the border
{
int w = contentSize.width();
int h = contentSize.height();
- return QSize( w + 12, h + 10 );
+ return TQSize( w + 12, h + 10 );
}
else
{
@@ -2881,21 +2881,21 @@ QSize MandrivaStyle::sizeFromContents( ContentsType contents,
}
case CT_ComboBox:
{
- const QComboBox* combobox = (const QComboBox*) widget;
+ const TQComboBox* combobox = (const TQComboBox*) widget;
int h = contentSize.height();
if ( h < 22 )
h = 22;
int arrow = 11;
- return QSize( contentSize.width() + arrow + (combobox->editable() ? 26 : 22),
+ return TQSize( contentSize.width() + arrow + (combobox->editable() ? 26 : 22),
combobox->editable() ? h : contentSize.height() + 10 );
}
// PUSHBUTTON SIZE
// ------------------------------------------------------------------
case CT_PushButton:
{
- const QPushButton* button = (const QPushButton*) widget;
+ const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -2914,16 +2914,16 @@ QSize MandrivaStyle::sizeFromContents( ContentsType contents,
if ( h < 30 )
h = 30;
- return QSize( w, h );
+ return TQSize( w, h );
}
case CT_PopupMenuItem:
{
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = (const QPopupMenu *) widget;
+ const TQPopupMenu *popup = (const TQPopupMenu *) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -2947,19 +2947,19 @@ QSize MandrivaStyle::sizeFromContents( ContentsType contents,
else
{
if ( mi->pixmap() )
- h = QMAX( h, mi->pixmap()->height() + 2*itemFrame );
+ h = TQMAX( h, mi->pixmap()->height() + 2*itemFrame );
else
{
// Ensure that the minimum height for text-only menu items
// is the same as the icon size used by KDE.
- h = QMAX( h, 16 + 2*itemFrame );
- h = QMAX( h, popup->fontMetrics().height()
+ h = TQMAX( h, 16 + 2*itemFrame );
+ h = TQMAX( h, popup->fontMetrics().height()
+ 2*itemVMargin + 2*itemFrame );
}
if ( mi->iconSet() )
- h = QMAX( h, mi->iconSet()->pixmap(
- QIconSet::Small, QIconSet::Normal).height() +
+ h = TQMAX( h, mi->iconSet()->pixmap(
+ TQIconSet::Small, TQIconSet::Normal).height() +
2 * itemFrame );
}
@@ -2977,7 +2977,7 @@ QSize MandrivaStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
default:
@@ -2986,57 +2986,57 @@ QSize MandrivaStyle::sizeFromContents( ContentsType contents,
}
//Why ? why create virtual function ?
-// Fix Qt's wacky image alignment
-QPixmap MandrivaStyle::stylePixmap(StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+// Fix TQt's wacky image alignment
+TQPixmap MandrivaStyle::stylePixmap(StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
return KStyle::stylePixmap(stylepixmap, widget, opt);
}
-bool MandrivaStyle::eventFilter( QObject *object, QEvent *event )
+bool MandrivaStyle::eventFilter( TQObject *object, TQEvent *event )
{
if (KStyle::eventFilter( object, event ))
return true;
- QToolBar* toolbar;
+ TQToolBar* toolbar;
//Hover highlight on buttons and combos
- if ( object->inherits("QPushButton")
- || object->inherits("QComboBox")
- || object->inherits("QScrollBar")
- || object->inherits("QHeader")
- || object->inherits("QSlider")
- || object->inherits("QCheckBox")
- || object->inherits("QSplitterHandle"))
+ if ( object->inherits("TQPushButton")
+ || object->inherits("TQComboBox")
+ || object->inherits("TQScrollBar")
+ || object->inherits("TQHeader")
+ || object->inherits("TQSlider")
+ || object->inherits("TQCheckBox")
+ || object->inherits("TQSplitterHandle"))
{
- if ( (event->type() == QEvent::Enter) && static_cast<QWidget*>(object)->isEnabled())
+ if ( (event->type() == TQEvent::Enter) && static_cast<TQWidget*>(object)->isEnabled())
{
- QWidget* button = static_cast<QWidget*>(object);
+ TQWidget* button = static_cast<TQWidget*>(object);
hoverWidget = button;
button->repaint( false );
}
- else if ( (event->type() == QEvent::Leave) && (object == hoverWidget) )
+ else if ( (event->type() == TQEvent::Leave) && (object == hoverWidget) )
{
- QWidget* button = static_cast<QWidget*>(object);
+ TQWidget* button = static_cast<TQWidget*>(object);
hoverWidget = 0;
hoverControl = HoverNone;
button->repaint( false );
}
- if ((object->inherits("QScrollBar") || object->inherits("QComboBox"))
- && event->type() == QEvent::MouseMove)
+ if ((object->inherits("TQScrollBar") || object->inherits("TQComboBox"))
+ && event->type() == TQEvent::MouseMove)
{
- QWidget *button = static_cast<QWidget*>(object);
- QMouseEvent *e = static_cast<QMouseEvent*>(event);
+ TQWidget *button = static_cast<TQWidget*>(object);
+ TQMouseEvent *e = static_cast<TQMouseEvent*>(event);
// updateHoverControl will trigger a repainting if necessary
updateHoverControl(e->pos());
}
}
- else if (object->inherits("QListBox"))
+ else if (object->inherits("TQListBox"))
{
- if ( event->type() == QEvent::Show || event->type() == QEvent::Hide)
+ if ( event->type() == TQEvent::Show || event->type() == TQEvent::Hide)
{
- QWidget *w = static_cast<QWidget*>(object);
- if (w->parentWidget() && w->parentWidget()->inherits("QComboBox"))
+ TQWidget *w = static_cast<TQWidget*>(object);
+ if (w->parentWidget() && w->parentWidget()->inherits("TQComboBox"))
w->parentWidget()->repaint(false);
}
}
@@ -3045,29 +3045,29 @@ bool MandrivaStyle::eventFilter( QObject *object, QEvent *event )
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name.
- if (event->type() == QEvent::Paint )
+ if (event->type() == TQEvent::Paint )
{
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- QWidget *widget = static_cast<QWidget*>(object);
- QWidget *parent = static_cast<QWidget*>(object->parent());
+ TQWidget *widget = static_cast<TQWidget*>(object);
+ TQWidget *parent = static_cast<TQWidget*>(object->parent());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = static_cast<QWidget*>(parent->parent());
+ parent = static_cast<TQWidget*>(parent->parent());
}
- QRect r = widget->rect();
- QRect pr = parent->rect();
+ TQRect r = widget->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* tb = dynamic_cast<QToolBar*>(parent);
- if (tb) horiz_grad = tb->orientation() == Qt::Vertical;
+ // Check if the parent is a TQToolbar, and use its orientation, else guess.
+ TQToolBar* tb = dynamic_cast<TQToolBar*>(parent);
+ if (tb) horiz_grad = tb->orientation() == TQt::Vertical;
- QPainter p( widget );
+ TQPainter p( widget );
renderGradient(&p, r, parent->colorGroup().background(),parent->colorGroup().background(), horiz_grad);/*,
x_offset, y_offset, pr.width(), pr.height());*/
//FIXME: check this code later
@@ -3075,22 +3075,22 @@ bool MandrivaStyle::eventFilter( QObject *object, QEvent *event )
}
}
else if ( object->parent() &&
- (toolbar = dynamic_cast<QToolBar*>(object->parent())) )
+ (toolbar = dynamic_cast<TQToolBar*>(object->parent())) )
{
// We need to override the paint event to draw a
- // gradient on a QToolBarExtensionWidget.
- if ( event->type() == QEvent::Paint )
+ // gradient on a TQToolBarExtensionWidget.
+ if ( event->type() == TQEvent::Paint )
{
- QWidget *widget = static_cast<QWidget*>(object);
- QRect wr = widget->rect(), tr = toolbar->rect();
- QPainter p( widget );
+ TQWidget *widget = static_cast<TQWidget*>(object);
+ TQRect wr = widget->rect(), tr = toolbar->rect();
+ TQPainter p( widget );
renderGradient(&p, wr, toolbar->colorGroup().background(),toolbar->colorGroup().background(),
- toolbar->orientation() == Qt::Vertical);/*,
+ toolbar->orientation() == TQt::Vertical);/*,
wr.x(), wr.y(), tr.width() - 2, tr.height() - 2);*/
//FIXME: check this code later
p.setPen( toolbar->colorGroup().dark() );
- if ( toolbar->orientation() == Qt::Horizontal )
+ if ( toolbar->orientation() == TQt::Horizontal )
p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 );
else
p.drawLine( 0, wr.height()-1, wr.width()-1, wr.height()-1 );
@@ -3102,10 +3102,10 @@ bool MandrivaStyle::eventFilter( QObject *object, QEvent *event )
//***************
// renderGradient from PlastikStyle
-void MandrivaStyle::renderGradient(QPainter *painter,
- const QRect &rect,
- const QColor &c1,
- const QColor &c2,
+void MandrivaStyle::renderGradient(TQPainter *painter,
+ const TQRect &rect,
+ const TQColor &c1,
+ const TQColor &c2,
bool horizontal) const
{
if((rect.width() <= 0)||(rect.height() <= 0))
@@ -3137,9 +3137,9 @@ void MandrivaStyle::renderGradient(QPainter *painter,
}
// there wasn't anything matching in the cache, create the pixmap now...
- QPixmap *result = new QPixmap(horizontal ? rect.width() : 10,
+ TQPixmap *result = new TQPixmap(horizontal ? rect.width() : 10,
horizontal ? 10 : rect.height());
- QPainter p(result);
+ TQPainter p(result);
int r_w = result->rect().width();
int r_h = result->rect().height();
@@ -3173,7 +3173,7 @@ void MandrivaStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x, r_y+y, r_x2, r_y+y);
}
}
@@ -3185,7 +3185,7 @@ void MandrivaStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x+x, r_y, r_x+x, r_y2);
}
}
@@ -3204,9 +3204,9 @@ void MandrivaStyle::renderGradient(QPainter *painter,
delete result;
}
-void MandrivaStyle::drawButton( const MandrivaColorData *cdata, const QRect & r, QPainter *p,const QColorGroup &cg, SFlags flags)const
+void MandrivaStyle::drawButton( const MandrivaColorData *cdata, const TQRect & r, TQPainter *p,const TQColorGroup &cg, SFlags flags)const
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
bool down = flags & Style_Down;
bool on = flags & Style_On;
bool enabled = flags & Style_Enabled;
@@ -3318,36 +3318,36 @@ void MandrivaStyle::drawButton( const MandrivaColorData *cdata, const QRect & r,
if ( on )
- renderGradient(p, QRect(x+3, y+3, xw-5, yh-5),
+ renderGradient(p, TQRect(x+3, y+3, xw-5, yh-5),
cdata->buttonColor[0] ,mouseOver ? cdata->buttonColor[1] : cdata->buttonColor[2], false);
else if ( down ||sunken )
- renderGradient(p, QRect(x+3, y+3, xw-4, yh-4),
+ renderGradient(p, TQRect(x+3, y+3, xw-4, yh-4),
cdata->buttonColor[2] ,cdata->buttonColor[1], false);
else
- renderGradient(p, QRect(x+3, y+3, xw-5, yh-5),
+ renderGradient(p, TQRect(x+3, y+3, xw-5, yh-5),
cdata->buttonColor[0] ,mouseOver ? cdata->buttonColor[1] :cdata->buttonColor[2], false);
p->setPen( oldPen ); // restore pen
}
-QRect MandrivaStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect MandrivaStyle::subRect(SubRect r, const TQWidget *widget) const
{
switch ( r )
{
case SR_ProgressBarContents:
{
- QRect wrect( widget->rect());
- return QRect( wrect.x() , wrect.y() , wrect.width(), wrect.height());
+ TQRect wrect( widget->rect());
+ return TQRect( wrect.x() , wrect.y() , wrect.width(), wrect.height());
}
case SR_PushButtonFocusRect:
{
- const QPushButton* button = (const QPushButton*) widget;
- QRect wrect(widget->rect());
+ const TQPushButton* button = (const TQPushButton*) widget;
+ TQRect wrect(widget->rect());
if (button->isDefault() || button->autoDefault())
- return QRect(wrect.x() + 6, wrect.y() + 4, wrect.width() - 12, wrect.height() - 8);
+ return TQRect(wrect.x() + 6, wrect.y() + 4, wrect.width() - 12, wrect.height() - 8);
else
- return QRect(wrect.x() + 4 , wrect.y() + 5, wrect.width() - 9, wrect.height() - 8);
+ return TQRect(wrect.x() + 4 , wrect.y() + 5, wrect.width() - 9, wrect.height() - 8);
break;
}
@@ -3361,7 +3361,7 @@ QRect MandrivaStyle::subRect(SubRect r, const QWidget *widget) const
}
//define handle point
-void MandrivaStyle::drawHandlePoint ( const MandrivaColorData *cdata,QPainter *p, int x, int y)const
+void MandrivaStyle::drawHandlePoint ( const MandrivaColorData *cdata,TQPainter *p, int x, int y)const
{
//blue-4
p->save();
@@ -3388,33 +3388,33 @@ void MandrivaStyle::drawHandlePoint ( const MandrivaColorData *cdata,QPainter *p
p->restore();
}
-bool MandrivaStyle::excludeColor(const QColor &col, bool active) const
+bool MandrivaStyle::excludeColor(const TQColor &col, bool active) const
{
if ( active )
{
- if ( col == QColor( "#F7B610" )
- || col == QColor( "#8EC7FF" )
- || col == QColor( "#C7D3DF" ) )
+ if ( col == TQColor( "#F7B610" )
+ || col == TQColor( "#8EC7FF" )
+ || col == TQColor( "#C7D3DF" ) )
return true;
}
return false;
}
-bool MandrivaStyle::isFormWidget(const QWidget* widget) const
+bool MandrivaStyle::isFormWidget(const TQWidget* widget) const
{
//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();
+ //of widgets - TQClipperWidget, and outside of that, TQViewportWidget
+ 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;
diff --git a/src/widget/ia_ora.h b/src/widget/ia_ora.h
index 1e96ccc..2c9c174 100644
--- a/src/widget/ia_ora.h
+++ b/src/widget/ia_ora.h
@@ -33,14 +33,14 @@
#ifndef __MANDRIVASTYLE_H
#define __MANDRIVASTYLE_H
-#include <qbitmap.h>
-#include <qintdict.h>
+#include <tqbitmap.h>
+#include <tqintdict.h>
#include <kdrawutil.h>
#include <kpixmap.h>
#include <kstyle.h>
-#include <qintcache.h>
+#include <tqintcache.h>
-class QPopupMenu;
+class TQPopupMenu;
class MandrivaStyle : public KStyle
@@ -51,77 +51,77 @@ public:
MandrivaStyle();
virtual ~MandrivaStyle();
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
- void polish( QApplication *app );
- void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
- const QPopupMenu* popup ) const;
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
+ void polish( TQApplication *app );
+ void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
+ const TQPopupMenu* popup ) const;
void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
void 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 = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric( PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const;
+ TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const;
- QRect subRect( SubRect r,
- const QWidget *widget ) const;
+ TQRect subRect( SubRect r,
+ const TQWidget *widget ) const;
- // Fix Qt3's wacky image positions
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ // Fix TQt3's wacky image positions
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+ TQRect querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
protected:
enum Hover
@@ -141,36 +141,36 @@ protected:
};
- bool eventFilter( QObject *object, QEvent *event );
+ bool eventFilter( TQObject *object, TQEvent *event );
- void renderGradient(QPainter* p,
- const QRect& r,
- const QColor& ca,
- const QColor& cb ,
+ void renderGradient(TQPainter* p,
+ const TQRect& r,
+ const TQColor& ca,
+ const TQColor& cb ,
bool horizontal) const;
- QWidget *hoverWidget;
+ TQWidget *hoverWidget;
enum Hover hoverControl;
struct MandrivaColorData
{
~MandrivaColorData();
- QRgb spotColor;
+ TQRgb spotColor;
// gradient color
//rename to grey
- QColor shades[7];
+ TQColor shades[7];
// five blue color
- QColor blueMdkColor[5];
+ TQColor blueMdkColor[5];
// button gradients
- QColor buttonColor[7];
+ TQColor buttonColor[7];
- QColor radioColor;
+ TQColor radioColor;
- bool isGroup (const QColorGroup &cg)
+ bool isGroup (const TQColorGroup &cg)
{
return cg.button() == buttonColor[0] && cg.highlight().rgb() == spotColor;
}
@@ -184,73 +184,73 @@ private:
MandrivaStyle& operator=( const MandrivaStyle & );
void drawButton( const MandrivaColorData *cdata,
- const QRect & r, QPainter *p,
- const QColorGroup &cg,
+ const TQRect & r, TQPainter *p,
+ const TQColorGroup &cg,
SFlags flags) const;
void drawHandlePoint ( const MandrivaColorData *cdata,
- QPainter *p,
+ TQPainter *p,
int x,
int y) const;
void drawHandle( const MandrivaColorData *cdata,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt,
+ const TQStyleOption& opt,
bool drawBorderAndGradient,
bool drawGradient = false ) const;
void drawGroupBox(const MandrivaColorData *cdata,
- const QColorGroup & cg,
- QPainter *p,
- const QRect & r,
+ const TQColorGroup & cg,
+ TQPainter *p,
+ const TQRect & r,
bool active,
bool sunken )const;
void drawLineSeparator(const MandrivaColorData *cdata,
- const QColorGroup & cg,
- QPainter *p,
- const QRect & r,
+ const TQColorGroup & cg,
+ TQPainter *p,
+ const TQRect & r,
bool horiziontal,
bool active,
bool sunken,
bool skipOffset = true) const;
void drawFrame( const MandrivaColorData *cdata,
- const QColorGroup & cg,
- QPainter *p,
- const QRect & r,
+ const TQColorGroup & cg,
+ TQPainter *p,
+ const TQRect & r,
bool active) const;
- void drawComboboxArrow( QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ void drawComboboxArrow( TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags active)const;
- void drawMandrivaArrow( QPointArray a, QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ void drawMandrivaArrow( TQPointArray a, TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const;
+ const TQStyleOption& opt ) const;
- MandrivaColorData *realizeData (const QColorGroup &cg) const;
- const MandrivaColorData *lookupData (const QColorGroup &cg) const;
- bool isFormWidget(const QWidget* widget) const;
- bool excludeColor(const QColor &col, bool active) const;
- void getShade (const QColorGroup &cg, int shadenr, QColor &res) const;
- void updateHoverControl(const QPoint &pos);
- QIntCache<MandrivaColorData> m_dataCache;
+ MandrivaColorData *realizeData (const TQColorGroup &cg) const;
+ const MandrivaColorData *lookupData (const TQColorGroup &cg) const;
+ bool isFormWidget(const TQWidget* widget) const;
+ bool excludeColor(const TQColor &col, bool active) const;
+ void getShade (const TQColorGroup &cg, int shadenr, TQColor &res) const;
+ void updateHoverControl(const TQPoint &pos);
+ TQIntCache<MandrivaColorData> m_dataCache;
static const double shading[8];
mutable bool formMode;
bool kickerMode;
// For KPE_ListViewBranch
- mutable QBitmap *verticalLine;
- mutable QBitmap *horizontalLine;
+ mutable TQBitmap *verticalLine;
+ mutable TQBitmap *horizontalLine;
// pixmap cache.
enum CacheEntryType
@@ -264,14 +264,14 @@ private:
CacheEntryType type;
int width;
int height;
- QRgb c1Rgb;
- QRgb c2Rgb;
+ TQRgb c1Rgb;
+ TQRgb c2Rgb;
bool horizontal;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
- CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0,
- bool hor = false, QPixmap* p = 0 ):
+ CacheEntry(CacheEntryType t, int w, int h, TQRgb c1, TQRgb c2 = 0,
+ bool hor = false, TQPixmap* p = 0 ):
type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
{}
@@ -282,7 +282,7 @@ private:
int key()
{
- // create an int key from the properties which is used to refer to entries in the QIntCache.
+ // create an int key from the properties which is used to refer to entries in the TQIntCache.
// the result may not be 100% correct as we don't have so much space in one integer -- use
// == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
@@ -299,7 +299,7 @@ private:
return match;
}
};
- QIntCache<CacheEntry> *pixmapCache;
+ TQIntCache<CacheEntry> *pixmapCache;
};