summaryrefslogtreecommitdiffstats
path: root/kwin/clients/b2
diff options
context:
space:
mode:
Diffstat (limited to 'kwin/clients/b2')
-rw-r--r--kwin/clients/b2/b2client.cpp128
-rw-r--r--kwin/clients/b2/b2client.h6
-rw-r--r--kwin/clients/b2/bitmaps.h8
-rw-r--r--kwin/clients/b2/config/config.cpp2
-rw-r--r--kwin/clients/b2/config/config.h2
5 files changed, 73 insertions, 73 deletions
diff --git a/kwin/clients/b2/b2client.cpp b/kwin/clients/b2/b2client.cpp
index 0bd9a4535..97d049ffb 100644
--- a/kwin/clients/b2/b2client.cpp
+++ b/kwin/clients/b2/b2client.cpp
@@ -146,7 +146,7 @@ static void drawB2Rect(KPixmap *pix, const TQColor &primary, bool down)
TQColor hColor = primary.light(150);
TQColor lColor = primary.dark(150);
- if (down) tqSwap(hColor, lColor);
+ if (down) qSwap(hColor, lColor);
if (TQPixmap::defaultDepth() > 8) {
KPixmapEffect::gradient(*pix, hColor, lColor,
@@ -199,40 +199,40 @@ static void create_pixmaps()
}
// there seems to be no way to load X bitmaps from data properly, so
- // we need to create new ones for each tqmask :P
- TQBitmap pinupMask(16, 16, pinup_tqmask_bits, true);
+ // we need to create new ones for each mask :P
+ TQBitmap pinupMask(16, 16, pinup_mask_bits, true);
PIXMAP_A(P_PINUP)->setMask(pinupMask);
PIXMAP_I(P_PINUP)->setMask(pinupMask);
- TQBitmap pindownMask(16, 16, pindown_tqmask_bits, true);
+ TQBitmap pindownMask(16, 16, pindown_mask_bits, true);
PIXMAP_AD(P_PINUP)->setMask(pindownMask);
PIXMAP_ID(P_PINUP)->setMask(pindownMask);
- TQBitmap menuMask(16, 16, menu_tqmask_bits, true);
+ TQBitmap menuMask(16, 16, menu_mask_bits, true);
for (i = 0; i < NumStates; i++)
pixmap[P_MENU * NumStates + i]->setMask(menuMask);
- TQBitmap helpMask(16, 16, help_tqmask_bits, true);
+ TQBitmap helpMask(16, 16, help_mask_bits, true);
for (i = 0; i < NumStates; i++)
pixmap[P_HELP * NumStates + i]->setMask(helpMask);
TQBitmap normalizeMask(16, 16, true);
- // draw normalize icon tqmask
- TQPainter tqmask;
- tqmask.begin(&normalizeMask);
+ // draw normalize icon mask
+ TQPainter mask;
+ mask.begin(&normalizeMask);
TQBrush one(Qt::color1);
- tqmask.fillRect(normalizeMask.width() - 12, normalizeMask.height() - 12,
+ mask.fillRect(normalizeMask.width() - 12, normalizeMask.height() - 12,
12, 12, one);
- tqmask.fillRect(0, 0, 10, 10, one);
- tqmask.end();
+ mask.fillRect(0, 0, 10, 10, one);
+ mask.end();
for (i = 0; i < NumStates; i++)
pixmap[P_NORMALIZE * NumStates + i]->setMask(normalizeMask);
TQBitmap shadeMask(bsize, bsize, true);
- tqmask.begin(&shadeMask);
- tqmask.fillRect(0, 0, bsize, 6, one);
- tqmask.end();
+ mask.begin(&shadeMask);
+ mask.fillRect(0, 0, bsize, 6, one);
+ mask.end();
for (i = 0; i < NumStates; i++)
pixmap[P_SHADE * NumStates + i]->setMask(shadeMask);
@@ -418,7 +418,7 @@ void B2Client::init()
titleLayout->addSpacing(3);
- TQColor c = options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive()).
+ TQColor c = options()->colorGroup(KDecoration::ColorTitleBar, isActive()).
color(TQColorGroup::Button);
for (int i = 0; i < BtnCount; i++) {
@@ -537,7 +537,7 @@ bool B2Client::mustDrawHandle() const
void B2Client::iconChange()
{
if (button[BtnMenu])
- button[BtnMenu]->tqrepaint(false);
+ button[BtnMenu]->repaint(false);
}
// Gallium: New button show/hide magic for customizable
@@ -578,7 +578,7 @@ void B2Client::calcHiddenButtons()
void B2Client::resizeEvent(TQResizeEvent * /*e*/)
{
calcHiddenButtons();
- titlebar->tqlayout()->activate();
+ titlebar->layout()->activate();
positionButtons();
/* may be the resize cut off some space occupied by titlebar, which
@@ -586,7 +586,7 @@ void B2Client::resizeEvent(TQResizeEvent * /*e*/)
titleMoveAbs(bar_x_ofs);
doShape();
- widget()->tqrepaint(); // the frame is misrendered without this
+ widget()->repaint(); // the frame is misrendered without this
}
void B2Client::captionChange()
@@ -595,7 +595,7 @@ void B2Client::captionChange()
titleMoveAbs(bar_x_ofs);
doShape();
titlebar->recalcBuffer();
- titlebar->tqrepaint(false);
+ titlebar->repaint(false);
}
void B2Client::paintEvent(TQPaintEvent* e)
@@ -605,7 +605,7 @@ void B2Client::paintEvent(TQPaintEvent* e)
KDecoration::ColorType frameColorGroup = colored_frame ?
KDecoration::ColorTitleBar : KDecoration::ColorFrame;
- TQRect t = titlebar->tqgeometry();
+ TQRect t = titlebar->geometry();
// Frame height, this is used a lot of times
int fHeight = height() - t.height();
@@ -614,7 +614,7 @@ void B2Client::paintEvent(TQPaintEvent* e)
int bb = mustDrawHandle() ? 4 : 0;
int bDepth = thickness + bb;
- TQColorGroup fillColor = options()->tqcolorGroup(frameColorGroup, isActive());
+ TQColorGroup fillColor = options()->colorGroup(frameColorGroup, isActive());
TQBrush fillBrush(options()->color(frameColorGroup, isActive()));
// outer frame rect
@@ -689,7 +689,7 @@ void B2Client::paintEvent(TQPaintEvent* e)
visibilitinotify events until its state changes, so we just try
*/
if (titlebar->isFullyObscured()) {
- /* We first see, if our tqrepaint contained the titlebar area */
+ /* We first see, if our repaint contained the titlebar area */
TQRegion reg(TQRect(0, 0, width(), buttonSize + 4));
reg = reg.intersect(e->region());
if (!reg.isEmpty())
@@ -699,36 +699,36 @@ void B2Client::paintEvent(TQPaintEvent* e)
void B2Client::doShape()
{
- TQRect t = titlebar->tqgeometry();
- TQRegion tqmask(widget()->rect());
+ TQRect t = titlebar->geometry();
+ TQRegion mask(widget()->rect());
// top to the tilebar right
if (bar_x_ofs) {
// left from bar
- tqmask -= TQRect(0, 0, bar_x_ofs, t.height() - thickness);
+ mask -= TQRect(0, 0, bar_x_ofs, t.height() - thickness);
// top left point
- tqmask -= TQRect(0, t.height() - thickness, 1, 1);
+ mask -= TQRect(0, t.height() - thickness, 1, 1);
}
if (t.right() < width() - 1) {
- tqmask -= TQRect(width() - 1,
+ mask -= TQRect(width() - 1,
t.height() - thickness, 1, 1); //top right point
- tqmask -= TQRect(t.right() + 1, 0,
+ mask -= TQRect(t.right() + 1, 0,
width() - t.right() - 1, t.height() - thickness);
}
// bottom right point
- tqmask -= TQRect(width() - 1, height() - 1, 1, 1);
+ mask -= TQRect(width() - 1, height() - 1, 1, 1);
if (mustDrawHandle()) {
// bottom left point
- tqmask -= TQRect(0, height() - 5, 1, 1);
+ mask -= TQRect(0, height() - 5, 1, 1);
// handle left point
- tqmask -= TQRect(width() - 40, height() - 1, 1, 1);
+ mask -= TQRect(width() - 40, height() - 1, 1, 1);
// bottom left
- tqmask -= TQRect(0, height() - 4, width() - 40, 4);
+ mask -= TQRect(0, height() - 4, width() - 40, 4);
} else {
// bottom left point
- tqmask -= TQRect(0, height() - 1, 1, 1);
+ mask -= TQRect(0, height() - 1, 1, 1);
}
- setMask(tqmask);
+ setMask(mask);
}
void B2Client::showEvent(TQShowEvent *)
@@ -741,7 +741,7 @@ void B2Client::showEvent(TQShowEvent *)
KDecoration::Position B2Client::mousePosition(const TQPoint& p) const
{
const int range = 16;
- TQRect t = titlebar->tqgeometry();
+ TQRect t = titlebar->geometry();
t.setHeight(buttonSize + 4 - thickness);
int ly = t.bottom();
int lx = t.right();
@@ -794,8 +794,8 @@ void B2Client::titleMoveAbs(int new_ofs)
bar_x_ofs = new_ofs;
positionButtons();
doShape();
- widget()->tqrepaint(0, 0, width(), buttonSize + 4, false);
- titlebar->tqrepaint(false);
+ widget()->repaint(0, 0, width(), buttonSize + 4, false);
+ titlebar->repaint(false);
}
}
@@ -820,7 +820,7 @@ void B2Client::maximizeChange()
bool m = maximizeMode() == MaximizeFull;
if (button[BtnMax]) {
button[BtnMax]->setPixmaps(m ? P_NORMALIZE : P_MAX);
- button[BtnMax]->tqrepaint();
+ button[BtnMax]->repaint();
TQToolTip::remove(button[BtnMax]);
TQToolTip::add(button[BtnMax],
m ? i18n("Restore") : i18n("Maximize"));
@@ -830,21 +830,21 @@ void B2Client::maximizeChange()
g->activate();
doShape();
- widget()->tqrepaint(false);
+ widget()->repaint(false);
}
void B2Client::activeChange()
{
- widget()->tqrepaint(false);
- titlebar->tqrepaint(false);
+ widget()->repaint(false);
+ titlebar->repaint(false);
- TQColor c = options()->tqcolorGroup(
+ TQColor c = options()->colorGroup(
KDecoration::ColorTitleBar, isActive()).color(TQColorGroup::Button);
for (int i = 0; i < BtnCount; i++)
if (button[i]) {
button[i]->setBg(c);
- button[i]->tqrepaint(false);
+ button[i]->repaint(false);
}
}
@@ -860,7 +860,7 @@ void B2Client::shadeChange()
}
}
-TQSize B2Client::tqminimumSize() const
+TQSize B2Client::minimumSize() const
{
int left, right, top, bottom;
borders(left, right, top, bottom);
@@ -918,7 +918,7 @@ void B2Client::unobscureTitlebar()
{
/* we just noticed, that we got obscured by other windows
so we look at all windows above us (stacking_order) merging their
- tqmasks, intersecting it with our titlebar area, and see if we can
+ masks, intersecting it with our titlebar area, and see if we can
find a place not covered by any window */
if (in_unobs) {
return;
@@ -939,8 +939,8 @@ void B2Client::unobscureTitlebar()
static void redraw_pixmaps()
{
int i;
- TQColorGroup aGrp = options()->tqcolorGroup(KDecoration::ColorButtonBg, true);
- TQColorGroup iGrp = options()->tqcolorGroup(KDecoration::ColorButtonBg, false);
+ TQColorGroup aGrp = options()->colorGroup(KDecoration::ColorButtonBg, true);
+ TQColorGroup iGrp = options()->colorGroup(KDecoration::ColorButtonBg, false);
// close
drawB2Rect(PIXMAP_A(P_CLOSE), aGrp.button(), false);
@@ -1096,7 +1096,7 @@ void B2Client::positionButtons()
cap = "XXXXX"; // area for dragging the window
int textLen = fm.width(cap);
- TQRect t = titlebar->captionSpacer->tqgeometry();
+ TQRect t = titlebar->captionSpacer->geometry();
int titleWidth = titlebar->width() - t.width() + textLen + 2;
if (titleWidth > width()) titleWidth = width();
@@ -1107,7 +1107,7 @@ void B2Client::positionButtons()
// Transparent bound stuff.
static TQRect *visible_bound;
-static TQPointArray bound_tqshape;
+static TQPointArray bound_shape;
bool B2Client::drawbound(const TQRect& geom, bool clear)
{
@@ -1117,7 +1117,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)
if (!visible_bound) {
visible_bound = new TQRect(geom);
- TQRect t = titlebar->tqgeometry();
+ TQRect t = titlebar->geometry();
int frameTop = geom.top() + t.bottom();
int barLeft = geom.left() + bar_x_ofs;
int barRight = barLeft + t.width() - 1;
@@ -1132,7 +1132,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)
barLeft += 2;
barRight -= 2;
- bound_tqshape.putPoints(0, 8,
+ bound_shape.putPoints(0, 8,
g.left(), frameTop,
barLeft, frameTop,
barLeft, g.top(),
@@ -1147,7 +1147,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)
TQPainter p(workspaceWidget());
p.setPen(TQPen(Qt::white, 5));
p.setRasterOp(Qt::XorROP);
- p.drawPolygon(bound_tqshape);
+ p.drawPolygon(bound_shape);
if (clear) {
delete visible_bound;
@@ -1201,7 +1201,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent,
}
-TQSize B2Button::tqsizeHint() const
+TQSize B2Button::sizeHint() const
{
return TQSize(buttonSize, buttonSize);
}
@@ -1252,7 +1252,7 @@ void B2Button::setPixmaps(int button_id)
for (int i = 0; i < NumStates; i++) {
icon[i] = B2::pixmap[button_id + i];
}
- tqrepaint(false);
+ repaint(false);
}
void B2Button::mousePressEvent(TQMouseEvent * e)
@@ -1276,14 +1276,14 @@ void B2Button::mouseReleaseEvent(TQMouseEvent * e)
void B2Button::enterEvent(TQEvent *e)
{
hover = true;
- tqrepaint(false);
+ repaint(false);
TQButton::enterEvent(e);
}
void B2Button::leaveEvent(TQEvent *e)
{
hover = false;
- tqrepaint(false);
+ repaint(false);
TQButton::leaveEvent(e);
}
@@ -1292,7 +1292,7 @@ void B2Button::leaveEvent(TQEvent *e)
B2Titlebar::B2Titlebar(B2Client *parent)
: TQWidget(parent->widget(), 0, WStyle_Customize | WRepaintNoErase),
client(parent),
- set_x11tqmask(false), isfullyobscured(false), shift_move(false)
+ set_x11mask(false), isfullyobscured(false), shift_move(false)
{
setBackgroundMode(NoBackground);
captionSpacer = new TQSpacerItem(buttonSize, buttonSize + 4,
@@ -1301,8 +1301,8 @@ B2Titlebar::B2Titlebar(B2Client *parent)
bool B2Titlebar::x11Event(XEvent *e)
{
- if (!set_x11tqmask) {
- set_x11tqmask = true;
+ if (!set_x11mask) {
+ set_x11mask = true;
XSelectInput(qt_xdisplay(), winId(),
KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |
@@ -1342,7 +1342,7 @@ void B2Titlebar::drawTitlebar(TQPainter &p, bool state)
// titlebar fill
const TQColorGroup cg =
- options()->tqcolorGroup(KDecoration::ColorTitleBar, state);
+ options()->colorGroup(KDecoration::ColorTitleBar, state);
TQBrush brush(cg.background());
if (gradient) brush.setPixmap(*gradient);
qDrawShadeRect(&p, 1, 1, t.right() - 1, t.height() - 1,
@@ -1351,7 +1351,7 @@ void B2Titlebar::drawTitlebar(TQPainter &p, bool state)
// and the caption
p.setPen(options()->color(KDecoration::ColorFont, state));
p.setFont(options()->font(state));
- t = captionSpacer->tqgeometry();
+ t = captionSpacer->geometry();
p.drawText(t, AlignLeft | AlignVCenter, client->caption());
}
@@ -1367,7 +1367,7 @@ void B2Titlebar::recalcBuffer()
void B2Titlebar::resizeEvent(TQResizeEvent *)
{
recalcBuffer();
- tqrepaint(false);
+ repaint(false);
}
@@ -1391,7 +1391,7 @@ void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e)
void B2Titlebar::wheelEvent(TQWheelEvent *e)
{
- if (client->isSetShade() || rect().tqcontains(e->pos()))
+ if (client->isSetShade() || rect().contains(e->pos()))
client->titlebarMouseWheelOperation( e->delta());
}
diff --git a/kwin/clients/b2/b2client.h b/kwin/clients/b2/b2client.h
index 4439bf1a1..198dfbb9b 100644
--- a/kwin/clients/b2/b2client.h
+++ b/kwin/clients/b2/b2client.h
@@ -38,7 +38,7 @@ public:
void setToggle(){setToggleType(Toggle);}
void setActive(bool on){setOn(on);}
void setUseMiniIcon(){useMiniIcon = true;}
- TQSize tqsizeHint() const;
+ TQSize sizeHint() const;
TQSizePolicy sizePolicy() const;
protected:
virtual void drawButton(TQPainter *p);
@@ -86,7 +86,7 @@ private:
TQString oldTitle;
KPixmap titleBuffer;
TQPoint moveOffset;
- bool set_x11tqmask;
+ bool set_x11mask;
bool isfullyobscured;
bool shift_move;
};
@@ -119,7 +119,7 @@ protected:
Position mousePosition( const TQPoint& p ) const;
void resize(const TQSize&);
void borders(int &, int &, int &, int &) const;
- TQSize tqminimumSize() const;
+ TQSize minimumSize() const;
bool eventFilter(TQObject *, TQEvent *);
private slots:
void menuButtonPressed();
diff --git a/kwin/clients/b2/bitmaps.h b/kwin/clients/b2/bitmaps.h
index f521de292..2f610f4b2 100644
--- a/kwin/clients/b2/bitmaps.h
+++ b/kwin/clients/b2/bitmaps.h
@@ -28,7 +28,7 @@ static const unsigned char menu_dgray_bits[] = {
0x00, 0x00, 0x00, 0x20, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const unsigned char menu_tqmask_bits[] = {
+static const unsigned char menu_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0x3f, 0x04, 0x20, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -48,7 +48,7 @@ static const unsigned char pindown_dgray_bits[] = {
0x48, 0x30, 0xc8, 0x38, 0x08, 0x1f, 0x08, 0x18, 0x10, 0x1c, 0x10, 0x0e,
0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const unsigned char pindown_tqmask_bits[] = {
+static const unsigned char pindown_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x1f, 0xf0, 0x3f, 0xf0, 0x3f,
0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x1f, 0xf0, 0x0f,
0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -68,12 +68,12 @@ static const unsigned char pinup_dgray_bits[] = {
0x40, 0x20, 0x40, 0x20, 0x7f, 0x2a, 0x40, 0x3f, 0xc0, 0x31, 0xc0, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const unsigned char pinup_tqmask_bits[] = {
+static const unsigned char pinup_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xc0, 0x31, 0xc0, 0x3f,
0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xc0, 0x3f, 0xc0, 0x31, 0xc0, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const unsigned char help_tqmask_bits[] = {
+static const unsigned char help_mask_bits[] = {
0x00,0x00,0x00,0x00,0xe0,0x03,0xf0,0x07,0x70,0x0e,0x60,0x0e,0x00,0x0f,0x80,
0x07,0xc0,0x03,0xc0,0x01,0x80,0x01,0xc0,0x00,0xc0,0x01,0x80,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x4c,0x0b,0x08,0x58,0x65,0x09,0x08,0x90,0x00,0x00,
diff --git a/kwin/clients/b2/config/config.cpp b/kwin/clients/b2/config/config.cpp
index 3a42b9eba..ca1dccc65 100644
--- a/kwin/clients/b2/config/config.cpp
+++ b/kwin/clients/b2/config/config.cpp
@@ -1,5 +1,5 @@
/*
- * This file tqcontains the B2 configuration widget
+ * This file contains the B2 configuration widget
*
* Copyright (c) 2001
* Karol Szwed <gallium@kde.org>
diff --git a/kwin/clients/b2/config/config.h b/kwin/clients/b2/config/config.h
index cf8c95736..92c255ae6 100644
--- a/kwin/clients/b2/config/config.h
+++ b/kwin/clients/b2/config/config.h
@@ -1,5 +1,5 @@
/*
- * This file tqcontains the B2 configuration widget
+ * This file contains the B2 configuration widget
*
* Copyright (c) 2001
* Karol Szwed <gallium@kde.org>