summaryrefslogtreecommitdiffstats
path: root/kwin/clients/modernsystem/modernsys.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
commit495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 (patch)
treedaabcb652c07b9a17cad88ca50b63a2d91ead4a3 /kwin/clients/modernsystem/modernsys.cpp
parent50001f1757f97510e80cb1990e2f2d5b00144c2a (diff)
downloadtdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.tar.gz
tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/clients/modernsystem/modernsys.cpp')
-rw-r--r--kwin/clients/modernsystem/modernsys.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kwin/clients/modernsystem/modernsys.cpp b/kwin/clients/modernsystem/modernsys.cpp
index ce7545cdf..1bb9f9815 100644
--- a/kwin/clients/modernsystem/modernsys.cpp
+++ b/kwin/clients/modernsystem/modernsys.cpp
@@ -65,7 +65,7 @@ static unsigned char shade_on_bits[] = {
static unsigned char menu_bits[] = {
0xff, 0x81, 0x81, 0xff, 0x81, 0xff, 0x81, 0xff};
-static unsigned char btnhighcolor_mask_bits[] = {
+static unsigned char btnhighcolor_tqmask_bits[] = {
0xe0,0x41,0xf8,0x07,0xfc,0x0f,0xfe,0xdf,0xfe,0x1f,0xff,0x3f,0xff,0xff,0xff,
0x3f,0xff,0x3f,0xff,0xff,0xff,0xff,0xfe,0x9f,0xfe,0x1f,0xfc,0x0f,0xf0,0x03,
0x00,0x40,0x80,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x20,0x99,0x0f,0x08,0xc4,
@@ -127,7 +127,7 @@ static void make_button_fx(const TQColorGroup &g, TQPixmap *pix, bool light=fals
}
else{
- if(!lcDark1->mask()){
+ if(!lcDark1->tqmask()){
lcDark1->setMask(*lcDark1);
lcDark2->setMask(*lcDark2);
lcDark3->setMask(*lcDark3);
@@ -171,20 +171,20 @@ static void create_pixmaps()
KPixmapEffect::VerticalGradient);
}
// buttons
- TQColorGroup btnColor(options()->colorGroup(KDecoration::ColorButtonBg, true));
+ TQColorGroup btnColor(options()->tqcolorGroup(KDecoration::ColorButtonBg, true));
buttonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPix);
buttonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPixDown, true);
- btnColor = options()->colorGroup(KDecoration::ColorButtonBg, false);
+ btnColor = options()->tqcolorGroup(KDecoration::ColorButtonBg, false);
iButtonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPix);
iButtonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPixDown, true);
- if(qGray(btnColor.background().rgb()) < 150)
+ if(tqGray(btnColor.background().rgb()) < 150)
buttonFg = new TQColor(Qt::white);
else
buttonFg = new TQColor(Qt::black);
@@ -289,11 +289,11 @@ ModernButton::ModernButton(ButtonType type, ModernSys *parent, const char *name)
{
setBackgroundMode( NoBackground );
- TQBitmap mask(14, 15, TQPixmap::defaultDepth() > 8 ?
- btnhighcolor_mask_bits : lowcolor_mask_bits, true);
+ TQBitmap tqmask(14, 15, TQPixmap::defaultDepth() > 8 ?
+ btnhighcolor_tqmask_bits : lowcolor_tqmask_bits, true);
resize(14, 15);
- setMask(mask);
+ setMask(tqmask);
}
void ModernButton::reset(unsigned long changed)
@@ -410,7 +410,7 @@ bool ModernSys::decorationBehaviour(DecorationBehaviour behaviour) const
}
}
-int ModernSys::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const
+int ModernSys::tqlayoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const
{
// bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows();
@@ -425,9 +425,9 @@ int ModernSys::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCom
return border_width + handle_width;
case LM_TitleEdgeLeft:
- return layoutMetric(LM_BorderLeft,respectWindowState)+3;
+ return tqlayoutMetric(LM_BorderLeft,respectWindowState)+3;
case LM_TitleEdgeRight:
- return layoutMetric(LM_BorderRight,respectWindowState)+3;
+ return tqlayoutMetric(LM_BorderRight,respectWindowState)+3;
case LM_TitleEdgeTop:
return 2;
@@ -454,7 +454,7 @@ int ModernSys::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCom
return 3;
default:
- return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
+ return KCommonDecoration::tqlayoutMetric(lm, respectWindowState, btn);
}
}
@@ -515,10 +515,10 @@ void ModernSys::recalcTitleBuffer()
p.drawTiledPixmap(0, 0, width(), title_height+2, *aUpperGradient);
else
p.fillRect(0, 0, width(), title_height+2,
- options()->colorGroup(ColorTitleBar, true).
+ options()->tqcolorGroup(ColorTitleBar, true).
brush(TQColorGroup::Button));
- TQRect t = titleRect(); // titlebar->geometry();
+ TQRect t = titleRect(); // titlebar->tqgeometry();
t.setTop( 2 );
t.setLeft( t.left() );
t.setRight( t.right() - 2 );
@@ -554,7 +554,7 @@ void ModernSys::updateCaption()
void ModernSys::drawRoundFrame(TQPainter &p, int x, int y, int w, int h)
{
kDrawRoundButton(&p, x, y, w, h,
- options()->colorGroup(ColorFrame, isActive()), false);
+ options()->tqcolorGroup(ColorFrame, isActive()), false);
}
@@ -568,11 +568,11 @@ void ModernSys::paintEvent( TQPaintEvent* )
int hw = handle_width;
TQPainter p( widget() );
- TQRect t = titleRect(); // titlebar->geometry();
+ TQRect t = titleRect(); // titlebar->tqgeometry();
- TQBrush fillBrush(widget()->colorGroup().brush(TQColorGroup::Background).pixmap() ?
- widget()->colorGroup().brush(TQColorGroup::Background) :
- options()->colorGroup(ColorFrame, isActive()).
+ TQBrush fillBrush(widget()->tqcolorGroup().brush(TQColorGroup::Background).pixmap() ?
+ widget()->tqcolorGroup().brush(TQColorGroup::Background) :
+ options()->tqcolorGroup(ColorFrame, isActive()).
brush(TQColorGroup::Button));
p.fillRect(1, title_height+3, width()-2, height()-(title_height+3), fillBrush);
@@ -586,7 +586,7 @@ void ModernSys::paintEvent( TQPaintEvent* )
int h = height() - hw;
// titlebar
- TQColorGroup g = options()->colorGroup(ColorTitleBar, isActive());
+ TQColorGroup g = options()->tqcolorGroup(ColorTitleBar, isActive());
if(isActive()){
p.drawPixmap(1, 1, titleBuffer, 0, 0, w-2, title_height+2);
}
@@ -609,7 +609,7 @@ void ModernSys::paintEvent( TQPaintEvent* )
p.drawLine(0, title_height+2, w-2, title_height+2);
// frame
- g = options()->colorGroup(ColorFrame, isActive());
+ g = options()->tqcolorGroup(ColorFrame, isActive());
p.setPen(g.light());
p.drawLine(1, title_height+3, 1, h-2);
p.setPen(g.dark());
@@ -649,22 +649,22 @@ void ModernSys::updateWindowShape()
{
int hs = handle_size;
int hw = handle_width;
- TQRegion mask;
- mask += TQRect(0, 0, width()-hw, height()-hw);
+ TQRegion tqmask;
+ tqmask += TQRect(0, 0, width()-hw, height()-hw);
//single points
- mask -= TQRect(0, 0, 1, 1);
- mask -= TQRect(width()-hw-1, 0, 1, 1);
- mask -= TQRect(0, height()-hw-1, 1, 1);
+ tqmask -= TQRect(0, 0, 1, 1);
+ tqmask -= TQRect(width()-hw-1, 0, 1, 1);
+ tqmask -= TQRect(0, height()-hw-1, 1, 1);
if (show_handle) {
- mask += TQRect(width()-hs, height()-hs, hs-1, hs-1);
- mask -= TQRect(width()-2, height()-2, 1, 1);
- mask -= TQRect(width()-2, height()-hs, 1, 1);
- mask -= TQRect(width()-hs, height()-2, 1, 1);
+ tqmask += TQRect(width()-hs, height()-hs, hs-1, hs-1);
+ tqmask -= TQRect(width()-2, height()-2, 1, 1);
+ tqmask -= TQRect(width()-2, height()-hs, 1, 1);
+ tqmask -= TQRect(width()-hs, height()-2, 1, 1);
} else
- mask -= TQRect(width()-1, height()-1, 1, 1);
+ tqmask -= TQRect(width()-1, height()-1, 1, 1);
- setMask(mask);
+ setMask(tqmask);
}
ModernSysFactory::ModernSysFactory()