summaryrefslogtreecommitdiffstats
path: root/twin/clients/b2/b2client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'twin/clients/b2/b2client.cpp')
-rw-r--r--twin/clients/b2/b2client.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp
index 3e0cdf7ad..032065602 100644
--- a/twin/clients/b2/b2client.cpp
+++ b/twin/clients/b2/b2client.cpp
@@ -82,7 +82,7 @@ static bool drawSmallBorders = false;
// =====================================
-extern "C" KDE_EXPORT KDecorationFactory* create_factory()
+extern "C" TDE_EXPORT KDecorationFactory* create_factory()
{
return new B2::B2ClientFactory();
}
@@ -221,7 +221,7 @@ static void create_pixmaps()
TQPainter mask;
mask.begin(&normalizeMask);
- TQBrush one(Qt::color1);
+ TQBrush one(TQt::color1);
mask.fillRect(normalizeMask.width() - 12, normalizeMask.height() - 12,
12, 12, one);
mask.fillRect(0, 0, 10, 10, one);
@@ -461,11 +461,11 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (!isModalSystemNotification()) {
if (!button[BtnMenu]) {
button[BtnMenu] = new B2Button(this, tb, tips[BtnMenu],
- Qt::LeftButton | Qt::RightButton);
+ TQt::LeftButton | TQt::RightButton);
button[BtnMenu]->setPixmaps(P_MENU);
button[BtnMenu]->setUseMiniIcon();
- connect(button[BtnMenu], TQT_SIGNAL(pressed()),
- this, TQT_SLOT(menuButtonPressed()));
+ connect(button[BtnMenu], TQ_SIGNAL(pressed()),
+ this, TQ_SLOT(menuButtonPressed()));
titleLayout->addWidget(button[BtnMenu]);
}
}
@@ -477,8 +477,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
button[BtnSticky]->setPixmaps(P_PINUP);
button[BtnSticky]->setToggle();
button[BtnSticky]->setDown(isOnAllDesktops());
- connect(button[BtnSticky], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(toggleOnAllDesktops()));
+ connect(button[BtnSticky], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(toggleOnAllDesktops()));
titleLayout->addWidget(button[BtnSticky]);
}
}
@@ -487,8 +487,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (providesContextHelp() && (!button[BtnHelp])) {
button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]);
button[BtnHelp]->setPixmaps(P_HELP);
- connect(button[BtnHelp], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(showContextHelp()));
+ connect(button[BtnHelp], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(showContextHelp()));
titleLayout->addWidget(button[BtnHelp]);
}
break;
@@ -496,19 +496,19 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isMinimizable() && (!button[BtnIconify])) {
button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]);
button[BtnIconify]->setPixmaps(P_ICONIFY);
- connect(button[BtnIconify], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(minimize()));
+ connect(button[BtnIconify], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(minimize()));
titleLayout->addWidget(button[BtnIconify]);
}
break;
case 'A': // Maximize button
if (isMaximizable() && (!button[BtnMax])) {
button[BtnMax] = new B2Button(this, tb, tips[BtnMax],
- Qt::LeftButton | Qt::MidButton | Qt::RightButton);
+ TQt::LeftButton | TQt::MidButton | TQt::RightButton);
button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ?
P_NORMALIZE : P_MAX);
- connect(button[BtnMax], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(maxButtonClicked()));
+ connect(button[BtnMax], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(maxButtonClicked()));
titleLayout->addWidget(button[BtnMax]);
}
break;
@@ -516,8 +516,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isCloseable() && !button[BtnClose]) {
button[BtnClose] = new B2Button(this, tb, tips[BtnClose]);
button[BtnClose]->setPixmaps(P_CLOSE);
- connect(button[BtnClose], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(closeWindow()));
+ connect(button[BtnClose], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(closeWindow()));
titleLayout->addWidget(button[BtnClose]);
}
break;
@@ -525,8 +525,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (isShadeable() && !button[BtnShade]) {
button[BtnShade] = new B2Button(this, tb, tips[BtnShade]);
button[BtnShade]->setPixmaps(P_SHADE);
- connect(button[BtnShade], TQT_SIGNAL(clicked()),
- this, TQT_SLOT(shadeButtonClicked()));
+ connect(button[BtnShade], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(shadeButtonClicked()));
titleLayout->addWidget(button[BtnShade]);
}
break;
@@ -534,8 +534,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[],
if (resizable && !button[BtnResize]) {
button[BtnResize] = new B2Button(this, tb, tips[BtnResize]);
button[BtnResize]->setPixmaps(P_RESIZE);
- connect(button[BtnResize], TQT_SIGNAL(pressed()),
- this, TQT_SLOT(resizeButtonPressed()));
+ connect(button[BtnResize], TQ_SIGNAL(pressed()),
+ this, TQ_SLOT(resizeButtonPressed()));
titleLayout->addWidget(button[BtnResize]);
}
break;
@@ -676,7 +676,7 @@ void B2Client::paintEvent(TQPaintEvent* e)
// bottom handle rect
if (mustDrawHandle()) {
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
int hx = width() - 40;
int hw = 40;
@@ -981,8 +981,8 @@ static void redraw_pixmaps()
KPixmap *pix = pixmap[P_SHADE * NumStates + i];
TQColor color = is_act ? aGrp.button() : iGrp.button();
drawB2Rect(&thinBox, color, is_down);
- pix->fill(Qt::black);
- bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&thinBox),
+ pix->fill(TQt::black);
+ bitBlt(pix, 0, 0, &thinBox,
0, 0, thinBox.width(), thinBox.height(), TQt::CopyROP, true);
}
@@ -1005,12 +1005,12 @@ static void redraw_pixmaps()
drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down);
drawB2Rect(&largeBox, is_act ? aGrp.button() : iGrp.button(), is_down);
pix->fill(options()->color(KDecoration::ColorTitleBar, is_act));
- bitBlt(TQT_TQPAINTDEVICE(pix), pix->width() - 12, pix->width() - 12, TQT_TQPAINTDEVICE(&largeBox),
+ bitBlt(pix, pix->width() - 12, pix->width() - 12, &largeBox,
0, 0, 12, 12, TQt::CopyROP, true);
- bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pix, 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
- bitBlt(TQT_TQPAINTDEVICE(pixmap[P_ICONIFY * NumStates + i]), 0, 0,
- TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pixmap[P_ICONIFY * NumStates + i], 0, 0,
+ &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
}
// resize
@@ -1020,8 +1020,8 @@ static void redraw_pixmaps()
*pixmap[P_RESIZE * NumStates + i] = *pixmap[P_CLOSE * NumStates + i];
pixmap[P_RESIZE * NumStates + i]->detach();
drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down);
- bitBlt(TQT_TQPAINTDEVICE(pixmap[P_RESIZE * NumStates + i]),
- 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true);
+ bitBlt(pixmap[P_RESIZE * NumStates + i],
+ 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true);
}
@@ -1166,7 +1166,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)
*visible_bound = geom;
}
TQPainter p(workspaceWidget());
- p.setPen(TQPen(Qt::white, 5));
+ p.setPen(TQPen(TQt::white, 5));
p.setRasterOp(TQt::XorROP);
p.drawPolygon(bound_shape);
@@ -1179,26 +1179,26 @@ bool B2Client::drawbound(const TQRect& geom, bool clear)
bool B2Client::eventFilter(TQObject *o, TQEvent *e)
{
- if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()))
+ if (o != widget())
return false;
switch (e->type()) {
case TQEvent::Resize:
- resizeEvent(TQT_TQRESIZEEVENT(e));
+ resizeEvent(static_cast<TQResizeEvent*>(e));
return true;
case TQEvent::Paint:
- paintEvent(TQT_TQPAINTEVENT(e));
+ paintEvent(static_cast<TQPaintEvent*>(e));
return true;
case TQEvent::MouseButtonDblClick:
- titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
+ titlebar->mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
return true;
case TQEvent::Wheel:
- titlebar->wheelEvent(TQT_TQWHEELEVENT(e));
+ titlebar->wheelEvent(static_cast<TQWheelEvent*>(e));
return true;
case TQEvent::MouseButtonPress:
- processMousePressEvent(TQT_TQMOUSEEVENT(e));
+ processMousePressEvent(static_cast<TQMouseEvent*>(e));
return true;
case TQEvent::Show:
- showEvent(TQT_TQSHOWEVENT(e));
+ showEvent(static_cast<TQShowEvent*>(e));
return true;
default:
break;
@@ -1213,7 +1213,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent,
: TQButton(parent, 0), hover(false)
{
setBackgroundMode(NoBackground);
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
realizeButtons = realizeBtns;
client = _client;
useMiniIcon = false;
@@ -1280,7 +1280,7 @@ void B2Button::mousePressEvent(TQMouseEvent * e)
{
last_button = e->button();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton,
+ (e->button() & realizeButtons) ? TQt::LeftButton : TQt::NoButton,
e->state());
TQButton::mousePressEvent(&me);
}
@@ -1289,7 +1289,7 @@ void B2Button::mouseReleaseEvent(TQMouseEvent * e)
{
last_button = e->button();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton,
+ (e->button() & realizeButtons) ? TQt::LeftButton : TQt::NoButton,
e->state());
TQButton::mouseReleaseEvent(&me);
}
@@ -1356,7 +1356,7 @@ void B2Titlebar::drawTitlebar(TQPainter &p, bool state)
TQRect t = rect();
// black titlebar frame
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
p.drawLine(0, 0, 0, t.bottom());
p.drawLine(0, 0, t.right(), 0);
p.drawLine(t.right(), 0, t.right(), t.bottom());
@@ -1395,7 +1395,7 @@ void B2Titlebar::resizeEvent(TQResizeEvent *)
void B2Titlebar::paintEvent(TQPaintEvent *)
{
if(client->isActive())
- bitBlt(TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&titleBuffer), 0, 0, titleBuffer.width(),
+ bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),
titleBuffer.height(), TQt::CopyROP, true);
else {
TQPainter p(this);
@@ -1405,14 +1405,14 @@ void B2Titlebar::paintEvent(TQPaintEvent *)
void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e)
{
- if (e->button() == Qt::LeftButton && e->y() < height()) {
+ if (e->button() == TQt::LeftButton && e->y() < height()) {
client->titlebarDblClickOperation();
}
}
void B2Titlebar::wheelEvent(TQWheelEvent *e)
{
- if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).contains(e->pos()))
+ if (client->isSetShade() || rect().contains(e->pos()))
client->titlebarMouseWheelOperation( e->delta());
}