summaryrefslogtreecommitdiffstats
path: root/kwin/clients/plastik
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
commit8155225c9be993acc0512956416d195edfef4eb9 (patch)
treede4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kwin/clients/plastik
parent364641b8e0279758d236af39abd138d379328a19 (diff)
downloadtdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz
tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/clients/plastik')
-rw-r--r--kwin/clients/plastik/config/config.h2
-rw-r--r--kwin/clients/plastik/config/configdialog.ui18
-rw-r--r--kwin/clients/plastik/misc.cpp10
-rw-r--r--kwin/clients/plastik/plastik.cpp2
-rw-r--r--kwin/clients/plastik/plastik.h4
-rw-r--r--kwin/clients/plastik/plastikbutton.cpp6
-rw-r--r--kwin/clients/plastik/plastikclient.cpp30
7 files changed, 36 insertions, 36 deletions
diff --git a/kwin/clients/plastik/config/config.h b/kwin/clients/plastik/config/config.h
index f288c58ea..d06bd30b8 100644
--- a/kwin/clients/plastik/config/config.h
+++ b/kwin/clients/plastik/config/config.h
@@ -30,7 +30,7 @@ class TQGroupBox;
class KConfig;
class ConfigDialog;
-class PlastikConfig : public QObject
+class PlastikConfig : public TQObject
{
Q_OBJECT
public:
diff --git a/kwin/clients/plastik/config/configdialog.ui b/kwin/clients/plastik/config/configdialog.ui
index 642891b31..f751d8024 100644
--- a/kwin/clients/plastik/config/configdialog.ui
+++ b/kwin/clients/plastik/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="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>titleAlign</cstring>
</property>
@@ -33,7 +33,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignLeft</cstring>
</property>
@@ -41,7 +41,7 @@
<string>Left</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignHCenter</cstring>
</property>
@@ -49,7 +49,7 @@
<string>Center</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignRight</cstring>
</property>
@@ -59,7 +59,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>coloredBorder</cstring>
</property>
@@ -73,7 +73,7 @@
<string>Check this option if the window border should be painted in the titlebar color. Otherwise it will be painted in the background color.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>titleShadow</cstring>
</property>
@@ -84,7 +84,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>animateButtons</cstring>
</property>
@@ -95,7 +95,7 @@
<string>Check this option if you want the buttons to fade in when the mouse pointer hovers over them and fade out again when it moves away.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>menuClose</cstring>
</property>
diff --git a/kwin/clients/plastik/misc.cpp b/kwin/clients/plastik/misc.cpp
index 43786fe46..1b259d383 100644
--- a/kwin/clients/plastik/misc.cpp
+++ b/kwin/clients/plastik/misc.cpp
@@ -61,9 +61,9 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- TQColor result = TQColor( 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;
}
@@ -73,10 +73,10 @@ TQImage recolorImage(TQImage *img, TQColor color) {
destImg.setAlphaBuffer(true);
for (int x = 0; x < img->width(); x++) {
for (int y = 0; y < img->height(); y++) {
- if(img->pixel(x,y) == qRgb(0,0,255) ) {
+ if(img->pixel(x,y) == tqRgb(0,0,255) ) {
destImg.setPixel(x,y,color.rgb() ); // set to the new color
} else {
- destImg.setPixel(x,y,qRgba(0,0,0,0) ); // set transparent...
+ destImg.setPixel(x,y,tqRgba(0,0,0,0) ); // set transparent...
}
}
}
diff --git a/kwin/clients/plastik/plastik.cpp b/kwin/clients/plastik/plastik.cpp
index a6313cd1c..3f0ceab85 100644
--- a/kwin/clients/plastik/plastik.cpp
+++ b/kwin/clients/plastik/plastik.cpp
@@ -290,7 +290,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo
} else {
pm = new TQPixmap(1, titleBarTileHeight);
painter.begin(pm);
- painter.drawPixmap(0, 0, gradient, 0,2);
+ painter.tqdrawPixmap(0, 0, gradient, 0,2);
if (m_coloredBorder) {
painter.setPen(getColor(TitleGradient3, active).dark(110) );
} else {
diff --git a/kwin/clients/plastik/plastik.h b/kwin/clients/plastik/plastik.h
index 974df622b..a4c1bc5b7 100644
--- a/kwin/clients/plastik/plastik.h
+++ b/kwin/clients/plastik/plastik.h
@@ -93,7 +93,7 @@ public:
int borderSize() { return m_borderSize; }
bool animateButtons() { return m_animateButtons; }
bool menuClose() { return m_menuClose; }
- Qt::AlignmentFlags titleAlign() { return m_titleAlign; }
+ TQ_Alignment titleAlign() { return m_titleAlign; }
bool reverseLayout() { return m_reverse; }
TQColor getColor(KWinPlastik::ColorType type, const bool active = true);
@@ -113,7 +113,7 @@ private:
int m_titleHeightTool;
TQFont m_titleFont;
TQFont m_titleFontTool;
- Qt::AlignmentFlags m_titleAlign;
+ TQ_Alignment m_titleAlign;
// pixmap cache
TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
diff --git a/kwin/clients/plastik/plastikbutton.cpp b/kwin/clients/plastik/plastikbutton.cpp
index 27a3eb127..795a384d2 100644
--- a/kwin/clients/plastik/plastikbutton.cpp
+++ b/kwin/clients/plastik/plastikbutton.cpp
@@ -140,7 +140,7 @@ void PlastikButton::animate()
}
}
- repaint(false);
+ tqrepaint(false);
}
void PlastikButton::enterEvent(TQEvent *e)
@@ -253,7 +253,7 @@ void PlastikButton::drawButton(TQPainter *painter)
{
TQPixmap menuIcon(m_client->icon().pixmap( TQIconSet::Small, TQIconSet::Normal));
if (width() < menuIcon.width() || height() < menuIcon.height() ) {
- menuIcon.convertFromImage( menuIcon.convertToImage().smoothScale(width(), height()));
+ menuIcon.convertFromImage( TQImage(menuIcon.convertToImage()).smoothScale(width(), height()));
}
bP.drawPixmap((width()-menuIcon.width())/2, (height()-menuIcon.height())/2, menuIcon);
}
@@ -269,7 +269,7 @@ void PlastikButton::drawButton(TQPainter *painter)
if(!isDown() && Handler()->titleShadow() ) {
TQColor shadowColor;
- if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
+ if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
shadowColor = TQColor(255, 255, 255);
else
shadowColor = TQColor(0,0,0);
diff --git a/kwin/clients/plastik/plastikclient.cpp b/kwin/clients/plastik/plastikclient.cpp
index 604c66641..61dfdaba7 100644
--- a/kwin/clients/plastik/plastikclient.cpp
+++ b/kwin/clients/plastik/plastikclient.cpp
@@ -280,7 +280,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(titleEdgeTop > 0)
{
tempRect.setRect(r_x+2, r_y, r_w-2*2, titleEdgeTop );
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTileTop, active, toolWindow) );
}
}
@@ -291,7 +291,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(titleEdgeLeft > 0)
{
tempRect.setRect(r_x, r_y, borderLeft, titleEdgeTop+titleHeight+titleEdgeBottom);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarLeft, active, toolWindow) );
titleMarginLeft = borderLeft;
}
@@ -301,7 +301,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(titleEdgeRight > 0)
{
tempRect.setRect(borderRightLeft, r_y, borderRight, titleEdgeTop+titleHeight+titleEdgeBottom);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarRight, active, toolWindow) );
titleMarginRight = borderRight;
}
@@ -312,7 +312,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(Rtitle.width() > 0)
{
m_captionRect = captionRect(); // also update m_captionRect!
- if (m_captionRect.isValid() && region.contains(m_captionRect) )
+ if (m_captionRect.isValid() && region.tqcontains(m_captionRect) )
{
painter.drawTiledPixmap(m_captionRect, caption);
}
@@ -320,14 +320,14 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
// left to the title
tempRect.setRect(r_x+titleMarginLeft, m_captionRect.top(),
m_captionRect.left() - (r_x+titleMarginLeft), m_captionRect.height() );
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) );
}
// right to the title
tempRect.setRect(m_captionRect.right()+1, m_captionRect.top(),
(r_x2-titleMarginRight) - m_captionRect.right(), m_captionRect.height() );
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) );
}
@@ -337,7 +337,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(borderLeft > 0 && sideHeight > 0)
{
tempRect.setCoords(r_x, titleEdgeBottomBottom+1, borderLeftRight, borderBottomTop-1);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(BorderLeftTile, active, toolWindow) );
}
}
@@ -346,7 +346,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
if(borderRight > 0 && sideHeight > 0)
{
tempRect.setCoords(borderRightLeft, titleEdgeBottomBottom+1, r_x2, borderBottomTop-1);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(BorderRightTile, active, toolWindow) );
}
}
@@ -358,19 +358,19 @@ void PlastikClient::paintEvent(TQPaintEvent *e)
int r = r_x2;
tempRect.setRect(r_x, borderBottomTop, borderLeft, borderBottom);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomLeft, active, toolWindow) );
l = tempRect.right()+1;
}
tempRect.setRect(borderRightLeft, borderBottomTop, borderLeft, borderBottom);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomRight, active, toolWindow) );
r = tempRect.left()-1;
}
tempRect.setCoords(l, borderBottomTop, r, r_y2);
- if (tempRect.isValid() && region.contains(tempRect) ) {
+ if (tempRect.isValid() && region.tqcontains(tempRect) ) {
painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomTile, active, toolWindow) );
}
}
@@ -394,7 +394,7 @@ TQRect PlastikClient::captionRect() const
buttonsLeftWidth() - buttonsRightWidth() -
marginLeft - marginRight;
- Qt::AlignmentFlags a = Handler()->titleAlign();
+ TQ_Alignment a = Handler()->titleAlign();
int tX, tW; // position/width of the title buffer
if (caption.width() > titleWidth) {
@@ -435,7 +435,7 @@ void PlastikClient::reset( unsigned long changed )
{
if (changed & SettingColors)
{
- // repaint the whole thing
+ // tqrepaint the whole thing
clearCaptionPixmaps();
widget()->update();
updateButtons();
@@ -445,7 +445,7 @@ void PlastikClient::reset( unsigned long changed )
updateLayout();
- // then repaint
+ // then tqrepaint
clearCaptionPixmaps();
widget()->update();
}
@@ -496,7 +496,7 @@ const TQPixmap &PlastikClient::captionPixmap() const
if(Handler()->titleShadow())
{
TQColor shadowColor;
- if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
+ if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
shadowColor = TQColor(255, 255, 255);
else
shadowColor = TQColor(0,0,0);