summaryrefslogtreecommitdiffstats
path: root/kwin-styles
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
commitb5d38fd2e94066885d4620b0c35c48a2faa5aa44 (patch)
tree7e7e611e0e3ef23dc2efd327a7455bcf4d7c9b7f /kwin-styles
parent019ebb9a949a97c898e5d563f0699a3ff49e6588 (diff)
downloadtdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.tar.gz
tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin-styles')
-rw-r--r--kwin-styles/cde/cdeclient.cpp178
-rw-r--r--kwin-styles/cde/cdeclient.h48
-rw-r--r--kwin-styles/cde/config/config.cpp50
-rw-r--r--kwin-styles/cde/config/config.h24
-rw-r--r--kwin-styles/glow/config/glowconfigdialog.cpp160
-rw-r--r--kwin-styles/glow/config/glowconfigdialog.h38
-rw-r--r--kwin-styles/glow/glowbutton.cpp118
-rw-r--r--kwin-styles/glow/glowbutton.h52
-rw-r--r--kwin-styles/glow/glowclient.cpp230
-rw-r--r--kwin-styles/glow/glowclient.h86
-rw-r--r--kwin-styles/icewm/config/config.cpp82
-rw-r--r--kwin-styles/icewm/config/config.h28
-rw-r--r--kwin-styles/icewm/icewm.cpp426
-rw-r--r--kwin-styles/icewm/icewm.h96
-rw-r--r--kwin-styles/kde1/kde1client.cpp344
-rw-r--r--kwin-styles/kde1/kde1client.h68
-rw-r--r--kwin-styles/kstep/nextclient.cpp230
-rw-r--r--kwin-styles/kstep/nextclient.h50
-rw-r--r--kwin-styles/openlook/OpenLook.cpp144
-rw-r--r--kwin-styles/openlook/OpenLook.h60
-rw-r--r--kwin-styles/riscos/AboveButton.cpp6
-rw-r--r--kwin-styles/riscos/AboveButton.h4
-rw-r--r--kwin-styles/riscos/Button.cpp30
-rw-r--r--kwin-styles/riscos/Button.h18
-rw-r--r--kwin-styles/riscos/CloseButton.cpp6
-rw-r--r--kwin-styles/riscos/CloseButton.h4
-rw-r--r--kwin-styles/riscos/HelpButton.cpp6
-rw-r--r--kwin-styles/riscos/HelpButton.h4
-rw-r--r--kwin-styles/riscos/IconifyButton.cpp6
-rw-r--r--kwin-styles/riscos/IconifyButton.h4
-rw-r--r--kwin-styles/riscos/LowerButton.cpp6
-rw-r--r--kwin-styles/riscos/LowerButton.h4
-rw-r--r--kwin-styles/riscos/Manager.cpp150
-rw-r--r--kwin-styles/riscos/Manager.h34
-rw-r--r--kwin-styles/riscos/MaximiseButton.cpp16
-rw-r--r--kwin-styles/riscos/MaximiseButton.h4
-rw-r--r--kwin-styles/riscos/Palette.h6
-rw-r--r--kwin-styles/riscos/Static.cpp64
-rw-r--r--kwin-styles/riscos/Static.h32
-rw-r--r--kwin-styles/riscos/StickyButton.cpp16
-rw-r--r--kwin-styles/riscos/StickyButton.h4
-rw-r--r--kwin-styles/smooth-blend/client/buttons.h36
-rw-r--r--kwin-styles/smooth-blend/client/config/smoothblendconfig.cc48
-rw-r--r--kwin-styles/smooth-blend/client/config/smoothblendconfig.h6
-rw-r--r--kwin-styles/smooth-blend/client/smoothblend.cc340
-rw-r--r--kwin-styles/smooth-blend/client/smoothblend.h66
-rw-r--r--kwin-styles/system/systemclient.cpp174
-rw-r--r--kwin-styles/system/systemclient.h54
48 files changed, 1830 insertions, 1830 deletions
diff --git a/kwin-styles/cde/cdeclient.cpp b/kwin-styles/cde/cdeclient.cpp
index 9757ee87..6e2dd152 100644
--- a/kwin-styles/cde/cdeclient.cpp
+++ b/kwin-styles/cde/cdeclient.cpp
@@ -18,15 +18,15 @@
*/
#include "cdeclient.h"
-#include <qdatetime.h>
-#include <qlayout.h>
-#include <qbutton.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qapplication.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
+#include <tqbutton.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kconfig.h>
@@ -114,9 +114,9 @@ static inline const KDecorationOptions* options()
return KDecoration::options();
}
-static void fixColorGroup(QColorGroup & colorGroup)
+static void fixColorGroup(TQColorGroup & colorGroup)
{
- QColor light = colorGroup.light();
+ TQColor light = colorGroup.light();
int hue, saturation, value;
@@ -125,17 +125,17 @@ static void fixColorGroup(QColorGroup & colorGroup)
if (value < 128)
{
light.setHsv(hue, saturation, 128);
- colorGroup.setColor(QColorGroup::Light, light);
+ colorGroup.setColor(TQColorGroup::Light, light);
}
- QColor dark = colorGroup.dark();
+ TQColor dark = colorGroup.dark();
dark.hsv(&hue, &saturation, &value);
if (value < 84)
{
dark.setHsv(hue, saturation, 84);
- colorGroup.setColor(QColorGroup::Dark, dark);
+ colorGroup.setColor(TQColorGroup::Dark, dark);
}
}
@@ -156,7 +156,7 @@ static void readConfig(CdeClientFactory *f)
coloredFrame = conf.readBoolEntry( "UseTitleBarBorderColors", true );
titlebarButtonMode = conf.readBoolEntry( "TitlebarButtonMode", true );
- QString value = conf.readEntry( "TextAlignment", "AlignHCenter" );
+ TQString value = conf.readEntry( "TextAlignment", "AlignHCenter" );
if ( value == "AlignLeft" )
textAlignment = Qt::AlignLeft;
else if ( value == "AlignHCenter" )
@@ -178,7 +178,7 @@ static void readConfig(CdeClientFactory *f)
// Force button size to be in a reasonable range.
// If the frame width is large, the button size must be large too.
- s_buttonSize = QFontMetrics(options()->font( true )).height() + 2;
+ s_buttonSize = TQFontMetrics(options()->font( true )).height() + 2;
if (s_buttonSize < 19) s_buttonSize = 19;
if (s_buttonSize < s_frameWidth) s_buttonSize = s_frameWidth;
s_buttonSize |= 1; // Be sure the button size is odd.
@@ -248,11 +248,11 @@ bool CdeClientFactory::supports( Ability ability )
};
}
-QValueList< CdeClientFactory::BorderSize >
+TQValueList< CdeClientFactory::BorderSize >
CdeClientFactory::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderTiny << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderTiny << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge <<
BorderVeryHuge << BorderOversized;
}
@@ -271,9 +271,9 @@ void CdeClient::init()
widget()->setBackgroundMode(NoBackground);
- mainLayout = new QVBoxLayout(widget());
- QBoxLayout* windowLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
- titleLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ mainLayout = new TQVBoxLayout(widget());
+ TQBoxLayout* windowLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ titleLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
// TODO Check if this stuff can be simplified.
// Border sizes are from a fixed set now.
@@ -295,17 +295,17 @@ void CdeClient::init()
mainLayout->addLayout( windowLayout, 1 );
if (isPreview())
- windowLayout->addWidget(new QLabel(i18n(
+ windowLayout->addWidget(new TQLabel(i18n(
"<center><b>CDE preview</b></center>"), widget()), 1);
else
- windowLayout->addItem( new QSpacerItem( 0, 0 ));
+ windowLayout->addItem( new TQSpacerItem( 0, 0 ));
for ( int i=0; i < BtnCount; i++ )
button[i] = NULL;
addClientButtons( options()->titleButtonsLeft() );
- titlebar = new QSpacerItem( 10, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem( 10, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
titleLayout->addItem( titlebar );
addClientButtons( options()->titleButtonsRight() );
@@ -314,7 +314,7 @@ void CdeClient::init()
closing = false;
}
-void CdeClient::addClientButtons( const QString& s )
+void CdeClient::addClientButtons( const TQString& s )
{
if ( s.length() > 0 )
for ( unsigned int i = 0; i < s.length(); i++ )
@@ -326,8 +326,8 @@ void CdeClient::addClientButtons( const QString& s )
if ( ! button[BtnMenu] )
{
button[BtnMenu] = new CdeButton( this, "menu", BtnMenu, i18n("Menu"), LeftButton|RightButton );
- connect( button[BtnMenu], SIGNAL(pressed()), SLOT(menuButtonPressed()) );
- connect( button[BtnMenu], SIGNAL(released()), SLOT(menuButtonReleased()) );
+ connect( button[BtnMenu], TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed()) );
+ connect( button[BtnMenu], TQT_SIGNAL(released()), TQT_SLOT(menuButtonReleased()) );
titleLayout->addWidget( button[BtnMenu] );
}
break;
@@ -338,7 +338,7 @@ void CdeClient::addClientButtons( const QString& s )
{
button[BtnHelp] = new CdeButton( this, "help", BtnHelp, i18n("Help") );
connect(button[BtnHelp],
- SIGNAL(clicked()), SLOT(showContextHelp()));
+ TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp()));
titleLayout->addWidget( button[BtnHelp] );
}
break;
@@ -349,7 +349,7 @@ void CdeClient::addClientButtons( const QString& s )
{
button[BtnIconify] = new CdeButton( this, "iconify", BtnIconify, i18n("Minimize") );
connect(button[BtnIconify],
- SIGNAL(clicked()), SLOT(minimize()));
+ TQT_SIGNAL(clicked()), TQT_SLOT(minimize()));
titleLayout->addWidget( button[BtnIconify] );
}
break;
@@ -359,8 +359,8 @@ void CdeClient::addClientButtons( const QString& s )
if ( (! button[BtnMax] ) && isMaximizable() )
{
button[BtnMax] = new CdeButton(this, "maximize", BtnMax, i18n("Maximize"), LeftButton|MidButton|RightButton);
- connect(button[BtnMax], SIGNAL(clicked()),
- SLOT(maximizeButtonClicked()));
+ connect(button[BtnMax], TQT_SIGNAL(clicked()),
+ TQT_SLOT(maximizeButtonClicked()));
titleLayout->addWidget( button[BtnMax] );
}
break;
@@ -370,7 +370,7 @@ void CdeClient::addClientButtons( const QString& s )
if ( !button[BtnClose] && isCloseable())
{
button[BtnClose] = new CdeButton(this, "close", BtnClose, i18n("Close"));
- connect( button[BtnClose], SIGNAL( clicked()), SLOT(closeWindow()) );
+ connect( button[BtnClose], TQT_SIGNAL( clicked()), TQT_SLOT(closeWindow()) );
titleLayout->addWidget( button[BtnClose] );
}
// Add onAlldesktops button and spacers
@@ -396,8 +396,8 @@ void CdeClient::maximizeChange()
{
if ( button[BtnMax] ) {
bool m = maximizeMode() == MaximizeFull;
- QToolTip::remove(button[BtnMax]);
- QToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize"));
+ TQToolTip::remove(button[BtnMax]);
+ TQToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize"));
button[BtnMax]->repaint();
}
}
@@ -410,7 +410,7 @@ void CdeClient::shadeChange()
{
}
-void CdeClient::showEvent(QShowEvent *)
+void CdeClient::showEvent(TQShowEvent *)
{
widget()->repaint();
}
@@ -420,13 +420,13 @@ void CdeClient::desktopChange()
// Nothing to do yet
}
-QSize CdeClient::minimumSize() const
+TQSize CdeClient::minimumSize() const
{
- return QSize(2 * (s_buttonSize + s_frameWidth),
+ return TQSize(2 * (s_buttonSize + s_frameWidth),
2 * s_frameWidth + s_buttonSize);
}
-void CdeClient::resize(const QSize& s)
+void CdeClient::resize(const TQSize& s)
{
widget()->resize(s);
}
@@ -440,21 +440,21 @@ void CdeClient::maximizeButtonClicked()
void CdeClient::menuButtonPressed()
{
- static QTime* t = NULL;
+ static TQTime* t = NULL;
static CdeClient* lastClient = NULL;
if( t == NULL )
t = new QTime;
- bool dbl = ( lastClient == this && t->elapsed() <= QApplication::doubleClickInterval());
+ bool dbl = ( lastClient == this && t->elapsed() <= TQApplication::doubleClickInterval());
lastClient = this;
t->start();
if( !dbl )
{
- QRect menuRect = button[BtnMenu]->rect();
- QPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft());
- QPoint menuBottom =
+ TQRect menuRect = button[BtnMenu]->rect();
+ TQPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft());
+ TQPoint menuBottom =
button[BtnMenu]->mapToGlobal(menuRect.bottomRight());
KDecorationFactory* f = factory();
- showWindowMenu(QRect(menuTop, menuBottom));
+ showWindowMenu(TQRect(menuTop, menuBottom));
if( !f->exists( this )) // 'this' was deleted
return;
button[BtnMenu]->setDown(false);
@@ -469,7 +469,7 @@ void CdeClient::menuButtonReleased()
closeWindow();
}
-void CdeClient::resizeEvent( QResizeEvent* e)
+void CdeClient::resizeEvent( TQResizeEvent* e)
{
if (widget()->isVisibleToTLW()) {
widget()->update();
@@ -488,22 +488,22 @@ void CdeClient::resizeEvent( QResizeEvent* e)
if ( dx )
{
widget()->update( width() - dx + 1, 0, dx, height() );
- widget()->update( QRect( QPoint(4,4),
- titlebar->geometry().bottomLeft() - QPoint(1,0) ) );
- widget()->update(QRect(titlebar->geometry().topRight(),
- QPoint(width() - 4, titlebar->geometry().bottom())));
+ widget()->update( TQRect( TQPoint(4,4),
+ titlebar->geometry().bottomLeft() - TQPoint(1,0) ) );
+ widget()->update(TQRect(titlebar->geometry().topRight(),
+ TQPoint(width() - 4, titlebar->geometry().bottom())));
// Titlebar needs no paint event
- QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), false ) );
+ TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) );
}
}
}
-void CdeClient::paintEvent( QPaintEvent* )
+void CdeClient::paintEvent( TQPaintEvent* )
{
- QPainter p(widget());
+ TQPainter p(widget());
- QColorGroup colorGroup;
+ TQColorGroup colorGroup;
if ( coloredFrame )
colorGroup = options()->colorGroup( KDecoration::ColorTitleBar, isActive() );
@@ -512,8 +512,8 @@ void CdeClient::paintEvent( QPaintEvent* )
fixColorGroup( colorGroup );
- QRect trect = titlebar->geometry();
- QRect mrect = widget()->rect();
+ TQRect trect = titlebar->geometry();
+ TQRect mrect = widget()->rect();
if ( s_frameWidth > 0 )
{
@@ -678,7 +678,7 @@ void CdeClient::paintEvent( QPaintEvent* )
}
-KDecoration::Position CdeClient::mousePosition( const QPoint& p ) const
+KDecoration::Position CdeClient::mousePosition( const TQPoint& p ) const
{
const int range = s_frameWidth + s_buttonSize;
const int border = s_frameWidth + 1;
@@ -710,19 +710,19 @@ KDecoration::Position CdeClient::mousePosition( const QPoint& p ) const
return m;
}
-void CdeClient::mouseDoubleClickEvent( QMouseEvent * e )
+void CdeClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
}
-void CdeClient::wheelEvent( QWheelEvent * e )
+void CdeClient::wheelEvent( TQWheelEvent * e )
{
if (isSetShade() || titleLayout->geometry().contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
-void CdeClient::mousePressEvent( QMouseEvent * e )
+void CdeClient::mousePressEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
{
@@ -740,7 +740,7 @@ void CdeClient::borders(int &left, int &right, int &top, int &bottom) const
top = s_buttonSize + s_frameWidth + 1;
}
-void CdeClient::mouseReleaseEvent( QMouseEvent * e )
+void CdeClient::mouseReleaseEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebarPressed )
{
@@ -749,28 +749,28 @@ void CdeClient::mouseReleaseEvent( QMouseEvent * e )
}
}
-bool CdeClient::eventFilter(QObject *o, QEvent *e)
+bool CdeClient::eventFilter(TQObject *o, TQEvent *e)
{
if (o != widget())
return false;
switch (e->type()) {
- case QEvent::Resize:
- resizeEvent(static_cast< QResizeEvent* >(e));
+ case TQEvent::Resize:
+ resizeEvent(static_cast< TQResizeEvent* >(e));
return true;
- case QEvent::Paint:
- paintEvent(static_cast< QPaintEvent* >(e));
+ case TQEvent::Paint:
+ paintEvent(static_cast< TQPaintEvent* >(e));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast< QMouseEvent* >(e));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast< TQMouseEvent* >(e));
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent(static_cast< QMouseEvent* >(e));
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent(static_cast< TQMouseEvent* >(e));
return true;
- case QEvent::Show:
- showEvent(static_cast< QShowEvent* >(e));
+ case TQEvent::Show:
+ showEvent(static_cast< TQShowEvent* >(e));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
break;
@@ -781,16 +781,16 @@ bool CdeClient::eventFilter(QObject *o, QEvent *e)
// ---------------------------------------
CdeButton::CdeButton(CdeClient* parent,
- const char* name, int btnType, const QString& tip, int realize_btns)
- : QButton(parent->widget(), name), m_btnType(btnType), last_button(NoButton)
+ const char* name, int btnType, const TQString& tip, int realize_btns)
+ : TQButton(parent->widget(), name), m_btnType(btnType), last_button(NoButton)
{
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
setFixedSize( s_buttonSize, s_buttonSize );
resize( s_buttonSize, s_buttonSize );
m_parent = parent;
setCursor(ArrowCursor);
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
m_realize_buttons = realize_btns;
}
@@ -800,12 +800,12 @@ void CdeButton::reset()
repaint( false );
}
-void CdeButton::drawButton( QPainter* p )
+void CdeButton::drawButton( TQPainter* p )
{
p->setBrush( options()->color( KDecoration::ColorTitleBar, m_parent->isActive() ) );
p->drawRect( 0, 0, s_buttonSize, s_buttonSize );
- QColorGroup colorGroup =
+ TQColorGroup colorGroup =
options()->colorGroup( KDecoration::ColorTitleBar, m_parent->isActive() );
fixColorGroup(colorGroup);
@@ -820,9 +820,9 @@ void CdeButton::drawButton( QPainter* p )
break;
case (BtnHelp):
p->setPen( colorGroup.light() );
- p->drawLineSegments( QPointArray(16, helpLLines) );
+ p->drawLineSegments( TQPointArray(16, helpLLines) );
p->setPen( colorGroup.dark() );
- p->drawLineSegments( QPointArray(14, helpDLines) );
+ p->drawLineSegments( TQPointArray(14, helpDLines) );
break;
case (BtnIconify):
qDrawShadePanel( p, s_o2, s_o2, s_w2, s_w2, colorGroup );
@@ -833,27 +833,27 @@ void CdeButton::drawButton( QPainter* p )
break;
case (BtnClose):
p->setPen( colorGroup.dark() );
- p->drawLineSegments( QPointArray(18, closeDLines) );
+ p->drawLineSegments( TQPointArray(18, closeDLines) );
p->setPen( colorGroup.light() );
- p->drawLineSegments( QPointArray(15, closeLLines) );
+ p->drawLineSegments( TQPointArray(15, closeLLines) );
break;
}
}
-void CdeButton::mousePressEvent(QMouseEvent *e)
+void CdeButton::mousePressEvent(TQMouseEvent *e)
{
last_button = e->button();
- QMouseEvent me(e->type(), e->pos(),
+ TQMouseEvent me(e->type(), e->pos(),
e->globalPos(), (e->button()&m_realize_buttons)?LeftButton:NoButton, e->state());
- QButton::mousePressEvent(&me);
+ TQButton::mousePressEvent(&me);
}
-void CdeButton::mouseReleaseEvent(QMouseEvent * e)
+void CdeButton::mouseReleaseEvent(TQMouseEvent * e)
{
last_button = e->button();
- QMouseEvent me(e->type(), e->pos(),
+ TQMouseEvent me(e->type(), e->pos(),
e->globalPos(), (e->button()&m_realize_buttons)?LeftButton:NoButton, e->state());
- QButton::mouseReleaseEvent(&me);
+ TQButton::mouseReleaseEvent(&me);
}
} // CDE namespace
diff --git a/kwin-styles/cde/cdeclient.h b/kwin-styles/cde/cdeclient.h
index 40e8f2eb..071c41ff 100644
--- a/kwin-styles/cde/cdeclient.h
+++ b/kwin-styles/cde/cdeclient.h
@@ -18,8 +18,8 @@
#ifndef __CDECLIENT_H
#define __CDECLIENT_H
-#include <qbutton.h>
-#include <qbitmap.h>
+#include <tqbutton.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -39,14 +39,14 @@ class CdeButton : public QButton
{
public:
CdeButton( CdeClient* parent=0, const char* name=0, int btnType=0,
- const QString& tip=NULL, int realize_btns = LeftButton );
+ const TQString& tip=NULL, int realize_btns = LeftButton );
void reset();
ButtonState lastButton() { return last_button; }
protected:
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- virtual void drawButton(QPainter *p);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ virtual void drawButton(TQPainter *p);
private:
CdeClient *m_parent;
@@ -64,26 +64,26 @@ public:
void init();
protected:
- bool eventFilter(QObject *o, QEvent *e);
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
-
- void showEvent(QShowEvent *);
- void addClientButtons( const QString& );
- void mouseDoubleClickEvent( QMouseEvent* );
- void wheelEvent( QWheelEvent * );
+ bool eventFilter(TQObject *o, TQEvent *e);
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+
+ void showEvent(TQShowEvent *);
+ void addClientButtons( const TQString& );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void wheelEvent( TQWheelEvent * );
void captionChange();
void desktopChange();
void activeChange();
void shadeChange();
void iconChange();
- QSize minimumSize() const;
- void resize(const QSize &size);
+ TQSize minimumSize() const;
+ void resize(const TQSize &size);
void borders(int &left, int &right, int &top, int &bottom) const;
- void mousePressEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
void maximizeChange();
- Position mousePosition( const QPoint& p ) const;
+ Position mousePosition( const TQPoint& p ) const;
protected slots:
void menuButtonPressed();
@@ -92,14 +92,14 @@ protected slots:
private:
CdeButton* button[BtnCount];
- QVBoxLayout* mainLayout;
- QBoxLayout* titleLayout;
- QSpacerItem* titlebar;
+ TQVBoxLayout* mainLayout;
+ TQBoxLayout* titleLayout;
+ TQSpacerItem* titlebar;
bool titlebarPressed;
bool closing;
};
-class CdeClientFactory: public QObject, public KDecorationFactory
+class CdeClientFactory: public TQObject, public KDecorationFactory
{
public:
CdeClientFactory();
@@ -108,7 +108,7 @@ public:
virtual bool supports( Ability ability );
virtual bool reset(unsigned long changed);
- QValueList< CdeClientFactory::BorderSize > borderSizes() const;
+ TQValueList< CdeClientFactory::BorderSize > borderSizes() const;
};
diff --git a/kwin-styles/cde/config/config.cpp b/kwin-styles/cde/config/config.cpp
index 5c3ac455..e9e49df0 100644
--- a/kwin-styles/cde/config/config.cpp
+++ b/kwin-styles/cde/config/config.cpp
@@ -2,11 +2,11 @@
#include "config.h"
#include <kapplication.h>
#include <kglobal.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
#include <klocale.h>
-extern "C" KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+extern "C" KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return new CdeConfig(conf, parent);
}
@@ -16,36 +16,36 @@ extern "C" KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
* 'conf' is a pointer to the kwindecoration modules open kwin config,
* and is by default set to the "Style" group.
*
- * 'parent' is the parent of the QObject, which is a VBox inside the
+ * 'parent' is the parent of the TQObject, which is a VBox inside the
* Configure tab in kwindecoration
*/
-CdeConfig::CdeConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+CdeConfig::CdeConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
cdeConfig = new KConfig("kwincderc");
KGlobal::locale()->insertCatalogue("kwin_art_clients");
- groupBox = new QVBox( parent );
+ groupBox = new TQVBox( parent );
- bgAlign = new QButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox );
+ bgAlign = new TQButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox );
bgAlign->setExclusive( true );
- QWhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") );
- new QRadioButton( i18n("Left"), bgAlign, "AlignLeft" );
- QRadioButton *radio2 = new QRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" );
+ TQWhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") );
+ new TQRadioButton( i18n("Left"), bgAlign, "AlignLeft" );
+ TQRadioButton *radio2 = new TQRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" );
radio2->setChecked( true );
- new QRadioButton( i18n("Right"), bgAlign, "AlignRight" );
+ new TQRadioButton( i18n("Right"), bgAlign, "AlignRight" );
- cbColorBorder = new QCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox );
- QWhatsThis::add( cbColorBorder, i18n("When selected, the window decoration borders "
+ cbColorBorder = new TQCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox );
+ TQWhatsThis::add( cbColorBorder, i18n("When selected, the window decoration borders "
"are drawn using the titlebar colors. Otherwise, they are "
"drawn using normal border colors instead.") );
-// cbTitlebarButton = new QCheckBox( i18n("Titlebar acts like a &pushbutton when clicked"), groupBox );
-// QWhatsThis::add( cbTitlebarButton, i18n("When selected, this option causes the window titlebar to behave "
+// cbTitlebarButton = new TQCheckBox( i18n("Titlebar acts like a &pushbutton when clicked"), groupBox );
+// TQWhatsThis::add( cbTitlebarButton, i18n("When selected, this option causes the window titlebar to behave "
// "as if it was a pushbutton when you click it to move the window.") );
- (void) new QLabel( i18n("Tip: If you want the look of the original Motif(tm) Window Manager,\n"
+ (void) new TQLabel( i18n("Tip: If you want the look of the original Motif(tm) Window Manager,\n"
"click the \"Buttons\" tab above and remove the help\n"
"and close buttons from the titlebar."), groupBox );
@@ -53,9 +53,9 @@ CdeConfig::CdeConfig( KConfig* conf, QWidget* parent )
load( conf );
// Ensure we track user changes properly
- connect( cbColorBorder, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
-// connect( cbTitlebarButton, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
- connect( bgAlign, SIGNAL(clicked(int)), SLOT(slotSelectionChanged(int)) );
+ connect( cbColorBorder, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
+// connect( cbTitlebarButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
+ connect( bgAlign, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotSelectionChanged(int)) );
// Make the widgets visible in kwindecoration
groupBox->show();
@@ -86,8 +86,8 @@ void CdeConfig::load( KConfig* /*conf*/ )
{
cdeConfig->setGroup("General");
- QString value = cdeConfig->readEntry( "TextAlignment", "AlignHCenter" );
- QRadioButton *button = (QRadioButton*)bgAlign->child( (const char *)value.latin1() );
+ TQString value = cdeConfig->readEntry( "TextAlignment", "AlignHCenter" );
+ TQRadioButton *button = (TQRadioButton*)bgAlign->child( (const char *)value.latin1() );
if ( button )
button->setChecked( true );
@@ -104,9 +104,9 @@ void CdeConfig::save( KConfig* /*conf*/ )
{
cdeConfig->setGroup("General");
- QRadioButton *button = (QRadioButton*)bgAlign->selected();
+ TQRadioButton *button = (TQRadioButton*)bgAlign->selected();
if ( button )
- cdeConfig->writeEntry( "TextAlignment", QString(button->name()) );
+ cdeConfig->writeEntry( "TextAlignment", TQString(button->name()) );
cdeConfig->writeEntry( "UseTitleBarBorderColors", cbColorBorder->isChecked() );
// cdeConfig->writeEntry( "TitlebarButtonMode", cbTitlebarButton->isChecked() );
@@ -119,7 +119,7 @@ void CdeConfig::save( KConfig* /*conf*/ )
// Sets UI widget defaults which must correspond to style defaults
void CdeConfig::defaults()
{
- QRadioButton *button = (QRadioButton*)bgAlign->child( "AlignHCenter" );
+ TQRadioButton *button = (TQRadioButton*)bgAlign->child( "AlignHCenter" );
if ( button )
button->setChecked( true );
diff --git a/kwin-styles/cde/config/config.h b/kwin-styles/cde/config/config.h
index 723d7b95..c9a6c528 100644
--- a/kwin-styles/cde/config/config.h
+++ b/kwin-styles/cde/config/config.h
@@ -1,12 +1,12 @@
#ifndef __KDE_CDECONFIG_H
#define __KDE_CDECONFIG_H
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
#include <kconfig.h>
class QCheckBox;
@@ -20,7 +20,7 @@ class CdeConfig: public QObject
Q_OBJECT
public:
- CdeConfig( KConfig* conf, QWidget* parent );
+ CdeConfig( KConfig* conf, TQWidget* parent );
~CdeConfig();
// These public signals/slots work similar to KCM modules
@@ -38,11 +38,11 @@ class CdeConfig: public QObject
private:
KConfig* cdeConfig;
- QCheckBox* cbColorBorder;
-// QCheckBox* cbTitlebarButton;
- QHBox* groupBox;
- QGroupBox* gbSlider;
- QButtonGroup* bgAlign;
+ TQCheckBox* cbColorBorder;
+// TQCheckBox* cbTitlebarButton;
+ TQHBox* groupBox;
+ TQGroupBox* gbSlider;
+ TQButtonGroup* bgAlign;
};
diff --git a/kwin-styles/glow/config/glowconfigdialog.cpp b/kwin-styles/glow/config/glowconfigdialog.cpp
index 41144c8a..ab0cd40d 100644
--- a/kwin-styles/glow/config/glowconfigdialog.cpp
+++ b/kwin-styles/glow/config/glowconfigdialog.cpp
@@ -15,19 +15,19 @@
* *
***************************************************************************/
-#include <qbitmap.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qsignalmapper.h>
-#include <qstringlist.h>
+#include <tqbitmap.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignalmapper.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -45,129 +45,129 @@
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new GlowConfigDialog(conf, parent));
}
}
-GlowConfigDialog::GlowConfigDialog( KConfig * conf, QWidget * parent )
- : QObject(parent)
+GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
+ : TQObject(parent)
{
_glowConfig = new KConfig("kwinglowrc");
KGlobal::locale()->insertCatalogue("kwin_glow_config");
- _main_group_box = new QWidget(parent);
- QVBoxLayout *main_group_boxLayout = new QVBoxLayout(_main_group_box);
+ _main_group_box = new TQWidget(parent);
+ TQVBoxLayout *main_group_boxLayout = new TQVBoxLayout(_main_group_box);
main_group_boxLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
main_group_boxLayout->setSpacing(6);
//-------------------------------------------------------------------------
// themes
- _theme_list_view = new QListView (_main_group_box, "theme_list_view");
+ _theme_list_view = new TQListView (_main_group_box, "theme_list_view");
_theme_list_view->addColumn (i18n("Theme"));
_theme_list_view->addColumn (i18n("Button Size"));
_theme_list_view->setAllColumnsShowFocus(true);
- _theme_list_view->setResizeMode(QListView::AllColumns);
+ _theme_list_view->setResizeMode(TQListView::AllColumns);
main_group_boxLayout->addWidget (_theme_list_view);
- QObject::connect (_theme_list_view, SIGNAL(selectionChanged()),
- this, SLOT(slotThemeListViewSelectionChanged()));
+ TQObject::connect (_theme_list_view, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotThemeListViewSelectionChanged()));
slotLoadThemeList();
- _button_glow_color_group_box = new QGroupBox(
+ _button_glow_color_group_box = new TQGroupBox(
0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box);
- QHBoxLayout *colorHBoxLayout =
- new QHBoxLayout(_button_glow_color_group_box->layout());
+ TQHBoxLayout *colorHBoxLayout =
+ new TQHBoxLayout(_button_glow_color_group_box->layout());
// create buttons
- QSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
- QPixmap pm(buttonSize);
+ TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
+ TQPixmap pm(buttonSize);
pm.fill(Qt::black);
- _stickyButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, stickyoff_bits, true));
+ _stickyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, stickyoff_bits, true));
_stickyButton->setPixmap(pm);
colorHBoxLayout->addWidget(_stickyButton);
_titleButtonList.push_back(_stickyButton);
- _helpButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, help_bits, true));
+ _helpButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, help_bits, true));
_helpButton->setPixmap(pm);
colorHBoxLayout->addWidget(_helpButton);
_titleButtonList.push_back(_helpButton);
- _iconifyButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, minimize_bits, true));
+ _iconifyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, minimize_bits, true));
_iconifyButton->setPixmap(pm);
colorHBoxLayout->addWidget(_iconifyButton);
_titleButtonList.push_back(_iconifyButton);
- _maximizeButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, maximizeoff_bits, true));
+ _maximizeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, maximizeoff_bits, true));
_maximizeButton->setPixmap(pm);
colorHBoxLayout->addWidget(_maximizeButton);
_titleButtonList.push_back(_maximizeButton);
- _closeButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, close_bits, true));
+ _closeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, close_bits, true));
_closeButton->setPixmap(pm);
colorHBoxLayout->addWidget(_closeButton);
_titleButtonList.push_back(_closeButton);
// create signal mapper
- _titleButtonMapper = new QSignalMapper(this);
+ _titleButtonMapper = new TQSignalMapper(this);
for( uint i=0; i<_titleButtonList.size(); i++ ) {
_titleButtonMapper->setMapping(_titleButtonList[i], i);
- connect(_titleButtonList[i], SIGNAL(clicked()),_titleButtonMapper, SLOT(map()));
+ connect(_titleButtonList[i], TQT_SIGNAL(clicked()),_titleButtonMapper, TQT_SLOT(map()));
}
- connect(_titleButtonMapper, SIGNAL(mapped(int)),this, SLOT(slotTitleButtonClicked(int)));
+ connect(_titleButtonMapper, TQT_SIGNAL(mapped(int)),this, TQT_SLOT(slotTitleButtonClicked(int)));
_colorButton = new KColorButton(_button_glow_color_group_box);
_colorButton->setEnabled(false);
- connect(_colorButton, SIGNAL(changed(const QColor&)),
- this, SLOT(slotColorButtonChanged(const QColor&)));
+ connect(_colorButton, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(slotColorButtonChanged(const TQColor&)));
- colorHBoxLayout->addItem(new QSpacerItem(
- 200, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ colorHBoxLayout->addItem(new TQSpacerItem(
+ 200, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
colorHBoxLayout->addWidget(_colorButton);
main_group_boxLayout->addWidget(_button_glow_color_group_box);
- QHBoxLayout *titlebarGradientTypeLayout = new QHBoxLayout();
- _titlebarGradientTypeComboBox = new QComboBox(_main_group_box);
+ TQHBoxLayout *titlebarGradientTypeLayout = new TQHBoxLayout();
+ _titlebarGradientTypeComboBox = new TQComboBox(_main_group_box);
KConfig *c = KGlobal::config();
- KConfigGroupSaver cgs( c, QString::fromLatin1("WM") );
- QColor activeBackground = c->readColorEntry("activeBackground");
- QColor activeBlend = c->readColorEntry("activeBlend");
+ KConfigGroupSaver cgs( c, TQString::fromLatin1("WM") );
+ TQColor activeBackground = c->readColorEntry("activeBackground");
+ TQColor activeBlend = c->readColorEntry("activeBlend");
// If the colors are equal, change one to get a gradient effect
if (activeBackground==activeBlend) {
activeBackground = activeBackground.dark();
}
for (int i=0; i< KPixmapEffect::EllipticGradient; i++ ) {
- KPixmap gradPixmap(QSize(196,20));
+ KPixmap gradPixmap(TQSize(196,20));
KPixmapEffect::gradient(gradPixmap, activeBackground,
activeBlend, (KPixmapEffect::GradientType) i);
_titlebarGradientTypeComboBox->insertItem(gradPixmap, i);
}
- connect(_titlebarGradientTypeComboBox, SIGNAL(activated(int)),
- this, SLOT(slotTitlebarGradientTypeChanged(int)));
+ connect(_titlebarGradientTypeComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotTitlebarGradientTypeChanged(int)));
titlebarGradientTypeLayout->addWidget(
- new QLabel(i18n("Titlebar gradient:"), _main_group_box));
+ new TQLabel(i18n("Titlebar gradient:"), _main_group_box));
titlebarGradientTypeLayout->addWidget(_titlebarGradientTypeComboBox, 0, Qt::AlignLeft);
titlebarGradientTypeLayout->addStretch(10);
main_group_boxLayout->addLayout(titlebarGradientTypeLayout);
- _showResizeHandleCheckBox = new QCheckBox(
+ _showResizeHandleCheckBox = new TQCheckBox(
i18n("Show resize handle"), _main_group_box);
- connect(_showResizeHandleCheckBox, SIGNAL(clicked()),
- this, SLOT(slotResizeHandleCheckBoxChanged()));
+ connect(_showResizeHandleCheckBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotResizeHandleCheckBoxChanged()));
main_group_boxLayout->addWidget(_showResizeHandleCheckBox);
// load config and update user interface
@@ -185,12 +185,12 @@ GlowConfigDialog::~GlowConfigDialog()
void GlowConfigDialog::load( KConfig* /* conf */ )
{
- QColor color;
- const QColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ TQColor color;
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
_glowConfig->setGroup("General");
@@ -249,11 +249,11 @@ void GlowConfigDialog::save( KConfig* /* conf */ )
void GlowConfigDialog::defaults()
{
- const QColor defaultCloseButtonColor = DEFAULT_CLOSE_BUTTON_COLOR;
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ const TQColor defaultCloseButtonColor = DEFAULT_CLOSE_BUTTON_COLOR;
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
_buttonConfigMap[stickyButton] = defaultStickyButtonColor;
_buttonConfigMap[helpButton] = defaultHelpButtonColor;
@@ -273,21 +273,21 @@ void GlowConfigDialog::defaults()
void GlowConfigDialog::slotLoadThemeList ()
{
- QStringList dir_list=KGlobal::dirs()->findDirs("data", "kwin/glow-themes");
+ TQStringList dir_list=KGlobal::dirs()->findDirs("data", "kwin/glow-themes");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
_theme_list_view->clear();
- new QListViewItem (_theme_list_view, "default", "17x17");
+ new TQListViewItem (_theme_list_view, "default", "17x17");
for (it=dir_list.begin(); it!=dir_list.end(); ++it)
{
- QDir dir (*it, QString("*"), QDir::Unsorted,
- QDir::Dirs | QDir::Readable);
+ TQDir dir (*it, TQString("*"), TQDir::Unsorted,
+ TQDir::Dirs | TQDir::Readable);
if (dir.exists())
{
QFileInfoListIterator it2(*dir.entryInfoList());
- QFileInfo * finfo;
+ TQFileInfo * finfo;
while ((finfo=it2.current()))
{
@@ -300,17 +300,17 @@ void GlowConfigDialog::slotLoadThemeList ()
{
KConfig conf (dir.path() + "/" + finfo->fileName() + "/" +
finfo->fileName() + ".theme");
- QSize button_size = conf.readSizeEntry (
- "buttonSize", new QSize (-1, -1));
+ TQSize button_size = conf.readSizeEntry (
+ "buttonSize", new TQSize (-1, -1));
if (button_size.width() == -1)
{
++it2;
continue;
}
- QString size_string = QString("") +
- QString::number(button_size.width()) +
- "x" + QString::number(button_size.height());
- new QListViewItem (_theme_list_view,
+ TQString size_string = TQString("") +
+ TQString::number(button_size.width()) +
+ "x" + TQString::number(button_size.height());
+ new TQListViewItem (_theme_list_view,
finfo->fileName(), size_string);
}
@@ -341,7 +341,7 @@ void GlowConfigDialog::slotTitleButtonClicked(int index)
_colorButton->setColor(_buttonConfigMap[index]);
}
-void GlowConfigDialog::slotColorButtonChanged(const QColor& glowColor)
+void GlowConfigDialog::slotColorButtonChanged(const TQColor& glowColor)
{
if( _stickyButton->isDown() ) {
_buttonConfigMap[stickyButton] = glowColor;
diff --git a/kwin-styles/glow/config/glowconfigdialog.h b/kwin-styles/glow/config/glowconfigdialog.h
index 2190b3ce..033954b6 100644
--- a/kwin-styles/glow/config/glowconfigdialog.h
+++ b/kwin-styles/glow/config/glowconfigdialog.h
@@ -18,8 +18,8 @@
#ifndef GLOW_CONFIG_DIALOG_H
#define GLOW_CONFIG_DIALOG_H
-#include <qvaluevector.h>
-#include <qobject.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
class QListView;
class QPushButton;
@@ -34,7 +34,7 @@ class GlowConfigDialog : public QObject
Q_OBJECT
public:
- GlowConfigDialog( KConfig* conf, QWidget* parent );
+ GlowConfigDialog( KConfig* conf, TQWidget* parent );
~GlowConfigDialog();
signals:
@@ -47,7 +47,7 @@ public slots:
protected slots:
void slotTitleButtonClicked(int);
- void slotColorButtonChanged(const QColor&);
+ void slotColorButtonChanged(const TQColor&);
void slotTitlebarGradientTypeChanged(int);
void slotResizeHandleCheckBoxChanged();
void slotThemeListViewSelectionChanged ();
@@ -63,26 +63,26 @@ private:
bool _showResizeHandle;
KPixmapEffect::GradientType _titlebarGradientType;
- QString _theme_name;
+ TQString _theme_name;
- QWidget *_main_group_box;
- QGroupBox *_button_glow_color_group_box;
- QGroupBox *_theme_group_box;
+ TQWidget *_main_group_box;
+ TQGroupBox *_button_glow_color_group_box;
+ TQGroupBox *_theme_group_box;
- QListView * _theme_list_view;
+ TQListView * _theme_list_view;
- QCheckBox *_showResizeHandleCheckBox;
- QComboBox *_titlebarGradientTypeComboBox;
+ TQCheckBox *_showResizeHandleCheckBox;
+ TQComboBox *_titlebarGradientTypeComboBox;
- QPushButton *_stickyButton;
- QPushButton *_helpButton;
- QPushButton *_iconifyButton;
- QPushButton *_maximizeButton;
- QPushButton *_closeButton;
- QSignalMapper *_titleButtonMapper;
+ TQPushButton *_stickyButton;
+ TQPushButton *_helpButton;
+ TQPushButton *_iconifyButton;
+ TQPushButton *_maximizeButton;
+ TQPushButton *_closeButton;
+ TQSignalMapper *_titleButtonMapper;
- QColor* _buttonConfigMap;
- QValueVector<QPushButton*> _titleButtonList;
+ TQColor* _buttonConfigMap;
+ TQValueVector<TQPushButton*> _titleButtonList;
KColorButton *_colorButton;
};
diff --git a/kwin-styles/glow/glowbutton.cpp b/kwin-styles/glow/glowbutton.cpp
index 41f53386..25bae19c 100644
--- a/kwin-styles/glow/glowbutton.cpp
+++ b/kwin-styles/glow/glowbutton.cpp
@@ -18,14 +18,14 @@
#include <math.h>
#include <iostream>
#include <vector>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kdecoration.h>
#include <kiconeffect.h>
#include "glowbutton.h"
@@ -37,11 +37,11 @@ namespace Glow
// PixmapCache
//-----------------------------------------------------------------------------
-QMap<QString, const QPixmap*> PixmapCache::m_pixmapMap;
+TQMap<TQString, const TQPixmap*> PixmapCache::m_pixmapMap;
-const QPixmap* PixmapCache::find(const QString& key)
+const TQPixmap* PixmapCache::find(const TQString& key)
{
- QMap<QString, const QPixmap*>::const_iterator it =
+ TQMap<TQString, const TQPixmap*>::const_iterator it =
m_pixmapMap.find(key);
if( it != m_pixmapMap.end() )
return *it;
@@ -49,14 +49,14 @@ const QPixmap* PixmapCache::find(const QString& key)
return 0;
}
-void PixmapCache::insert(const QString& key, const QPixmap *pixmap)
+void PixmapCache::insert(const TQString& key, const TQPixmap *pixmap)
{
m_pixmapMap[key] = pixmap;
}
-void PixmapCache::erase(const QString& key)
+void PixmapCache::erase(const TQString& key)
{
- QMap<QString, const QPixmap*>::iterator it =
+ TQMap<TQString, const TQPixmap*>::iterator it =
m_pixmapMap.find(key);
if (it != m_pixmapMap.end())
{
@@ -68,7 +68,7 @@ void PixmapCache::erase(const QString& key)
void PixmapCache::clear()
{
// delete all pixmaps in the cache
- QMap<QString, const QPixmap*>::const_iterator it
+ TQMap<TQString, const TQPixmap*>::const_iterator it
= m_pixmapMap.begin();
for(; it != m_pixmapMap.end(); ++it)
delete *it;
@@ -79,18 +79,18 @@ void PixmapCache::clear()
// GlowButton
//-----------------------------------------------------------------------------
-GlowButton::GlowButton(QWidget *parent, const char *name,
- const QString& tip, const int realizeBtns)
- : QButton(parent, name)
+GlowButton::GlowButton(TQWidget *parent, const char *name,
+ const TQString& tip, const int realizeBtns)
+ : TQButton(parent, name)
{
m_realizeButtons = realizeBtns;
_steps = 0;
m_updateTime = 50;
- m_pixmapName = QString::null;
+ m_pixmapName = TQString::null;
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
m_pos = 0;
m_timerStatus = Stop;
@@ -102,16 +102,16 @@ GlowButton::~GlowButton()
{
}
-void GlowButton::setTipText( const QString& tip )
+void GlowButton::setTipText( const TQString& tip )
{
if (KDecoration::options()->showTooltips())
{
- QToolTip::remove( this );
- QToolTip::add( this, tip );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, tip );
}
}
-QString GlowButton::getPixmapName() const
+TQString GlowButton::getPixmapName() const
{
return m_pixmapName;
}
@@ -121,11 +121,11 @@ Qt::ButtonState GlowButton::lastButton() const
return _last_button;
}
-void GlowButton::setPixmapName(const QString& pixmapName)
+void GlowButton::setPixmapName(const TQString& pixmapName)
{
m_pixmapName = pixmapName;
- const QPixmap *pixmap = PixmapCache::find(pixmapName);
+ const TQPixmap *pixmap = PixmapCache::find(pixmapName);
if( ! pixmap )
return;
@@ -135,18 +135,18 @@ void GlowButton::setPixmapName(const QString& pixmapName)
repaint(false);
}
-void GlowButton::paintEvent( QPaintEvent *e )
+void GlowButton::paintEvent( TQPaintEvent *e )
{
- QWidget::paintEvent(e);
- const QPixmap *pixmap = PixmapCache::find(m_pixmapName);
+ TQWidget::paintEvent(e);
+ const TQPixmap *pixmap = PixmapCache::find(m_pixmapName);
if( pixmap != 0 )
{
int pos = m_pos>=0?m_pos:-m_pos;
- QPainter p;
- QPixmap pm (pixmap->size());
+ TQPainter p;
+ TQPixmap pm (pixmap->size());
p.begin(&pm);
- const QPixmap * bg_pixmap = PixmapCache::find(
- QString::number(parentWidget()->winId()));
+ const TQPixmap * bg_pixmap = PixmapCache::find(
+ TQString::number(parentWidget()->winId()));
p.drawPixmap (0, 0, *bg_pixmap, x(), y(), width(), height());
p.drawPixmap (0, 0, *pixmap, 0, pos*height(), width(), height());
p.end();
@@ -156,25 +156,25 @@ void GlowButton::paintEvent( QPaintEvent *e )
}
}
-void GlowButton::enterEvent( QEvent *e )
+void GlowButton::enterEvent( TQEvent *e )
{
if( m_pos<0 )
m_pos=-m_pos;
m_timerStatus = Run;
if( ! m_timer->isActive() )
m_timer->start(m_updateTime);
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
}
-void GlowButton::leaveEvent( QEvent *e )
+void GlowButton::leaveEvent( TQEvent *e )
{
m_timerStatus = Stop;
if( ! m_timer->isActive() )
m_timer->start(m_updateTime);
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
}
-void GlowButton::mousePressEvent( QMouseEvent *e )
+void GlowButton::mousePressEvent( TQMouseEvent *e )
{
_last_button = e->button();
if( m_timer->isActive() )
@@ -183,24 +183,24 @@ void GlowButton::mousePressEvent( QMouseEvent *e )
repaint(false);
// without pretending LeftButton, clicking on the button with MidButton
// or RightButton would cause unwanted titlebar action
- QMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state());
- QButton::mousePressEvent(&me);
+ TQButton::mousePressEvent(&me);
}
-void GlowButton::mouseReleaseEvent( QMouseEvent *e )
+void GlowButton::mouseReleaseEvent( TQMouseEvent *e )
{
_last_button = e->button();
- QPoint p = mapToParent(mapFromGlobal(e->globalPos()));
+ TQPoint p = mapToParent(mapFromGlobal(e->globalPos()));
if( ! m_timer->isActive() ) {
m_timer->start(m_updateTime);
}
if( ! geometry().contains(p) ) {
m_timerStatus = Stop;
}
- QMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state());
- QButton::mouseReleaseEvent(&me);
+ TQButton::mouseReleaseEvent(&me);
}
void GlowButton::slotTimeout()
@@ -241,26 +241,26 @@ void GlowButtonFactory::setSteps(int steps)
_steps = steps;
}
-QPixmap * GlowButtonFactory::createGlowButtonPixmap(
- const QImage & bg_image,
- const QImage & fg_image,
- const QImage & glow_image,
- const QColor & color,
- const QColor & glow_color)
+TQPixmap * GlowButtonFactory::createGlowButtonPixmap(
+ const TQImage & bg_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color)
{
if (bg_image.size() != fg_image.size()
|| fg_image.size() != glow_image.size()) {
std::cerr << "Image size error" << std::endl;
- return new QPixmap();
+ return new TQPixmap();
}
- QImage colorized_bg_image = bg_image.copy();
+ TQImage colorized_bg_image = bg_image.copy();
KIconEffect::colorize (colorized_bg_image, color, 1.0);
int w = colorized_bg_image.width();
int h = colorized_bg_image.height();
- QImage image (w, (_steps+1)*h, 32);
+ TQImage image (w, (_steps+1)*h, 32);
image.setAlphaBuffer (true);
for (int i=0; i<_steps+1; ++i) {
for (int y=0; y<h; ++y) {
@@ -276,11 +276,11 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
}
}
}
- QPixmap * pixmap = new QPixmap (image);
- QPainter painter (pixmap);
+ TQPixmap * pixmap = new TQPixmap (image);
+ TQPainter painter (pixmap);
bool dark = (qGray(color.rgb()) <= 127);
- QImage fg_img (w, h, 32);
+ TQImage fg_img (w, h, 32);
fg_img.setAlphaBuffer (true);
for (int y=0; y<h; ++y) {
uint * src_line = (uint*) fg_image.scanLine (y);
@@ -297,7 +297,7 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
int r = glow_color.red();
int g = glow_color.green();
int b = glow_color.blue();
- QImage glow_img (w, h, 32);
+ TQImage glow_img (w, h, 32);
glow_img.setAlphaBuffer (true);
for (int i=0; i<_steps; ++i) {
painter.drawImage (0, i*h, fg_img);
@@ -327,7 +327,7 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
}
GlowButton* GlowButtonFactory::createGlowButton(
- QWidget *parent, const char* name, const QString& tip, const int realizeBtns)
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns)
{
GlowButton *glowButton = new GlowButton(parent, name, tip, realizeBtns);
return glowButton;
diff --git a/kwin-styles/glow/glowbutton.h b/kwin-styles/glow/glowbutton.h
index 3d4f5e1d..e7cc3605 100644
--- a/kwin-styles/glow/glowbutton.h
+++ b/kwin-styles/glow/glowbutton.h
@@ -19,8 +19,8 @@
#define GLOW_BUTTON_H
#include <vector>
-#include <qmap.h>
-#include <qbutton.h>
+#include <tqmap.h>
+#include <tqbutton.h>
class QPixmap;
class QBitmap;
@@ -33,12 +33,12 @@ namespace Glow
class PixmapCache
{
public:
- static const QPixmap* find(const QString& key);
- static void insert(const QString& key, const QPixmap *pixmap);
- static void erase(const QString& key);
+ static const TQPixmap* find(const TQString& key);
+ static void insert(const TQString& key, const TQPixmap *pixmap);
+ static void erase(const TQString& key);
static void clear();
private:
- static QMap<QString, const QPixmap*> m_pixmapMap;
+ static TQMap<TQString, const TQPixmap*> m_pixmapMap;
};
@@ -49,24 +49,24 @@ class GlowButton : public QButton
Q_OBJECT
public:
- GlowButton(QWidget *parent, const char* name, const QString& tip, const int realizeBtns);
+ GlowButton(TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns);
~GlowButton();
- void setTipText( const QString& tip );
+ void setTipText( const TQString& tip );
- QString getPixmapName() const;
+ TQString getPixmapName() const;
ButtonState lastButton() const;
/** Sets the name of the pixmap in the pixmap cache.
- * If no background pixmap is wanted use QString::null as name. */
- void setPixmapName(const QString& pixmapName);
+ * If no background pixmap is wanted use TQString::null as name. */
+ void setPixmapName(const TQString& pixmapName);
protected:
- virtual void paintEvent( QPaintEvent * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
protected slots:
void slotTimeout();
@@ -76,9 +76,9 @@ private:
int m_updateTime;
int _steps;
- QString m_pixmapName;
+ TQString m_pixmapName;
- QTimer *m_timer;
+ TQTimer *m_timer;
int m_pos;
TimerStatus m_timerStatus;
@@ -108,16 +108,16 @@ public:
* in succession to create the glow effect. The last sub pixmap is used
* when the button is pressed.
*/
- QPixmap * createGlowButtonPixmap(
- const QImage & bg_image,
-// const QImage & bg_alpha_image,
- const QImage & fg_image,
- const QImage & glow_image,
- const QColor & color,
- const QColor & glow_color);
+ TQPixmap * createGlowButtonPixmap(
+ const TQImage & bg_image,
+// const TQImage & bg_alpha_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color);
GlowButton* createGlowButton(
- QWidget *parent, const char* name, const QString& tip, const int realizeBtns = Qt::LeftButton);
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns = Qt::LeftButton);
private:
int _steps;
diff --git a/kwin-styles/glow/glowclient.cpp b/kwin-styles/glow/glowclient.cpp
index ed13f480..53d52b79 100644
--- a/kwin-styles/glow/glowclient.cpp
+++ b/kwin-styles/glow/glowclient.cpp
@@ -15,19 +15,19 @@
* *
***************************************************************************/
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpixmapeffect.h>
#include <kpixmap.h>
#include <kstandarddirs.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "resources.h"
#include "glowclient.h"
#include "glowbutton.h"
@@ -54,11 +54,11 @@ void GlowClientConfig::load(KDecorationFactory *factory)
KConfig conf("kwinglowrc");
conf.setGroup("General");
- const QColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
stickyButtonGlowColor = conf.readColorEntry(
"stickyButtonGlowColor", &defaultStickyButtonColor);
@@ -123,9 +123,9 @@ GlowClientGlobals::~GlowClientGlobals()
m_instance = 0;
}
-QString GlowClientGlobals::getPixmapName(PixmapType type, bool isActive)
+TQString GlowClientGlobals::getPixmapName(PixmapType type, bool isActive)
{
- QString s = getPixmapTypeName(static_cast<PixmapType>(type));
+ TQString s = getPixmapTypeName(static_cast<PixmapType>(type));
s += "|";
s += isActive ? "Active" : "NotActive";
return s;
@@ -153,19 +153,19 @@ void GlowClientGlobals::readConfig()
_config->load(this);
}
-QValueList< GlowClientGlobals::BorderSize >
+TQValueList< GlowClientGlobals::BorderSize >
GlowClientGlobals::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge <<
BorderVeryHuge << BorderOversized;
}
void GlowClientGlobals::readTheme()
{
- QString theme_config_file = KGlobal::dirs()->findResource ("data",
- QString("kwin/glow-themes/") + config()->themeName + "/" +
+ TQString theme_config_file = KGlobal::dirs()->findResource ("data",
+ TQString("kwin/glow-themes/") + config()->themeName + "/" +
config()->themeName + ".theme");
if (theme_config_file.isNull())
{
@@ -207,7 +207,7 @@ void GlowClientGlobals::readTheme()
_theme->iconifyGlowPixmap = conf.readEntry ("iconifyGlowPixmap",
_theme->iconifyGlowPixmap);
- titleHeight = QFontMetrics(KDecoration::options()->font(true)).height();
+ titleHeight = TQFontMetrics(KDecoration::options()->font(true)).height();
if (titleHeight < SIDE_MARGIN)
titleHeight = SIDE_MARGIN;
if (titleHeight < _theme->buttonSize.height())
@@ -266,7 +266,7 @@ void GlowClientGlobals::deletePixmaps()
PixmapCache::clear();
}
-const QString GlowClientGlobals::getPixmapTypeName(PixmapType type)
+const TQString GlowClientGlobals::getPixmapTypeName(PixmapType type)
{
switch(type) {
case (StickyOn):
@@ -284,69 +284,69 @@ const QString GlowClientGlobals::getPixmapTypeName(PixmapType type)
case(Close):
return "Close";
default:
- return QString::null;
+ return TQString::null;
}
}
bool GlowClientGlobals::createPixmap(PixmapType type, bool isActive)
{
- QString theme_dir = KGlobal::dirs()->findResource ("data",
- QString("kwin/glow-themes/") + _config->themeName + "/");
+ TQString theme_dir = KGlobal::dirs()->findResource ("data",
+ TQString("kwin/glow-themes/") + _config->themeName + "/");
- QColor glow_color;
- QColor color = options()->color(ColorButtonBg, isActive);
+ TQColor glow_color;
+ TQColor color = options()->color(ColorButtonBg, isActive);
- QImage bg_image (theme_dir+_theme->backgroundPixmap);
- QImage fg_image;
- QImage glow_image;
+ TQImage bg_image (theme_dir+_theme->backgroundPixmap);
+ TQImage fg_image;
+ TQImage glow_image;
switch(type) {
case (StickyOn):
{
- fg_image = QImage (theme_dir+_theme->stickyOnPixmap);
- glow_image = QImage (theme_dir+_theme->stickyOnGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->stickyOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOnGlowPixmap);
glow_color = _config->stickyButtonGlowColor;
break;
}
case (StickyOff):
{
- fg_image = QImage (theme_dir+_theme->stickyOffPixmap);
- glow_image = QImage (theme_dir+_theme->stickyOffGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->stickyOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOffGlowPixmap);
glow_color = _config->stickyButtonGlowColor;
break;
}
case (Help):
{
- fg_image = QImage (theme_dir+_theme->helpPixmap);
- glow_image = QImage (theme_dir+_theme->helpGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->helpPixmap);
+ glow_image = TQImage (theme_dir+_theme->helpGlowPixmap);
glow_color = _config->helpButtonGlowColor;
break;
}
case (Iconify):
{
- fg_image = QImage (theme_dir+_theme->iconifyPixmap);
- glow_image = QImage (theme_dir+_theme->iconifyGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->iconifyPixmap);
+ glow_image = TQImage (theme_dir+_theme->iconifyGlowPixmap);
glow_color = _config->iconifyButtonGlowColor;
break;
}
case (MaximizeOn):
{
- fg_image = QImage (theme_dir+_theme->maximizeOnPixmap);
- glow_image = QImage (theme_dir+_theme->maximizeOnGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->maximizeOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOnGlowPixmap);
glow_color = _config->maximizeButtonGlowColor;
break;
}
case (MaximizeOff):
{
- fg_image = QImage (theme_dir+_theme->maximizeOffPixmap);
- glow_image = QImage (theme_dir+_theme->maximizeOffGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->maximizeOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOffGlowPixmap);
glow_color = _config->maximizeButtonGlowColor;
break;
}
case (Close):
{
- fg_image = QImage (theme_dir+_theme->closePixmap);
- glow_image = QImage (theme_dir+_theme->closeGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->closePixmap);
+ glow_image = TQImage (theme_dir+_theme->closeGlowPixmap);
glow_color = _config->closeButtonGlowColor;
break;
}
@@ -357,7 +357,7 @@ bool GlowClientGlobals::createPixmap(PixmapType type, bool isActive)
|| glow_image.size() != _theme->buttonSize)
return false;
- QPixmap * glowPm = buttonFactory()->createGlowButtonPixmap(
+ TQPixmap * glowPm = buttonFactory()->createGlowButtonPixmap(
bg_image, fg_image, glow_image,
color, glow_color);
if (glowPm->isNull())
@@ -398,40 +398,40 @@ void GlowClient::init()
GlowClient::~GlowClient()
{
- PixmapCache::erase(QString::number(widget()->winId()));
+ PixmapCache::erase(TQString::number(widget()->winId()));
}
-void GlowClient::resizeEvent( QResizeEvent * )
+void GlowClient::resizeEvent( TQResizeEvent * )
{
doShape();
widget()->repaint(false);
}
-void GlowClient::paintEvent( QPaintEvent * )
+void GlowClient::paintEvent( TQPaintEvent * )
{
GlowClientConfig *conf = GlowClientGlobals::instance()->config();
- QRect r_this = widget()->rect();
- QRect r_title = _title_spacer->geometry();
- QColorGroup titleCg = options()->colorGroup(ColorTitleBar, isActive());
- QColorGroup titleBlendCg=options()->colorGroup(ColorTitleBlend, isActive());
- QColorGroup cg = widget()->colorGroup();
- QColor titleColor = options()->color(ColorTitleBar, isActive());
- QColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
- QColor bgColor = widget()->colorGroup().background();
- QPainter p;
- QPointArray pArray, pArray2, pArray3, pArray4;
+ TQRect r_this = widget()->rect();
+ TQRect r_title = _title_spacer->geometry();
+ TQColorGroup titleCg = options()->colorGroup(ColorTitleBar, isActive());
+ TQColorGroup titleBlendCg=options()->colorGroup(ColorTitleBlend, isActive());
+ TQColorGroup cg = widget()->colorGroup();
+ TQColor titleColor = options()->color(ColorTitleBar, isActive());
+ TQColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
+ TQColor bgColor = widget()->colorGroup().background();
+ TQPainter p;
+ TQPointArray pArray, pArray2, pArray3, pArray4;
// pixmap for title bar
- QSize tBSize(width(), r_title.height());
- QSize gradientPixmapSize (tBSize-QSize(3,3));
+ TQSize tBSize(width(), r_title.height());
+ TQSize gradientPixmapSize (tBSize-TQSize(3,3));
if (! gradientPixmapSize.isValid())
- gradientPixmapSize = QSize(0,0);
+ gradientPixmapSize = TQSize(0,0);
KPixmap gradientPixmap(gradientPixmapSize);
if (! gradientPixmapSize.isNull())
KPixmapEffect::gradient(gradientPixmap, titleColor, titleBlendColor,
(KPixmapEffect::GradientType) conf->titlebarGradientType);
- QPixmap * title_buffer = new QPixmap(tBSize);
+ TQPixmap * title_buffer = new TQPixmap(tBSize);
p.begin(title_buffer);
if (! gradientPixmap.isNull())
p.drawPixmap(2, 2, gradientPixmap);
@@ -446,7 +446,7 @@ void GlowClient::paintEvent( QPaintEvent * )
Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, caption());
// draw split color beneath buttons top right
- pArray4 = QPointArray(4);
+ pArray4 = TQPointArray(4);
pArray4.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
pArray4.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
tBSize.height()/2-1);
@@ -457,7 +457,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolygon(pArray4);
// draw borders
- pArray = QPointArray(3);
+ pArray = TQPointArray(3);
pArray.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
pArray.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
tBSize.height()/2-1);
@@ -466,7 +466,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolyline(pArray);
p.drawLine (0, tBSize.height()-1, r_title.x()+r_title.width()-1, tBSize.height()-1);
- pArray2 = QPointArray(3);
+ pArray2 = TQPointArray(3);
pArray2.setPoint(0, 1, tBSize.height()-2);
pArray2.setPoint(1, 1, 1);
pArray2.setPoint(2, tBSize.width()-2, 1);
@@ -474,7 +474,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolyline(pArray2);
}
- pArray3 = QPointArray(4);
+ pArray3 = TQPointArray(4);
pArray3.setPoint(0, 0, tBSize.height()-1);
pArray3.setPoint(1, 0, 0);
pArray3.setPoint(2, tBSize.width()-1, 0);
@@ -484,8 +484,8 @@ void GlowClient::paintEvent( QPaintEvent * )
p.end();
// insert title buffer in cache; before that, remove old buffer
- PixmapCache::erase(QString::number(widget()->winId()));
- PixmapCache::insert(QString::number(widget()->winId()), title_buffer);
+ PixmapCache::erase(TQString::number(widget()->winId()));
+ PixmapCache::insert(TQString::number(widget()->winId()), title_buffer);
bitBlt(widget(), 0, 0, title_buffer);
for (unsigned int i=0; i<m_buttonList.size(); ++i)
@@ -518,21 +518,21 @@ void GlowClient::paintEvent( QPaintEvent * )
}
}
-void GlowClient::showEvent( QShowEvent * )
+void GlowClient::showEvent( TQShowEvent * )
{
doShape();
widget()->repaint(false);
}
-void GlowClient::mouseDoubleClickEvent( QMouseEvent *e )
+void GlowClient::mouseDoubleClickEvent( TQMouseEvent *e )
{
if(e->button() == LeftButton && _title_spacer->geometry().contains(e->pos()))
titlebarDblClickOperation();
}
-void GlowClient::wheelEvent( QWheelEvent *e )
+void GlowClient::wheelEvent( TQWheelEvent *e )
{
- if (isSetShade() || QRect( 0, 0, width(), titleHeight ).contains(e->pos()))
+ if (isSetShade() || TQRect( 0, 0, width(), titleHeight ).contains(e->pos()))
titlebarMouseWheelOperation( e->delta());
}
@@ -556,12 +556,12 @@ void GlowClient::captionChange()
widget()->update(_title_spacer->geometry());
}
-QSize GlowClient::minimumSize() const
+TQSize GlowClient::minimumSize() const
{
return widget()->minimumSize();
}
-void GlowClient::resize( const QSize& s )
+void GlowClient::resize( const TQSize& s )
{
widget()->resize( s );
}
@@ -607,7 +607,7 @@ void GlowClient::maximizeChange()
}
}
-KDecoration::Position GlowClient::mousePosition(const QPoint &pos) const
+KDecoration::Position GlowClient::mousePosition(const TQPoint &pos) const
{
Position m = PositionCenter;
@@ -646,87 +646,87 @@ void GlowClient::createButtons()
{
GlowClientGlobals *globals = GlowClientGlobals::instance();
GlowButtonFactory *factory = globals->buttonFactory();
- QSize size = globals->theme()->buttonSize;
+ TQSize size = globals->theme()->buttonSize;
m_stickyButton = factory->createGlowButton(widget(),
"StickyButton", isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops"), LeftButton|RightButton);
m_stickyButton->setFixedSize(size);
- connect(m_stickyButton, SIGNAL(clicked()), this, SLOT(toggleOnAllDesktops()));
+ connect(m_stickyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleOnAllDesktops()));
m_buttonList.insert(m_buttonList.end(), m_stickyButton);
m_helpButton = factory->createGlowButton(widget(),
"HelpButton", i18n("Help"));
m_helpButton->setFixedSize(size);
- connect(m_helpButton, SIGNAL(clicked()), this, SLOT(showContextHelp()));
+ connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showContextHelp()));
m_buttonList.insert(m_buttonList.end(), m_helpButton);
m_minimizeButton = factory->createGlowButton(widget(),
"IconifyButton", i18n("Minimize"));
m_minimizeButton->setFixedSize(size);
- connect(m_minimizeButton, SIGNAL(clicked()), this, SLOT(minimize()));
+ connect(m_minimizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize()));
m_buttonList.insert(m_buttonList.end(), m_minimizeButton);
m_maximizeButton=factory->createGlowButton(widget(),
"MaximizeButton", i18n("Maximize"), LeftButton|MidButton|RightButton);
m_maximizeButton->setFixedSize(size);
- connect(m_maximizeButton, SIGNAL(clicked()), this, SLOT(slotMaximize()));
+ connect(m_maximizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMaximize()));
m_buttonList.insert(m_buttonList.end(), m_maximizeButton);
m_closeButton = factory->createGlowButton(widget(),
"CloseButton", i18n("Close"));
m_closeButton->setFixedSize(size);
- connect(m_closeButton, SIGNAL(clicked()), this, SLOT(closeWindow()));
+ connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow()));
m_buttonList.insert(m_buttonList.end(), m_closeButton);
}
void GlowClient::resetLayout()
{
- _main_layout = new QVBoxLayout(widget(), 0, 0);
- _main_layout->setResizeMode (QLayout::FreeResize);
+ _main_layout = new TQVBoxLayout(widget(), 0, 0);
+ _main_layout->setResizeMode (TQLayout::FreeResize);
// update button positions and colors
updateButtonPositions();
updateButtonPixmaps();
- QBoxLayout * topLayout = new QBoxLayout(_main_layout,
- QBoxLayout::LeftToRight, 0, 0);
+ TQBoxLayout * topLayout = new TQBoxLayout(_main_layout,
+ TQBoxLayout::LeftToRight, 0, 0);
topLayout->setMargin(0);
topLayout->setSpacing(TITLE_SPACING);
topLayout->addSpacing(SIDE_MARGIN);
- QVBoxLayout *outerLeftLayout = new QVBoxLayout(topLayout);
+ TQVBoxLayout *outerLeftLayout = new TQVBoxLayout(topLayout);
outerLeftLayout->addSpacing(TITLE_MARGIN);
outerLeftLayout->addItem(m_leftButtonLayout);
outerLeftLayout->addSpacing(1);
topLayout->addSpacing(SIDE_MARGIN);
- _title_spacer = new QSpacerItem(0, titleHeight + TITLE_MARGIN + 1,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ _title_spacer = new TQSpacerItem(0, titleHeight + TITLE_MARGIN + 1,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
topLayout->addItem(_title_spacer);
topLayout->addSpacing(SIDE_MARGIN);
- QVBoxLayout *outerRightLayout = new QVBoxLayout(topLayout);
+ TQVBoxLayout *outerRightLayout = new TQVBoxLayout(topLayout);
outerRightLayout->addSpacing(TITLE_MARGIN);
outerRightLayout->addItem(m_rightButtonLayout);
outerRightLayout->addSpacing(1);
topLayout->addSpacing(SIDE_MARGIN);
- QBoxLayout *midLayout = new QBoxLayout(
- _main_layout, QBoxLayout::LeftToRight, 0, 0);
+ TQBoxLayout *midLayout = new TQBoxLayout(
+ _main_layout, TQBoxLayout::LeftToRight, 0, 0);
midLayout->addSpacing(SIDE_MARGIN);
if(isPreview())
midLayout->addWidget(
- new QLabel( i18n( "<b><center>Glow preview</center></b>" ), widget()));
+ new TQLabel( i18n( "<b><center>Glow preview</center></b>" ), widget()));
else
- midLayout->addItem( new QSpacerItem( 0, 0 ));
+ midLayout->addItem( new TQSpacerItem( 0, 0 ));
midLayout->addSpacing(SIDE_MARGIN);
if(GlowClientGlobals::instance()->config()->showResizeHandle
&& isResizable() ) {
- _bottom_spacer = new QSpacerItem(SIDE_MARGIN*2,
- RESIZE_HANDLE_HEIGHT, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ RESIZE_HANDLE_HEIGHT, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
} else {
- _bottom_spacer = new QSpacerItem(SIDE_MARGIN*2,
- BOTTOM_MARGIN, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ BOTTOM_MARGIN, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
}
_main_layout->addItem (_bottom_spacer);
_main_layout->setStretchFactor(topLayout, 0);
@@ -735,7 +735,7 @@ void GlowClient::resetLayout()
void GlowClient::updateButtonPositions()
{
- QString buttons = options()->titleButtonsLeft() + "|"
+ TQString buttons = options()->titleButtonsLeft() + "|"
+ options()->titleButtonsRight();
bool leftButtons=true;
@@ -749,12 +749,12 @@ void GlowClient::updateButtonPositions()
// reset left and right button layout
if(m_leftButtonLayout)
delete m_leftButtonLayout;
- m_leftButtonLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
m_leftButtonLayout->setMargin(0);
m_leftButtonLayout->setSpacing(TITLE_SPACING);
if(m_rightButtonLayout)
delete m_rightButtonLayout;
- m_rightButtonLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ m_rightButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
m_rightButtonLayout->setMargin(0);
m_rightButtonLayout->setSpacing(TITLE_SPACING);
@@ -825,12 +825,12 @@ void GlowClient::updateButtonPixmaps()
void GlowClient::doShape()
{
- QRegion mask(widget()->rect());
+ TQRegion mask(widget()->rect());
// edges
- mask -= QRegion(width()-1,0,1,1);
- mask -= QRegion(0,height()-1,1,1);
- mask -= QRegion(width()-1,height()-1,1,1);
+ mask -= TQRegion(width()-1,0,1,1);
+ mask -= TQRegion(0,height()-1,1,1);
+ mask -= TQRegion(width()-1,height()-1,1,1);
setMask(mask);
}
@@ -855,29 +855,29 @@ void GlowClient::slotMaximize()
maximize(m_maximizeButton->lastButton());
}
-bool GlowClient::eventFilter( QObject* o, QEvent* e )
+bool GlowClient::eventFilter( TQObject* o, TQEvent* e )
{
if( o != widget())
return false;
switch( e->type())
{
- case QEvent::Resize:
- resizeEvent( static_cast< QResizeEvent* >( e ));
+ case TQEvent::Resize:
+ resizeEvent( static_cast< TQResizeEvent* >( e ));
return true;
- case QEvent::Paint:
- paintEvent( static_cast< QPaintEvent* >( e ));
+ case TQEvent::Paint:
+ paintEvent( static_cast< TQPaintEvent* >( e ));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent( static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent( static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::Show:
- showEvent( static_cast< QShowEvent* >( e ));
+ case TQEvent::Show:
+ showEvent( static_cast< TQShowEvent* >( e ));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
break;
diff --git a/kwin-styles/glow/glowclient.h b/kwin-styles/glow/glowclient.h
index 9de73126..faa12e62 100644
--- a/kwin-styles/glow/glowclient.h
+++ b/kwin-styles/glow/glowclient.h
@@ -43,30 +43,30 @@ class GlowButtonFactory;
struct GlowTheme
{
- QSize buttonSize;
+ TQSize buttonSize;
- QString backgroundPixmap;
- QString backgroundAlphaPixmap;
-
- QString stickyOnPixmap;
- QString stickyOffPixmap;
- QString maximizeOnPixmap;
- QString maximizeOffPixmap;
- QString helpPixmap;
- QString closePixmap;
- QString iconifyPixmap;
-
- QString stickyOnGlowPixmap;
- QString stickyOffGlowPixmap;
- QString maximizeOnGlowPixmap;
- QString maximizeOffGlowPixmap;
- QString helpGlowPixmap;
- QString closeGlowPixmap;
- QString iconifyGlowPixmap;
+ TQString backgroundPixmap;
+ TQString backgroundAlphaPixmap;
+
+ TQString stickyOnPixmap;
+ TQString stickyOffPixmap;
+ TQString maximizeOnPixmap;
+ TQString maximizeOffPixmap;
+ TQString helpPixmap;
+ TQString closePixmap;
+ TQString iconifyPixmap;
+
+ TQString stickyOnGlowPixmap;
+ TQString stickyOffGlowPixmap;
+ TQString maximizeOnGlowPixmap;
+ TQString maximizeOffGlowPixmap;
+ TQString helpGlowPixmap;
+ TQString closeGlowPixmap;
+ TQString iconifyGlowPixmap;
};
static GlowTheme default_glow_theme = {
- QSize (17, 17),
+ TQSize (17, 17),
"background.png", "background_alpha.png",
"stickyon.png", "stickyoff.png",
"maximizeon.png", "maximizeoff.png",
@@ -86,14 +86,14 @@ public:
void load (KDecorationFactory *factory);
- QColor stickyButtonGlowColor;
- QColor helpButtonGlowColor;
- QColor iconifyButtonGlowColor;
- QColor maximizeButtonGlowColor;
- QColor closeButtonGlowColor;
+ TQColor stickyButtonGlowColor;
+ TQColor helpButtonGlowColor;
+ TQColor iconifyButtonGlowColor;
+ TQColor maximizeButtonGlowColor;
+ TQColor closeButtonGlowColor;
bool showResizeHandle;
int titlebarGradientType;
- QString themeName;
+ TQString themeName;
};
//-----------------------------------------------------------------------------
@@ -113,9 +113,9 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* b );
virtual bool reset( unsigned long changed );
virtual bool supports( Ability ability );
- QValueList< GlowClientGlobals::BorderSize > borderSizes() const;
+ TQValueList< GlowClientGlobals::BorderSize > borderSizes() const;
- QString getPixmapName(PixmapType type, bool isActive);
+ TQString getPixmapName(PixmapType type, bool isActive);
GlowTheme * theme() const { return _theme; }
GlowClientConfig * config() const { return _config; }
@@ -134,7 +134,7 @@ private:
bool createPixmaps();
void deletePixmaps();
bool createPixmap(PixmapType type,bool isActive);
- const QString getPixmapTypeName(PixmapType type);
+ const TQString getPixmapTypeName(PixmapType type);
};
//-----------------------------------------------------------------------------
@@ -150,23 +150,23 @@ public:
virtual void init();
virtual void borders( int&, int&, int&, int& ) const;
- virtual void resize( const QSize& );
- virtual QSize minimumSize() const;
+ virtual void resize( const TQSize& );
+ virtual TQSize minimumSize() const;
protected:
- virtual void resizeEvent( QResizeEvent * );
- virtual void paintEvent( QPaintEvent * );
- virtual void showEvent( QShowEvent * );
- virtual void mouseDoubleClickEvent( QMouseEvent * );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void showEvent( TQShowEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+ virtual void wheelEvent( TQWheelEvent * );
virtual void maximizeChange();
virtual void activeChange();
virtual void iconChange();
virtual void desktopChange();
virtual void shadeChange();
virtual void captionChange();
- virtual Position mousePosition(const QPoint &) const;
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual Position mousePosition(const TQPoint &) const;
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
std::vector<GlowButton*> m_buttonList;
@@ -177,11 +177,11 @@ private:
GlowButton *m_minimizeButton;
GlowButton *m_maximizeButton;
GlowButton *m_closeButton;
- QBoxLayout *m_leftButtonLayout;
- QBoxLayout *m_rightButtonLayout;
- QSpacerItem * _bottom_spacer;
- QSpacerItem * _title_spacer;
- QVBoxLayout * _main_layout;
+ TQBoxLayout *m_leftButtonLayout;
+ TQBoxLayout *m_rightButtonLayout;
+ TQSpacerItem * _bottom_spacer;
+ TQSpacerItem * _title_spacer;
+ TQVBoxLayout * _main_layout;
void createButtons();
void updateButtonPositions();
diff --git a/kwin-styles/icewm/config/config.cpp b/kwin-styles/icewm/config/config.cpp
index 7cae598e..980e949a 100644
--- a/kwin-styles/icewm/config/config.cpp
+++ b/kwin-styles/icewm/config/config.cpp
@@ -25,10 +25,10 @@
*/
#include "config.h"
-#include <qdir.h>
-#include <qregexp.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -39,7 +39,7 @@
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new IceWMConfig(conf, parent));
}
@@ -51,43 +51,43 @@ extern "C"
// 'conf' is a pointer to the kwindecoration modules open kwin config,
// and is by default set to the "Style" group.
//
-// 'parent' is the parent of the QObject, which is a VBox inside the
+// 'parent' is the parent of the TQObject, which is a VBox inside the
// Configure tab in kwindecoration
// ==========================================================================
-IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+IceWMConfig::IceWMConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
icewmConfig = new KConfig("kwinicewmrc");
KGlobal::locale()->insertCatalogue("kwin_art_clients");
- mainWidget = new QVBox( parent );
+ mainWidget = new TQVBox( parent );
mainWidget->setSpacing( KDialog::spacingHint() );
- themeListBox = new QListBox( mainWidget );
- QWhatsThis::add( themeListBox,
+ themeListBox = new TQListBox( mainWidget );
+ TQWhatsThis::add( themeListBox,
i18n("Make your IceWM selection by clicking on a theme here. ") );
- cbThemeTitleTextColors = new QCheckBox(
+ cbThemeTitleTextColors = new TQCheckBox(
i18n("Use theme &title text colors"), mainWidget );
- QWhatsThis::add( cbThemeTitleTextColors,
+ TQWhatsThis::add( cbThemeTitleTextColors,
i18n("When selected, titlebar colors will follow those set "
"in the IceWM theme. If not selected, the current KDE "
"titlebar colors will be used instead.") );
- cbTitleBarOnTop = new QCheckBox(
+ cbTitleBarOnTop = new TQCheckBox(
i18n("&Show title bar on top of windows"), mainWidget );
- QWhatsThis::add( cbTitleBarOnTop,
+ TQWhatsThis::add( cbTitleBarOnTop,
i18n("When selected, all window titlebars will be shown "
"at the top of each window, otherwise they will be "
"shown at the bottom.") );
- cbShowMenuButtonIcon = new QCheckBox(
+ cbShowMenuButtonIcon = new TQCheckBox(
i18n("&Menu button always shows application mini icon"), mainWidget );
- QWhatsThis::add( cbShowMenuButtonIcon,
+ TQWhatsThis::add( cbShowMenuButtonIcon,
i18n("When selected, all titlebar menu buttons will have "
"the application icon shown. If not selected, the current "
"theme's defaults are used instead.") );
@@ -95,7 +95,7 @@ IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent )
urlLabel = new KURLLabel( mainWidget );
urlLabel->setText( i18n("Open KDE's IceWM theme folder") );
- themeLabel = new QLabel(
+ themeLabel = new TQLabel(
i18n("Clicking on the link above will cause a window to appear "
"showing the KDE IceWM theme folder. You can "
"add or remove native IceWM themes by "
@@ -107,36 +107,36 @@ IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent )
load( conf );
// Ensure we track user changes properly
- connect( themeListBox, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()) );
+ connect( themeListBox, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()) );
- connect( urlLabel, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(callURL(const QString&)));
+ connect( urlLabel, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(callURL(const TQString&)));
- connect( cbThemeTitleTextColors, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
+ connect( cbThemeTitleTextColors, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
- connect( cbTitleBarOnTop, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
+ connect( cbTitleBarOnTop, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
- connect( cbShowMenuButtonIcon, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
+ connect( cbShowMenuButtonIcon, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
// Create the theme directory (if not found) ... and obtain the path as we do so.
localThemeString = KGlobal::dirs()->saveLocation("data", "kwin");
localThemeString += "/icewm-themes";
- if (!QFile::exists(localThemeString))
- QDir().mkdir(localThemeString);
+ if (!TQFile::exists(localThemeString))
+ TQDir().mkdir(localThemeString);
// Watch the icewm theme directory for theme additions/removals
KDirWatch::self()->addDir(localThemeString);
- connect( KDirWatch::self(), SIGNAL(dirty(const QString&)), this, SLOT(findIceWMThemes()) );
- connect( KDirWatch::self(), SIGNAL(created(const QString&)), this, SLOT(findIceWMThemes()) );
- connect( KDirWatch::self(), SIGNAL(deleted(const QString&)), this, SLOT(findIceWMThemes()) );
+ connect( KDirWatch::self(), TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(findIceWMThemes()) );
+ connect( KDirWatch::self(), TQT_SIGNAL(created(const TQString&)), this, TQT_SLOT(findIceWMThemes()) );
+ connect( KDirWatch::self(), TQT_SIGNAL(deleted(const TQString&)), this, TQT_SLOT(findIceWMThemes()) );
// Set the konqui link url
- QString urlThemeString = QString("file://") + localThemeString;
- urlThemeString.replace( QRegExp("~"), "$HOME" );
+ TQString urlThemeString = TQString("file://") + localThemeString;
+ urlThemeString.replace( TQRegExp("~"), "$HOME" );
urlLabel->setURL( urlThemeString );
// Make the widgets visible in kwindecoration
@@ -158,8 +158,8 @@ IceWMConfig::~IceWMConfig()
// Searches for all installed IceWM themes, and adds them to the listBox.
void IceWMConfig::findIceWMThemes()
{
- QStringList dirList = KGlobal::dirs()->findDirs("data", "kwin/icewm-themes");
- QStringList::ConstIterator it;
+ TQStringList dirList = KGlobal::dirs()->findDirs("data", "kwin/icewm-themes");
+ TQStringList::ConstIterator it;
// Remove any old themes in the list (if any)
themeListBox->clear();
@@ -169,11 +169,11 @@ void IceWMConfig::findIceWMThemes()
for( it = dirList.begin(); it != dirList.end(); it++)
{
// List all directory names only...
- QDir d(*it, QString("*"), QDir::Unsorted, QDir::Dirs | QDir::Readable );
+ TQDir d(*it, TQString("*"), TQDir::Unsorted, TQDir::Dirs | TQDir::Readable );
if (d.exists())
{
QFileInfoListIterator it2( *d.entryInfoList() );
- QFileInfo* finfo;
+ TQFileInfo* finfo;
// Step through all directories within the kwin/icewm-themes directory
while( (finfo = it2.current()) )
@@ -197,7 +197,7 @@ void IceWMConfig::findIceWMThemes()
themeListBox->sort();
// Select the currently used IceWM theme
- QString themeName = icewmConfig->readEntry("CurrentTheme");
+ TQString themeName = icewmConfig->readEntry("CurrentTheme");
// Provide a theme alias
if (themeName == "default")
@@ -211,7 +211,7 @@ void IceWMConfig::findIceWMThemes()
}
-void IceWMConfig::callURL( const QString& s )
+void IceWMConfig::callURL( const TQString& s )
{
kapp->invokeBrowser( s );
}
diff --git a/kwin-styles/icewm/config/config.h b/kwin-styles/icewm/config/config.h
index e156137e..09c2fd8c 100644
--- a/kwin-styles/icewm/config/config.h
+++ b/kwin-styles/icewm/config/config.h
@@ -27,11 +27,11 @@
#ifndef _ICEWMCONFIG_H
#define _ICEWMCONFIG_H
-#include <qwidget.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
#include <kurllabel.h>
#include <kconfig.h>
@@ -42,7 +42,7 @@ class IceWMConfig: public QObject
Q_OBJECT
public:
- IceWMConfig( KConfig* conf, QWidget* parent );
+ IceWMConfig( KConfig* conf, TQWidget* parent );
~IceWMConfig();
// These public signals/slots work similar to KCM modules
@@ -56,19 +56,19 @@ class IceWMConfig: public QObject
protected slots:
void slotSelectionChanged(); // Internal use
- void callURL( const QString& s );
+ void callURL( const TQString& s );
void findIceWMThemes();
private:
KConfig* icewmConfig;
- QCheckBox* cbThemeTitleTextColors;
- QCheckBox* cbTitleBarOnTop;
- QCheckBox* cbShowMenuButtonIcon;
- QListBox* themeListBox;
- QLabel* themeLabel;
+ TQCheckBox* cbThemeTitleTextColors;
+ TQCheckBox* cbTitleBarOnTop;
+ TQCheckBox* cbShowMenuButtonIcon;
+ TQListBox* themeListBox;
+ TQLabel* themeLabel;
KURLLabel* urlLabel;
- QString localThemeString;
- QVBox* mainWidget;
+ TQString localThemeString;
+ TQVBox* mainWidget;
};
diff --git a/kwin-styles/icewm/icewm.cpp b/kwin-styles/icewm/icewm.cpp
index e6108748..9b60219d 100644
--- a/kwin-styles/icewm/icewm.cpp
+++ b/kwin-styles/icewm/icewm.cpp
@@ -45,15 +45,15 @@
#include <kglobal.h>
#include <klocale.h>
#include <kdrawutil.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qdatetime.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqdatetime.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
#include "icewm.h"
namespace IceWM {
@@ -63,52 +63,52 @@ namespace IceWM {
////////////////////////////////////////////////////////////////////////////////////////////
// IceWM frame pixmaps
-QPixmap* frameTL[] = {NULL, NULL};
-QPixmap* frameT [] = {NULL, NULL};
-QPixmap* frameTR[] = {NULL, NULL};
-QPixmap* frameL [] = {NULL, NULL};
-QPixmap* frameR [] = {NULL, NULL};
-QPixmap* frameBL[] = {NULL, NULL};
-QPixmap* frameB [] = {NULL, NULL};
-QPixmap* frameBR[] = {NULL, NULL};
+TQPixmap* frameTL[] = {NULL, NULL};
+TQPixmap* frameT [] = {NULL, NULL};
+TQPixmap* frameTR[] = {NULL, NULL};
+TQPixmap* frameL [] = {NULL, NULL};
+TQPixmap* frameR [] = {NULL, NULL};
+TQPixmap* frameBL[] = {NULL, NULL};
+TQPixmap* frameB [] = {NULL, NULL};
+TQPixmap* frameBR[] = {NULL, NULL};
// Button pixmaps
-QPixmap* closePix[] = {NULL, NULL};
-QPixmap* depthPix[] = {NULL, NULL};
-QPixmap* maximizePix[] = {NULL, NULL};
-QPixmap* minimizePix[] = {NULL, NULL};
-QPixmap* restorePix[] = {NULL, NULL};
-QPixmap* hidePix[] = {NULL, NULL};
-QPixmap* rollupPix[] = {NULL, NULL};
-QPixmap* rolldownPix[] = {NULL, NULL};
-QPixmap* menuButtonPix[] = {NULL, NULL};
+TQPixmap* closePix[] = {NULL, NULL};
+TQPixmap* depthPix[] = {NULL, NULL};
+TQPixmap* maximizePix[] = {NULL, NULL};
+TQPixmap* minimizePix[] = {NULL, NULL};
+TQPixmap* restorePix[] = {NULL, NULL};
+TQPixmap* hidePix[] = {NULL, NULL};
+TQPixmap* rollupPix[] = {NULL, NULL};
+TQPixmap* rolldownPix[] = {NULL, NULL};
+TQPixmap* menuButtonPix[] = {NULL, NULL};
// Titlebar pixmaps
-QPixmap* titleJ[] = {NULL, NULL};
-QPixmap* titleL[] = {NULL, NULL};
-QPixmap* titleS[] = {NULL, NULL};
-QPixmap* titleP[] = {NULL, NULL};
-QPixmap* titleT[] = {NULL, NULL};
-QPixmap* titleM[] = {NULL, NULL};
-QPixmap* titleB[] = {NULL, NULL};
-QPixmap* titleR[] = {NULL, NULL};
-QPixmap* titleQ[] = {NULL, NULL};
+TQPixmap* titleJ[] = {NULL, NULL};
+TQPixmap* titleL[] = {NULL, NULL};
+TQPixmap* titleS[] = {NULL, NULL};
+TQPixmap* titleP[] = {NULL, NULL};
+TQPixmap* titleT[] = {NULL, NULL};
+TQPixmap* titleM[] = {NULL, NULL};
+TQPixmap* titleB[] = {NULL, NULL};
+TQPixmap* titleR[] = {NULL, NULL};
+TQPixmap* titleQ[] = {NULL, NULL};
ThemeHandler* clientHandler;
-QString* titleButtonsLeft;
-QString* titleButtonsRight;
+TQString* titleButtonsLeft;
+TQString* titleButtonsRight;
-QColor* colorActiveBorder;
-QColor* colorInActiveBorder;
-QColor* colorActiveButton;
-QColor* colorInActiveButton;
-QColor* colorActiveTitleBarText;
-QColor* colorInActiveTitleBarText;
-QColor* colorActiveTitleBar;
-QColor* colorInActiveTitleBar;
-QColor* colorActiveTitleTextShadow;
-QColor* colorInActiveTitleTextShadow;
+TQColor* colorActiveBorder;
+TQColor* colorInActiveBorder;
+TQColor* colorActiveButton;
+TQColor* colorInActiveButton;
+TQColor* colorActiveTitleBarText;
+TQColor* colorInActiveTitleBarText;
+TQColor* colorActiveTitleBar;
+TQColor* colorInActiveTitleBar;
+TQColor* colorActiveTitleTextShadow;
+TQColor* colorInActiveTitleTextShadow;
int cornerSizeX;
int cornerSizeY;
@@ -136,7 +136,7 @@ enum styles {OTHER, WARP3, WARP4, MOTIF, WIN95, NICE} themeLook;
////////////////////////////////////////////////////////////////////////////////////////////
// Returns true if both active and inactive pixmaps are valid, and not null
-bool validPixmaps( QPixmap* p[] )
+bool validPixmaps( TQPixmap* p[] )
{
return ( p[Active] && ( !p[Active]->isNull() ) &&
p[InActive] && ( !p[InActive]->isNull() ) );
@@ -156,19 +156,19 @@ ThemeHandler::ThemeHandler()
initialized = false;
// Prevent having globals objects (use pointers to objects)
- titleButtonsLeft = new QString();
- titleButtonsRight = new QString();
-
- colorActiveBorder = new QColor();
- colorInActiveBorder = new QColor();
- colorActiveButton = new QColor();
- colorInActiveButton = new QColor();
- colorActiveTitleBarText = new QColor();
- colorInActiveTitleBarText = new QColor();
- colorActiveTitleBar = new QColor();
- colorInActiveTitleBar = new QColor();
- colorActiveTitleTextShadow = new QColor();
- colorInActiveTitleTextShadow = new QColor();
+ titleButtonsLeft = new TQString();
+ titleButtonsRight = new TQString();
+
+ colorActiveBorder = new TQColor();
+ colorInActiveBorder = new TQColor();
+ colorActiveButton = new TQColor();
+ colorInActiveButton = new TQColor();
+ colorActiveTitleBarText = new TQColor();
+ colorInActiveTitleBarText = new TQColor();
+ colorActiveTitleBar = new TQColor();
+ colorInActiveTitleBar = new TQColor();
+ colorActiveTitleTextShadow = new TQColor();
+ colorInActiveTitleTextShadow = new TQColor();
// Initialize
readConfig();
@@ -206,25 +206,25 @@ KDecoration* ThemeHandler::createDecoration( KDecorationBridge* bridge )
// Converts KDE style button strings to icewm style button strings
-void ThemeHandler::convertButtons( QString& s )
+void ThemeHandler::convertButtons( TQString& s )
{
- s.replace( QRegExp("_"), ""); // Spacer (ignored)
- s.replace( QRegExp("H"), ""); // Help (ignored)
- s.replace( QRegExp("M"), "s"); // Sysmenu
- s.replace( QRegExp("S"), "d"); // Sticky/OnAllDesktops
- s.replace( QRegExp("I"), "i"); // Minimize
- s.replace( QRegExp("A"), "m"); // Maximize
- s.replace( QRegExp("X"), "x"); // Close
+ s.replace( TQRegExp("_"), ""); // Spacer (ignored)
+ s.replace( TQRegExp("H"), ""); // Help (ignored)
+ s.replace( TQRegExp("M"), "s"); // Sysmenu
+ s.replace( TQRegExp("S"), "d"); // Sticky/OnAllDesktops
+ s.replace( TQRegExp("I"), "i"); // Minimize
+ s.replace( TQRegExp("A"), "m"); // Maximize
+ s.replace( TQRegExp("X"), "x"); // Close
}
// Reverses all characters in a QString
-QString ThemeHandler::reverseString( QString s )
+TQString ThemeHandler::reverseString( TQString s )
{
if (s.length() <= 1)
return s;
- QString tmpStr;
+ TQString tmpStr;
for(int i = s.length()-1; i >= 0; i--)
{
tmpStr += s[(unsigned int)i];
@@ -271,8 +271,8 @@ void ThemeHandler::initTheme()
// We use kconfig to read icewm config files...
// this is easy since icewm uses key=value pairs!
- KConfig config( locate("data", QString("kwin/icewm-themes/") +
- themeName + QString("default.theme")) );
+ KConfig config( locate("data", TQString("kwin/icewm-themes/") +
+ themeName + TQString("default.theme")) );
// Load specifics, or use IceWM defaults instead.
borderSizeX = config.readNumEntry("BorderSizeX", 6);
@@ -292,9 +292,9 @@ void ThemeHandler::initTheme()
// Ignore on all desktops 'd' on the left buttons
// (some themes look bad with it on by default)
*titleButtonsLeft = config.readEntry("TitleButtonsLeft", "s");
- *titleButtonsLeft = titleButtonsLeft->replace( QRegExp(QString("\"")), "");
+ *titleButtonsLeft = titleButtonsLeft->replace( TQRegExp(TQString("\"")), "");
*titleButtonsRight = config.readEntry("TitleButtonsRight", "xmir");
- *titleButtonsRight = titleButtonsRight->replace( QRegExp(QString("\"")), "");
+ *titleButtonsRight = titleButtonsRight->replace( TQRegExp(TQString("\"")), "");
// I have no idea why the right side buttons in icewm are reversed
*titleButtonsRight = reverseString( *titleButtonsRight );
@@ -302,7 +302,7 @@ void ThemeHandler::initTheme()
// Read the default border and text colours from the config file
// And use IceWM defaults if not found
- QString s;
+ TQString s;
s = config.readEntry("Look", "other");
if (s=="motif") themeLook = MOTIF;
@@ -433,16 +433,16 @@ void ThemeHandler::initTheme()
}
-QPixmap* ThemeHandler::duplicateValidPixmap( bool act, int size )
+TQPixmap* ThemeHandler::duplicateValidPixmap( bool act, int size )
{
- QPixmap* p1 = NULL;
+ TQPixmap* p1 = NULL;
// Use the stretch or title pixmaps instead
if ( titleS[act] )
- p1 = new QPixmap( *titleS[act] );
+ p1 = new TQPixmap( *titleS[act] );
else if ( titleB[act] )
- p1 = new QPixmap( *titleB[act] );
+ p1 = new TQPixmap( *titleB[act] );
else if ( titleT[act] )
- p1 = new QPixmap( *titleT[act] );
+ p1 = new TQPixmap( *titleT[act] );
// Stretch if required
if ( (size != -1) && p1 && (!p1->isNull()) )
@@ -487,7 +487,7 @@ void ThemeHandler::freePixmaps()
// Frees a dynamic pixmap group from the heap.
-void ThemeHandler::freePixmapGroup( QPixmap* p[] )
+void ThemeHandler::freePixmapGroup( TQPixmap* p[] )
{
if (p)
{
@@ -496,35 +496,35 @@ void ThemeHandler::freePixmapGroup( QPixmap* p[] )
p[Active] = NULL;
p[InActive] = NULL;
} else
- qWarning("kwin-icewm: freePixmapGroup - invalid QPixmap** 'p'\n");
+ qWarning("kwin-icewm: freePixmapGroup - invalid TQPixmap** 'p'\n");
}
// Converts icewm colors #C0C0C0 or rgb:C0/C0/C0 to QColors
-QColor ThemeHandler::decodeColor( QString& s )
+TQColor ThemeHandler::decodeColor( TQString& s )
{
// Make rgb:C0/C0/C0, or #C0/C0/C0 -> C0C0C0
- s.replace( QRegExp("r"), "");
- s.replace( QRegExp("g"), "");
- s.replace( QRegExp("b"), "");
- s.replace( QRegExp("#"), "");
- s.replace( QRegExp("/"), "");
- s.replace( QRegExp(":"), "");
- s.replace( QRegExp("\\"), "");
- s.replace( QRegExp("\""), "");
+ s.replace( TQRegExp("r"), "");
+ s.replace( TQRegExp("g"), "");
+ s.replace( TQRegExp("b"), "");
+ s.replace( TQRegExp("#"), "");
+ s.replace( TQRegExp("/"), "");
+ s.replace( TQRegExp(":"), "");
+ s.replace( TQRegExp("\\"), "");
+ s.replace( TQRegExp("\""), "");
// Wierd error - return grey
if (s.length() != 6)
- return QColor( 0xC0, 0xC0, 0xC0 );
+ return TQColor( 0xC0, 0xC0, 0xC0 );
// Qt makes this conversion very easy
- return QColor( QString("#") + s );
+ return TQColor( TQString("#") + s );
}
// Stretches tiny pixmaps vertically or horizontally, taking into account
// repetition in patterns, so as not to make them mismatched
-QPixmap* ThemeHandler::stretchPixmap( QPixmap* src, bool stretchHoriz, int stretchSize )
+TQPixmap* ThemeHandler::stretchPixmap( TQPixmap* src, bool stretchHoriz, int stretchSize )
{
if (!src) return NULL;
if (src->isNull()) return NULL;
@@ -549,13 +549,13 @@ QPixmap* ThemeHandler::stretchPixmap( QPixmap* src, bool stretchHoriz, int stret
} else
size = stretchSize;
- QPixmap* p = new QPixmap();
+ TQPixmap* p = new TQPixmap();
if ( stretchHoriz )
p->resize( size, src->height() );
else
p->resize( src->width(), size );
- QPainter pnt( p );
+ TQPainter pnt( p );
if ( stretchHoriz )
pnt.drawTiledPixmap( 0, 0, size, src->height(), *src);
else
@@ -566,9 +566,9 @@ QPixmap* ThemeHandler::stretchPixmap( QPixmap* src, bool stretchHoriz, int stret
return p;
}
-static void draw3DRect(QPainter &pnt, QColor &col, int x, int y, int w, int h, bool up) {
- QColor light = col.light(135);
- QColor dark = col.dark(140);
+static void draw3DRect(TQPainter &pnt, TQColor &col, int x, int y, int w, int h, bool up) {
+ TQColor light = col.light(135);
+ TQColor dark = col.dark(140);
pnt.setPen(up ? light : dark);
pnt.drawLine(x, y, x+w, y);
pnt.drawLine(x, y, x, y+h);
@@ -580,30 +580,30 @@ static void draw3DRect(QPainter &pnt, QColor &col, int x, int y, int w, int h, b
pnt.drawPoint(x, y+h);
}
-void ThemeHandler::setPixmapButton( QPixmap* p[], QString s1, QString s2)
+void ThemeHandler::setPixmapButton( TQPixmap* p[], TQString s1, TQString s2)
{
if ( p[Active] )
qWarning("kwin-icewm: setPixmap - should be null (1)\n");
if ( p[InActive] )
qWarning("kwin-icewm: setPixmap - should be null (2)\n");
- QString str = locate("appdata", QString("icewm-themes/")
+ TQString str = locate("appdata", TQString("icewm-themes/")
+ themeName + s1 + "A" + s2);
if (str.isEmpty())
- str = locate("appdata", QString("icewm-themes/")
+ str = locate("appdata", TQString("icewm-themes/")
+ themeName + s1 + s2);
- QPixmap *qp = new QPixmap(str);
- QColor cActive = themeLook == WIN95 ? *colorActiveTitleBar : *colorActiveButton;
- QColor cInActive = themeLook == WIN95 ? *colorInActiveTitleBar : *colorInActiveButton;
+ TQPixmap *qp = new TQPixmap(str);
+ TQColor cActive = themeLook == WIN95 ? *colorActiveTitleBar : *colorActiveButton;
+ TQColor cInActive = themeLook == WIN95 ? *colorInActiveTitleBar : *colorInActiveButton;
if (!qp->isNull() && themeLook > 0) {
int w = qp->width();
if (themeLook > 0 && titleBarHeight > w) w = titleBarHeight;
- p[Active] = new QPixmap(w, 2*titleBarHeight );
+ p[Active] = new TQPixmap(w, 2*titleBarHeight );
p[Active] -> fill(cActive);
- QPainter pnt( p[Active] );
+ TQPainter pnt( p[Active] );
int offX = (w - qp->width())/2;
int offY = (titleBarHeight - qp->height())/2;
@@ -631,20 +631,20 @@ void ThemeHandler::setPixmapButton( QPixmap* p[], QString s1, QString s2)
p[Active] = qp;
}
- str = locate("appdata", QString("icewm-themes/")
+ str = locate("appdata", TQString("icewm-themes/")
+ themeName + s1 + "I" + s2);
if (str.isEmpty())
- str = locate("appdata", QString("icewm-themes/")
+ str = locate("appdata", TQString("icewm-themes/")
+ themeName + s1 + s2);
- qp = new QPixmap(str);
+ qp = new TQPixmap(str);
if (!qp->isNull() && themeLook > 0) {
int w = qp->width();
if (titleBarHeight > w) w = titleBarHeight;
- p[InActive] = new QPixmap(w, 2*titleBarHeight );
+ p[InActive] = new TQPixmap(w, 2*titleBarHeight );
p[InActive] -> fill(cInActive);
- QPainter pnt( p[InActive] );
+ TQPainter pnt( p[InActive] );
int offX = (w - qp->width())/2;
int offY = (titleBarHeight - qp->height())/2;
@@ -678,7 +678,7 @@ void ThemeHandler::setPixmapButton( QPixmap* p[], QString s1, QString s2)
// Loads the specified Active/InActive files into the specific pixmaps, and
// can perform horizontal / vertical stretching if required for speed.
// Tries to implement some icewm specific pixmap handling for some dodgy themes
-void ThemeHandler::setPixmap( QPixmap* p[], QString s1, QString s2,
+void ThemeHandler::setPixmap( TQPixmap* p[], TQString s1, TQString s2,
bool stretch, bool stretchHoriz )
{
if ( p[Active] )
@@ -686,9 +686,9 @@ void ThemeHandler::setPixmap( QPixmap* p[], QString s1, QString s2,
if ( p[InActive] )
qWarning("kwin-icewm: setPixmap - should be null (2)\n");
- p[Active] = new QPixmap( locate("data", QString("kwin/icewm-themes/")
+ p[Active] = new TQPixmap( locate("data", TQString("kwin/icewm-themes/")
+ themeName + s1 + "A" + s2) );
- p[InActive] = new QPixmap( locate("data", QString("kwin/icewm-themes/")
+ p[InActive] = new TQPixmap( locate("data", TQString("kwin/icewm-themes/")
+ themeName + s1 + "I" + s2) );
// Stretch the pixmap if requested.
@@ -761,15 +761,15 @@ bool ThemeHandler::supports( Ability ability )
// IceWM button class
////////////////////////////////////////////////////////////////////////////////////////////
-IceWMButton::IceWMButton(IceWMClient *parent, const char *name, QPixmap* (*p)[2],
- bool isToggle, const QString& tip, const int realizeBtns )
- : QButton(parent->widget(), name)
+IceWMButton::IceWMButton(IceWMClient *parent, const char *name, TQPixmap* (*p)[2],
+ bool isToggle, const TQString& tip, const int realizeBtns )
+ : TQButton(parent->widget(), name)
{
m_realizeButtons = realizeBtns;
setTipText(tip);
setCursor(ArrowCursor);
// Eliminate any possible background flicker
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
client = parent;
usePixmap( p );
setFixedSize( sizeHint() );
@@ -777,27 +777,27 @@ IceWMButton::IceWMButton(IceWMClient *parent, const char *name, QPixmap* (*p)[2]
}
-void IceWMButton::setTipText(const QString &tip) {
+void IceWMButton::setTipText(const TQString &tip) {
if(KDecoration::options()->showTooltips()) {
- QToolTip::remove(this );
- QToolTip::add(this, tip );
+ TQToolTip::remove(this );
+ TQToolTip::add(this, tip );
}
}
-QSize IceWMButton::sizeHint() const
+TQSize IceWMButton::sizeHint() const
{
// Check for invalid data
- if ( validPixmaps( (QPixmap**) (*pix) ) ) // Cast to avoid dumb warning
+ if ( validPixmaps( (TQPixmap**) (*pix) ) ) // Cast to avoid dumb warning
{
- QPixmap* p = (*pix)[ client->isActive() ? Active : InActive ];
- return( QSize(p->width(), titleBarHeight) );
+ TQPixmap* p = (*pix)[ client->isActive() ? Active : InActive ];
+ return( TQSize(p->width(), titleBarHeight) );
} else
- return( QSize(0, 0) );
+ return( TQSize(0, 0) );
}
-void IceWMButton::usePixmap( QPixmap* (*p)[2] )
+void IceWMButton::usePixmap( TQPixmap* (*p)[2] )
{
if (validPixmaps( *p )) {
pix = p;
@@ -808,11 +808,11 @@ void IceWMButton::usePixmap( QPixmap* (*p)[2] )
}
-void IceWMButton::drawButton(QPainter *pnt)
+void IceWMButton::drawButton(TQPainter *pnt)
{
if ( pix && validPixmaps(*pix) )
{
- QPixmap* p = (*pix)[ client->isActive() ? Active : InActive ];
+ TQPixmap* p = (*pix)[ client->isActive() ? Active : InActive ];
if( p && (!p->isNull()) )
{
@@ -836,21 +836,21 @@ void IceWMButton::turnOn( bool isOn )
}
-void IceWMButton::mousePressEvent( QMouseEvent* e )
+void IceWMButton::mousePressEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mousePressEvent( &me );
+ TQButton::mousePressEvent( &me );
}
-void IceWMButton::mouseReleaseEvent( QMouseEvent* e )
+void IceWMButton::mouseReleaseEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mouseReleaseEvent( &me );
+ TQButton::mouseReleaseEvent( &me );
}
@@ -893,26 +893,26 @@ void IceWMClient::init()
widget()->setBackgroundMode( NoBackground );
// Pack the windowWrapper() window within a grid layout
- grid = new QGridLayout(widget(), 0, 0, 0);
- grid->setResizeMode(QLayout::FreeResize);
+ grid = new TQGridLayout(widget(), 0, 0, 0);
+ grid->setResizeMode(TQLayout::FreeResize);
grid->addRowSpacing(0, borderSizeY); // Top grab bar
// Do something IceWM can't do :)
if (titleBarOnTop) {
if( isPreview())
- grid->addWidget( new QLabel( i18n( "<center><b>IceWM preview</b></center>" ), widget() ), 2, 1);
+ grid->addWidget( new TQLabel( i18n( "<center><b>IceWM preview</b></center>" ), widget() ), 2, 1);
else
- grid->addItem( new QSpacerItem( 0, 0 ), 2, 1);
+ grid->addItem( new TQSpacerItem( 0, 0 ), 2, 1);
// no shade flicker
- grid->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+ grid->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
}
else {
// no shade flicker
- grid->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+ grid->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
if( isPreview())
- grid->addWidget( new QLabel( i18n( "<center><b>IceWM preview</b></center>" ), widget() ), 1, 1);
+ grid->addWidget( new TQLabel( i18n( "<center><b>IceWM preview</b></center>" ), widget() ), 1, 1);
else
- grid->addItem( new QSpacerItem( 0, 0 ), 1, 1);
+ grid->addItem( new TQSpacerItem( 0, 0 ), 1, 1);
}
grid->setRowStretch(1, 10);
@@ -923,8 +923,8 @@ void IceWMClient::init()
grid->addColSpacing(2, borderSizeX);
// Pack the titlebar with spacers and buttons
- hb = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
- hb->setResizeMode( QLayout::FreeResize );
+ hb = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ hb->setResizeMode( TQLayout::FreeResize );
titleSpacerJ = addPixmapSpacer( titleJ );
@@ -932,17 +932,17 @@ void IceWMClient::init()
titleSpacerL = addPixmapSpacer( titleL );
// Centre titlebar if required.
- QSizePolicy::SizeType spTitleBar;
- spTitleBar = titleBarCentered ? QSizePolicy::Expanding : QSizePolicy::Maximum;
+ TQSizePolicy::SizeType spTitleBar;
+ spTitleBar = titleBarCentered ? TQSizePolicy::Expanding : TQSizePolicy::Maximum;
titleSpacerS = addPixmapSpacer( titleS, spTitleBar, 1 );
titleSpacerP = addPixmapSpacer( titleP );
- titlebar = new QSpacerItem( titleTextWidth(caption()), titleBarHeight,
- QSizePolicy::Preferred, QSizePolicy::Fixed );
+ titlebar = new TQSpacerItem( titleTextWidth(caption()), titleBarHeight,
+ TQSizePolicy::Preferred, TQSizePolicy::Fixed );
hb->addItem(titlebar);
titleSpacerM = addPixmapSpacer( titleM );
- titleSpacerB = addPixmapSpacer( titleB, QSizePolicy::Expanding, 1 );
+ titleSpacerB = addPixmapSpacer( titleB, TQSizePolicy::Expanding, 1 );
titleSpacerR = addPixmapSpacer( titleR );
addClientButtons( *titleButtonsRight );
@@ -958,7 +958,7 @@ void IceWMClient::init()
// Adds the buttons to the hbox layout as per the buttons specified
// in the button string 's'
-void IceWMClient::addClientButtons( const QString& s )
+void IceWMClient::addClientButtons( const TQString& s )
{
if (!s.isEmpty())
for(unsigned int i = 0; i < s.length(); i++)
@@ -979,10 +979,10 @@ void IceWMClient::addClientButtons( const QString& s )
button[BtnSysMenu] = new IceWMButton(this, "menu",
&menuButtonPix, false, i18n("Menu"));
- connect( button[BtnSysMenu], SIGNAL(pressed()),
- this, SLOT(menuButtonPressed()));
- connect( button[BtnSysMenu], SIGNAL(released()),
- this, SLOT(menuButtonReleased()));
+ connect( button[BtnSysMenu], TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(menuButtonPressed()));
+ connect( button[BtnSysMenu], TQT_SIGNAL(released()),
+ this, TQT_SLOT(menuButtonReleased()));
hb->addWidget( button[BtnSysMenu] );
}
break;
@@ -993,8 +993,8 @@ void IceWMClient::addClientButtons( const QString& s )
button[BtnClose] = new IceWMButton(this, "close",
&closePix, false, i18n("Close"));
hb->addWidget( button[BtnClose] );
- connect( button[BtnClose], SIGNAL(clicked()),
- this, SLOT(closeWindow()));
+ connect( button[BtnClose], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(closeWindow()));
}
break;
@@ -1004,8 +1004,8 @@ void IceWMClient::addClientButtons( const QString& s )
button[BtnMaximize] = new IceWMButton(this, "maximize",
&maximizePix, false, i18n("Maximize"), LeftButton|MidButton|RightButton);
hb->addWidget( button[BtnMaximize] );
- connect( button[BtnMaximize], SIGNAL(clicked()),
- this, SLOT(slotMaximize()));
+ connect( button[BtnMaximize], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMaximize()));
}
break;
@@ -1016,8 +1016,8 @@ void IceWMClient::addClientButtons( const QString& s )
button[BtnMinimize] = new IceWMButton(this, "minimize",
&minimizePix, false, i18n("Minimize"));
hb->addWidget( button[BtnMinimize] );
- connect( button[BtnMinimize], SIGNAL(clicked()),
- this, SLOT(minimize()));
+ connect( button[BtnMinimize], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(minimize()));
}
break;
@@ -1035,8 +1035,8 @@ void IceWMClient::addClientButtons( const QString& s )
isSetShade() ? &rolldownPix : &rollupPix,
false, i18n("Rollup"));
hb->addWidget( button[BtnRollup] );
- connect( button[BtnRollup], SIGNAL(clicked()),
- this, SLOT(toggleShade()));
+ connect( button[BtnRollup], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(toggleShade()));
}
break;
@@ -1048,8 +1048,8 @@ void IceWMClient::addClientButtons( const QString& s )
&depthPix, true, isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops"));
button[BtnDepth]->turnOn( isOnAllDesktops() );
hb->addWidget( button[BtnDepth] );
- connect( button[BtnDepth], SIGNAL(clicked()),
- this, SLOT(toggleOnAllDesktops()));
+ connect( button[BtnDepth], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(toggleOnAllDesktops()));
}
break;
}
@@ -1058,18 +1058,18 @@ void IceWMClient::addClientButtons( const QString& s )
// Adds a pixmap to the titlebar layout via the use of a nice QSpacerItem
-QSpacerItem* IceWMClient::addPixmapSpacer( QPixmap* p[], QSizePolicy::SizeType s, int hsize )
+TQSpacerItem* IceWMClient::addPixmapSpacer( TQPixmap* p[], TQSizePolicy::SizeType s, int hsize )
{
- QSpacerItem* sp;
+ TQSpacerItem* sp;
// Add a null spacer for zero image
if ( p && p[Active] )
{
int w = (hsize == -1) ? p[Active]->width(): hsize;
- sp = new QSpacerItem( w, titleBarHeight, s, QSizePolicy::Fixed );
+ sp = new TQSpacerItem( w, titleBarHeight, s, TQSizePolicy::Fixed );
}
else
- sp = new QSpacerItem(0, 0, QSizePolicy::Maximum, QSizePolicy::Fixed );
+ sp = new TQSpacerItem(0, 0, TQSizePolicy::Maximum, TQSizePolicy::Fixed );
hb->addItem( sp );
return sp;
@@ -1078,7 +1078,7 @@ QSpacerItem* IceWMClient::addPixmapSpacer( QPixmap* p[], QSizePolicy::SizeType s
void IceWMClient::renderMenuIcons()
{
- QPixmap miniIcon( icon().pixmap( QIconSet::Small, QIconSet::Normal) );
+ TQPixmap miniIcon( icon().pixmap( TQIconSet::Small, TQIconSet::Normal) );
if (!miniIcon.isNull())
for(int i = 0; i < 2; i++) {
@@ -1090,12 +1090,12 @@ void IceWMClient::renderMenuIcons()
int w = titleBarHeight;
if (validPixmaps(menuButtonPix) && menuButtonPix[i]->width() > w)
w = menuButtonPix[i]->width();
- menuButtonWithIconPix[i] = new QPixmap(w, 2*titleBarHeight );
+ menuButtonWithIconPix[i] = new TQPixmap(w, 2*titleBarHeight );
if (themeLook != WIN95)
menuButtonWithIconPix[i] -> fill((i==0) ? *colorInActiveButton : *colorActiveButton);
else
menuButtonWithIconPix[i] -> fill((i==0) ? *colorInActiveTitleBar : *colorActiveTitleBar);
- QPainter pnt( menuButtonWithIconPix[i] );
+ TQPainter pnt( menuButtonWithIconPix[i] );
if (themeLook > 0 && themeLook != WIN95 && themeLook != WARP4) {
draw3DRect(pnt, *colorActiveButton, 0, 0,
@@ -1127,11 +1127,11 @@ void IceWMClient::toggleShade()
setShade(!isSetShade());
}
-int IceWMClient::titleTextWidth( const QString& s )
+int IceWMClient::titleTextWidth( const TQString& s )
{
// Obtains the actual width of the text, using the titlebar font
- QSize size;
- QFontMetrics fm( options()->font(true) );
+ TQSize size;
+ TQFontMetrics fm( options()->font(true) );
size = fm.size( 0, s );
return size.width();
}
@@ -1151,20 +1151,20 @@ void IceWMClient::borders(int& left, int& right, int& top, int& bottom) const
}
-void IceWMClient::resize( const QSize& s )
+void IceWMClient::resize( const TQSize& s )
{
widget()->resize( s );
}
-QSize IceWMClient::minimumSize() const
+TQSize IceWMClient::minimumSize() const
{
return widget()->minimumSize();
}
// Repaint nicely upon resize to minimise flicker.
-void IceWMClient::resizeEvent( QResizeEvent* e )
+void IceWMClient::resizeEvent( TQResizeEvent* e )
{
calcHiddenButtons();
@@ -1186,8 +1186,8 @@ void IceWMClient::resizeEvent( QResizeEvent* e )
if ( dx )
{
widget()->update( width() - dx + 1, 0, dx, height() );
- widget()->update( QRect( QPoint(4,4), titlebar->geometry().bottomLeft() - QPoint(1,0) ) );
- widget()->update( QRect( titlebar->geometry().topRight(), QPoint( width() - 4, titlebar->geometry().bottom() ) ) );
+ widget()->update( TQRect( TQPoint(4,4), titlebar->geometry().bottomLeft() - TQPoint(1,0) ) );
+ widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4, titlebar->geometry().bottom() ) ) );
widget()->repaint(titlebar->geometry(), false);
}
}
@@ -1195,14 +1195,14 @@ void IceWMClient::resizeEvent( QResizeEvent* e )
// IceWM Paint magic goes here.
-void IceWMClient::paintEvent( QPaintEvent* )
+void IceWMClient::paintEvent( TQPaintEvent* )
{
- QColor colorTitleShadow;
- QColor colorTitle;
- QColor c1;
+ TQColor colorTitleShadow;
+ TQColor colorTitle;
+ TQColor c1;
int rx, rw;
- QPainter p( widget() );
+ TQPainter p( widget() );
int act = isActive() ? Active: InActive;
// Determine titlebar shadow colors
@@ -1216,7 +1216,7 @@ void IceWMClient::paintEvent( QPaintEvent* )
colorTitle = options()->color(ColorFont, isActive());
// Obtain widget bounds.
- QRect r;
+ TQRect r;
r = widget()->rect();
int fillWidth = r.width() - 2*borderSizeX;
int y = r.y();
@@ -1373,8 +1373,8 @@ void IceWMClient::paintEvent( QPaintEvent* )
// Draw the title elements, if we need to draw a titlebar.
if (titleBarHeight > 0)
{
- QPixmap* titleBuffer = new QPixmap( width()-(2*borderSizeX), titleBarHeight );
- QPainter p2( titleBuffer, this );
+ TQPixmap* titleBuffer = new TQPixmap( width()-(2*borderSizeX), titleBarHeight );
+ TQPainter p2( titleBuffer, this );
titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
r = titleSpacerJ->geometry();
@@ -1439,24 +1439,24 @@ void IceWMClient::paintEvent( QPaintEvent* )
}
-void IceWMClient::showEvent(QShowEvent *ev)
+void IceWMClient::showEvent(TQShowEvent *ev)
{
calcHiddenButtons();
titlebar->changeSize( titleTextWidth(caption()), titleBarHeight,
- QSizePolicy::Preferred, QSizePolicy::Fixed );
+ TQSizePolicy::Preferred, TQSizePolicy::Fixed );
grid->activate();
widget()->show();
IceWMClient::showEvent(ev);
}
-void IceWMClient::mouseDoubleClickEvent( QMouseEvent * e )
+void IceWMClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if( e->button() != LeftButton )
return;
- QRect r;
+ TQRect r;
if (titleBarOnTop)
r.setRect( borderSizeX, borderSizeY, width()-(2*borderSizeX), titleBarHeight);
else
@@ -1469,9 +1469,9 @@ void IceWMClient::mouseDoubleClickEvent( QMouseEvent * e )
}
-void IceWMClient::wheelEvent(QWheelEvent *e)
+void IceWMClient::wheelEvent(TQWheelEvent *e)
{
- if (isSetShade() || QRect( 0, 0, width(), titleBarHeight ).contains( e->pos() ) )
+ if (isSetShade() || TQRect( 0, 0, width(), titleBarHeight ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
@@ -1506,10 +1506,10 @@ void IceWMClient::desktopChange()
// Please don't modify the following unless you want layout problems
void IceWMClient::captionChange()
{
- QRect r( 0, borderSizeY, geometry().width(), titleBarHeight);
+ TQRect r( 0, borderSizeY, geometry().width(), titleBarHeight);
titlebar->changeSize( titleTextWidth( caption() ), titleBarHeight,
- QSizePolicy::Preferred, QSizePolicy::Fixed );
+ TQSizePolicy::Preferred, TQSizePolicy::Fixed );
titlebar->invalidate();
grid->activate();
widget()->repaint( r, false );
@@ -1592,7 +1592,7 @@ void IceWMClient::calcHiddenButtons()
// Mouse position code modified from that in workspace.cpp
-IceWMClient::Position IceWMClient::mousePosition( const QPoint& p ) const
+IceWMClient::Position IceWMClient::mousePosition( const TQPoint& p ) const
{
int rangeX = cornerSizeX;
int rangeY = cornerSizeY;
@@ -1629,9 +1629,9 @@ IceWMClient::Position IceWMClient::mousePosition( const QPoint& p ) const
void IceWMClient::menuButtonPressed()
{
- static QTime t;
+ static TQTime t;
static IceWMClient* lastClient = NULL;
- bool dbl = ( lastClient == this && t.elapsed() <= QApplication::doubleClickInterval());
+ bool dbl = ( lastClient == this && t.elapsed() <= TQApplication::doubleClickInterval());
lastClient = this;
t.start();
@@ -1641,7 +1641,7 @@ void IceWMClient::menuButtonPressed()
return;
}
- QPoint menuPoint ( button[BtnSysMenu]->rect().bottomLeft() );
+ TQPoint menuPoint ( button[BtnSysMenu]->rect().bottomLeft() );
// Move to right if menu on rhs, otherwise on left
// and make this depend on windowWrapper(), not button.
@@ -1659,26 +1659,26 @@ void IceWMClient::menuButtonReleased()
closeWindow();
}
-bool IceWMClient::eventFilter( QObject* o, QEvent* e )
+bool IceWMClient::eventFilter( TQObject* o, TQEvent* e )
{
if( o != widget())
return false;
switch( e->type())
{
- case QEvent::Resize:
- resizeEvent(static_cast< QResizeEvent* >( e ) );
+ case TQEvent::Resize:
+ resizeEvent(static_cast< TQResizeEvent* >( e ) );
return true;
- case QEvent::Paint:
- paintEvent(static_cast< QPaintEvent* >( e ) );
+ case TQEvent::Paint:
+ paintEvent(static_cast< TQPaintEvent* >( e ) );
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent(static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent(static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
break;
diff --git a/kwin-styles/icewm/icewm.h b/kwin-styles/icewm/icewm.h
index 656f3426..8bfef4f6 100644
--- a/kwin-styles/icewm/icewm.h
+++ b/kwin-styles/icewm/icewm.h
@@ -42,12 +42,12 @@
#ifndef __KDEGALLIUM_ICEWM_H
#define __KDEGALLIUM_ICEWM_H
-#include <qbutton.h>
-#include <qlayout.h>
+#include <tqbutton.h>
+#include <tqlayout.h>
#include <kpixmap.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
-#include <qbutton.h>
+#include <tqbutton.h>
class QLabel;
class QSpacerItem;
class QBoxLayout;
@@ -77,22 +77,22 @@ class ThemeHandler: public KDecorationFactory
private:
bool initialized;
- QString themeName;
+ TQString themeName;
void readConfig();
- QColor decodeColor( QString& s );
+ TQColor decodeColor( TQString& s );
bool isFrameValid();
void initTheme();
void freePixmaps();
- void freePixmapGroup( QPixmap* p[] );
- void setPixmap( QPixmap* p[], QString s1, QString s2, bool
+ void freePixmapGroup( TQPixmap* p[] );
+ void setPixmap( TQPixmap* p[], TQString s1, TQString s2, bool
stretch=false, bool stretchHoriz=true );
- void setPixmapButton( QPixmap* p[], QString s1, QString s2);
- QPixmap* stretchPixmap( QPixmap* src, bool stretchHoriz=true,
+ void setPixmapButton( TQPixmap* p[], TQString s1, TQString s2);
+ TQPixmap* stretchPixmap( TQPixmap* src, bool stretchHoriz=true,
int stretchSize=-1);
- QPixmap* duplicateValidPixmap( bool act, int size = -1 );
- void convertButtons( QString& s );
- QString reverseString( QString s );
+ TQPixmap* duplicateValidPixmap( bool act, int size = -1 );
+ void convertButtons( TQString& s );
+ TQString reverseString( TQString s );
};
@@ -100,25 +100,25 @@ class IceWMButton : public QButton
{
public:
IceWMButton( IceWMClient *parent=0, const char *name=0,
- QPixmap* (*p)[2]=0L, bool isToggle=false,
- const QString& tip=NULL, const int realizeBtns = LeftButton );
- void setTipText(const QString &tip);
- void usePixmap( QPixmap* (*p)[2] );
- QSize sizeHint() const;
+ TQPixmap* (*p)[2]=0L, bool isToggle=false,
+ const TQString& tip=NULL, const int realizeBtns = LeftButton );
+ void setTipText(const TQString &tip);
+ void usePixmap( TQPixmap* (*p)[2] );
+ TQSize sizeHint() const;
void turnOn( bool isOn );
ButtonState last_button;
protected:
- void mousePressEvent( QMouseEvent* e );
- void mouseReleaseEvent( QMouseEvent* e );
+ void mousePressEvent( TQMouseEvent* e );
+ void mouseReleaseEvent( TQMouseEvent* e );
- void drawButton( QPainter *p );
- void drawButtonLabel( QPainter * ) {;}
+ void drawButton( TQPainter *p );
+ void drawButtonLabel( TQPainter * ) {;}
private:
int m_realizeButtons;
IceWMClient* client;
- QPixmap* (*pix)[2]; // Points to active/inactive pixmap array
+ TQPixmap* (*pix)[2]; // Points to active/inactive pixmap array
};
@@ -130,26 +130,26 @@ class IceWMClient : public KDecoration
~IceWMClient();
virtual void init();
- virtual void resize(const QSize&);
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual void resize(const TQSize&);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
protected:
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
- void showEvent( QShowEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent( QWheelEvent * );
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent( TQWheelEvent * );
virtual void captionChange();
virtual void maximizeChange();
virtual void shadeChange();
virtual void activeChange();
// void shadeChange(bool); /* KWin Client class doesn't provide this yet */
- Position mousePosition( const QPoint& ) const;
+ Position mousePosition( const TQPoint& ) const;
void renderMenuIcons();
void iconChange();
virtual void desktopChange( );
virtual void borders(int&, int&, int&, int&) const;
- virtual QSize minimumSize() const;
+ virtual TQSize minimumSize() const;
protected slots:
void slotMaximize();
@@ -162,26 +162,26 @@ class IceWMClient : public KDecoration
enum Buttons{ BtnSysMenu=0, BtnClose, BtnMaximize, BtnMinimize,
BtnHide, BtnRollup, BtnDepth, BtnCount };
- QString shortenCaption( const QString* s );
+ TQString shortenCaption( const TQString* s );
void calcHiddenButtons();
- int titleTextWidth( const QString& s );
- void addClientButtons( const QString& s );
- QSpacerItem* addPixmapSpacer( QPixmap* p[],
- QSizePolicy::SizeType = QSizePolicy::Maximum, int hsize = -1 );
+ int titleTextWidth( const TQString& s );
+ void addClientButtons( const TQString& s );
+ TQSpacerItem* addPixmapSpacer( TQPixmap* p[],
+ TQSizePolicy::SizeType = TQSizePolicy::Maximum, int hsize = -1 );
IceWMButton* button[ IceWMClient::BtnCount ];
- QPixmap* menuButtonWithIconPix[2];
- QSpacerItem* titleSpacerJ;
- QSpacerItem* titleSpacerL;
- QSpacerItem* titleSpacerS;
- QSpacerItem* titleSpacerP;
- QSpacerItem* titlebar;
- QSpacerItem* titleSpacerM;
- QSpacerItem* titleSpacerB;
- QSpacerItem* titleSpacerR;
- QSpacerItem* titleSpacerQ;
- QBoxLayout* hb;
- QGridLayout* grid;
+ TQPixmap* menuButtonWithIconPix[2];
+ TQSpacerItem* titleSpacerJ;
+ TQSpacerItem* titleSpacerL;
+ TQSpacerItem* titleSpacerS;
+ TQSpacerItem* titleSpacerP;
+ TQSpacerItem* titlebar;
+ TQSpacerItem* titleSpacerM;
+ TQSpacerItem* titleSpacerB;
+ TQSpacerItem* titleSpacerR;
+ TQSpacerItem* titleSpacerQ;
+ TQBoxLayout* hb;
+ TQGridLayout* grid;
bool m_closing;
};
diff --git a/kwin-styles/kde1/kde1client.cpp b/kwin-styles/kde1/kde1client.cpp
index 39ba9605..c0b7ab57 100644
--- a/kwin-styles/kde1/kde1client.cpp
+++ b/kwin-styles/kde1/kde1client.cpp
@@ -4,18 +4,18 @@ kwin - the KDE window manager
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/
#include "kde1client.h"
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qbitmap.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqbitmap.h>
#include <kdrawutil.h>
#include <klocale.h>
#include <kpixmap.h>
-#include <qdatetime.h>
-#include <qimage.h>
-#include <qtooltip.h>
+#include <tqdatetime.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
#include "kde1client_bitmaps.h"
@@ -26,25 +26,25 @@ const char default_right[] = "H_IAX";
namespace KDE1
{
-QPixmap* close_pix = 0;
-QPixmap* maximize_pix = 0;
-QPixmap* minimize_pix = 0;
-QPixmap* normalize_pix = 0;
-QPixmap* pinup_pix = 0;
-QPixmap* pindown_pix = 0;
-QPixmap* menu_pix = 0;
-QPixmap* question_mark_pix = 0;
+TQPixmap* close_pix = 0;
+TQPixmap* maximize_pix = 0;
+TQPixmap* minimize_pix = 0;
+TQPixmap* normalize_pix = 0;
+TQPixmap* pinup_pix = 0;
+TQPixmap* pindown_pix = 0;
+TQPixmap* menu_pix = 0;
+TQPixmap* question_mark_pix = 0;
-QPixmap* dis_close_pix = 0;
-QPixmap* dis_maximize_pix = 0;
-QPixmap* dis_minimize_pix = 0;
-QPixmap* dis_normalize_pix = 0;
-QPixmap* dis_pinup_pix = 0;
-QPixmap* dis_pindown_pix = 0;
-QPixmap* dis_menu_pix = 0;
-QPixmap* dis_question_mark_pix = 0;
+TQPixmap* dis_close_pix = 0;
+TQPixmap* dis_maximize_pix = 0;
+TQPixmap* dis_minimize_pix = 0;
+TQPixmap* dis_normalize_pix = 0;
+TQPixmap* dis_pinup_pix = 0;
+TQPixmap* dis_pindown_pix = 0;
+TQPixmap* dis_menu_pix = 0;
+TQPixmap* dis_question_mark_pix = 0;
-QPixmap* titleBuffer = 0;
+TQPixmap* titleBuffer = 0;
bool pixmaps_created = FALSE;
@@ -55,96 +55,96 @@ void create_pixmaps()
if ( pixmaps_created )
return;
pixmaps_created = true;
- QColorGroup aGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, true);
- QColorGroup iGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, false);
+ TQColorGroup aGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, true);
+ TQColorGroup iGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, false);
- QPainter aPainter, iPainter;
- close_pix = new QPixmap(16, 16);
- dis_close_pix = new QPixmap(16, 16);
+ TQPainter aPainter, iPainter;
+ close_pix = new TQPixmap(16, 16);
+ dis_close_pix = new TQPixmap(16, 16);
aPainter.begin(close_pix); iPainter.begin(dis_close_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, close_white_bits,
NULL, NULL, close_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, close_white_bits,
NULL, NULL, close_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- close_pix->setMask(QBitmap(16, 16, close_mask_bits, true));
+ close_pix->setMask(TQBitmap(16, 16, close_mask_bits, true));
dis_close_pix->setMask(*close_pix->mask());
- minimize_pix = new QPixmap(16, 16);
- dis_minimize_pix = new QPixmap(16, 16);
+ minimize_pix = new TQPixmap(16, 16);
+ dis_minimize_pix = new TQPixmap(16, 16);
aPainter.begin(minimize_pix); iPainter.begin(dis_minimize_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, iconify_white_bits,
NULL, NULL, iconify_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, iconify_white_bits,
NULL, NULL, iconify_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- minimize_pix->setMask(QBitmap(16, 16, iconify_mask_bits, true));
+ minimize_pix->setMask(TQBitmap(16, 16, iconify_mask_bits, true));
dis_minimize_pix->setMask(*minimize_pix->mask());
- maximize_pix = new QPixmap(16, 16);
- dis_maximize_pix = new QPixmap(16, 16);
+ maximize_pix = new TQPixmap(16, 16);
+ dis_maximize_pix = new TQPixmap(16, 16);
aPainter.begin(maximize_pix); iPainter.begin(dis_maximize_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, maximize_white_bits,
NULL, NULL, maximize_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, maximize_white_bits,
NULL, NULL, maximize_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- maximize_pix->setMask(QBitmap(16, 16, maximize_mask_bits, true));
+ maximize_pix->setMask(TQBitmap(16, 16, maximize_mask_bits, true));
dis_maximize_pix->setMask(*maximize_pix->mask());
- normalize_pix = new QPixmap(16, 16);
- dis_normalize_pix = new QPixmap(16, 16);
+ normalize_pix = new TQPixmap(16, 16);
+ dis_normalize_pix = new TQPixmap(16, 16);
aPainter.begin(normalize_pix); iPainter.begin(dis_normalize_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, maximizedown_white_bits,
NULL, NULL, maximizedown_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, maximizedown_white_bits,
NULL, NULL, maximizedown_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- normalize_pix->setMask(QBitmap(16, 16, maximizedown_mask_bits, true));
+ normalize_pix->setMask(TQBitmap(16, 16, maximizedown_mask_bits, true));
dis_normalize_pix->setMask(*normalize_pix->mask());
- menu_pix = new QPixmap(16, 16);
- dis_menu_pix = new QPixmap(16, 16);
+ menu_pix = new TQPixmap(16, 16);
+ dis_menu_pix = new TQPixmap(16, 16);
aPainter.begin(menu_pix); iPainter.begin(dis_menu_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, menu_white_bits,
NULL, NULL, menu_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, menu_white_bits,
NULL, NULL, menu_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- menu_pix->setMask(QBitmap(16, 16, menu_mask_bits, true));
+ menu_pix->setMask(TQBitmap(16, 16, menu_mask_bits, true));
dis_menu_pix->setMask(*menu_pix->mask());
- pinup_pix = new QPixmap(16, 16);
- dis_pinup_pix = new QPixmap(16, 16);
+ pinup_pix = new TQPixmap(16, 16);
+ dis_pinup_pix = new TQPixmap(16, 16);
aPainter.begin(pinup_pix); iPainter.begin(dis_pinup_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, pinup_white_bits,
pinup_gray_bits, NULL, pinup_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, pinup_white_bits,
pinup_gray_bits, NULL, pinup_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- pinup_pix->setMask(QBitmap(16, 16, pinup_mask_bits, true));
+ pinup_pix->setMask(TQBitmap(16, 16, pinup_mask_bits, true));
dis_pinup_pix->setMask(*pinup_pix->mask());
- pindown_pix = new QPixmap(16, 16);
- dis_pindown_pix = new QPixmap(16, 16);
+ pindown_pix = new TQPixmap(16, 16);
+ dis_pindown_pix = new TQPixmap(16, 16);
aPainter.begin(pindown_pix); iPainter.begin(dis_pindown_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, pindown_white_bits,
pindown_gray_bits, NULL, pindown_dgray_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, pindown_white_bits,
pindown_gray_bits, NULL, pindown_dgray_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- pindown_pix->setMask(QBitmap(16, 16, pindown_mask_bits, true));
+ pindown_pix->setMask(TQBitmap(16, 16, pindown_mask_bits, true));
dis_pindown_pix->setMask(*pindown_pix->mask());
- question_mark_pix = new QPixmap(16, 16);
- dis_question_mark_pix = new QPixmap(16, 16);
+ question_mark_pix = new TQPixmap(16, 16);
+ dis_question_mark_pix = new TQPixmap(16, 16);
aPainter.begin(question_mark_pix); iPainter.begin(dis_question_mark_pix);
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, help_light_bits,
NULL, NULL, help_dark_bits, NULL, NULL);
kColorBitmaps(&iPainter, iGrp, 0, 0, 16, 16, true, help_light_bits,
NULL, NULL, help_dark_bits, NULL, NULL);
aPainter.end(); iPainter.end();
- question_mark_pix->setMask(QBitmap(16, 16, help_mask_bits, true));
+ question_mark_pix->setMask(TQBitmap(16, 16, help_mask_bits, true));
dis_question_mark_pix->setMask(*question_mark_pix->mask());
titleBuffer = new KPixmap;
@@ -174,15 +174,15 @@ void delete_pixmaps()
void drawGradient
(
- QPainter & p,
- const QRect & t,
- const QColor & c1,
- const QColor & c2
+ TQPainter & p,
+ const TQRect & t,
+ const TQColor & c1,
+ const TQColor & c2
)
{
// Don't draw a million vertical lines if we don't need to.
- if (c1 == c2 || QPixmap::defaultDepth() <= 8)
+ if (c1 == c2 || TQPixmap::defaultDepth() <= 8)
{
p.fillRect(t, c1);
return;
@@ -212,7 +212,7 @@ void drawGradient
gl += gcdelta;
bl += bcdelta;
- p.setPen(QColor(rl >> 16, gl >> 16, bl >> 16));
+ p.setPen(TQColor(rl >> 16, gl >> 16, bl >> 16));
p.drawLine(t.x() + x, 0, t.x() + x, t.y() + t.height() - 1);
}
@@ -221,7 +221,7 @@ void drawGradient
void StdClient::reset( unsigned long )
{
- if (button[ButtonMenu] && (icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull()))
+ if (button[ButtonMenu] && (icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).isNull()))
button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix);
if (button[ButtonSticky])
button[ButtonSticky]->setIconSet(isOnAllDesktops() ? isActive() ? *pindown_pix : *dis_pindown_pix :
@@ -251,30 +251,30 @@ void StdClient::init()
widget()->setFont(options()->font(isActive() ));
- QGridLayout* g = new QGridLayout( widget(), 0, 0, 3, 2 );
+ TQGridLayout* g = new TQGridLayout( widget(), 0, 0, 3, 2 );
g->setRowStretch( 1, 10 );
if( isPreview())
- g->addWidget( new QLabel( i18n( "<center><b>KDE 1 preview</b></center>" ), widget()), 1, 1 );
+ g->addWidget( new TQLabel( i18n( "<center><b>KDE 1 preview</b></center>" ), widget()), 1, 1 );
else
- g->addItem( new QSpacerItem( 0, 0 ), 1, 1 ); //no widget in the middle
- g->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+ g->addItem( new TQSpacerItem( 0, 0 ), 1, 1 ); //no widget in the middle
+ g->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
g->addColSpacing(0, 1);
g->addColSpacing(2, 1);
g->addRowSpacing(2, 1);
int fh = widget()->fontMetrics().lineSpacing();
- titlebar = new QSpacerItem(10, fh, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem(10, fh, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
- QBoxLayout* hb = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ TQBoxLayout* hb = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
g->addLayout( hb, 0, 1 );
// setup titlebar buttons
for (int n=0; n<ButtonTypeCount; n++) button[n] = 0;
- addButtons(hb, options()->customButtonPositions() ? options()->titleButtonsLeft() : QString(default_left));
+ addButtons(hb, options()->customButtonPositions() ? options()->titleButtonsLeft() : TQString(default_left));
hb->addItem(titlebar);
- addButtons(hb, options()->customButtonPositions() ? options()->titleButtonsRight() : QString(default_right));
+ addButtons(hb, options()->customButtonPositions() ? options()->titleButtonsRight() : TQString(default_right));
for (int n=0; n<ButtonTypeCount; n++) {
if ( !button[n] )
@@ -282,7 +282,7 @@ void StdClient::init()
button[n]->setBackgroundMode( PaletteBackground );
button[n]->setMouseTracking( FALSE );
button[n]->setAutoRaise( TRUE );
- button[n]->setFocusPolicy( QWidget::NoFocus );
+ button[n]->setFocusPolicy( TQWidget::NoFocus );
button[n]->setFixedSize( 20, 20 );
}
@@ -297,44 +297,44 @@ void StdClient::init()
#endif
}
-void StdClient::addButtons(QBoxLayout *hb, const QString& s)
+void StdClient::addButtons(TQBoxLayout *hb, const TQString& s)
{
if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) {
switch (s[n]) {
case 'M': // Menu button
if (!button[ButtonMenu]) {
- button[ButtonMenu] = new QToolButton( widget(), 0 );
- QToolTip::add( button[ButtonMenu], i18n("Menu") );
+ button[ButtonMenu] = new TQToolButton( widget(), 0 );
+ TQToolTip::add( button[ButtonMenu], i18n("Menu") );
button[ButtonMenu]->setCursor(ArrowCursor);
- if( icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull())
+ if( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).isNull())
button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix);
else
- button[ButtonMenu]->setIconSet( icon().pixmap( QIconSet::Small, QIconSet::Normal ));
- connect( button[0], SIGNAL( pressed() ), this, SLOT( menuButtonPressed() ) );
+ button[ButtonMenu]->setIconSet( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ));
+ connect( button[0], TQT_SIGNAL( pressed() ), this, TQT_SLOT( menuButtonPressed() ) );
hb->addWidget(button[ButtonMenu]);
}
break;
case 'S': // Sticky button
if (!button[ButtonSticky]) {
- button[ButtonSticky] = new QToolButton( widget(), 0 );
+ button[ButtonSticky] = new TQToolButton( widget(), 0 );
button[ButtonSticky]->setIconSet( isOnAllDesktops()?*pindown_pix:*pinup_pix );
- QToolTip::add( button[ButtonSticky], isOnAllDesktops()?i18n("Not On All Desktops"):i18n("On All Desktops") );
+ TQToolTip::add( button[ButtonSticky], isOnAllDesktops()?i18n("Not On All Desktops"):i18n("On All Desktops") );
button[ButtonSticky]->setCursor(ArrowCursor);
button[ButtonSticky]->setIconSet(isOnAllDesktops() ? isActive() ? *pindown_pix : *dis_pindown_pix :
isActive() ? *pinup_pix : *dis_pinup_pix );
- connect( button[ButtonSticky], SIGNAL( clicked() ), this, ( SLOT( toggleOnAllDesktops() ) ) );
+ connect( button[ButtonSticky], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( toggleOnAllDesktops() ) ) );
hb->addWidget(button[ButtonSticky]);
}
break;
case 'H': // Help button
if ((!button[ButtonHelp]) && providesContextHelp()) {
- button[ButtonHelp] = new QToolButton( widget(), 0 );
- QToolTip::add( button[ButtonHelp], i18n("Help") );
+ button[ButtonHelp] = new TQToolButton( widget(), 0 );
+ TQToolTip::add( button[ButtonHelp], i18n("Help") );
button[ButtonHelp]->setIconSet( isActive() ? *question_mark_pix : *dis_question_mark_pix);
- connect( button[ButtonHelp], SIGNAL( clicked() ), this, ( SLOT( showContextHelp() ) ) );
+ connect( button[ButtonHelp], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( showContextHelp() ) ) );
button[ButtonHelp]->setCursor(ArrowCursor);
hb->addWidget(button[ButtonHelp]);
}
@@ -342,11 +342,11 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s)
case 'I': // Minimize button
if ((!button[ButtonMinimize]) && isMinimizable()) {
- button[ButtonMinimize] = new QToolButton( widget(), 0 );
- QToolTip::add( button[ButtonMinimize], i18n("Minimize") );
+ button[ButtonMinimize] = new TQToolButton( widget(), 0 );
+ TQToolTip::add( button[ButtonMinimize], i18n("Minimize") );
button[ButtonMinimize]->setCursor(ArrowCursor);
button[ButtonMinimize]->setIconSet(isActive() ? *minimize_pix : *dis_minimize_pix);
- connect( button[ButtonMinimize], SIGNAL( clicked() ), this, ( SLOT( minimize() ) ) );
+ connect( button[ButtonMinimize], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( minimize() ) ) );
hb->addWidget(button[ButtonMinimize]);
}
break;
@@ -355,28 +355,28 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s)
if ((!button[ButtonMaximize]) && isMaximizable()) {
const bool max = maximizeMode()!=MaximizeRestore;
button[ButtonMaximize] = new ThreeButtonButton( widget(), 0 );
- QToolTip::add( button[ButtonMaximize], max?i18n("Restore"):i18n("Maximize") );
+ TQToolTip::add( button[ButtonMaximize], max?i18n("Restore"):i18n("Maximize") );
button[ButtonMaximize]->setCursor(ArrowCursor);
button[ButtonMaximize]->setIconSet( max?(isActive() ? *normalize_pix : *dis_normalize_pix):(isActive() ? *maximize_pix : *dis_maximize_pix) );
- connect( button[ButtonMaximize], SIGNAL( clicked(ButtonState) ),
- this, ( SLOT( maxButtonClicked(ButtonState) ) ) );
+ connect( button[ButtonMaximize], TQT_SIGNAL( clicked(ButtonState) ),
+ this, ( TQT_SLOT( maxButtonClicked(ButtonState) ) ) );
hb->addWidget(button[ButtonMaximize]);
}
break;
case 'X': // Close button
if ((!button[ButtonClose]) && isCloseable()) {
- button[ButtonClose] = new QToolButton( widget(), 0 );
- QToolTip::add( button[ButtonClose], i18n("Close") );
+ button[ButtonClose] = new TQToolButton( widget(), 0 );
+ TQToolTip::add( button[ButtonClose], i18n("Close") );
button[ButtonClose]->setCursor(ArrowCursor);
button[ButtonClose]->setIconSet(isActive() ? *close_pix : *dis_close_pix);
- connect( button[ButtonClose], SIGNAL( clicked() ), this, ( SLOT( closeWindow() ) ) );
+ connect( button[ButtonClose], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( closeWindow() ) ) );
hb->addWidget(button[ButtonClose]);
}
break;
case '_': // Spacer item
- hb->addItem( new QSpacerItem( 5, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+ hb->addItem( new TQSpacerItem( 5, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
}
}
}
@@ -385,7 +385,7 @@ void StdClient::addButtons(QBoxLayout *hb, const QString& s)
void StdClient::activeChange()
{
bool on = isActive();
- if (button[ButtonMenu] && (icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull()))
+ if (button[ButtonMenu] && (icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).isNull()))
button[ButtonMenu]->setIconSet(on ? *menu_pix : *dis_menu_pix);
if (button[ButtonSticky])
button[ButtonSticky]->setIconSet(isOnAllDesktops() ? on ? *pindown_pix : *dis_pindown_pix :
@@ -410,18 +410,18 @@ StdClient::~StdClient()
}
-void StdClient::resizeEvent( QResizeEvent* )
+void StdClient::resizeEvent( TQResizeEvent* )
{
- QRegion rr = widget()->rect();
- QRect t = titlebar->geometry();
+ TQRegion rr = widget()->rect();
+ TQRect t = titlebar->geometry();
// t.setTop( 0 );
-// QRegion r = rr.subtract( QRect( t.x()+1, 0, t.width()-2, 1 ) );
+// TQRegion r = rr.subtract( TQRect( t.x()+1, 0, t.width()-2, 1 ) );
// setMask( r );
if ( widget()->isVisibleToTLW() && !widget()->testWFlags( WStaticContents )) {
// manual clearing without the titlebar (we selected WResizeNoErase )
- QRect cr( 2, 2, width()-4, height()- 4 );
- widget()->erase( QRegion( cr ).subtract( t ) );
+ TQRect cr( 2, 2, width()-4, height()- 4 );
+ widget()->erase( TQRegion( cr ).subtract( t ) );
}
}
@@ -440,8 +440,8 @@ void StdClient::maximizeChange()
bool m = maximizeMode() == MaximizeFull;
if (button[ButtonMaximize]) {
button[ButtonMaximize]->setIconSet( m?*normalize_pix:*maximize_pix );
- QToolTip::remove( button[ButtonMaximize] );
- QToolTip::add( button[ButtonMaximize], m ? i18n("Restore") : i18n("Maximize") );
+ TQToolTip::remove( button[ButtonMaximize] );
+ TQToolTip::add( button[ButtonMaximize], m ? i18n("Restore") : i18n("Maximize") );
}
}
@@ -453,16 +453,16 @@ void StdClient::desktopChange()
bool s = isOnAllDesktops();
if (button[ButtonSticky]) {
button[ButtonSticky]->setIconSet( s?*pindown_pix:*pinup_pix );
- QToolTip::remove( button[ButtonSticky] );
- QToolTip::add( button[ButtonSticky], s ? i18n("Not On All Desktops") : i18n("On All Desktops") );
+ TQToolTip::remove( button[ButtonSticky] );
+ TQToolTip::add( button[ButtonSticky], s ? i18n("Not On All Desktops") : i18n("On All Desktops") );
}
}
-void StdClient::paintEvent( QPaintEvent* )
+void StdClient::paintEvent( TQPaintEvent* )
{
- QPainter p( widget() );
- QRect t = titlebar->geometry();
- QRegion r = widget()->rect();
+ TQPainter p( widget() );
+ TQRect t = titlebar->geometry();
+ TQRegion r = widget()->rect();
r = r.subtract( t );
p.setClipRegion( r );
qDrawWinPanel( &p, widget()->rect(), widget()->colorGroup() );
@@ -470,9 +470,9 @@ void StdClient::paintEvent( QPaintEvent* )
// p.setClipRegion( t );
// t.setTop( 0 );
- QRect titleRect( 0, 0, t.width(), t.height() );
+ TQRect titleRect( 0, 0, t.width(), t.height() );
titleBuffer->resize( titleRect.width(), titleRect.height() );
- QPainter p2( titleBuffer );
+ TQPainter p2( titleBuffer );
drawGradient(p2, titleRect, options()->color(KDecorationOptions::ColorTitleBar, isActive()),
options()->color(KDecorationOptions::ColorTitleBlend, isActive()));
@@ -492,16 +492,16 @@ void StdClient::paintEvent( QPaintEvent* )
}
-void StdClient::mouseDoubleClickEvent( QMouseEvent * e )
+void StdClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
}
-void StdClient::wheelEvent( QWheelEvent * e )
+void StdClient::wheelEvent( TQWheelEvent * e )
{
- if (isSetShade() || QRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
+ if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
@@ -509,10 +509,10 @@ void StdClient::wheelEvent( QWheelEvent * e )
void StdClient::iconChange()
{
if (button[ButtonMenu]) {
- if ( icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull())
+ if ( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).isNull())
button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix);
else
- button[ButtonMenu]->setIconSet( icon().pixmap( QIconSet::Small, QIconSet::Normal ) );
+ button[ButtonMenu]->setIconSet( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) );
button[ButtonMenu]->repaint( FALSE );
}
}
@@ -524,12 +524,12 @@ void StdClient::iconChange()
*/
void StdClient::menuButtonPressed()
{
- QRect menuRect = button[ButtonMenu]->rect();
+ TQRect menuRect = button[ButtonMenu]->rect();
menuRect.addCoords(-1, 0, +1, +2);
- QPoint menuTop = button[ButtonMenu]->mapToGlobal(menuRect.topLeft());
- QPoint menuBottom = button[ButtonMenu]->mapToGlobal(menuRect.bottomRight());
+ TQPoint menuTop = button[ButtonMenu]->mapToGlobal(menuRect.topLeft());
+ TQPoint menuBottom = button[ButtonMenu]->mapToGlobal(menuRect.bottomRight());
KDecorationFactory* f = factory(); // needs to be saved before
- showWindowMenu( QRect(menuTop, menuBottom) );
+ showWindowMenu( TQRect(menuTop, menuBottom) );
if( !f->exists( this )) // destroyed, return immediately
return;
button[ButtonMenu]->setDown(false);
@@ -541,30 +541,30 @@ void StdClient::maxButtonClicked( ButtonState button )
maximize( button );
}
-bool StdClient::eventFilter( QObject* o, QEvent* e )
+bool StdClient::eventFilter( TQObject* o, TQEvent* e )
{
if ( o != widget() )
return false;
switch ( e->type() ) {
- case QEvent::Resize:
- resizeEvent( static_cast< QResizeEvent* >( e ) );
+ case TQEvent::Resize:
+ resizeEvent( static_cast< TQResizeEvent* >( e ) );
return true;
- case QEvent::Paint:
- paintEvent( static_cast< QPaintEvent* >( e ) );
+ case TQEvent::Paint:
+ paintEvent( static_cast< TQPaintEvent* >( e ) );
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent( static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent( static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
@@ -572,9 +572,9 @@ bool StdClient::eventFilter( QObject* o, QEvent* e )
}
}
-QSize StdClient::minimumSize() const
+TQSize StdClient::minimumSize() const
{
- return widget()->minimumSize().expandedTo( QSize( 100, 50 ));
+ return widget()->minimumSize().expandedTo( TQSize( 100, 50 ));
}
void StdClient::borders( int& left, int& right, int& top, int& bottom ) const
@@ -583,7 +583,7 @@ void StdClient::borders( int& left, int& right, int& top, int& bottom ) const
top = 6 + widget()->fontMetrics().lineSpacing()+2;
}
-void StdClient::resize( const QSize& s )
+void StdClient::resize( const TQSize& s )
{
widget()->resize( s );
}
@@ -600,31 +600,31 @@ void StdToolClient::init()
widget()->setFont(options()->font(isActive(), true ));
- QGridLayout* g = new QGridLayout( widget(), 0, 0, 2 );
+ TQGridLayout* g = new TQGridLayout( widget(), 0, 0, 2 );
g->setRowStretch( 1, 10 );
if( isPreview())
- g->addWidget( new QLabel( i18n( "<center><b>KDE 1 decoration</b></center>" ), widget()), 1, 1 );
+ g->addWidget( new TQLabel( i18n( "<center><b>KDE 1 decoration</b></center>" ), widget()), 1, 1 );
else
- g->addItem( new QSpacerItem( 0, 0 ), 1, 1 ); //no widget in the middle
- g->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+ g->addItem( new TQSpacerItem( 0, 0 ), 1, 1 ); //no widget in the middle
+ g->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
g->addColSpacing(0, 1);
g->addColSpacing(2, 1);
g->addRowSpacing(2, 1);
- closeBtn = new QToolButton( widget(), 0 );
- QToolTip::add( closeBtn, i18n("Close") );
- connect( closeBtn, SIGNAL( clicked() ), this, ( SLOT( closeWindow() ) ) );
+ closeBtn = new TQToolButton( widget(), 0 );
+ TQToolTip::add( closeBtn, i18n("Close") );
+ connect( closeBtn, TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( closeWindow() ) ) );
closeBtn->setFixedSize( 13, 13);
reset( -1U );
- QHBoxLayout* hb = new QHBoxLayout;
+ TQHBoxLayout* hb = new QHBoxLayout;
g->addLayout( hb, 0, 1 );
int fh = widget()->fontMetrics().lineSpacing()+2;
- titlebar = new QSpacerItem(10, fh, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem(10, fh, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
hb->addItem( titlebar );
hb->addWidget( closeBtn );
}
@@ -633,26 +633,26 @@ StdToolClient::~StdToolClient()
{
}
-void StdToolClient::resizeEvent( QResizeEvent* )
+void StdToolClient::resizeEvent( TQResizeEvent* )
{
-// QRegion r = rect();
-// QRect t = titlebar->geometry();
+// TQRegion r = rect();
+// TQRect t = titlebar->geometry();
// t.setTop( 0 );
-// r = r.subtract( QRect(0, 0, width(), 1) );
-// r = r.subtract (QRect( 0, 0, 1, t.height() ) );
-// r = r.subtract (QRect( width()-1, 0, 1, t.height() ) );
+// r = r.subtract( TQRect(0, 0, width(), 1) );
+// r = r.subtract (TQRect( 0, 0, 1, t.height() ) );
+// r = r.subtract (TQRect( width()-1, 0, 1, t.height() ) );
// setMask( r );
}
-void StdToolClient::paintEvent( QPaintEvent* )
+void StdToolClient::paintEvent( TQPaintEvent* )
{
- QPainter p( widget() );
- QRect t = titlebar->geometry();
- QRect r = widget()->rect();
+ TQPainter p( widget() );
+ TQRect t = titlebar->geometry();
+ TQRect r = widget()->rect();
qDrawWinPanel( &p, r, widget()->colorGroup() );
r.setTop( t.bottom()+1 );
qDrawWinPanel( &p, r, widget()->colorGroup() );
- p.fillRect( QRect( QPoint(t.topLeft() ), QPoint( width() - t.left(), t.bottom() ) ),
+ p.fillRect( TQRect( TQPoint(t.topLeft() ), TQPoint( width() - t.left(), t.bottom() ) ),
options()->color(KDecorationOptions::ColorTitleBar, isActive()));
p.setPen( options()->color(KDecorationOptions::ColorTitleBar, isActive()).light() );
t.setLeft( t.left() + 4 );
@@ -663,15 +663,15 @@ void StdToolClient::paintEvent( QPaintEvent* )
}
-void StdToolClient::mouseDoubleClickEvent( QMouseEvent * e )
+void StdToolClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
}
-void StdToolClient::wheelEvent( QWheelEvent * e )
+void StdToolClient::wheelEvent( TQWheelEvent * e )
{
- if (isSetShade() || QRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
+ if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
@@ -682,38 +682,38 @@ void StdToolClient::captionChange()
void StdToolClient::reset( unsigned long )
{
- QImage img = close_pix->convertToImage();
+ TQImage img = close_pix->convertToImage();
img = img.smoothScale( 12, 12 );
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage( img );
closeBtn->setPixmap( pm );
widget()->setFont(options()->font(isActive(), true ));
}
-bool StdToolClient::eventFilter( QObject* o, QEvent* e )
+bool StdToolClient::eventFilter( TQObject* o, TQEvent* e )
{
if ( o != widget() )
return false;
switch ( e->type() ) {
- case QEvent::Resize:
- resizeEvent( static_cast< QResizeEvent* >( e ) );
+ case TQEvent::Resize:
+ resizeEvent( static_cast< TQResizeEvent* >( e ) );
return true;
- case QEvent::Paint:
- paintEvent( static_cast< QPaintEvent* >( e ) );
+ case TQEvent::Paint:
+ paintEvent( static_cast< TQPaintEvent* >( e ) );
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent( static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent( static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
@@ -721,9 +721,9 @@ bool StdToolClient::eventFilter( QObject* o, QEvent* e )
}
}
-QSize StdToolClient::minimumSize() const
+TQSize StdToolClient::minimumSize() const
{
- return widget()->minimumSize().expandedTo( QSize( 100, 50 ));
+ return widget()->minimumSize().expandedTo( TQSize( 100, 50 ));
}
void StdToolClient::borders( int& left, int& right, int& top, int& bottom ) const
@@ -732,7 +732,7 @@ void StdToolClient::borders( int& left, int& right, int& top, int& bottom ) cons
top = 6 + widget()->fontMetrics().lineSpacing();
}
-void StdToolClient::resize( const QSize& s )
+void StdToolClient::resize( const TQSize& s )
{
widget()->resize( s );
}
diff --git a/kwin-styles/kde1/kde1client.h b/kwin-styles/kde1/kde1client.h
index 27a246dd..5c960abd 100644
--- a/kwin-styles/kde1/kde1client.h
+++ b/kwin-styles/kde1/kde1client.h
@@ -5,11 +5,11 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/
#ifndef STDCLIENT_H
#define STDCLIENT_H
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class QLabel;
class QSpacerItem;
@@ -32,19 +32,19 @@ public:
StdClient( KDecorationBridge* b, KDecorationFactory* f );
~StdClient();
void init();
- QSize minimumSize() const;
+ TQSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const;
void reset( unsigned long mask );
- void resize( const QSize& s );
+ void resize( const TQSize& s );
void shadeChange() {};
- Position mousePosition( const QPoint& p ) const { return KDecoration::mousePosition( p ); }
+ Position mousePosition( const TQPoint& p ) const { return KDecoration::mousePosition( p ); }
protected:
- bool eventFilter( QObject* o, QEvent* e );
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
+ bool eventFilter( TQObject* o, TQEvent* e );
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent( QWheelEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent( TQWheelEvent * );
void captionChange();
void iconChange();
void maximizeChange();
@@ -52,15 +52,15 @@ protected:
void activeChange();
private:
- void addButtons(QBoxLayout* hb, const QString& buttons);
+ void addButtons(TQBoxLayout* hb, const TQString& buttons);
private slots:
void menuButtonPressed();
void maxButtonClicked( ButtonState );
private:
- QToolButton* button[ButtonTypeCount];
- QSpacerItem* titlebar;
+ TQToolButton* button[ButtonTypeCount];
+ TQSpacerItem* titlebar;
};
class StdToolClient : public KDecoration
@@ -70,44 +70,44 @@ public:
StdToolClient( KDecorationBridge* b, KDecorationFactory* f );
~StdToolClient();
void init();
- QSize minimumSize() const;
+ TQSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const;
void reset( unsigned long mask );
- void resize( const QSize& s );
+ void resize( const TQSize& s );
void shadeChange() {};
void activeChange() {};
void iconChange() {};
void maximizeChange() {};
void desktopChange() {};
- Position mousePosition( const QPoint& p ) const { return KDecoration::mousePosition( p ); }
+ Position mousePosition( const TQPoint& p ) const { return KDecoration::mousePosition( p ); }
protected:
- bool eventFilter( QObject* o, QEvent* e );
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
+ bool eventFilter( TQObject* o, TQEvent* e );
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent( QWheelEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent( TQWheelEvent * );
void captionChange();
private:
- QToolButton* closeBtn;
- QSpacerItem* titlebar;
+ TQToolButton* closeBtn;
+ TQSpacerItem* titlebar;
};
/*
- Like QToolButton, but provides a clicked(ButtonState) signals that
+ Like TQToolButton, but provides a clicked(ButtonState) signals that
has the last pressed mouse button as argument
*/
class ThreeButtonButton: public QToolButton
{
Q_OBJECT
public:
- ThreeButtonButton ( QWidget *parent = 0, const char* name = 0 )
- : QToolButton( parent, name )
+ ThreeButtonButton ( TQWidget *parent = 0, const char* name = 0 )
+ : TQToolButton( parent, name )
{
- connect( this, SIGNAL( clicked() ), this, SLOT( handleClicked() ) );
+ connect( this, TQT_SIGNAL( clicked() ), this, TQT_SLOT( handleClicked() ) );
setCursor( arrowCursor );
}
~ThreeButtonButton () {}
@@ -116,17 +116,17 @@ signals:
void clicked( ButtonState );
protected:
- void mousePressEvent( QMouseEvent* e )
+ void mousePressEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mousePressEvent( &me );
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mousePressEvent( &me );
}
- void mouseReleaseEvent( QMouseEvent* e )
+ void mouseReleaseEvent( TQMouseEvent* e )
{
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mouseReleaseEvent( &me );
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mouseReleaseEvent( &me );
}
private slots:
diff --git a/kwin-styles/kstep/nextclient.cpp b/kwin-styles/kstep/nextclient.cpp
index 64fb5217..d4e57e86 100644
--- a/kwin-styles/kstep/nextclient.cpp
+++ b/kwin-styles/kstep/nextclient.cpp
@@ -1,11 +1,11 @@
#include "nextclient.h"
-#include <qdatetime.h>
-#include <qdrawutil.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqdatetime.h>
+#include <tqdrawutil.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpixmapeffect.h>
@@ -165,7 +165,7 @@ static KPixmap *aBtn;
static KPixmap *aBtnDown;
static KPixmap *iBtn;
static KPixmap *iBtnDown;
-static QColor *btnForeground;
+static TQColor *btnForeground;
static bool pixmaps_created = false;
static int titleHeight = 16;
@@ -191,7 +191,7 @@ static void create_pixmaps(NextClientFactory *f)
int i = options()->preferredBorderSize(f);
if (i >= 0 && i <= 6) handleSize = borderSizes[i];
- titleHeight = QFontMetrics(options()->font(true)).height() + 4;
+ titleHeight = TQFontMetrics(options()->font(true)).height() + 4;
if (titleHeight < handleSize) titleHeight = handleSize;
titleHeight &= ~1; // Make title height even
if (titleHeight < 16) titleHeight = 16;
@@ -250,7 +250,7 @@ static void create_pixmaps(NextClientFactory *f)
internal.resize(internalHeight, internalHeight);
// inactive buttons
- QColor c(options()->color(KDecoration::ColorButtonBg, false));
+ TQColor c(options()->color(KDecoration::ColorButtonBg, false));
KPixmapEffect::gradient(*iBtn, c.light(120), c.dark(120),
KPixmapEffect::DiagonalGradient);
KPixmapEffect::gradient(internal, c.dark(120), c.light(120),
@@ -277,7 +277,7 @@ static void create_pixmaps(NextClientFactory *f)
KPixmapEffect::DiagonalGradient);
bitBlt(aBtnDown, 3, 3, &internal, 0, 0, internalHeight, internalHeight, Qt::CopyROP, true);
- QPainter p;
+ TQPainter p;
p.begin(aBtn);
p.setPen(Qt::black);
p.drawRect(0, 0, btnWidth, btnWidth);
@@ -296,9 +296,9 @@ static void create_pixmaps(NextClientFactory *f)
p.end();
if(qGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 128)
- btnForeground = new QColor(Qt::black);
+ btnForeground = new TQColor(Qt::black);
else
- btnForeground = new QColor(Qt::white);
+ btnForeground = new TQColor(Qt::white);
}
static void delete_pixmaps()
@@ -322,8 +322,8 @@ static void delete_pixmaps()
NextButton::NextButton(NextClient *parent, const char *name,
const unsigned char *bitmap, int bw, int bh,
- const QString& tip, const int realizeBtns)
- : QButton(parent->widget(), name),
+ const TQString& tip, const int realizeBtns)
+ : TQButton(parent->widget(), name),
deco(NULL), client(parent), last_button(NoButton)
{
realizeButtons = realizeBtns;
@@ -335,7 +335,7 @@ NextButton::NextButton(NextClient *parent, const char *name,
if(bitmap)
setBitmap(bitmap, bw, bh);
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
}
void NextButton::reset()
@@ -345,12 +345,12 @@ void NextButton::reset()
void NextButton::setBitmap(const unsigned char *bitmap, int w, int h)
{
- deco = new QBitmap(w, h, bitmap, true);
+ deco = new TQBitmap(w, h, bitmap, true);
deco->setMask(*deco);
repaint();
}
-void NextButton::drawButton(QPainter *p)
+void NextButton::drawButton(TQPainter *p)
{
if(client->isActive())
p->drawPixmap(0, 0, isDown() ? *aBtnDown : *aBtn);
@@ -366,26 +366,26 @@ void NextButton::drawButton(QPainter *p)
p->drawPixmap(offset, offset, *deco);
} else {
offset = (titleHeight - 16) / 2;
- KPixmap btnpix = client->icon().pixmap(QIconSet::Small,
- client->isActive() ? QIconSet::Normal : QIconSet::Disabled);
+ KPixmap btnpix = client->icon().pixmap(TQIconSet::Small,
+ client->isActive() ? TQIconSet::Normal : TQIconSet::Disabled);
p->drawPixmap( offset, offset, btnpix );
}
}
-void NextButton::mousePressEvent( QMouseEvent* e )
+void NextButton::mousePressEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me( e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me( e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mousePressEvent( &me );
+ TQButton::mousePressEvent( &me );
}
-void NextButton::mouseReleaseEvent( QMouseEvent* e )
+void NextButton::mouseReleaseEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me( e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me( e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mouseReleaseEvent( &me );
+ TQButton::mouseReleaseEvent( &me );
}
// =====================================
@@ -402,19 +402,19 @@ void NextClient::init()
widget()->setBackgroundMode( NoBackground );
- QVBoxLayout *mainLayout = new QVBoxLayout(widget());
- QBoxLayout *titleLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
- QHBoxLayout *windowLayout = new QHBoxLayout();
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(widget());
+ TQBoxLayout *titleLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ TQHBoxLayout *windowLayout = new TQHBoxLayout();
mainLayout->addLayout(titleLayout);
mainLayout->addLayout(windowLayout, 1);
mainLayout->addSpacing(mustDrawHandle() ? handleSize : 1);
windowLayout->addSpacing(1);
if (isPreview())
- windowLayout->addWidget(new QLabel(i18n(
+ windowLayout->addWidget(new TQLabel(i18n(
"<center><b>KStep preview</b></center>"), widget()));
else
- windowLayout->addItem(new QSpacerItem( 0, 0 ));
+ windowLayout->addItem(new TQSpacerItem( 0, 0 ));
windowLayout->addSpacing(1);
@@ -432,7 +432,7 @@ void NextClient::init()
button is selected in the current button scheme, or (2) null
otherwise.
*/
-void NextClient::initializeButtonsAndTitlebar(QBoxLayout* titleLayout)
+void NextClient::initializeButtonsAndTitlebar(TQBoxLayout* titleLayout)
{
// Null the buttons to begin with (they are not guaranteed to be null).
for (int i=0; i<MAX_NUM_BUTTONS; i++) {
@@ -442,20 +442,20 @@ void NextClient::initializeButtonsAndTitlebar(QBoxLayout* titleLayout)
// The default button positions for other styles do not match the
// behavior of older versions of KStep, so we have to set these
// manually when customButtonPositions isn't enabled.
- QString left, right;
+ TQString left, right;
if (options()->customButtonPositions()) {
left = options()->titleButtonsLeft();
right = options()->titleButtonsRight();
} else {
- left = QString("I");
- right = QString("SX");
+ left = TQString("I");
+ right = TQString("SX");
}
// Do actual creation and addition to titleLayout
addButtons(titleLayout, left);
- titlebar = new QSpacerItem(10, titleHeight, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem(10, titleHeight, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
titleLayout->addItem(titlebar);
addButtons(titleLayout, right);
@@ -470,7 +470,7 @@ void NextClient::initializeButtonsAndTitlebar(QBoxLayout* titleLayout)
/** Adds the buttons for one side of the title bar, based on the spec
* string; see the KWinInternal::KDecoration class, methods
* titleButtonsLeft and titleBUttonsRight. */
-void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
+void NextClient::addButtons(TQBoxLayout* titleLayout, const TQString& spec)
{
for (unsigned int i=0; i<spec.length(); i++) {
switch (spec[i].latin1()) {
@@ -480,8 +480,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
new NextButton(this, "maximize", maximize_bits, 10, 10,
i18n("Maximize"), LeftButton|MidButton|RightButton);
titleLayout->addWidget( button[MAXIMIZE_IDX] );
- connect( button[MAXIMIZE_IDX], SIGNAL(clicked()),
- this, SLOT(maximizeButtonClicked()) );
+ connect( button[MAXIMIZE_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(maximizeButtonClicked()) );
}
break;
@@ -490,8 +490,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
button[HELP_IDX] = new NextButton(this,
"help", question_bits, 10, 10, i18n("Help"));
titleLayout->addWidget( button[HELP_IDX] );
- connect( button[HELP_IDX], SIGNAL(clicked()),
- this, SLOT(showContextHelp()) );
+ connect( button[HELP_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(showContextHelp()) );
}
break;
@@ -501,8 +501,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
new NextButton(this, "iconify", iconify_bits, 10, 10,
i18n("Minimize"));
titleLayout->addWidget( button[ICONIFY_IDX] );
- connect( button[ICONIFY_IDX], SIGNAL(clicked()),
- this, SLOT(minimize()) );
+ connect( button[ICONIFY_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(minimize()) );
}
break;
@@ -511,16 +511,16 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
new NextButton(this, "menu", NULL, 10, 10, i18n("Menu"), LeftButton|RightButton);
titleLayout->addWidget( button[MENU_IDX] );
// NOTE DIFFERENCE: capture pressed(), not clicked()
- connect( button[MENU_IDX], SIGNAL(pressed()),
- this, SLOT(menuButtonPressed()) );
+ connect( button[MENU_IDX], TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(menuButtonPressed()) );
break;
case 'L':
button[SHADE_IDX] =
new NextButton(this, "shade", NULL, 0, 0, i18n("Shade"));
titleLayout->addWidget( button[SHADE_IDX] );
- connect( button[SHADE_IDX], SIGNAL(clicked()),
- this, SLOT(shadeClicked()) );
+ connect( button[SHADE_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(shadeClicked()) );
// NOTE DIFFERENCE: set the pixmap separately (2 states)
shadeChange();
break;
@@ -529,8 +529,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
button[STICKY_IDX] =
new NextButton(this, "sticky", NULL, 0, 0, i18n("On all desktops"));
titleLayout->addWidget( button[STICKY_IDX] );
- connect( button[STICKY_IDX], SIGNAL(clicked()),
- this, SLOT(toggleOnAllDesktops()) );
+ connect( button[STICKY_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(toggleOnAllDesktops()) );
// NOTE DIFFERENCE: set the pixmap separately (2 states)
desktopChange();
break;
@@ -538,20 +538,20 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
case 'F':
button[ABOVE_IDX] = new NextButton(this, "above", NULL, 0, 0, "");
titleLayout->addWidget( button[ABOVE_IDX] );
- connect( button[ABOVE_IDX], SIGNAL(clicked()),
- this, SLOT(aboveClicked()) );
- connect(this, SIGNAL(keepAboveChanged(bool)),
- SLOT(keepAboveChange(bool)));
+ connect( button[ABOVE_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboveClicked()) );
+ connect(this, TQT_SIGNAL(keepAboveChanged(bool)),
+ TQT_SLOT(keepAboveChange(bool)));
keepAboveChange(keepAbove());
break;
case 'B':
button[BELOW_IDX] = new NextButton(this, "below", NULL, 0, 0, "");
titleLayout->addWidget( button[BELOW_IDX] );
- connect( button[BELOW_IDX], SIGNAL(clicked()),
- this, SLOT(belowClicked()) );
- connect(this, SIGNAL(keepBelowChanged(bool)),
- SLOT(keepBelowChange(bool)));
+ connect( button[BELOW_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(belowClicked()) );
+ connect(this, TQT_SIGNAL(keepBelowChanged(bool)),
+ TQT_SLOT(keepBelowChange(bool)));
keepBelowChange(keepBelow());
break;
@@ -561,8 +561,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
new NextButton(this, "close", close_bits, 10, 10,
i18n("Close"));
titleLayout->addWidget(button[CLOSE_IDX]);
- connect(button[CLOSE_IDX], SIGNAL(clicked()),
- this, SLOT(closeWindow()));
+ connect(button[CLOSE_IDX], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(closeWindow()));
}
break;
@@ -573,8 +573,8 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
i18n("Resize"));
titleLayout->addWidget(button[RESIZE_IDX]);
// NOTE DIFFERENCE: capture pressed(), not clicked()
- connect(button[RESIZE_IDX], SIGNAL(pressed()),
- this, SLOT(resizePressed()));
+ connect(button[RESIZE_IDX], TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(resizePressed()));
}
break;
case '_':
@@ -583,7 +583,7 @@ void NextClient::addButtons(QBoxLayout* titleLayout, const QString& spec)
default:
kdDebug() << " Can't happen: unknown button code "
- << QString(spec[i]);
+ << TQString(spec[i]);
break;
}
}
@@ -609,13 +609,13 @@ void NextClient::menuButtonPressed()
{
// Probably don't need this null check, but we might as well.
if (button[MENU_IDX]) {
- QRect menuRect = button[MENU_IDX]->rect();
- QPoint menuTop = button[MENU_IDX]->mapToGlobal(menuRect.topLeft());
- QPoint menuBottom = button[MENU_IDX]->mapToGlobal(menuRect.bottomRight());
- menuTop += QPoint(1, 1);
- menuBottom += QPoint(1, 1);
+ TQRect menuRect = button[MENU_IDX]->rect();
+ TQPoint menuTop = button[MENU_IDX]->mapToGlobal(menuRect.topLeft());
+ TQPoint menuBottom = button[MENU_IDX]->mapToGlobal(menuRect.bottomRight());
+ menuTop += TQPoint(1, 1);
+ menuBottom += TQPoint(1, 1);
KDecorationFactory* f = factory();
- showWindowMenu(QRect(menuTop, menuBottom));
+ showWindowMenu(TQRect(menuTop, menuBottom));
if( !f->exists( this )) // 'this' was deleted
return;
button[MENU_IDX]->setDown(false);
@@ -652,17 +652,17 @@ void NextClient::resizePressed()
performWindowOperation(ResizeOp);
}
-void NextClient::resizeEvent(QResizeEvent *)
+void NextClient::resizeEvent(TQResizeEvent *)
{
if (widget()->isVisible()) {
// TODO ? update border area only?
widget()->update();
#if 0
widget()->update(titlebar->geometry());
- QPainter p(widget());
- QRect t = titlebar->geometry();
+ TQPainter p(widget());
+ TQRect t = titlebar->geometry();
t.setTop( 0 );
- QRegion r = widget()->rect();
+ TQRegion r = widget()->rect();
r = r.subtract( t );
p.setClipRegion( r );
p.eraseRect(widget()->rect());
@@ -676,17 +676,17 @@ void NextClient::captionChange()
}
-void NextClient::paintEvent( QPaintEvent* )
+void NextClient::paintEvent( TQPaintEvent* )
{
- QPainter p(widget());
+ TQPainter p(widget());
// Draw black frame
- QRect fr = widget()->rect();
+ TQRect fr = widget()->rect();
p.setPen(Qt::black);
p.drawRect(fr);
// Draw title bar
- QRect t = titlebar->geometry();
+ TQRect t = titlebar->geometry();
t.setTop(1);
p.drawTiledPixmap(t.x()+1, t.y()+1, t.width()-2, t.height()-2,
isActive() ? *aTitlePix : *iTitlePix);
@@ -696,7 +696,7 @@ void NextClient::paintEvent( QPaintEvent* )
#if 0
// Why setting up a clipping region if it is not used? (setClipping(false))
- QRegion r = fr;
+ TQRegion r = fr;
r = r.subtract( t );
p.setClipRegion( r );
p.setClipping(false);
@@ -739,19 +739,19 @@ void NextClient::paintEvent( QPaintEvent* )
}
}
-void NextClient::mouseDoubleClickEvent( QMouseEvent * e )
+void NextClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if (e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
}
-void NextClient::wheelEvent( QWheelEvent * e )
+void NextClient::wheelEvent( TQWheelEvent * e )
{
- if (isSetShade() || QRect( 0, 0, width(), titleHeight ).contains( e->pos() ) )
+ if (isSetShade() || TQRect( 0, 0, width(), titleHeight ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
-void NextClient::showEvent(QShowEvent *)
+void NextClient::showEvent(TQShowEvent *)
{
widget()->repaint();
}
@@ -761,8 +761,8 @@ void NextClient::desktopChange()
bool on = isOnAllDesktops();
if (NextButton * b = button[STICKY_IDX]) {
b->setBitmap( on ? unsticky_bits : sticky_bits, 10, 10);
- QToolTip::remove(b);
- QToolTip::add(b, on ? i18n("Not on all desktops") : i18n("On all desktops"));
+ TQToolTip::remove(b);
+ TQToolTip::add(b, on ? i18n("Not on all desktops") : i18n("On all desktops"));
}
}
@@ -771,12 +771,12 @@ void NextClient::maximizeChange()
if (button[MAXIMIZE_IDX]) {
bool m = maximizeMode() == MaximizeFull;
//button[MAXIMIZE_IDX]->setBitmap(m ? minmax_bits : maximize_bits);
- QToolTip::remove(button[MAXIMIZE_IDX]);
- QToolTip::add(button[MAXIMIZE_IDX],
+ TQToolTip::remove(button[MAXIMIZE_IDX]);
+ TQToolTip::add(button[MAXIMIZE_IDX],
m ? i18n("Restore") : i18n("Maximize"));
}
//spacer->changeSize(10, mustDrawHandle() ? handleSize : 1,
- // QSizePolicy::Expanding, QSizePolicy::Minimum);
+ // TQSizePolicy::Expanding, TQSizePolicy::Minimum);
//mainLayout->activate();
}
@@ -796,7 +796,7 @@ void NextClient::slotReset()
}
KDecoration::Position
-NextClient::mousePosition( const QPoint& p ) const
+NextClient::mousePosition( const TQPoint& p ) const
{
Position m = PositionCenter;
@@ -827,8 +827,8 @@ void NextClient::shadeChange()
{
if (NextButton *b = button[SHADE_IDX]) {
b->setBitmap(isSetShade() ? unshade_bits : shade_bits, 10, 10);
- QToolTip::remove(b);
- QToolTip::add(b, isSetShade() ? i18n("Unshade") : i18n("Shade"));
+ TQToolTip::remove(b);
+ TQToolTip::add(b, isSetShade() ? i18n("Unshade") : i18n("Shade"));
}
}
@@ -836,8 +836,8 @@ void NextClient::keepAboveChange(bool above)
{
if (NextButton *b = button[ABOVE_IDX]) {
b->setBitmap(above ? from_above_bits : keep_above_bits, 10, 10);
- QToolTip::remove(b);
- QToolTip::add(b, above ?
+ TQToolTip::remove(b);
+ TQToolTip::add(b, above ?
i18n("Do not keep above others") : i18n("Keep above others"));
b->repaint(false);
}
@@ -847,19 +847,19 @@ void NextClient::keepBelowChange(bool below)
{
if (NextButton *b = button[BELOW_IDX]) {
b->setBitmap(below ? from_below_bits : keep_below_bits, 10, 10);
- QToolTip::remove(b);
- QToolTip::add(b, below ?
+ TQToolTip::remove(b);
+ TQToolTip::add(b, below ?
i18n("Do not keep below others") : i18n("Keep below others"));
b->repaint(false);
}
}
-QSize NextClient::minimumSize() const
+TQSize NextClient::minimumSize() const
{
- return QSize(titleHeight * 6 + 2, titleHeight + handleSize + 2);
+ return TQSize(titleHeight * 6 + 2, titleHeight + handleSize + 2);
}
-void NextClient::resize(const QSize& s)
+void NextClient::resize(const TQSize& s)
{
widget()->resize(s);
}
@@ -873,28 +873,28 @@ void NextClient::reset(unsigned long)
widget()->repaint();
}
-bool NextClient::eventFilter(QObject *o, QEvent *e)
+bool NextClient::eventFilter(TQObject *o, TQEvent *e)
{
if (o != widget())
return false;
switch (e->type()) {
- case QEvent::Resize:
- resizeEvent(static_cast< QResizeEvent* >( e ));
+ case TQEvent::Resize:
+ resizeEvent(static_cast< TQResizeEvent* >( e ));
return true;
- case QEvent::Paint:
- paintEvent(static_cast< QPaintEvent* >( e ));
+ case TQEvent::Paint:
+ paintEvent(static_cast< TQPaintEvent* >( e ));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent(static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent(static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::Show:
- showEvent(static_cast< QShowEvent* >( e ));
+ case TQEvent::Show:
+ showEvent(static_cast< TQShowEvent* >( e ));
return true;
default:
break;
@@ -902,10 +902,10 @@ bool NextClient::eventFilter(QObject *o, QEvent *e)
return false;
}
-bool NextClient::drawbound(const QRect& geom, bool /* clear */)
+bool NextClient::drawbound(const TQRect& geom, bool /* clear */)
{
- QPainter p(workspaceWidget());
- p.setPen(QPen(Qt::white, 3));
+ TQPainter p(workspaceWidget());
+ p.setPen(TQPen(Qt::white, 3));
p.setRasterOp(Qt::XorROP);
p.drawRect(geom);
int leftMargin = geom.left() + 2;
@@ -966,11 +966,11 @@ bool NextClientFactory::supports( Ability ability )
};
}
-QValueList< NextClientFactory::BorderSize >
+TQValueList< NextClientFactory::BorderSize >
NextClientFactory::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderTiny << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderTiny << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge <<
BorderVeryHuge << BorderOversized;
}
diff --git a/kwin-styles/kstep/nextclient.h b/kwin-styles/kstep/nextclient.h
index dc0470c8..9eff9621 100644
--- a/kwin-styles/kstep/nextclient.h
+++ b/kwin-styles/kstep/nextclient.h
@@ -1,11 +1,11 @@
#ifndef __NEXTCLIENT_H
#define __NEXTCLIENT_H
-#include <qvariant.h>
-#include <qbitmap.h>
+#include <tqvariant.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
-#include <qlayout.h>
-#include <qbutton.h>
+#include <tqlayout.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -21,19 +21,19 @@ class NextButton : public QButton
public:
NextButton(NextClient *parent=0, const char *name=0,
const unsigned char *bitmap=NULL, int bw=0, int bh=0,
- const QString& tip=NULL, const int realizeBtns = LeftButton);
+ const TQString& tip=NULL, const int realizeBtns = LeftButton);
void setBitmap(const unsigned char *bitmap, int bw, int bh);
void reset();
ButtonState lastButton() { return last_button; }
protected:
- void mousePressEvent( QMouseEvent* e );
- void mouseReleaseEvent( QMouseEvent* e );
- virtual void drawButton(QPainter *p);
- void drawButtonLabel(QPainter *){;}
+ void mousePressEvent( TQMouseEvent* e );
+ void mouseReleaseEvent( TQMouseEvent* e );
+ virtual void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter *){;}
KPixmap aBackground, iBackground;
- QBitmap* deco;
+ TQBitmap* deco;
NextClient *client;
ButtonState last_button;
int realizeButtons;
@@ -46,28 +46,28 @@ public:
NextClient(KDecorationBridge *b, KDecorationFactory *f);
~NextClient() {;}
void init();
- virtual bool drawbound(const QRect& geom, bool clear);
+ virtual bool drawbound(const TQRect& geom, bool clear);
protected:
- bool eventFilter(QObject *o, QEvent *e);
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
- void showEvent( QShowEvent* );
+ bool eventFilter(TQObject *o, TQEvent *e);
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent( QWheelEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent( TQWheelEvent * );
void captionChange();
void desktopChange();
void activeChange();
void shadeChange();
void iconChange();
- QSize minimumSize() const;
- void resize(const QSize &size);
+ TQSize minimumSize() const;
+ void resize(const TQSize &size);
void borders(int &left, int &right, int &top, int &bottom) const;
void reset(unsigned long changed);
void calcHiddenButtons();
void updateActiveBuffer();
- Position mousePosition(const QPoint &) const;
+ Position mousePosition(const TQPoint &) const;
void maximizeChange();
protected slots:
@@ -83,11 +83,11 @@ protected slots:
void keepBelowChange(bool below);
private:
- void initializeButtonsAndTitlebar(QBoxLayout* titleLayout);
- void addButtons(QBoxLayout* titleLayout, const QString& buttons);
+ void initializeButtonsAndTitlebar(TQBoxLayout* titleLayout);
+ void addButtons(TQBoxLayout* titleLayout, const TQString& buttons);
bool mustDrawHandle() const;
- QSpacerItem* titlebar;
+ TQSpacerItem* titlebar;
// Helpful constants for buttons in array
enum { CLOSE_IDX = 0,
@@ -107,7 +107,7 @@ private:
NextButton* button[MAX_NUM_BUTTONS];
};
-class NextClientFactory: public QObject, public KDecorationFactory
+class NextClientFactory: public TQObject, public KDecorationFactory
{
public:
NextClientFactory();
@@ -116,7 +116,7 @@ public:
virtual bool reset(unsigned long changed);
virtual bool supports( Ability ability );
- QValueList< NextClientFactory::BorderSize > borderSizes() const;
+ TQValueList< NextClientFactory::BorderSize > borderSizes() const;
};
diff --git a/kwin-styles/openlook/OpenLook.cpp b/kwin-styles/openlook/OpenLook.cpp
index 0f31a6ec..d3f2b190 100644
--- a/kwin-styles/openlook/OpenLook.cpp
+++ b/kwin-styles/openlook/OpenLook.cpp
@@ -26,13 +26,13 @@
#include <unistd.h> // for usleep
#include <math.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qtoolbutton.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqtoolbutton.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <klocale.h>
@@ -86,11 +86,11 @@ bool DecorationFactory::supports( Ability ability )
};
}
-QValueList< DecorationFactory::BorderSize >
+TQValueList< DecorationFactory::BorderSize >
DecorationFactory::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge <<
BorderVeryHuge << BorderOversized;
}
@@ -124,7 +124,7 @@ void OpenLook::init()
widget()->setBackgroundMode(NoBackground);
NET::WindowType type = windowType(SUPPORTED_WINDOW_TYPES_MASK);
tool_ = (type == NET::Toolbar || type == NET::Utility || type == NET::Menu);
- QFontMetrics fm(options()->font(isActive(), tool_));
+ TQFontMetrics fm(options()->font(isActive(), tool_));
titleHeight = fm.height() + openLookTextVMargin * 2;
@@ -160,35 +160,35 @@ OpenLook::~OpenLook()
// Empty.
}
-bool OpenLook::eventFilter(QObject *o, QEvent *e)
+bool OpenLook::eventFilter(TQObject *o, TQEvent *e)
{
if (o != widget()) return false;
switch (e->type()) {
- case QEvent::Resize:
- resizeEvent(static_cast< QResizeEvent* >(e));
+ case TQEvent::Resize:
+ resizeEvent(static_cast< TQResizeEvent* >(e));
return true;
- case QEvent::Paint:
- paintEvent(static_cast< QPaintEvent* >(e));
+ case TQEvent::Paint:
+ paintEvent(static_cast< TQPaintEvent* >(e));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast< QMouseEvent* >(e));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast< TQMouseEvent* >(e));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
- case QEvent::MouseButtonPress:
- if (!isButtonPress(static_cast< QMouseEvent* >(e))) {
- processMousePressEvent(static_cast< QMouseEvent* >(e));
+ case TQEvent::MouseButtonPress:
+ if (!isButtonPress(static_cast< TQMouseEvent* >(e))) {
+ processMousePressEvent(static_cast< TQMouseEvent* >(e));
}
return true;
- case QEvent::MouseButtonRelease:
- if (isButtonRelease(static_cast< QMouseEvent* >(e))) {
+ case TQEvent::MouseButtonRelease:
+ if (isButtonRelease(static_cast< TQMouseEvent* >(e))) {
return true;
} else {
return false;
}
- case QEvent::Show:
- showEvent(static_cast< QShowEvent* >(e));
+ case TQEvent::Show:
+ showEvent(static_cast< TQShowEvent* >(e));
return true;
default:
break;
@@ -215,28 +215,28 @@ OpenLook::shadeChange()
{
}
-QSize OpenLook::minimumSize() const
+TQSize OpenLook::minimumSize() const
{
int left, right, top, bottom;
borders(left, right, top, bottom);
- return QSize(left + right + 2 * titleHeight, top + bottom);
+ return TQSize(left + right + 2 * titleHeight, top + bottom);
}
void
-OpenLook::resize(const QSize& s)
+OpenLook::resize(const TQSize& s)
{
widget()->resize(s);
widget()->repaint(); //there is some strange wrong repaint of the frame without
}
void
-OpenLook::paintEvent(QPaintEvent * pe)
+OpenLook::paintEvent(TQPaintEvent * pe)
{
- QRect tr(titleRect());
+ TQRect tr(titleRect());
- QPainter p(widget());
+ TQPainter p(widget());
- QRegion clipRegion(pe->region());
+ TQRegion clipRegion(pe->region());
p.setClipRegion(clipRegion);
@@ -249,12 +249,12 @@ OpenLook::paintEvent(QPaintEvent * pe)
p.setClipRegion(clipRegion + buttonRect());
- QBrush titleBackground(options()->color(KDecoration::ColorTitleBar, true));
+ TQBrush titleBackground(options()->color(KDecoration::ColorTitleBar, true));
if (isActive())
qDrawShadePanel(&p, tr, widget()->colorGroup(), true, 1, &titleBackground);
else
- p.fillRect(tr, widget()->colorGroup().brush(QColorGroup::Background));
+ p.fillRect(tr, widget()->colorGroup().brush(TQColorGroup::Background));
p.setClipRegion(clipRegion);
@@ -270,13 +270,13 @@ OpenLook::paintEvent(QPaintEvent * pe)
}
void
-OpenLook::showEvent(QShowEvent *)
+OpenLook::showEvent(TQShowEvent *)
{
widget()->repaint();
}
void
-OpenLook::mouseDoubleClickEvent(QMouseEvent * e)
+OpenLook::mouseDoubleClickEvent(TQMouseEvent * e)
{
if (e->button() == LeftButton && titleRect().contains(e->pos()))
{
@@ -285,7 +285,7 @@ OpenLook::mouseDoubleClickEvent(QMouseEvent * e)
}
void
-OpenLook::wheelEvent(QWheelEvent *e)
+OpenLook::wheelEvent(TQWheelEvent *e)
{
if (isSetShade() || titleRect().contains(e->pos()))
{
@@ -294,7 +294,7 @@ OpenLook::wheelEvent(QWheelEvent *e)
}
void
-OpenLook::resizeEvent(QResizeEvent* e)
+OpenLook::resizeEvent(TQResizeEvent* e)
{
widget()->update();
}
@@ -306,7 +306,7 @@ OpenLook::activeChange()
}
KDecoration::Position
-OpenLook::mousePosition(const QPoint & p) const
+OpenLook::mousePosition(const TQPoint & p) const
{
if (topLeftRect().contains(p))
return PositionTopLeft;
@@ -339,31 +339,31 @@ OpenLook::maximizeChange()
void
OpenLook::doLayout()
{
- QVBoxLayout * layout = new QVBoxLayout(widget(), openLookMargin);
+ TQVBoxLayout * layout = new TQVBoxLayout(widget(), openLookMargin);
titleSpacer_ =
new QSpacerItem
(
0,
titleHeight,
- QSizePolicy::Expanding,
- QSizePolicy::Fixed
+ TQSizePolicy::Expanding,
+ TQSizePolicy::Fixed
);
layout->addItem(titleSpacer_);
layout->addSpacing(2);
- QBoxLayout * midLayout =
- new QBoxLayout(layout, QBoxLayout::LeftToRight, 0, 0);
+ TQBoxLayout * midLayout =
+ new TQBoxLayout(layout, TQBoxLayout::LeftToRight, 0, 0);
if (isPreview()) {
- midLayout->addWidget(new QLabel(
+ midLayout->addWidget(new TQLabel(
i18n("<center><b>OpenLook preview</b></center>"),
widget()),
1);
} else {
- midLayout->addItem( new QSpacerItem( 0, 0 ));
+ midLayout->addItem( new TQSpacerItem( 0, 0 ));
}
}
@@ -372,21 +372,21 @@ OpenLook::doLayout()
OpenLook::animateMinimize(bool /*iconify*/)
{
#if 0
- QRect icongeom(iconGeometry());
+ TQRect icongeom(iconGeometry());
if (!icongeom.isValid())
return false;
- QRect wingeom(geometry());
+ TQRect wingeom(geometry());
- QPainter p(workspaceWidget());
+ TQPainter p(workspaceWidget());
p.setRasterOp(Qt::NotROP);
#if 0
if (iconify)
p.setClipRegion(
- QRegion(workspace()->desktopWidget()->rect()) - wingeom
+ TQRegion(workspace()->desktopWidget()->rect()) - wingeom
);
#endif
@@ -471,11 +471,11 @@ OpenLook::bottomRightRect() const
}
void
-OpenLook::paintTopLeftRect(QPainter & p) const
+OpenLook::paintTopLeftRect(TQPainter & p) const
{
- QColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
+ TQColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
- QRect r(topLeftRect());
+ TQRect r(topLeftRect());
int x1(r.left());
int y1(r.top());
@@ -502,11 +502,11 @@ OpenLook::paintTopLeftRect(QPainter & p) const
}
void
-OpenLook::paintTopRightRect(QPainter & p) const
+OpenLook::paintTopRightRect(TQPainter & p) const
{
- QColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
+ TQColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
- QRect r(topRightRect());
+ TQRect r(topRightRect());
int x1(r.left());
int y1(r.top());
@@ -530,11 +530,11 @@ OpenLook::paintTopRightRect(QPainter & p) const
}
void
-OpenLook::paintBottomLeftRect(QPainter & p) const
+OpenLook::paintBottomLeftRect(TQPainter & p) const
{
- QColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
+ TQColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
- QRect r(bottomLeftRect());
+ TQRect r(bottomLeftRect());
int x1(r.left());
int y1(r.top());
@@ -558,11 +558,11 @@ OpenLook::paintBottomLeftRect(QPainter & p) const
}
void
-OpenLook::paintBottomRightRect(QPainter & p) const
+OpenLook::paintBottomRightRect(TQPainter & p) const
{
- QColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
+ TQColor handleColour(options()->color(KDecoration::ColorHandle, isActive()));
- QRect r(bottomRightRect());
+ TQRect r(bottomRightRect());
int x1(r.left());
int y1(r.top());
@@ -598,9 +598,9 @@ OpenLook::buttonRect() const
}
void
-OpenLook::paintButton(QPainter & p) const
+OpenLook::paintButton(TQPainter & p) const
{
- QRect r(buttonRect());
+ TQRect r(buttonRect());
p.fillRect
(
@@ -627,16 +627,16 @@ OpenLook::paintButton(QPainter & p) const
}
void
-OpenLook::paintArrow(QPainter & p) const
+OpenLook::paintArrow(TQPainter & p) const
{
- QRect br(buttonRect());
+ TQRect br(buttonRect());
int x = br.left() + 5;
int y = br.top() + 5;
int w = br.width() - 10;
int h = br.height() - 10;
- QPointArray poly(3);
+ TQPointArray poly(3);
p.setBrush(widget()->colorGroup().mid());
@@ -658,7 +658,7 @@ OpenLook::paintArrow(QPainter & p) const
}
void
-OpenLook::paintBorder(QPainter & p) const
+OpenLook::paintBorder(TQPainter & p) const
{
const uint cs(openLookCornerSize);
@@ -674,7 +674,7 @@ OpenLook::paintBorder(QPainter & p) const
p.fillRect(x, y + cs, 2, h - cs - cs, widget()->colorGroup().shadow());
p.fillRect(r - 1, y + cs, 2, h - cs - cs, widget()->colorGroup().shadow());
- QColor frameColour(options()->color(KDecoration::ColorFrame, isActive()));
+ TQColor frameColour(options()->color(KDecoration::ColorFrame, isActive()));
p.fillRect(x + cs, y + 2, w - cs - cs, openLookMargin-2, frameColour);
p.fillRect(x + cs, b - openLookMargin + 1, w - cs - cs, openLookMargin-2, frameColour);
@@ -698,7 +698,7 @@ OpenLook::titleRect() const
}
bool
-OpenLook::isButtonPress(QMouseEvent * e)
+OpenLook::isButtonPress(TQMouseEvent * e)
{
mousePressPoint_ = e->pos();
@@ -709,7 +709,7 @@ OpenLook::isButtonPress(QMouseEvent * e)
}
bool
-OpenLook::isButtonRelease(QMouseEvent * e)
+OpenLook::isButtonRelease(TQMouseEvent * e)
{
if (buttonDown_ && buttonRect().contains(e->pos()))
{
diff --git a/kwin-styles/openlook/OpenLook.h b/kwin-styles/openlook/OpenLook.h
index 698dec4d..900ccb54 100644
--- a/kwin-styles/openlook/OpenLook.h
+++ b/kwin-styles/openlook/OpenLook.h
@@ -25,8 +25,8 @@
#ifndef KWIN_WEB_H
#define KWIN_WEB_H
-#include <qptrlist.h>
-#include <qbutton.h>
+#include <tqptrlist.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -47,10 +47,10 @@ namespace OpenLook
void init();
protected:
- bool eventFilter(QObject *o, QEvent *e);
- void resizeEvent(QResizeEvent *e);
- void paintEvent(QPaintEvent *e);
- void showEvent(QShowEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
+ void resizeEvent(TQResizeEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void showEvent(TQShowEvent *e);
virtual void captionChange();
void desktopChange();
@@ -59,47 +59,47 @@ namespace OpenLook
void iconChange();
void maximizeChange();
void borders(int &left, int &right, int &top, int &bottom) const;
- QSize minimumSize() const;
- void resize( const QSize& );
- virtual void mouseDoubleClickEvent(QMouseEvent *);
- virtual void wheelEvent(QWheelEvent *e);
+ TQSize minimumSize() const;
+ void resize( const TQSize& );
+ virtual void mouseDoubleClickEvent(TQMouseEvent *);
+ virtual void wheelEvent(TQWheelEvent *e);
- virtual Position mousePosition(const QPoint &) const;
+ virtual Position mousePosition(const TQPoint &) const;
virtual bool animateMinimize(bool);
private:
void doLayout();
- QRect titleRect() const;
+ TQRect titleRect() const;
- QRect topLeftRect() const;
- QRect topRightRect() const;
- QRect bottomLeftRect() const;
- QRect bottomRightRect() const;
+ TQRect topLeftRect() const;
+ TQRect topRightRect() const;
+ TQRect bottomLeftRect() const;
+ TQRect bottomRightRect() const;
- QRect buttonRect() const;
+ TQRect buttonRect() const;
- void paintBorder(QPainter &) const;
+ void paintBorder(TQPainter &) const;
- void paintTopLeftRect(QPainter &) const;
- void paintTopRightRect(QPainter &) const;
- void paintBottomLeftRect(QPainter &) const;
- void paintBottomRightRect(QPainter &) const;
+ void paintTopLeftRect(TQPainter &) const;
+ void paintTopRightRect(TQPainter &) const;
+ void paintBottomLeftRect(TQPainter &) const;
+ void paintBottomRightRect(TQPainter &) const;
- void paintButton(QPainter &) const;
- void paintArrow(QPainter &) const;
+ void paintButton(TQPainter &) const;
+ void paintArrow(TQPainter &) const;
- bool isButtonPress(QMouseEvent *);
- bool isButtonRelease(QMouseEvent *);
+ bool isButtonPress(TQMouseEvent *);
+ bool isButtonRelease(TQMouseEvent *);
- QSpacerItem * titleSpacer_;
- QPoint mousePressPoint_;
+ TQSpacerItem * titleSpacer_;
+ TQPoint mousePressPoint_;
bool tool_;
bool buttonDown_;
};
- class DecorationFactory: public QObject, public KDecorationFactory
+ class DecorationFactory: public TQObject, public KDecorationFactory
{
public:
DecorationFactory();
@@ -107,7 +107,7 @@ namespace OpenLook
virtual KDecoration *createDecoration(KDecorationBridge *);
virtual bool reset(unsigned long changed);
virtual bool supports( Ability ability );
- QValueList< DecorationFactory::BorderSize > borderSizes() const;
+ TQValueList< DecorationFactory::BorderSize > borderSizes() const;
};
}
diff --git a/kwin-styles/riscos/AboveButton.cpp b/kwin-styles/riscos/AboveButton.cpp
index 738b7f79..7b66e3ba 100644
--- a/kwin-styles/riscos/AboveButton.cpp
+++ b/kwin-styles/riscos/AboveButton.cpp
@@ -44,13 +44,13 @@ static const char * const above_xpm[] = {
" ..... ",
" "};
-AboveButton::AboveButton(QWidget *parent)
+AboveButton::AboveButton(TQWidget *parent)
: Button(parent, i18n("Keep above others"))
{
- setPixmap(QPixmap((const char **)above_xpm));
+ setPixmap(TQPixmap((const char **)above_xpm));
}
-void AboveButton::mouseReleaseEvent(QMouseEvent *e)
+void AboveButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/AboveButton.h b/kwin-styles/riscos/AboveButton.h
index b7a910ec..9ea0e005 100644
--- a/kwin-styles/riscos/AboveButton.h
+++ b/kwin-styles/riscos/AboveButton.h
@@ -34,7 +34,7 @@ class AboveButton : public Button
public:
- AboveButton(QWidget *parent);
+ AboveButton(TQWidget *parent);
signals:
@@ -42,7 +42,7 @@ class AboveButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
};
} // End namespace
diff --git a/kwin-styles/riscos/Button.cpp b/kwin-styles/riscos/Button.cpp
index d4da6ecc..d126ced1 100644
--- a/kwin-styles/riscos/Button.cpp
+++ b/kwin-styles/riscos/Button.cpp
@@ -20,23 +20,23 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "Button.h"
#include "Static.h"
namespace RiscOS
{
-Button::Button(QWidget *parent, const QString& tip,
+Button::Button(TQWidget *parent, const TQString& tip,
const ButtonState realizeButtons)
- : QWidget(parent, "Button", 0),
+ : TQWidget(parent, "Button", 0),
realizeButtons_(realizeButtons),
lastButton_(NoButton),
alignment_(Left),
down_ (false),
active_ (false)
{
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
setBackgroundColor(Qt::black);
setFixedSize(Static::instance()->titleHeight() - 1,
@@ -65,32 +65,32 @@ Button::Alignment Button::alignment() const
return alignment_;
}
-void Button::mousePressEvent(QMouseEvent *e)
+void Button::mousePressEvent(TQMouseEvent *e)
{
down_ = true;
lastButton_ = e->button();
repaint();
- QMouseEvent me(e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons_) ? LeftButton : NoButton,
e->state());
- QWidget::mousePressEvent(&me);
+ TQWidget::mousePressEvent(&me);
}
-void Button::mouseReleaseEvent(QMouseEvent *e)
+void Button::mouseReleaseEvent(TQMouseEvent *e)
{
down_ = false;
lastButton_ = e->button();
repaint();
- QMouseEvent me(e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons_) ? LeftButton : NoButton,
e->state());
- QWidget::mouseReleaseEvent(&me);
+ TQWidget::mouseReleaseEvent(&me);
}
-void Button::setPixmap(const QPixmap &p)
+void Button::setPixmap(const TQPixmap &p)
{
- if (QPixmap::defaultDepth() <= 8)
+ if (TQPixmap::defaultDepth() <= 8)
aPixmap_ = iPixmap_ = p;
else
{
@@ -98,8 +98,8 @@ void Button::setPixmap(const QPixmap &p)
QRgb* data = NULL;
QRgb w = qRgb(255, 255, 255);
- QImage aTx(p.convertToImage());
- QImage iTx(aTx.copy());
+ TQImage aTx(p.convertToImage());
+ TQImage iTx(aTx.copy());
const KDecorationOptions* options = KDecoration::options();
light = options->color(KDecoration::ColorButtonBg, true).light(150).rgb();
@@ -136,7 +136,7 @@ void Button::setPixmap(const QPixmap &p)
repaint();
}
-void Button::paintEvent(QPaintEvent *)
+void Button::paintEvent(TQPaintEvent *)
{
bitBlt(this, alignment_ == Left ? 1 : 0, 0,
&Static::instance()->buttonBase(active_, down_));
diff --git a/kwin-styles/riscos/Button.h b/kwin-styles/riscos/Button.h
index 1289a2fa..fc29e205 100644
--- a/kwin-styles/riscos/Button.h
+++ b/kwin-styles/riscos/Button.h
@@ -23,8 +23,8 @@
#ifndef RISC_OS_BUTTON_H
#define RISC_OS_BUTTON_H
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
#include <klocale.h>
#include <kdecoration.h>
@@ -41,7 +41,7 @@ class Button : public QWidget
enum Alignment { Left, Right };
- Button(QWidget *parent, const QString &tip,
+ Button(TQWidget *parent, const TQString &tip,
const ButtonState realizeButton = LeftButton);
virtual ~Button();
@@ -55,13 +55,13 @@ class Button : public QWidget
protected:
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
- void mousePressEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
- void mouseMoveEvent(QMouseEvent *) { /* Empty. */ }
+ void mousePressEvent(TQMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
+ void mouseMoveEvent(TQMouseEvent *) { /* Empty. */ }
- void setPixmap(const QPixmap &);
+ void setPixmap(const TQPixmap &);
ButtonState realizeButtons_;
ButtonState lastButton_;
@@ -71,7 +71,7 @@ class Button : public QWidget
Alignment alignment_;
bool down_;
bool active_;
- QPixmap aPixmap_, iPixmap_;
+ TQPixmap aPixmap_, iPixmap_;
};
} // End namespace
diff --git a/kwin-styles/riscos/CloseButton.cpp b/kwin-styles/riscos/CloseButton.cpp
index 4f2066cf..1a4c06b5 100644
--- a/kwin-styles/riscos/CloseButton.cpp
+++ b/kwin-styles/riscos/CloseButton.cpp
@@ -44,13 +44,13 @@ static const char * const close_xpm[] = {
" .+. .+. ",
" . . "};
-CloseButton::CloseButton(QWidget *parent)
+CloseButton::CloseButton(TQWidget *parent)
: Button(parent, i18n("Close"))
{
- setPixmap(QPixmap((const char **)close_xpm));
+ setPixmap(TQPixmap((const char **)close_xpm));
}
-void CloseButton::mouseReleaseEvent(QMouseEvent *e)
+void CloseButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/CloseButton.h b/kwin-styles/riscos/CloseButton.h
index 73791b76..b9173c14 100644
--- a/kwin-styles/riscos/CloseButton.h
+++ b/kwin-styles/riscos/CloseButton.h
@@ -34,7 +34,7 @@ class CloseButton : public Button
public:
- CloseButton(QWidget *parent);
+ CloseButton(TQWidget *parent);
signals:
@@ -42,7 +42,7 @@ class CloseButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
};
} // End namespace;
diff --git a/kwin-styles/riscos/HelpButton.cpp b/kwin-styles/riscos/HelpButton.cpp
index a3d36668..936738eb 100644
--- a/kwin-styles/riscos/HelpButton.cpp
+++ b/kwin-styles/riscos/HelpButton.cpp
@@ -44,13 +44,13 @@ static const char * const help_xpm[] = {
" + ++ ",
" ++ "};
-HelpButton::HelpButton(QWidget *parent)
+HelpButton::HelpButton(TQWidget *parent)
: Button(parent, i18n("Help"))
{
- setPixmap(QPixmap((const char **)help_xpm));
+ setPixmap(TQPixmap((const char **)help_xpm));
}
-void HelpButton::mouseReleaseEvent(QMouseEvent *e)
+void HelpButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/HelpButton.h b/kwin-styles/riscos/HelpButton.h
index 89d76453..f825a05b 100644
--- a/kwin-styles/riscos/HelpButton.h
+++ b/kwin-styles/riscos/HelpButton.h
@@ -34,7 +34,7 @@ class HelpButton : public Button
public:
- HelpButton(QWidget *parent);
+ HelpButton(TQWidget *parent);
signals:
@@ -42,7 +42,7 @@ class HelpButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
};
} // End namespace;
diff --git a/kwin-styles/riscos/IconifyButton.cpp b/kwin-styles/riscos/IconifyButton.cpp
index 760194f5..b5eef9e5 100644
--- a/kwin-styles/riscos/IconifyButton.cpp
+++ b/kwin-styles/riscos/IconifyButton.cpp
@@ -44,13 +44,13 @@ static const char * const iconify_xpm[] = {
" ",
" "};
-IconifyButton::IconifyButton(QWidget *parent)
+IconifyButton::IconifyButton(TQWidget *parent)
: Button(parent, i18n("Minimize"))
{
- setPixmap(QPixmap((const char **)iconify_xpm));
+ setPixmap(TQPixmap((const char **)iconify_xpm));
}
-void IconifyButton::mouseReleaseEvent(QMouseEvent *e)
+void IconifyButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/IconifyButton.h b/kwin-styles/riscos/IconifyButton.h
index 9c940713..8f757cb4 100644
--- a/kwin-styles/riscos/IconifyButton.h
+++ b/kwin-styles/riscos/IconifyButton.h
@@ -34,7 +34,7 @@ class IconifyButton : public Button
public:
- IconifyButton(QWidget *parent);
+ IconifyButton(TQWidget *parent);
signals:
@@ -42,7 +42,7 @@ class IconifyButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
};
} // End namespace;
diff --git a/kwin-styles/riscos/LowerButton.cpp b/kwin-styles/riscos/LowerButton.cpp
index a14c6149..7f03e41f 100644
--- a/kwin-styles/riscos/LowerButton.cpp
+++ b/kwin-styles/riscos/LowerButton.cpp
@@ -44,13 +44,13 @@ static const char * const lower_xpm[] = {
" ..... ",
" "};
-LowerButton::LowerButton(QWidget *parent)
+LowerButton::LowerButton(TQWidget *parent)
: Button(parent, i18n("Keep below others"))
{
- setPixmap(QPixmap((const char **)lower_xpm));
+ setPixmap(TQPixmap((const char **)lower_xpm));
}
-void LowerButton::mouseReleaseEvent(QMouseEvent *e)
+void LowerButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/LowerButton.h b/kwin-styles/riscos/LowerButton.h
index ec5ab474..f3fc4df1 100644
--- a/kwin-styles/riscos/LowerButton.h
+++ b/kwin-styles/riscos/LowerButton.h
@@ -34,7 +34,7 @@ class LowerButton : public Button
public:
- LowerButton(QWidget *parent);
+ LowerButton(TQWidget *parent);
signals:
@@ -42,7 +42,7 @@ class LowerButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
};
} // End namespace;
diff --git a/kwin-styles/riscos/Manager.cpp b/kwin-styles/riscos/Manager.cpp
index a890ac63..c4b77f0a 100644
--- a/kwin-styles/riscos/Manager.cpp
+++ b/kwin-styles/riscos/Manager.cpp
@@ -24,11 +24,11 @@
#include <config.h> // for usleep on non-linux platforms
#include <math.h> // for sin and cos
-#include <qapplication.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include <netwm.h>
@@ -80,37 +80,37 @@ void Manager::init()
resetLayout();
}
-bool Manager::eventFilter(QObject *o, QEvent *e)
+bool Manager::eventFilter(TQObject *o, TQEvent *e)
{
if (o != widget()) return false;
switch (e->type())
{
- case QEvent::Resize:
- resizeEvent(static_cast<QResizeEvent*>(e));
+ case TQEvent::Resize:
+ resizeEvent(static_cast<TQResizeEvent*>(e));
return true;
- case QEvent::Paint:
- paintEvent(static_cast<QPaintEvent*>(e));
+ case TQEvent::Paint:
+ paintEvent(static_cast<TQPaintEvent*>(e));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<QMouseEvent*>(e));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent(static_cast<QMouseEvent*>(e));
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent(static_cast<TQMouseEvent*>(e));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
return false;
- case QEvent::Show:
+ case TQEvent::Show:
return false;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
return false;
- case QEvent::Enter:
+ case TQEvent::Enter:
return false;
- case QEvent::Leave:
+ case TQEvent::Leave:
return false;
- case QEvent::Move:
+ case TQEvent::Move:
return false;
default:
return false;
@@ -129,12 +129,12 @@ void Manager::borders(int &left, int &right, int &top, int &bottom) const
bottom = isResizable() ? Static::instance()->resizeHeight() : 1;
}
-void Manager::resize(const QSize &s)
+void Manager::resize(const TQSize &s)
{
widget()->resize(s);
}
-QSize Manager::minimumSize() const
+TQSize Manager::minimumSize() const
{
return widget()->minimumSize();
}
@@ -169,16 +169,16 @@ void Manager::shadeChange()
{
}
-void Manager::paintEvent(QPaintEvent *e)
+void Manager::paintEvent(TQPaintEvent *e)
{
- QPainter p(widget());
+ TQPainter p(widget());
- QRect r(e->rect());
+ TQRect r(e->rect());
- bool intersectsLeft = r.intersects(QRect(0, 0, 1, height()));
+ bool intersectsLeft = r.intersects(TQRect(0, 0, 1, height()));
bool intersectsRight =
- r.intersects(QRect(width() - 1, 0, width(), height()));
+ r.intersects(TQRect(width() - 1, 0, width(), height()));
if (intersectsLeft || intersectsRight)
{
@@ -197,7 +197,7 @@ void Manager::paintEvent(QPaintEvent *e)
// Title bar.
- QRect tr = titleSpacer_->geometry();
+ TQRect tr = titleSpacer_->geometry();
bitBlt(widget(), tr.topLeft(), &titleBuf_);
// Resize bar.
@@ -220,7 +220,7 @@ void Manager::paintEvent(QPaintEvent *e)
p.drawLine(1, height() - 1, width() - 2, height() - 1);
}
-void Manager::resizeEvent(QResizeEvent*)
+void Manager::resizeEvent(TQResizeEvent*)
{
updateButtonVisibility();
updateTitleBuffer();
@@ -292,14 +292,14 @@ void Manager::updateTitleBuffer()
Static * s = Static::instance();
- QRect tr = titleSpacer_->geometry();
+ TQRect tr = titleSpacer_->geometry();
if (tr.width() == 0 || tr.height() == 0)
titleBuf_.resize(8, 8);
else
titleBuf_.resize(tr.size());
- QPainter p(&titleBuf_);
+ TQPainter p(&titleBuf_);
p.drawPixmap(0, 0, s->titleTextLeft(active));
@@ -316,7 +316,7 @@ void Manager::updateTitleBuffer()
p.drawPixmap(tr.width() - 3, 0, s->titleTextRight(active));
}
-KDecoration::Position Manager::mousePosition(const QPoint& p) const
+KDecoration::Position Manager::mousePosition(const TQPoint& p) const
{
Position m = PositionCenter;
@@ -350,19 +350,19 @@ KDecoration::Position Manager::mousePosition(const QPoint& p) const
return m;
}
-void Manager::mouseDoubleClickEvent(QMouseEvent *e)
+void Manager::mouseDoubleClickEvent(TQMouseEvent *e)
{
if (e->button() == LeftButton && titleSpacer_->geometry().contains(e->pos()))
titlebarDblClickOperation();
}
-void Manager::wheelEvent(QWheelEvent *e)
+void Manager::wheelEvent(TQWheelEvent *e)
{
if (isSetShade() || titleLayout_->geometry().contains(e->pos()) )
titlebarMouseWheelOperation( e->delta());
}
-void Manager::paletteChange(const QPalette &)
+void Manager::paletteChange(const TQPalette &)
{
resetLayout();
}
@@ -430,7 +430,7 @@ bool Manager::animateMinimize(bool iconify)
helperShowHide(false);
qApp->syncX();
- QRect r = iconGeometry();
+ TQRect r = iconGeometry();
if (!r.isValid())
return true;
@@ -462,7 +462,7 @@ bool Manager::animateMinimize(bool iconify)
double delta = finalAngle / steps;
- QPainter p(workspaceWidget());
+ TQPainter p(workspaceWidget());
p.setRasterOp(Qt::NotROP);
for (double angle = 0; ; angle += delta)
@@ -474,10 +474,10 @@ bool Manager::animateMinimize(bool iconify)
double dch = (ch / 2) * cos(angle);
double midy = cy + (ch / 2);
- QPoint p1(int(cx + dx), int(midy - dch));
- QPoint p2(int(cx + cw - dx), p1.y());
- QPoint p3(int(cx + dw + dx), int(midy + dch));
- QPoint p4(int(cx - dx), p3.y());
+ TQPoint p1(int(cx + dx), int(midy - dch));
+ TQPoint p2(int(cx + cw - dx), p1.y());
+ TQPoint p3(int(cx + dw + dx), int(midy + dch));
+ TQPoint p4(int(cx - dx), p3.y());
grabXServer();
@@ -521,12 +521,12 @@ bool Manager::animateMinimize(bool iconify)
int stepCount = 12;
- QRect r(geometry());
+ TQRect r(geometry());
int dx = r.width() / (stepCount * 2);
int dy = r.height() / (stepCount * 2);
- QPainter p(workspaceWidget());
+ TQPainter p(workspaceWidget());
p.setRasterOp(Qt::NotROP);
for (int step = 0; step < stepCount; step++)
@@ -550,19 +550,19 @@ bool Manager::animateMinimize(bool iconify)
default:
{
- QRect icongeom = iconGeometry();
+ TQRect icongeom = iconGeometry();
if (!icongeom.isValid())
return true;
- QRect wingeom = geometry();
+ TQRect wingeom = geometry();
- QPainter p(workspaceWidget());
+ TQPainter p(workspaceWidget());
p.setRasterOp(Qt::NotROP);
#if 0
if (iconify)
- p.setClipRegion(QRegion(workspaceWidget()->rect()) - wingeom);
+ p.setClipRegion(TQRegion(workspaceWidget()->rect()) - wingeom);
#endif
grabXServer();
@@ -594,7 +594,7 @@ void Manager::createTitle()
leftButtonList_.clear();
rightButtonList_.clear();
- QString buttons;
+ TQString buttons;
if (options()->customButtonPositions())
buttons = options()->titleButtonsLeft() + "|" +
@@ -602,7 +602,7 @@ void Manager::createTitle()
else
buttons = "XSH|IA";
- QPtrList<Button> *buttonList = &leftButtonList_;
+ TQPtrList<Button> *buttonList = &leftButtonList_;
for (unsigned int i = 0; i < buttons.length(); ++i)
{
@@ -612,9 +612,9 @@ void Manager::createTitle()
{
case 'S': // Sticky
tb = new StickyButton(widget());
- connect(this, SIGNAL(stickyChanged(bool)),
- tb, SLOT(setOn(bool)));
- connect(tb, SIGNAL(toggleSticky()), this, SLOT(slotToggleSticky()));
+ connect(this, TQT_SIGNAL(stickyChanged(bool)),
+ tb, TQT_SLOT(setOn(bool)));
+ connect(tb, TQT_SIGNAL(toggleSticky()), this, TQT_SLOT(slotToggleSticky()));
emit(stickyChanged(isOnAllDesktops()));
break;
@@ -622,7 +622,7 @@ void Manager::createTitle()
if (providesContextHelp())
{
tb = new HelpButton(widget());
- connect(tb, SIGNAL(help()), this, SLOT(showContextHelp()));
+ connect(tb, TQT_SIGNAL(help()), this, TQT_SLOT(showContextHelp()));
}
break;
@@ -630,7 +630,7 @@ void Manager::createTitle()
if (isMinimizable())
{
tb = new IconifyButton(widget());
- connect(tb, SIGNAL(iconify()), this, SLOT(minimize()));
+ connect(tb, TQT_SIGNAL(iconify()), this, TQT_SLOT(minimize()));
}
break;
@@ -638,29 +638,29 @@ void Manager::createTitle()
if (isMaximizable())
{
tb = new MaximiseButton(widget());
- connect(tb, SIGNAL(maximizeClicked(ButtonState)),
- this, SLOT(slotMaximizeClicked(ButtonState)));
- connect(this, SIGNAL(maximizeChanged(bool)),
- tb, SLOT(setOn(bool)));
+ connect(tb, TQT_SIGNAL(maximizeClicked(ButtonState)),
+ this, TQT_SLOT(slotMaximizeClicked(ButtonState)));
+ connect(this, TQT_SIGNAL(maximizeChanged(bool)),
+ tb, TQT_SLOT(setOn(bool)));
emit(maximizeChanged(maximizeMode() == MaximizeFull));
}
break;
case 'F': // Above
tb = new AboveButton(widget());
- connect(tb, SIGNAL(above()), this, SLOT(slotAbove()));
+ connect(tb, TQT_SIGNAL(above()), this, TQT_SLOT(slotAbove()));
break;
case 'B': // Lower
tb = new LowerButton(widget());
- connect(tb, SIGNAL(lower()), this, SLOT(slotLower()));
+ connect(tb, TQT_SIGNAL(lower()), this, TQT_SLOT(slotLower()));
break;
case 'X': // Close
if (isCloseable())
{
tb = new CloseButton(widget());
- connect(tb, SIGNAL(closeWindow()), this, SLOT(closeWindow()));
+ connect(tb, TQT_SIGNAL(closeWindow()), this, TQT_SLOT(closeWindow()));
}
break;
@@ -671,23 +671,23 @@ void Manager::createTitle()
if (tb != NULL)
{
- connect(this, SIGNAL(activeChanged(bool)), tb, SLOT(setActive(bool)));
+ connect(this, TQT_SIGNAL(activeChanged(bool)), tb, TQT_SLOT(setActive(bool)));
buttonList->append(tb);
}
}
- for (QPtrListIterator<Button> it(leftButtonList_); it.current(); ++it)
+ for (TQPtrListIterator<Button> it(leftButtonList_); it.current(); ++it)
{
it.current()->setAlignment(Button::Left);
titleLayout_->addWidget(it.current());
}
- titleSpacer_ = new QSpacerItem(0, Static::instance()->titleHeight(),
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ titleSpacer_ = new TQSpacerItem(0, Static::instance()->titleHeight(),
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
titleLayout_->addItem(titleSpacer_);
- for (QPtrListIterator<Button> it(rightButtonList_); it.current(); ++it)
+ for (TQPtrListIterator<Button> it(rightButtonList_); it.current(); ++it)
{
it.current()->setAlignment(Button::Right);
titleLayout_->addWidget(it.current());
@@ -697,21 +697,21 @@ void Manager::createTitle()
void Manager::resetLayout()
{
delete topLayout_;
- topLayout_ = new QVBoxLayout(widget(), 0, 0);
- topLayout_->setResizeMode(QLayout::FreeResize);
+ topLayout_ = new TQVBoxLayout(widget(), 0, 0);
+ topLayout_->setResizeMode(TQLayout::FreeResize);
- titleLayout_ = new QBoxLayout(topLayout_, QBoxLayout::LeftToRight, 0, 0);
- titleLayout_->setResizeMode(QLayout::FreeResize);
+ titleLayout_ = new TQBoxLayout(topLayout_, TQBoxLayout::LeftToRight, 0, 0);
+ titleLayout_->setResizeMode(TQLayout::FreeResize);
createTitle();
- QBoxLayout *midLayout = new QBoxLayout(topLayout_, QBoxLayout::LeftToRight,
+ TQBoxLayout *midLayout = new TQBoxLayout(topLayout_, TQBoxLayout::LeftToRight,
0, 0);
- midLayout->setResizeMode(QLayout::FreeResize);
+ midLayout->setResizeMode(TQLayout::FreeResize);
midLayout->addSpacing(1);
if (isPreview())
midLayout->addWidget(
- new QLabel(i18n("<center><b>RiscOS preview</b></center>"), widget()));
+ new TQLabel(i18n("<center><b>RiscOS preview</b></center>"), widget()));
midLayout->addSpacing(1);
if (isResizable())
diff --git a/kwin-styles/riscos/Manager.h b/kwin-styles/riscos/Manager.h
index 1d30b7a6..c5269051 100644
--- a/kwin-styles/riscos/Manager.h
+++ b/kwin-styles/riscos/Manager.h
@@ -23,7 +23,7 @@
#ifndef RISC_OS_MANAGER_H
#define RISC_OS_MANAGER_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -51,11 +51,11 @@ class Manager : public KDecoration
Manager(KDecorationBridge*, KDecorationFactory*);
~Manager();
void init();
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
void reset(unsigned long changed);
void borders(int&, int&, int&, int&) const;
- void resize(const QSize&);
- QSize minimumSize() const;
+ void resize(const TQSize&);
+ TQSize minimumSize() const;
void activeChange();
void captionChange();
void iconChange();
@@ -78,14 +78,14 @@ class Manager : public KDecoration
protected:
- KDecoration::Position mousePosition(const QPoint &) const;
- void paletteChange(const QPalette &);
+ KDecoration::Position mousePosition(const TQPoint &) const;
+ void paletteChange(const TQPalette &);
void activeChange(bool);
void stickyChange(bool);
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
- void mouseDoubleClickEvent(QMouseEvent *);
- void wheelEvent(QWheelEvent *e);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mouseDoubleClickEvent(TQMouseEvent *);
+ void wheelEvent(TQWheelEvent *e);
bool animateMinimize(bool);
void updateButtonVisibility();
void updateTitleBuffer();
@@ -95,16 +95,16 @@ class Manager : public KDecoration
private:
- QVBoxLayout *topLayout_;
- QBoxLayout *titleLayout_;
- QSpacerItem *titleSpacer_;
+ TQVBoxLayout *topLayout_;
+ TQBoxLayout *titleLayout_;
+ TQSpacerItem *titleSpacer_;
- QPixmap titleBuf_;
- QPtrList<Button> leftButtonList_;
- QPtrList<Button> rightButtonList_;
+ TQPixmap titleBuf_;
+ TQPtrList<Button> leftButtonList_;
+ TQPtrList<Button> rightButtonList_;
};
-class Factory : public QObject, public KDecorationFactory
+class Factory : public TQObject, public KDecorationFactory
{
Q_OBJECT
diff --git a/kwin-styles/riscos/MaximiseButton.cpp b/kwin-styles/riscos/MaximiseButton.cpp
index b82f2867..ebfb6628 100644
--- a/kwin-styles/riscos/MaximiseButton.cpp
+++ b/kwin-styles/riscos/MaximiseButton.cpp
@@ -22,7 +22,7 @@
#include "MaximiseButton.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace RiscOS
{
@@ -65,25 +65,25 @@ static const char * const unmaximise_xpm[] = {
" ",
" "};
-MaximiseButton::MaximiseButton(QWidget * parent)
+MaximiseButton::MaximiseButton(TQWidget * parent)
: Button(parent, i18n("Maximize"),
(ButtonState)(LeftButton|MidButton|RightButton)),
on_(false)
{
- setPixmap(QPixmap((const char **)maximise_xpm));
+ setPixmap(TQPixmap((const char **)maximise_xpm));
}
void MaximiseButton::setOn(bool on)
{
on_ = on;
- setPixmap(on_ ? QPixmap((const char **)unmaximise_xpm)
- : QPixmap((const char **)maximise_xpm));
+ setPixmap(on_ ? TQPixmap((const char **)unmaximise_xpm)
+ : TQPixmap((const char **)maximise_xpm));
repaint();
- QToolTip::remove(this);
- QToolTip::add(this, on_ ? i18n("Restore") : i18n("Maximize"));
+ TQToolTip::remove(this);
+ TQToolTip::add(this, on_ ? i18n("Restore") : i18n("Maximize"));
}
-void MaximiseButton::mouseReleaseEvent(QMouseEvent *e)
+void MaximiseButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/MaximiseButton.h b/kwin-styles/riscos/MaximiseButton.h
index 7da4bc0a..ff715ba1 100644
--- a/kwin-styles/riscos/MaximiseButton.h
+++ b/kwin-styles/riscos/MaximiseButton.h
@@ -34,7 +34,7 @@ class MaximiseButton : public Button
public:
- MaximiseButton(QWidget *parent);
+ MaximiseButton(TQWidget *parent);
public slots:
@@ -46,7 +46,7 @@ class MaximiseButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
private:
diff --git a/kwin-styles/riscos/Palette.h b/kwin-styles/riscos/Palette.h
index e13457a6..260175b9 100644
--- a/kwin-styles/riscos/Palette.h
+++ b/kwin-styles/riscos/Palette.h
@@ -23,8 +23,8 @@
#ifndef RISC_OS_PALETTE_H
#define RISC_OS_PALETTE_H
-#include <qmemarray.h>
-#include <qglobal.h>
+#include <tqmemarray.h>
+#include <tqglobal.h>
namespace RiscOS
{
@@ -59,7 +59,7 @@ class Palette
private:
- QMemArray<QRgb> data_;
+ TQMemArray<QRgb> data_;
};
} // End namespace
diff --git a/kwin-styles/riscos/Static.cpp b/kwin-styles/riscos/Static.cpp
index 675cdfc1..5c6e427d 100644
--- a/kwin-styles/riscos/Static.cpp
+++ b/kwin-styles/riscos/Static.cpp
@@ -25,10 +25,10 @@
#undef Bool
#endif
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qptrlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
#include <kdecoration.h>
@@ -71,37 +71,37 @@ Static::~Static()
instance_ = NULL;
}
-const QPixmap& Static::titleTextLeft(bool active) const
+const TQPixmap& Static::titleTextLeft(bool active) const
{
return active ? aTitleTextLeft_ : iTitleTextLeft_;
}
-const QPixmap& Static::titleTextRight(bool active) const
+const TQPixmap& Static::titleTextRight(bool active) const
{
return active ? aTitleTextRight_ : iTitleTextRight_;
}
-const QPixmap& Static::resizeMidLeft(bool active) const
+const TQPixmap& Static::resizeMidLeft(bool active) const
{
return active ? aResizeMidLeft_ : iResizeMidLeft_;
}
-const QPixmap& Static::resizeMidRight(bool active) const
+const TQPixmap& Static::resizeMidRight(bool active) const
{
return active ? aResizeMidRight_ : iResizeMidRight_;
}
-const QPixmap& Static::titleTextMid(bool active) const
+const TQPixmap& Static::titleTextMid(bool active) const
{
return active ? aTitleTextMid_ : iTitleTextMid_;
}
-const QPixmap& Static::resizeMidMid(bool active) const
+const TQPixmap& Static::resizeMidMid(bool active) const
{
return active ? aResizeMid_ : iResizeMid_;
}
-const QPixmap& Static::resize(bool active) const
+const TQPixmap& Static::resize(bool active) const
{
return active ? aResize_ : iResize_;
}
@@ -121,7 +121,7 @@ int Static::resizeHeight() const
return resizeHeight_;
}
-void Static::_drawBorder(QPixmap &pix, int w, int h)
+void Static::_drawBorder(TQPixmap &pix, int w, int h)
{
// 0111111113
// 1122222235
@@ -134,14 +134,14 @@ void Static::_drawBorder(QPixmap &pix, int w, int h)
painter_.begin(&pix);
painter_.translate(transx, transy);
- QColor c0 = down_ ? palette_[7] : palette_[0];
- QColor c1 = down_ ? palette_[6] : palette_[1];
- QColor c2 = down_ ? palette_[5] : palette_[2];
- QColor c3 = down_ ? palette_[4] : palette_[3];
- QColor c4 = down_ ? palette_[3] : palette_[4];
- QColor c5 = down_ ? palette_[2] : palette_[5];
- QColor c6 = down_ ? palette_[2] : palette_[6];
- QColor c7 = down_ ? palette_[1] : palette_[7];
+ TQColor c0 = down_ ? palette_[7] : palette_[0];
+ TQColor c1 = down_ ? palette_[6] : palette_[1];
+ TQColor c2 = down_ ? palette_[5] : palette_[2];
+ TQColor c3 = down_ ? palette_[4] : palette_[3];
+ TQColor c4 = down_ ? palette_[3] : palette_[4];
+ TQColor c5 = down_ ? palette_[2] : palette_[5];
+ TQColor c6 = down_ ? palette_[2] : palette_[6];
+ TQColor c7 = down_ ? palette_[1] : palette_[7];
painter_.setPen(c0);
painter_.drawPoint(0, 0);
@@ -183,7 +183,7 @@ void Static::_drawBorder(QPixmap &pix, int w, int h)
painter_.resetXForm();
}
-void setPalette(Palette &pal, QColor c)
+void setPalette(Palette &pal, TQColor c)
{
pal[3] = c.rgb();
@@ -204,7 +204,7 @@ void setPalette(Palette &pal, QColor c)
void Static::_init()
{
- hicolour_ = QPixmap::defaultDepth() > 8;
+ hicolour_ = TQPixmap::defaultDepth() > 8;
animationStyle_ = 0;
updatePixmaps();
}
@@ -242,13 +242,13 @@ void Static::updatePixmaps()
_drawButtonBackgrounds();
}
-void Static::_createTexture(QPixmap &px, int t, bool active)
+void Static::_createTexture(TQPixmap &px, int t, bool active)
{
- const QImage texture(QPixmap((const char **)texture_xpm).convertToImage());
+ const TQImage texture(TQPixmap((const char **)texture_xpm).convertToImage());
const QRgb w(qRgb(255, 255, 255));
const QRgb b(qRgb(0, 0, 0));
- QColor c(KDecoration::options()->color(KDecoration::ColorType(t), active));
+ TQColor c(KDecoration::options()->color(KDecoration::ColorType(t), active));
QRgb mid (c.rgb());
QRgb light (c.light(110).rgb());
@@ -267,7 +267,7 @@ void Static::_createTexture(QPixmap &px, int t, bool active)
px.convertFromImage(texture);
}
-const QPixmap& Static::buttonBase(bool active, bool down) const
+const TQPixmap& Static::buttonBase(bool active, bool down) const
{
if (active)
return down ? aButtonDown_ : aButtonUp_;
@@ -277,9 +277,9 @@ const QPixmap& Static::buttonBase(bool active, bool down) const
void Static::_initSizes()
{
- QFont f(KDecoration::options()->font(true)); // XXX false doesn't work right at the moment
+ TQFont f(KDecoration::options()->font(true)); // XXX false doesn't work right at the moment
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
int h = fm.height();
@@ -361,7 +361,7 @@ void Static::_initTextures()
void Static::_drawTitleTextAreaSides()
{
- QPixmap temp(4, titleHeight_);
+ TQPixmap temp(4, titleHeight_);
temp.fill(Qt::black);
transx = transy = 0.0;
@@ -393,7 +393,7 @@ void Static::_drawTitleTextAreaSides()
void Static::_drawResizeCentralAreaSides()
{
- QPixmap temp(4, resizeHeight_);
+ TQPixmap temp(4, resizeHeight_);
temp.fill(Qt::black);
transy = 1.0;
@@ -424,7 +424,7 @@ void Static::_drawResizeCentralAreaSides()
void Static::_drawTitleTextAreaBackground()
{
- QPixmap temp(70, titleHeight_);
+ TQPixmap temp(70, titleHeight_);
temp.fill(Qt::black);
transx = transy = 0.0;
@@ -450,7 +450,7 @@ void Static::_drawTitleTextAreaBackground()
void Static::_drawResizeCentralAreaBackground()
{
- QPixmap temp(70, titleHeight_);
+ TQPixmap temp(70, titleHeight_);
temp.fill(Qt::black);
transy = 1.0;
diff --git a/kwin-styles/riscos/Static.h b/kwin-styles/riscos/Static.h
index 8a01d03b..e7b49d59 100644
--- a/kwin-styles/riscos/Static.h
+++ b/kwin-styles/riscos/Static.h
@@ -23,10 +23,10 @@
#ifndef RISC_OS_STATIC_H
#define RISC_OS_STATIC_H
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstringlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
#include "Palette.h"
@@ -54,14 +54,14 @@ class Static
void reset();
void updatePixmaps();
- const QPixmap& titleTextLeft(bool active) const;
- const QPixmap& titleTextRight(bool active) const;
- const QPixmap& resizeMidLeft(bool active) const;
- const QPixmap& resizeMidRight(bool active) const;
- const QPixmap& titleTextMid(bool active) const;
- const QPixmap& resizeMidMid(bool active) const;
- const QPixmap& buttonBase(bool active, bool down) const;
- const QPixmap& resize(bool active) const;
+ const TQPixmap& titleTextLeft(bool active) const;
+ const TQPixmap& titleTextRight(bool active) const;
+ const TQPixmap& resizeMidLeft(bool active) const;
+ const TQPixmap& resizeMidRight(bool active) const;
+ const TQPixmap& titleTextMid(bool active) const;
+ const TQPixmap& resizeMidMid(bool active) const;
+ const TQPixmap& buttonBase(bool active, bool down) const;
+ const TQPixmap& resize(bool active) const;
int animationStyle() const;
int titleHeight() const;
@@ -71,8 +71,8 @@ class Static
void _init();
- void _drawBorder(QPixmap&, int, int);
- void _createTexture(QPixmap&, int, bool);
+ void _drawBorder(TQPixmap&, int, int);
+ void _createTexture(TQPixmap&, int, bool);
void _initSizes();
@@ -111,9 +111,9 @@ class Static
aResizeMidRight_, iResizeMidRight_,
aResizeMid_, iResizeMid_;
- QPixmap aTexture_, iTexture_, abTexture_, ibTexture_;
+ TQPixmap aTexture_, iTexture_, abTexture_, ibTexture_;
- QPainter painter_;
+ TQPainter painter_;
bool down_;
Palette palette_;
double transx, transy;
diff --git a/kwin-styles/riscos/StickyButton.cpp b/kwin-styles/riscos/StickyButton.cpp
index 808f04c7..b40db535 100644
--- a/kwin-styles/riscos/StickyButton.cpp
+++ b/kwin-styles/riscos/StickyButton.cpp
@@ -22,7 +22,7 @@
#include "StickyButton.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace RiscOS
{
@@ -66,24 +66,24 @@ static const char * const sticky_xpm[] = {
".. "};
-StickyButton::StickyButton(QWidget *parent)
+StickyButton::StickyButton(TQWidget *parent)
: Button(parent, i18n("On all desktops")), on_(false)
{
- setPixmap(QPixmap((const char **)sticky_xpm));
+ setPixmap(TQPixmap((const char **)sticky_xpm));
}
void StickyButton::setOn(bool on)
{
on_ = on;
- setPixmap(on_ ? QPixmap((const char **)unsticky_xpm) :
- QPixmap((const char **)sticky_xpm));
+ setPixmap(on_ ? TQPixmap((const char **)unsticky_xpm) :
+ TQPixmap((const char **)sticky_xpm));
repaint();
- QToolTip::remove(this);
- QToolTip::add(this, on_ ? i18n("Not on all desktops")
+ TQToolTip::remove(this);
+ TQToolTip::add(this, on_ ? i18n("Not on all desktops")
: i18n("On all desktops"));
}
-void StickyButton::mouseReleaseEvent(QMouseEvent *e)
+void StickyButton::mouseReleaseEvent(TQMouseEvent *e)
{
Button::mouseReleaseEvent(e);
diff --git a/kwin-styles/riscos/StickyButton.h b/kwin-styles/riscos/StickyButton.h
index fb7746ae..4c500b8b 100644
--- a/kwin-styles/riscos/StickyButton.h
+++ b/kwin-styles/riscos/StickyButton.h
@@ -34,7 +34,7 @@ class StickyButton : public Button
public:
- StickyButton(QWidget *parent);
+ StickyButton(TQWidget *parent);
public slots:
@@ -46,7 +46,7 @@ class StickyButton : public Button
protected:
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
private:
diff --git a/kwin-styles/smooth-blend/client/buttons.h b/kwin-styles/smooth-blend/client/buttons.h
index a62268b7..ac0eaa8e 100644
--- a/kwin-styles/smooth-blend/client/buttons.h
+++ b/kwin-styles/smooth-blend/client/buttons.h
@@ -24,10 +24,10 @@
** WARNING! All changes made in this file will be lost!
****************************************************************************/
-#include <qimage.h>
-#include <qdict.h>
-#include <qmime.h>
-#include <qdragobject.h>
+#include <tqimage.h>
+#include <tqdict.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
// circle.png
static const unsigned char image_0_data[] = {
@@ -1726,20 +1726,20 @@ static struct EmbedImage {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
-static QImage uic_findImage( const QString& name )
+static TQImage uic_findImage( const TQString& name )
{
for ( int i=0; embed_image_vec[i].data; i++ ) {
- if ( QString::fromUtf8(embed_image_vec[i].name) == name ) {
- QByteArray baunzip;
+ if ( TQString::fromUtf8(embed_image_vec[i].name) == name ) {
+ TQByteArray baunzip;
baunzip = qUncompress( embed_image_vec[i].data,
embed_image_vec[i].compressed );
- QImage img((uchar*)baunzip.data(),
+ TQImage img((uchar*)baunzip.data(),
embed_image_vec[i].width,
embed_image_vec[i].height,
embed_image_vec[i].depth,
(QRgb*)embed_image_vec[i].colorTable,
embed_image_vec[i].numColors,
- QImage::BigEndian
+ TQImage::BigEndian
);
img = img.copy();
if ( embed_image_vec[i].alpha )
@@ -1747,7 +1747,7 @@ static QImage uic_findImage( const QString& name )
return img;
}
}
- return QImage();
+ return TQImage();
}
class MimeSourceFactory_smoothblend : public QMimeSourceFactory
@@ -1755,30 +1755,30 @@ class MimeSourceFactory_smoothblend : public QMimeSourceFactory
public:
MimeSourceFactory_smoothblend() {}
~MimeSourceFactory_smoothblend() {}
- const QMimeSource* data( const QString& abs_name ) const {
- const QMimeSource* d = QMimeSourceFactory::data( abs_name );
+ const TQMimeSource* data( const TQString& abs_name ) const {
+ const TQMimeSource* d = TQMimeSourceFactory::data( abs_name );
if ( d || abs_name.isNull() ) return d;
- QImage img = uic_findImage( abs_name );
+ TQImage img = uic_findImage( abs_name );
if ( !img.isNull() )
- ((QMimeSourceFactory*)this)->setImage( abs_name, img );
- return QMimeSourceFactory::data( abs_name );
+ ((TQMimeSourceFactory*)this)->setImage( abs_name, img );
+ return TQMimeSourceFactory::data( abs_name );
};
};
-static QMimeSourceFactory* bfactory = 0;
+static TQMimeSourceFactory* bfactory = 0;
void qInitImages_smoothblend()
{
if ( !bfactory ) {
bfactory = new MimeSourceFactory_smoothblend;
- QMimeSourceFactory::defaultFactory()->addFactory( bfactory );
+ TQMimeSourceFactory::defaultFactory()->addFactory( bfactory );
}
}
void qCleanupImages_smoothblend()
{
if ( bfactory ) {
- QMimeSourceFactory::defaultFactory()->removeFactory( bfactory );
+ TQMimeSourceFactory::defaultFactory()->removeFactory( bfactory );
delete bfactory;
bfactory = 0;
}
diff --git a/kwin-styles/smooth-blend/client/config/smoothblendconfig.cc b/kwin-styles/smooth-blend/client/config/smoothblendconfig.cc
index 30472143..3ec445b9 100644
--- a/kwin-styles/smooth-blend/client/config/smoothblendconfig.cc
+++ b/kwin-styles/smooth-blend/client/config/smoothblendconfig.cc
@@ -10,13 +10,13 @@
#include <kconfig.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqcombobox.h>
#include "smoothblendconfig.h"
#include "configdialog.h"
@@ -26,8 +26,8 @@
// -------------
// Constructor
-smoothblendConfig::smoothblendConfig(KConfig* config, QWidget* parent)
- : QObject(parent), config_(0), dialog_(0) {
+smoothblendConfig::smoothblendConfig(KConfig* config, TQWidget* parent)
+ : TQObject(parent), config_(0), dialog_(0) {
// create the configuration object
config_ = new KConfig("kwinsmoothblendrc");
KGlobal::locale()->insertCatalogue("kwin_smoothblend_config");
@@ -40,20 +40,20 @@ smoothblendConfig::smoothblendConfig(KConfig* config, QWidget* parent)
load(config_);
// setup the connections for title align
- connect(dialog_->titlealign, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int)));
+ connect(dialog_->titlealign, TQT_SIGNAL(clicked(int)),this, TQT_SLOT(selectionChanged(int)));
// setup the connections for corner rounding
- connect(dialog_->roundCorners, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
+ connect(dialog_->roundCorners, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int)));
// setup title shadow
- connect(dialog_->titleshadow, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
+ connect(dialog_->titleshadow, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int)));
// setup button actions
- connect(dialog_->animatebuttons, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
- connect(dialog_->btnComboBox, SIGNAL(activated(int)),this,SLOT(selectionChanged(int)));
+ connect(dialog_->animatebuttons, TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(selectionChanged(int)));
+ connect(dialog_->btnComboBox, TQT_SIGNAL(activated(int)),this,TQT_SLOT(selectionChanged(int)));
// setup the connections for spin boxes
- connect(dialog_->titlesize, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
- connect(dialog_->buttonsize, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
- connect(dialog_->framesize, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
+ connect(dialog_->titlesize, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int)));
+ connect(dialog_->buttonsize, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int)));
+ connect(dialog_->framesize, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(selectionChanged(int)));
// double click the menu
- connect(dialog_->menuClose, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
+ connect(dialog_->menuClose, TQT_SIGNAL(stateChanged(int)),this, TQT_SLOT(selectionChanged(int)));
}
//////////////////////////////////////////////////////////////////////////////
@@ -99,8 +99,8 @@ void smoothblendConfig::selectionChanged(int) {
void smoothblendConfig::load(KConfig*) {
config_->setGroup("General");
- QString value = config_->readEntry("TitleAlignment", "AlignHCenter");
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->child(value.latin1());
+ TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value.latin1());
if (button)
{
button->setChecked(true);
@@ -129,10 +129,10 @@ void smoothblendConfig::load(KConfig*) {
void smoothblendConfig::save(KConfig*) {
config_->setGroup("General");
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected();
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
if (button)
{
- config_->writeEntry("TitleAlignment", QString(button->name()));
+ config_->writeEntry("TitleAlignment", TQString(button->name()));
}
config_->writeEntry("RoundCorners", dialog_->roundCorners->isChecked() );
config_->writeEntry("TitleSize", dialog_->titlesize->value() );
@@ -152,7 +152,7 @@ void smoothblendConfig::save(KConfig*) {
// Set configuration defaults
void smoothblendConfig::defaults() {
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter");
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter");
if (button)
{
button->setChecked(true);
@@ -172,7 +172,7 @@ void smoothblendConfig::defaults() {
//////////////////////////////////////////////////////////////////////////////
extern "C" {
- QObject* allocate_config(KConfig* config, QWidget* parent) {
+ TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return (new smoothblendConfig(config, parent));
}
}
diff --git a/kwin-styles/smooth-blend/client/config/smoothblendconfig.h b/kwin-styles/smooth-blend/client/config/smoothblendconfig.h
index 3c4d18f7..de861779 100644
--- a/kwin-styles/smooth-blend/client/config/smoothblendconfig.h
+++ b/kwin-styles/smooth-blend/client/config/smoothblendconfig.h
@@ -25,15 +25,15 @@
#ifndef SMOOTHBLENDCONFIG_H
#define SMOOTHBLENDCONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
class KConfig;
class ConfigDialog;
-class smoothblendConfig : public QObject {
+class smoothblendConfig : public TQObject {
Q_OBJECT
public:
- smoothblendConfig(KConfig* config, QWidget* parent);
+ smoothblendConfig(KConfig* config, TQWidget* parent);
~smoothblendConfig();
signals:
diff --git a/kwin-styles/smooth-blend/client/smoothblend.cc b/kwin-styles/smooth-blend/client/smoothblend.cc
index 9adb60ac..67d2fa48 100644
--- a/kwin-styles/smooth-blend/client/smoothblend.cc
+++ b/kwin-styles/smooth-blend/client/smoothblend.cc
@@ -17,13 +17,13 @@
#include <kpixmapeffect.h>
#include <kpixmap.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include "smoothblend.h"
#include "buttons.h"
@@ -122,7 +122,7 @@ bool smoothblendFactory::readConfig() {
config.setGroup("General");
// grab settings
- QString value = config.readEntry("TitleAlignment", "AlignHCenter");
+ TQString value = config.readEntry("TitleAlignment", "AlignHCenter");
if (value == "AlignLeft")
titlealign_ = Qt::AlignLeft;
else if (value == "AlignHCenter")
@@ -156,7 +156,7 @@ bool smoothblendFactory::readConfig() {
// smoothblendButton()
// ---------------
// Constructor
-smoothblendButton::smoothblendButton(smoothblendClient *parent, const char *name, const QString& tip, ButtonType type, int button_size, bool toggle): QButton(parent->widget(), name),
+smoothblendButton::smoothblendButton(smoothblendClient *parent, const char *name, const TQString& tip, ButtonType type, int button_size, bool toggle): TQButton(parent->widget(), name),
client_(parent),
type_(type),
size_(button_size),
@@ -167,13 +167,13 @@ smoothblendButton::smoothblendButton(smoothblendClient *parent, const char *name
setBackgroundMode(NoBackground);
setFixedSize( ::factory->buttonSize(), ::factory->buttonSize());
setCursor(arrowCursor);
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
setToggleButton(toggle);
//button animation setup
- animTmr = new QTimer(this);
- connect(animTmr, SIGNAL(timeout() ), this, SLOT(animate() ) );
- connect(this, SIGNAL(pressed() ), this, SLOT(buttonClicked() ) );
- connect(this, SIGNAL(released() ), this, SLOT(buttonReleased() ) );
+ animTmr = new TQTimer(this);
+ connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) );
+ connect(this, TQT_SIGNAL(pressed() ), this, TQT_SLOT(buttonClicked() ) );
+ connect(this, TQT_SIGNAL(released() ), this, TQT_SLOT(buttonReleased() ) );
animProgress = 0;
m_clicked=false;
}
@@ -188,8 +188,8 @@ smoothblendButton::~smoothblendButton() {
// ----------
// Return size hint
-QSize smoothblendButton::sizeHint() const {
- return QSize(::factory->buttonSize(), ::factory->buttonSize());
+TQSize smoothblendButton::sizeHint() const {
+ return TQSize(::factory->buttonSize(), ::factory->buttonSize());
}
//////////////////////////////////////////////////////////////////////////////
@@ -239,9 +239,9 @@ void smoothblendButton::animate() {
// ------------
// Mouse has entered the button
-void smoothblendButton::enterEvent(QEvent *e) {
+void smoothblendButton::enterEvent(TQEvent *e) {
// we wanted to pass on the event
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
// we want to do mouseovers, so keep track of it here
hover_=true;
if(!m_clicked)
@@ -255,9 +255,9 @@ void smoothblendButton::enterEvent(QEvent *e) {
// ------------
// Mouse has left the button
-void smoothblendButton::leaveEvent(QEvent *e) {
+void smoothblendButton::leaveEvent(TQEvent *e) {
// we wanted to pass on the event
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
// we want to do mouseovers, so keep track of it here
hover_=false;
if(!m_clicked)
@@ -271,7 +271,7 @@ void smoothblendButton::leaveEvent(QEvent *e) {
// -----------------
// Button has been pressed
-void smoothblendButton::mousePressEvent(QMouseEvent* e) {
+void smoothblendButton::mousePressEvent(TQMouseEvent* e) {
lastmouse_ = e->button();
// translate and pass on mouse event
@@ -279,9 +279,9 @@ void smoothblendButton::mousePressEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate
}
- QMouseEvent me(e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
button, e->state());
- QButton::mousePressEvent(&me);
+ TQButton::mousePressEvent(&me);
}
//////////////////////////////////////////////////////////////////////////////
@@ -289,7 +289,7 @@ void smoothblendButton::mousePressEvent(QMouseEvent* e) {
// -----------------
// Button has been released
-void smoothblendButton::mouseReleaseEvent(QMouseEvent* e) {
+void smoothblendButton::mouseReleaseEvent(TQMouseEvent* e) {
lastmouse_ = e->button();
// translate and pass on mouse event
@@ -297,8 +297,8 @@ void smoothblendButton::mouseReleaseEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate
}
- QMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());
- QButton::mouseReleaseEvent(&me);
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());
+ TQButton::mouseReleaseEvent(&me);
if(m_clicked)
{
m_clicked=false;
@@ -307,21 +307,21 @@ void smoothblendButton::mouseReleaseEvent(QMouseEvent* e) {
void smoothblendButton::setOn(bool on)
{
- QButton::setOn(on);
+ TQButton::setOn(on);
}
void smoothblendButton::setDown(bool on)
{
- QButton::setDown(on);
+ TQButton::setDown(on);
}
//////////////////////////////////////////////////////////
// getButtonImage()
// ----------------
-// get the button QImage based on type and window mode
-QImage smoothblendButton::getButtonImage(ButtonType type)
+// get the button TQImage based on type and window mode
+TQImage smoothblendButton::getButtonImage(ButtonType type)
{
- QImage finalImage;
+ TQImage finalImage;
switch(type) {
case ButtonClose:
finalImage = uic_findImage( "close.png" );
@@ -394,7 +394,7 @@ QImage smoothblendButton::getButtonImage(ButtonType type)
// -------------------------
// draw the pixmap button
-void smoothblendButton::drawButton( QPainter *painter ) {
+void smoothblendButton::drawButton( TQPainter *painter ) {
if ( !smoothblendFactory::initialized() )
return ;
@@ -402,11 +402,11 @@ void smoothblendButton::drawButton( QPainter *painter ) {
int newHeight = height() - 2;
int dx = (width() - newWidth) / 2;
int dy = (height() - newHeight) / 2;
- QImage tmpResult;
- QColorGroup group;
- QColor redColor(red);
+ TQImage tmpResult;
+ TQColorGroup group;
+ TQColor redColor(red);
bool active = client_->isActive();
- QPixmap backgroundTile = client_->getTitleBarTile(active);
+ TQPixmap backgroundTile = client_->getTitleBarTile(active);
group = KDecoration::options()->colorGroup(KDecoration::ColorTitleBar, active);
//draw the titlebar behind the buttons and app icons
@@ -419,7 +419,7 @@ void smoothblendButton::drawButton( QPainter *painter ) {
painter->drawTiledPixmap(0, 0, width(), height(), backgroundTile, 0, y()-::factory->frameSize());
}
- QImage buttonImage = getButtonImage(type_).smoothScale( width(),height());
+ TQImage buttonImage = getButtonImage(type_).smoothScale( width(),height());
buttonImage = KImageEffect::blend( group.background(), buttonImage, .50);
if (type_ == ButtonMenu) {
//slight movement to show the menu button is depressed
@@ -427,10 +427,10 @@ void smoothblendButton::drawButton( QPainter *painter ) {
dx++;
dy++;
}
- QPixmap menuButtonPixmap(client_->icon().pixmap(QIconSet::Large, QIconSet::Normal));
- QImage menuButtonImage(menuButtonPixmap.convertToImage());
+ TQPixmap menuButtonPixmap(client_->icon().pixmap(TQIconSet::Large, TQIconSet::Normal));
+ TQImage menuButtonImage(menuButtonPixmap.convertToImage());
//draw the menu button the same size as the other buttons
- //using QIconSet::Large gives us a 32x32 icon to resize, resizing larger than
+ //using TQIconSet::Large gives us a 32x32 icon to resize, resizing larger than
//that may produce pixilation of the image
painter->drawImage( dx, dy, menuButtonImage.smoothScale(newWidth, newHeight) );
} else {
@@ -453,7 +453,7 @@ void smoothblendButton::drawButton( QPainter *painter ) {
{
tmpResult = buttonImage;
}
- painter->drawPixmap( 0, 0, QPixmap( tmpResult ) );
+ painter->drawPixmap( 0, 0, TQPixmap( tmpResult ) );
}
}
@@ -482,11 +482,11 @@ smoothblendClient::smoothblendClient(KDecorationBridge *b, KDecorationFactory *f
pixmaps_created(false),
//captionBufferDirty(true),
s_titleHeight(0),
- s_titleFont(QFont()),
+ s_titleFont(TQFont()),
closing(false)
{
- aCaptionBuffer = new QPixmap();
- iCaptionBuffer = new QPixmap();
+ aCaptionBuffer = new TQPixmap();
+ iCaptionBuffer = new TQPixmap();
//s_titleFont = isTool()?smoothblendFactory::titleFontTool():smoothblendFactory::titleFont();
s_titleFont = options()->font();
s_titleHeight = smoothblendFactory::titleSize();
@@ -504,8 +504,8 @@ void smoothblendClient::create_pixmaps() {
if(pixmaps_created)
return;
KPixmap tempPixmap;
- QPainter painter;
- QColorGroup group,widgetGroup;
+ TQPainter painter;
+ TQColorGroup group,widgetGroup;
int FRAMESIZE = ::factory->frameSize();
// Get the color groups we need for the gradients
group = options()->colorGroup(KDecoration::ColorTitleBar, true);
@@ -519,7 +519,7 @@ void smoothblendClient::create_pixmaps() {
KPixmapEffect::VerticalGradient,
100,
-100);
- aTitleBarTopTile = new QPixmap(1, TOPMARGIN);
+ aTitleBarTopTile = new TQPixmap(1, TOPMARGIN);
painter.begin(aTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -532,7 +532,7 @@ void smoothblendClient::create_pixmaps() {
KPixmapEffect::VerticalGradient,
100,
-100);
- iTitleBarTopTile = new QPixmap(1, TOPMARGIN);
+ iTitleBarTopTile = new TQPixmap(1, TOPMARGIN);
painter.begin(iTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -546,7 +546,7 @@ void smoothblendClient::create_pixmaps() {
KPixmapEffect::VerticalGradient,
100,
200);
- aTitleBarTile = new QPixmap(1, s_titleHeight+FRAMESIZE);
+ aTitleBarTile = new TQPixmap(1, s_titleHeight+FRAMESIZE);
painter.begin(aTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -559,7 +559,7 @@ void smoothblendClient::create_pixmaps() {
KPixmapEffect::VerticalGradient,
100,
200);
- iTitleBarTile = new QPixmap(1, s_titleHeight+FRAMESIZE);
+ iTitleBarTile = new TQPixmap(1, s_titleHeight+FRAMESIZE);
painter.begin(iTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -630,26 +630,26 @@ void smoothblendClient::_resetLayout()
delete bottomSpacer_;
delete windowSpacer_;
- mainLayout_ = new QVBoxLayout(widget());
+ mainLayout_ = new TQVBoxLayout(widget());
// title
- titleLayout_ = new QHBoxLayout();
- QHBoxLayout *windowLayout_ = new QHBoxLayout();
+ titleLayout_ = new TQHBoxLayout();
+ TQHBoxLayout *windowLayout_ = new TQHBoxLayout();
int FRAMESIZE = ::factory->frameSize();
- topSpacer_ = new QSpacerItem(1, FRAMESIZE, QSizePolicy::Expanding, QSizePolicy::Fixed);
- titlebar_ = new QSpacerItem(1, ::factory->buttonSize(),
- QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftTitleSpacer_ = new QSpacerItem(FRAMESIZE, s_titleHeight,
- QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightTitleSpacer_ = new QSpacerItem(FRAMESIZE, s_titleHeight,
- QSizePolicy::Fixed, QSizePolicy::Fixed);
- decoSpacer_ = new QSpacerItem(1, FRAMESIZE, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_ = new QSpacerItem(::factory->frameSize(), 1,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightSpacer_ = new QSpacerItem(::factory->frameSize(), 1,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
- bottomSpacer_ = new QSpacerItem(1, ::factory->frameSize(),
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer_ = new TQSpacerItem(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ titlebar_ = new TQSpacerItem(1, ::factory->buttonSize(),
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftTitleSpacer_ = new TQSpacerItem(FRAMESIZE, s_titleHeight,
+ TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightTitleSpacer_ = new TQSpacerItem(FRAMESIZE, s_titleHeight,
+ TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ decoSpacer_ = new TQSpacerItem(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_ = new TQSpacerItem(::factory->frameSize(), 1,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightSpacer_ = new TQSpacerItem(::factory->frameSize(), 1,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ bottomSpacer_ = new TQSpacerItem(1, ::factory->frameSize(),
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
// sizeof(...) is calculated at compile time
memset(button, 0, sizeof(smoothblendButton *) * ButtonTypeCount);
@@ -657,9 +657,9 @@ void smoothblendClient::_resetLayout()
// message in preview widget
if (isPreview()) {
windowLayout_->addWidget(
- new QLabel( i18n("<b><center>Smooth Blend</center></b>"), widget() ), 1 );
+ new TQLabel( i18n("<b><center>Smooth Blend</center></b>"), widget() ), 1 );
} else {
- windowLayout_->addItem(new QSpacerItem(0, 0));
+ windowLayout_->addItem(new TQSpacerItem(0, 0));
}
// setup titlebar buttons
@@ -668,16 +668,16 @@ void smoothblendClient::_resetLayout()
//Deal with the title and buttons
titleLayout_->addItem(leftTitleSpacer_);
addButtons(titleLayout_,
- options()->customButtonPositions() ? options()->titleButtonsLeft() : QString(default_left),
+ options()->customButtonPositions() ? options()->titleButtonsLeft() : TQString(default_left),
::factory->titleSize()-1);
titleLayout_->addItem(titlebar_);
addButtons(titleLayout_,
- options()->customButtonPositions() ? options()->titleButtonsRight() : QString(default_right),
+ options()->customButtonPositions() ? options()->titleButtonsRight() : TQString(default_right),
::factory->titleSize()-1);
titleLayout_->addItem(rightTitleSpacer_);
//Mid - left side, middle contents and right side
- QHBoxLayout * midLayout_ = new QHBoxLayout();
+ TQHBoxLayout * midLayout_ = new TQHBoxLayout();
midLayout_->addItem(leftSpacer_);
midLayout_->addLayout(windowLayout_);
midLayout_->addItem(rightSpacer_);
@@ -690,8 +690,8 @@ void smoothblendClient::_resetLayout()
mainLayout_->addItem( bottomSpacer_ );
// connections
- connect(this, SIGNAL(keepAboveChanged(bool)), SLOT(keepAboveChange(bool)));
- connect(this, SIGNAL(keepBelowChanged(bool)), SLOT(keepBelowChange(bool)));
+ connect(this, TQT_SIGNAL(keepAboveChanged(bool)), TQT_SLOT(keepAboveChange(bool)));
+ connect(this, TQT_SIGNAL(keepBelowChanged(bool)), TQT_SLOT(keepBelowChange(bool)));
}
//////////////////////////////////////////////////////////////////////////////
@@ -699,8 +699,8 @@ void smoothblendClient::_resetLayout()
// ------------
// Add buttons to title layout
-void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int button_size) {
- QString tip;
+void smoothblendClient::addButtons(TQBoxLayout *layout, const TQString& s, int button_size) {
+ TQString tip;
if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) {
switch (s[n]) {
@@ -708,8 +708,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
if (!button[ButtonMenu]) {
button[ButtonMenu] =
new smoothblendButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size);
- connect(button[ButtonMenu], SIGNAL(pressed()), this, SLOT(menuButtonPressed()));
- connect(button[ButtonMenu], SIGNAL(released()), this, SLOT(menuButtonReleased()));
+ connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed()));
+ connect(button[ButtonMenu], TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
layout->addWidget(button[ButtonMenu]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -724,8 +724,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
}
button[ButtonSticky] =
new smoothblendButton(this, "circle.png", tip, ButtonSticky, button_size, true);
- connect(button[ButtonSticky], SIGNAL(clicked()),
- this, SLOT(toggleOnAllDesktops()));
+ connect(button[ButtonSticky], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(toggleOnAllDesktops()));
layout->addWidget(button[ButtonSticky]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -735,8 +735,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
if ((!button[ButtonHelp]) && providesContextHelp()) {
button[ButtonHelp] =
new smoothblendButton(this, "help.png", i18n("Help"), ButtonHelp, button_size);
- connect(button[ButtonHelp], SIGNAL(clicked()),
- this, SLOT(showContextHelp()));
+ connect(button[ButtonHelp], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(showContextHelp()));
layout->addWidget(button[ButtonHelp]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -746,8 +746,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
if ((!button[ButtonMin]) && isMinimizable()) {
button[ButtonMin] =
new smoothblendButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size);
- connect(button[ButtonMin], SIGNAL(clicked()),
- this, SLOT(minimize()));
+ connect(button[ButtonMin], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(minimize()));
layout->addWidget(button[ButtonMin]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -762,8 +762,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
}
button[ButtonMax] =
new smoothblendButton(this, "maximize.png", tip, ButtonMax, button_size, true);
- connect(button[ButtonMax], SIGNAL(clicked()),
- this, SLOT(maxButtonPressed()));
+ connect(button[ButtonMax], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(maxButtonPressed()));
layout->addWidget(button[ButtonMax]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -773,8 +773,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
if ((!button[ButtonClose]) && isCloseable()) {
button[ButtonClose] =
new smoothblendButton(this, "close.png", i18n("Close"), ButtonClose, button_size);
- connect(button[ButtonClose], SIGNAL(clicked()),
- this, SLOT(closeWindow()));
+ connect(button[ButtonClose], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(closeWindow()));
layout->addWidget(button[ButtonClose]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -785,8 +785,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
button[ButtonAbove] =
new smoothblendButton(this, "keep_above.png",
i18n("Keep Above Others"), ButtonAbove, button_size, true);
- connect(button[ButtonAbove], SIGNAL(clicked()),
- this, SLOT(aboveButtonPressed()));
+ connect(button[ButtonAbove], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboveButtonPressed()));
layout->addWidget(button[ButtonAbove]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -797,8 +797,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
button[ButtonBelow] =
new smoothblendButton(this, "keep_below.png",
i18n("Keep Below Others"), ButtonBelow, button_size, true);
- connect(button[ButtonBelow], SIGNAL(clicked()),
- this, SLOT(belowButtonPressed()));
+ connect(button[ButtonBelow], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(belowButtonPressed()));
layout->addWidget(button[ButtonBelow]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -813,8 +813,8 @@ void smoothblendClient::addButtons(QBoxLayout *layout, const QString& s, int but
}
button[ButtonShade] =
new smoothblendButton(this, "shade.png", tip, ButtonShade, button_size, true);
- connect(button[ButtonShade], SIGNAL(clicked()),
- this, SLOT(shadeButtonPressed()));
+ connect(button[ButtonShade], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(shadeButtonPressed()));
layout->addWidget(button[ButtonShade]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -856,8 +856,8 @@ void smoothblendClient::captionChange() {
void smoothblendClient::desktopChange() {
bool d = isOnAllDesktops();
if (button[ButtonSticky]) {
- QToolTip::remove(button[ButtonSticky]);
- QToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
+ TQToolTip::remove(button[ButtonSticky]);
+ TQToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
button[ButtonSticky]->repaint(false);
}
}
@@ -881,8 +881,8 @@ void smoothblendClient::iconChange() {
void smoothblendClient::maximizeChange() {
bool m = (maximizeMode() == MaximizeFull);
if (button[ButtonMax]) {
- QToolTip::remove(button[ButtonMax]);
- QToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
+ TQToolTip::remove(button[ButtonMax]);
+ TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
button[ButtonMax]->repaint(false);
}
}
@@ -895,8 +895,8 @@ void smoothblendClient::maximizeChange() {
void smoothblendClient::shadeChange() {
bool s = isSetShade();
if (button[ButtonShade]) {
- QToolTip::remove(button[ButtonShade]);
- QToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
+ TQToolTip::remove(button[ButtonShade]);
+ TQToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
button[ButtonShade]->repaint(false);
}
}
@@ -938,25 +938,25 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
top = ::factory->buttonSize();
// update layout etc.
- topSpacer_->changeSize(1, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
- decoSpacer_->changeSize(1, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- leftTitleSpacer_->changeSize(left, top, QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightTitleSpacer_->changeSize(right, top, QSizePolicy::Fixed, QSizePolicy::Fixed);
- bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ leftTitleSpacer_->changeSize(left, top, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightTitleSpacer_->changeSize(right, top, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} else {
left = right = bottom = ::factory->frameSize();
top = ::factory->titleSize() + (FRAMESIZE*2);
// update layout etc.
- topSpacer_->changeSize(1, FRAMESIZE, QSizePolicy::Expanding, QSizePolicy::Fixed);
- decoSpacer_->changeSize(1, FRAMESIZE, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- leftTitleSpacer_->changeSize(left, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightTitleSpacer_->changeSize(right,s_titleHeight,QSizePolicy::Fixed, QSizePolicy::Fixed);
- bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ decoSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ leftTitleSpacer_->changeSize(left, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
}
widget()->layout()->activate();
}
@@ -966,7 +966,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
// --------
// Called to resize the window
-void smoothblendClient::resize(const QSize &size) {
+void smoothblendClient::resize(const TQSize &size) {
widget()->resize(size);
}
@@ -975,7 +975,7 @@ void smoothblendClient::resize(const QSize &size) {
// -------------
// Return the minimum allowable size for this window
-QSize smoothblendClient::minimumSize() const {
+TQSize smoothblendClient::minimumSize() const {
return widget()->minimumSize();
}
@@ -984,7 +984,7 @@ QSize smoothblendClient::minimumSize() const {
// ---------------
// Return logical mouse position
-KDecoration::Position smoothblendClient::mousePosition(const QPoint &point) const {
+KDecoration::Position smoothblendClient::mousePosition(const TQPoint &point) const {
const int corner = 24;
Position pos;
int fs = ::factory->frameSize() + handlebar;
@@ -1034,33 +1034,33 @@ KDecoration::Position smoothblendClient::mousePosition(const QPoint &point) cons
// -------------
// Event filter
-bool smoothblendClient::eventFilter(QObject *obj, QEvent *e) {
+bool smoothblendClient::eventFilter(TQObject *obj, TQEvent *e) {
if (obj != widget())
return false;
switch (e->type()) {
- case QEvent::MouseButtonDblClick: {
- mouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick: {
+ mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
return true;
}
- case QEvent::MouseButtonPress: {
- processMousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress: {
+ processMousePressEvent(static_cast<TQMouseEvent *>(e));
return true;
}
- case QEvent::Paint: {
- paintEvent(static_cast<QPaintEvent *>(e));
+ case TQEvent::Paint: {
+ paintEvent(static_cast<TQPaintEvent *>(e));
return true;
}
- case QEvent::Resize: {
- resizeEvent(static_cast<QResizeEvent *>(e));
+ case TQEvent::Resize: {
+ resizeEvent(static_cast<TQResizeEvent *>(e));
return true;
}
- case QEvent::Show: {
- showEvent(static_cast<QShowEvent *>(e));
+ case TQEvent::Show: {
+ showEvent(static_cast<TQShowEvent *>(e));
return true;
}
- case QEvent::Wheel: {
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel: {
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
}
default: {
@@ -1076,7 +1076,7 @@ bool smoothblendClient::eventFilter(QObject *obj, QEvent *e) {
// -----------------------
// Doubleclick on title
-void smoothblendClient::mouseDoubleClickEvent(QMouseEvent *e) {
+void smoothblendClient::mouseDoubleClickEvent(TQMouseEvent *e) {
if (titlebar_->geometry().contains(e->pos()))
titlebarDblClickOperation();
}
@@ -1086,7 +1086,7 @@ void smoothblendClient::mouseDoubleClickEvent(QMouseEvent *e) {
// ------------
// Mouse wheel on titlebar
-void smoothblendClient::wheelEvent(QWheelEvent *e)
+void smoothblendClient::wheelEvent(TQWheelEvent *e)
{
if (titleLayout_->geometry().contains(e->pos()) )
titlebarMouseWheelOperation( e->delta());
@@ -1097,7 +1097,7 @@ void smoothblendClient::wheelEvent(QWheelEvent *e)
// ------------
// Repaint the window
-void smoothblendClient::paintEvent(QPaintEvent*) {
+void smoothblendClient::paintEvent(TQPaintEvent*) {
if (!::factory->initialized())
{
return;
@@ -1105,31 +1105,31 @@ void smoothblendClient::paintEvent(QPaintEvent*) {
//int FRAMESIZE = ::factory->frameSize();
const uint maxCaptionLength = 300; // truncate captions longer than this!
- QString captionText(caption());
+ TQString captionText(caption());
if (captionText.length() > maxCaptionLength) {
captionText.truncate(maxCaptionLength);
captionText.append(" [...]");
}
- QColor blackColor(black);
- QColor redColor(red);
- QColorGroup group,widgetGroup;
- QPainter painter(widget());
+ TQColor blackColor(black);
+ TQColor redColor(red);
+ TQColorGroup group,widgetGroup;
+ TQPainter painter(widget());
bool active = isActive();
//get group information first
group = options()->colorGroup(KDecoration::ColorTitleBar, isActive());
widgetGroup = widget()->colorGroup();
- QRect topRect( topSpacer_->geometry() );
- QRect titleRect( titleLayout_->geometry() );
- QRect textRect( titlebar_->geometry() );
- QRect Rltitle( leftTitleSpacer_->geometry() );
- QRect Rrtitle( rightTitleSpacer_->geometry() );
- QRect Rdeco( decoSpacer_->geometry() );
- QRect Rleft( leftSpacer_->geometry() );
- QRect Rright( rightSpacer_->geometry() );
- QRect Rbottom( bottomSpacer_->geometry() );
- QRect tempRect;
+ TQRect topRect( topSpacer_->geometry() );
+ TQRect titleRect( titleLayout_->geometry() );
+ TQRect textRect( titlebar_->geometry() );
+ TQRect Rltitle( leftTitleSpacer_->geometry() );
+ TQRect Rrtitle( rightTitleSpacer_->geometry() );
+ TQRect Rdeco( decoSpacer_->geometry() );
+ TQRect Rleft( leftSpacer_->geometry() );
+ TQRect Rright( rightSpacer_->geometry() );
+ TQRect Rbottom( bottomSpacer_->geometry() );
+ TQRect tempRect;
/*
@@ -1159,7 +1159,7 @@ void smoothblendClient::paintEvent(QPaintEvent*) {
textRect.y(),
textRect.width()-SIDETITLEMARGIN*2,
textRect.height());
- QRect shadowRect(textRect.x()+1,textRect.y()+1,textRect.width(),textRect.height());
+ TQRect shadowRect(textRect.x()+1,textRect.y()+1,textRect.width(),textRect.height());
//if we are shadowing title bar text
if(::factory->titleShadow())
{
@@ -1242,32 +1242,32 @@ void smoothblendClient::updateMask() {
bool cornersFlag = ::factory->roundedCorners();
if ( (!options()->moveResizeMaximizedWindows() && maximizeMode() == MaximizeFull ) )
{
- setMask(QRegion(widget()->rect()));
+ setMask(TQRegion(widget()->rect()));
return;
}
int r(width());
int b(height());
- QRegion mask;
+ TQRegion mask;
- mask=QRegion(widget()->rect());
+ mask=TQRegion(widget()->rect());
// Remove top-left corner.
if(cornersFlag) {
- mask -= QRegion(0, 0, 5, 1);
- mask -= QRegion(0, 1, 3, 1);
- mask -= QRegion(0, 2, 2, 1);
- mask -= QRegion(0, 3, 1, 2);
- mask -= QRegion(r - 5, 0, 5, 1);
- mask -= QRegion(r - 3, 1, 3, 1);
- mask -= QRegion(r - 2, 2, 2, 1);
- mask -= QRegion(r - 1, 3, 1, 2);
+ mask -= TQRegion(0, 0, 5, 1);
+ mask -= TQRegion(0, 1, 3, 1);
+ mask -= TQRegion(0, 2, 2, 1);
+ mask -= TQRegion(0, 3, 1, 2);
+ mask -= TQRegion(r - 5, 0, 5, 1);
+ mask -= TQRegion(r - 3, 1, 3, 1);
+ mask -= TQRegion(r - 2, 2, 2, 1);
+ mask -= TQRegion(r - 1, 3, 1, 2);
}
//always remove one corner pixel so it simulates a soft corner like plastik
- mask -= QRegion(0,0,1,1);
- mask -= QRegion(r-1,0,1,1);
- mask -= QRegion(0, b-1, 1,1);
- mask -= QRegion(r-1,b-1,1,1);
+ mask -= TQRegion(0,0,1,1);
+ mask -= TQRegion(r-1,0,1,1);
+ mask -= TQRegion(0, b-1, 1,1);
+ mask -= TQRegion(r-1,b-1,1,1);
setMask(mask);
}
@@ -1277,9 +1277,9 @@ void smoothblendClient::updateMask() {
// -------------
// Window is being resized
-void smoothblendClient::resizeEvent(QResizeEvent *) {
+void smoothblendClient::resizeEvent(TQResizeEvent *) {
if (widget()->isShown()) {
- QRegion region = widget()->rect();
+ TQRegion region = widget()->rect();
region = region.subtract(titlebar_->geometry());
widget()->erase(region);
updateMask();
@@ -1291,7 +1291,7 @@ void smoothblendClient::resizeEvent(QResizeEvent *) {
// -----------
// Window is being shown
-void smoothblendClient::showEvent(QShowEvent *) {
+void smoothblendClient::showEvent(TQShowEvent *) {
updateMask();
widget()->repaint();
}
@@ -1362,16 +1362,16 @@ void smoothblendClient::belowButtonPressed() {
// Menu button was pressed (popup the menu)
void smoothblendClient::menuButtonPressed() {
- static QTime* t = NULL;
+ static TQTime* t = NULL;
static smoothblendClient* lastClient = NULL;
if (t == NULL)
t = new QTime;
- bool dbl = (lastClient==this && t->elapsed() <= QApplication::doubleClickInterval());
+ bool dbl = (lastClient==this && t->elapsed() <= TQApplication::doubleClickInterval());
lastClient = this;
t->start();
//if (button[ButtonMenu] && !dbl && !::factory->menuClosed()) {
if ( !dbl || !::factory->menuClosed()) {
- QPoint p(button[ButtonMenu]->rect().bottomLeft().x(),
+ TQPoint p(button[ButtonMenu]->rect().bottomLeft().x(),
button[ButtonMenu]->rect().bottomLeft().y());
KDecorationFactory* f = factory();
showWindowMenu(button[ButtonMenu]->mapToGlobal(p));
diff --git a/kwin-styles/smooth-blend/client/smoothblend.h b/kwin-styles/smooth-blend/client/smoothblend.h
index d5f07576..e5a2ec70 100644
--- a/kwin-styles/smooth-blend/client/smoothblend.h
+++ b/kwin-styles/smooth-blend/client/smoothblend.h
@@ -25,7 +25,7 @@
#ifndef SMOOTHBLEND_H
#define SMOOTHBLEND_H
-#include <qbutton.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -71,7 +71,7 @@ public:
static int buttonSize();
static int frameSize();
static int roundSize();
- static QFont titleFontTool() { return m_titleFontTool; }
+ static TQFont titleFontTool() { return m_titleFontTool; }
static bool titleShadow();
static bool animateButtons() { return animatebuttons; }
static int getBtnComboBox() { return btnComboBox; }
@@ -88,7 +88,7 @@ private:
static int buttonsize_;
static int framesize_;
static int roundsize_;
- static QFont m_titleFontTool;
+ static TQFont m_titleFontTool;
static bool titleshadow_;
static bool animatebuttons;
static int btnComboBox;
@@ -122,11 +122,11 @@ inline bool smoothblendFactory::titleShadow() {
// smoothblendButton //////////////////////////////////////////////////////////
-class smoothblendButton : public QButton {
+class smoothblendButton : public TQButton {
Q_OBJECT
public:
smoothblendButton(smoothblendClient *parent=0, const char *name=0,
- const QString &tip=NULL,
+ const TQString &tip=NULL,
ButtonType type=ButtonHelp,
int button_size=18,
bool toggle=false);
@@ -134,10 +134,10 @@ public:
~smoothblendButton();
void setBitmap(const unsigned char *bitmap);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
ButtonState lastMousePress() const;
void reset();
- QImage getButtonImage(ButtonType type);
+ TQImage getButtonImage(ButtonType type);
virtual void setOn(bool on);
virtual void setDown(bool on);
@@ -147,22 +147,22 @@ protected slots:
void buttonReleased();
private:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void drawButton(QPainter *painter);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void drawButton(TQPainter *painter);
private:
smoothblendClient *client_;
ButtonType type_;
int size_;
- QBitmap *deco_;
- QPixmap *pixmap[2][4];
+ TQBitmap *deco_;
+ TQPixmap *pixmap[2][4];
ButtonState lastmouse_;
bool hover_;
bool m_clicked;
- QTimer *animTmr;
+ TQTimer *animTmr;
uint animProgress;
};
@@ -192,34 +192,34 @@ public:
virtual void borders(int &l, int &r, int &t, int &b) const;
- virtual void resize(const QSize &size);
- virtual QSize minimumSize() const;
- virtual Position mousePosition(const QPoint &point) const;
+ virtual void resize(const TQSize &size);
+ virtual TQSize minimumSize() const;
+ virtual Position mousePosition(const TQPoint &point) const;
- QPixmap getTitleBarTile(bool active) const
+ TQPixmap getTitleBarTile(bool active) const
{
return active ? *aTitleBarTile : *iTitleBarTile;
}
private:
- void addButtons(QBoxLayout* layout, const QString& buttons, int buttonSize = 18);
- bool eventFilter(QObject *obj, QEvent *e);
- void mouseDoubleClickEvent(QMouseEvent *e);
- void wheelEvent(QWheelEvent *e);
- void paintEvent(QPaintEvent *e);
- void resizeEvent(QResizeEvent *);
- void showEvent(QShowEvent *);
+ void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18);
+ bool eventFilter(TQObject *obj, TQEvent *e);
+ void mouseDoubleClickEvent(TQMouseEvent *e);
+ void wheelEvent(TQWheelEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void resizeEvent(TQResizeEvent *);
+ void showEvent(TQShowEvent *);
void updateMask();
void _resetLayout();
- QVBoxLayout *mainLayout_;
- QHBoxLayout *titleLayout_;
- QSpacerItem *topSpacer_,
+ TQVBoxLayout *mainLayout_;
+ TQHBoxLayout *titleLayout_;
+ TQSpacerItem *topSpacer_,
*titleSpacer_,
*leftTitleSpacer_, *rightTitleSpacer_,
*decoSpacer_,
*leftSpacer_, *rightSpacer_,
*bottomSpacer_, *windowSpacer_;
- QPixmap *aCaptionBuffer, *iCaptionBuffer;
+ TQPixmap *aCaptionBuffer, *iCaptionBuffer;
private slots:
void maxButtonPressed();
@@ -236,12 +236,12 @@ signals:
void keepBelowChanged(bool);
private:
- QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
+ TQPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
smoothblendButton *button[ButtonTypeCount];
- QSpacerItem *titlebar_;
+ TQSpacerItem *titlebar_;
bool pixmaps_created;
int s_titleHeight;
- QFont s_titleFont;
+ TQFont s_titleFont;
int handlebar;
bool closing;
diff --git a/kwin-styles/system/systemclient.cpp b/kwin-styles/system/systemclient.cpp
index e3d85e8e..caab350a 100644
--- a/kwin-styles/system/systemclient.cpp
+++ b/kwin-styles/system/systemclient.cpp
@@ -1,11 +1,11 @@
#include "systemclient.h"
-#include <qlayout.h>
-#include <qdrawutil.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include <kpixmapeffect.h>
#include <kdrawutil.h>
@@ -47,13 +47,13 @@ static KPixmap *btnPix=0;
static KPixmap *btnPixDown=0;
static KPixmap *iBtnPix=0;
static KPixmap *iBtnPixDown=0;
-static QColor *btnForeground;
+static TQColor *btnForeground;
static bool pixmaps_created = false;
-static void drawButtonFrame(KPixmap *pix, const QColorGroup &g)
+static void drawButtonFrame(KPixmap *pix, const TQColorGroup &g)
{
- QPainter p;
+ TQPainter p;
p.begin(pix);
p.setPen(g.mid());
p.drawLine(0, 0, 13, 0);
@@ -72,13 +72,13 @@ static void create_pixmaps()
return;
pixmaps_created = true;
- if(QPixmap::defaultDepth() > 8){
+ if(TQPixmap::defaultDepth() > 8){
// titlebar
aUpperGradient = new KPixmap;
aUpperGradient->resize(32, 18);
iUpperGradient = new KPixmap;
iUpperGradient->resize(32, 18);
- QColor bgColor = kapp->palette().active().background();
+ TQColor bgColor = kapp->palette().active().background();
KPixmapEffect::gradient(*aUpperGradient,
KDecoration::options()->color(KDecorationOptions::ColorFrame, true).light(130),
bgColor,
@@ -98,7 +98,7 @@ static void create_pixmaps()
KPixmap iInternal;
iInternal.resize(8, 8);
- QColor hColor(KDecoration::options()->color(KDecorationOptions::ColorButtonBg, false));
+ TQColor hColor(KDecoration::options()->color(KDecorationOptions::ColorButtonBg, false));
KPixmapEffect::gradient(iInternal,
hColor.dark(120),
hColor.light(120),
@@ -168,9 +168,9 @@ static void create_pixmaps()
false));
}
if(qGray(KDecoration::options()->color(KDecorationOptions::ColorButtonBg, true).rgb()) > 128)
- btnForeground = new QColor(Qt::black);
+ btnForeground = new TQColor(Qt::black);
else
- btnForeground = new QColor(Qt::white);
+ btnForeground = new TQColor(Qt::white);
}
static void delete_pixmaps()
@@ -189,8 +189,8 @@ static void delete_pixmaps()
}
SystemButton::SystemButton(SystemClient *parent, const char *name,
- const unsigned char *bitmap, const QString& tip)
-: QButton(parent->widget(), name)
+ const unsigned char *bitmap, const TQString& tip)
+: TQButton(parent->widget(), name)
{
setTipText(tip);
setBackgroundMode( NoBackground );
@@ -201,19 +201,19 @@ SystemButton::SystemButton(SystemClient *parent, const char *name,
client = parent;
}
-void SystemButton::setTipText(const QString &tip)
+void SystemButton::setTipText(const TQString &tip)
{
if (KDecoration::options()->showTooltips())
{
- QToolTip::remove(this );
- QToolTip::add(this, tip );
+ TQToolTip::remove(this );
+ TQToolTip::add(this, tip );
}
}
-QSize SystemButton::sizeHint() const
+TQSize SystemButton::sizeHint() const
{
- return(QSize(14, 14));
+ return(TQSize(14, 14));
}
void SystemButton::reset()
@@ -223,12 +223,12 @@ void SystemButton::reset()
void SystemButton::setBitmap(const unsigned char *bitmap)
{
- deco = QBitmap(8, 8, bitmap, true);
+ deco = TQBitmap(8, 8, bitmap, true);
deco.setMask(deco);
repaint();
}
-void SystemButton::drawButton(QPainter *p)
+void SystemButton::drawButton(TQPainter *p)
{
if(btnPixDown){
if(client->isActive())
@@ -237,7 +237,7 @@ void SystemButton::drawButton(QPainter *p)
p->drawPixmap(0, 0, isDown() ? *iBtnPixDown : *iBtnPix);
}
else{
- QColorGroup g = KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame,
+ TQColorGroup g = KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame,
client->isActive());
int x2 = width()-1;
int y2 = height()-1;
@@ -268,18 +268,18 @@ void SystemButton::drawButton(QPainter *p)
}
}
-void SystemButton::mousePressEvent( QMouseEvent* e )
+void SystemButton::mousePressEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
- QButton::mousePressEvent( &me );
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQButton::mousePressEvent( &me );
}
-void SystemButton::mouseReleaseEvent( QMouseEvent* e )
+void SystemButton::mouseReleaseEvent( TQMouseEvent* e )
{
last_button = e->button();
- QMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
- QButton::mouseReleaseEvent( &me );
+ TQMouseEvent me ( e->type(), e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQButton::mouseReleaseEvent( &me );
}
@@ -300,47 +300,47 @@ void SystemClient::init()
createMainWidget(0);
widget()->installEventFilter( this );
- QGridLayout* g = new QGridLayout(widget(), 0, 0, 2);
+ TQGridLayout* g = new TQGridLayout(widget(), 0, 0, 2);
if (isPreview())
{
- g->addWidget(new QLabel(i18n("<center><b>System++ preview</b></center>"), widget()), 1, 1);
+ g->addWidget(new TQLabel(i18n("<center><b>System++ preview</b></center>"), widget()), 1, 1);
}
else
{
- g->addItem(new QSpacerItem( 0, 0 ), 1, 1); // no widget in the middle
+ g->addItem(new TQSpacerItem( 0, 0 ), 1, 1); // no widget in the middle
}
-// g->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
+// g->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) );
g->setRowStretch(1, 10);
g->addColSpacing(0, 2);
g->addColSpacing(2, 2);
g->addRowSpacing(2, 6);
- QBoxLayout* hb = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
- hb->setResizeMode(QLayout::FreeResize);
+ TQBoxLayout* hb = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ hb->setResizeMode(TQLayout::FreeResize);
g->addLayout( hb, 0, 1 );
hb->addSpacing(3);
- titlebar = new QSpacerItem(10, 14, QSizePolicy::Expanding,
- QSizePolicy::Minimum);
+ titlebar = new TQSpacerItem(10, 14, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum);
// setup titlebar buttons
for (int n=0; n<ButtonTypeCount; n++) button[n] = 0;
addButtons(hb, KDecoration::options()->customButtonPositions() ?
- KDecoration::options()->titleButtonsLeft() : QString(default_left));
+ KDecoration::options()->titleButtonsLeft() : TQString(default_left));
hb->addSpacing(2);
hb->addItem(titlebar);
hb->addSpacing(3);
addButtons(hb, KDecoration::options()->customButtonPositions() ?
- KDecoration::options()->titleButtonsRight() : QString(default_right));
+ KDecoration::options()->titleButtonsRight() : TQString(default_right));
hb->addSpacing(2);
- widget()->setBackgroundMode(QWidget::NoBackground);
+ widget()->setBackgroundMode(TQWidget::NoBackground);
recalcTitleBuffer();
}
-void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
+void SystemClient::addButtons(TQBoxLayout *hb, const TQString& s)
{
unsigned char *minmax_bits;
int l_max = KDecoration::options()->titleButtonsLeft().find('A');
@@ -350,7 +350,7 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
case 'X': // Close button
if ((!button[ButtonClose]) && isCloseable()) {
button[ButtonClose] = new SystemButton(this, "close", NULL, i18n("Close"));
- connect( button[ButtonClose], SIGNAL( clicked() ), this, ( SLOT( closeWindow() ) ) );
+ connect( button[ButtonClose], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( closeWindow() ) ) );
hb->addWidget(button[ButtonClose]);
hb->addSpacing(1);
}
@@ -363,7 +363,7 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
button[ButtonSticky]->setBitmap(unsticky_bits);
else
button[ButtonSticky]->setBitmap(sticky_bits);
- connect( button[ButtonSticky], SIGNAL( clicked() ), this, ( SLOT( toggleOnAllDesktops() ) ) );
+ connect( button[ButtonSticky], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( toggleOnAllDesktops() ) ) );
hb->addWidget(button[ButtonSticky]);
hb->addSpacing(1);
}
@@ -372,7 +372,7 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
case 'I': // Minimize button
if ((!button[ButtonMinimize]) && isMinimizable()) {
button[ButtonMinimize] = new SystemButton(this, "iconify", iconify_bits, i18n("Minimize"));
- connect( button[ButtonMinimize], SIGNAL( clicked() ), this, ( SLOT( minimize() ) ) );
+ connect( button[ButtonMinimize], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( minimize() ) ) );
hb->addWidget(button[ButtonMinimize]);
hb->addSpacing(1);
}
@@ -389,7 +389,7 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
}
else
button[ButtonMaximize] = new SystemButton(this, "maximize", maximize_bits, i18n("Maximize"));
- connect( button[ButtonMaximize], SIGNAL( clicked() ), this, ( SLOT( maxButtonClicked() ) ) );
+ connect( button[ButtonMaximize], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( maxButtonClicked() ) ) );
hb->addWidget(button[ButtonMaximize]);
hb->addSpacing(1);
}
@@ -398,7 +398,7 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
case 'H': // Help button
if ((!button[ButtonHelp]) && providesContextHelp()) {
button[ButtonHelp] = new SystemButton(this, "help", question_bits, i18n("Help"));
- connect( button[ButtonHelp], SIGNAL( clicked() ), this, ( SLOT( showContextHelp() ) ) );
+ connect( button[ButtonHelp], TQT_SIGNAL( clicked() ), this, ( TQT_SLOT( showContextHelp() ) ) );
hb->addWidget(button[ButtonHelp]);
hb->addSpacing(1);
}
@@ -409,26 +409,26 @@ void SystemClient::addButtons(QBoxLayout *hb, const QString& s)
}
}
-bool SystemClient::eventFilter( QObject* o, QEvent* e )
+bool SystemClient::eventFilter( TQObject* o, TQEvent* e )
{
if( o != widget())
return false;
switch( e->type())
{
- case QEvent::Resize:
- resizeEvent(static_cast< QResizeEvent* >( e ) );
+ case TQEvent::Resize:
+ resizeEvent(static_cast< TQResizeEvent* >( e ) );
return true;
- case QEvent::Paint:
- paintEvent(static_cast< QPaintEvent* >( e ) );
+ case TQEvent::Paint:
+ paintEvent(static_cast< TQPaintEvent* >( e ) );
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent(static_cast< QMouseEvent* >( e ) );
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent(static_cast< TQMouseEvent* >( e ) );
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
break;
@@ -458,30 +458,30 @@ void SystemClient::maxButtonClicked()
maximize( button[ButtonMaximize]->last_button );
}
-void SystemClient::resizeEvent( QResizeEvent* )
+void SystemClient::resizeEvent( TQResizeEvent* )
{
//Client::resizeEvent( e );
recalcTitleBuffer();
doShape();
/*
if ( isVisibleToTLW() && !testWFlags( WStaticContents )) {
- QPainter p( this );
- QRect t = titlebar->geometry();
+ TQPainter p( this );
+ TQRect t = titlebar->geometry();
t.setTop( 0 );
- QRegion r = rect();
+ TQRegion r = rect();
r = r.subtract( t );
p.setClipRegion( r );
p.eraseRect( rect() );
}*/
}
-void SystemClient::resize( const QSize& s )
+void SystemClient::resize( const TQSize& s )
{
widget()->resize( s );
}
-QSize SystemClient::minimumSize() const
+TQSize SystemClient::minimumSize() const
{
return widget()->minimumSize();
}
@@ -491,24 +491,24 @@ void SystemClient::recalcTitleBuffer()
{
if(oldTitle == caption() && width() == titleBuffer.width())
return;
- QFontMetrics fm(options()->font(true));
+ TQFontMetrics fm(options()->font(true));
titleBuffer.resize(width(), 18);
- QPainter p;
+ TQPainter p;
p.begin(&titleBuffer);
if(aUpperGradient)
p.drawTiledPixmap(0, 0, width(), 18, *aUpperGradient);
else
p.fillRect(0, 0, width(), 18,
options()->colorGroup(KDecorationOptions::ColorFrame, true).
- brush(QColorGroup::Button));
+ brush(TQColorGroup::Button));
- QRect t = titlebar->geometry();
+ TQRect t = titlebar->geometry();
t.setTop( 2 );
t.setLeft( t.left() + 4 );
t.setRight( t.right() - 2 );
- QRegion r(t.x(), 0, t.width(), 18);
- r -= QRect(t.x()+((t.width()-fm.width(caption()))/2)-4,
+ TQRegion r(t.x(), 0, t.width(), 18);
+ r -= TQRect(t.x()+((t.width()-fm.width(caption()))/2)-4,
0, fm.width(caption())+8, 18);
p.setClipRegion(r);
int i, ly;
@@ -535,22 +535,22 @@ void SystemClient::captionChange()
widget()->repaint(titlebar->geometry(), false);
}
-void SystemClient::drawRoundFrame(QPainter &p, int x, int y, int w, int h)
+void SystemClient::drawRoundFrame(TQPainter &p, int x, int y, int w, int h)
{
kDrawRoundButton(&p, x, y, w, h,
options()->colorGroup(KDecorationOptions::ColorFrame, isActive()), false);
}
-void SystemClient::paintEvent( QPaintEvent* )
+void SystemClient::paintEvent( TQPaintEvent* )
{
- QPainter p(widget());
- QRect t = titlebar->geometry();
+ TQPainter p(widget());
+ TQRect t = titlebar->geometry();
- QBrush fillBrush(widget()->colorGroup().brush(QColorGroup::Background).pixmap() ?
- widget()->colorGroup().brush(QColorGroup::Background) :
+ TQBrush fillBrush(widget()->colorGroup().brush(TQColorGroup::Background).pixmap() ?
+ widget()->colorGroup().brush(TQColorGroup::Background) :
options()->colorGroup(KDecorationOptions::ColorFrame, isActive()).
- brush(QColorGroup::Button));
+ brush(TQColorGroup::Button));
p.fillRect(1, 18, width()-2, height()-19, fillBrush);
@@ -584,15 +584,15 @@ void SystemClient::paintEvent( QPaintEvent* )
void SystemClient::doShape()
{
- // using a bunch of QRect lines seems much more efficent than bitmaps or
+ // using a bunch of TQRect lines seems much more efficent than bitmaps or
// point arrays
- QRegion mask;
+ TQRegion mask;
kRoundMaskRegion(mask, 0, 0, width(), height());
setMask(mask);
}
-void SystemClient::showEvent(QShowEvent *)
+void SystemClient::showEvent(TQShowEvent *)
{
// Client::showEvent(ev);
doShape();
@@ -600,20 +600,20 @@ void SystemClient::showEvent(QShowEvent *)
// widget()->repaint();
}
-/*void SystemClient::windowWrapperShowEvent( QShowEvent* )
+/*void SystemClient::windowWrapperShowEvent( TQShowEvent* )
{
doShape();
}*/
-void SystemClient::mouseDoubleClickEvent( QMouseEvent * e )
+void SystemClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
}
-void SystemClient::wheelEvent( QWheelEvent *e )
+void SystemClient::wheelEvent( TQWheelEvent *e )
{
- if (isSetShade() || QRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
+ if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
@@ -664,7 +664,7 @@ void SystemClient::desktopChange()
{
}*/
-KDecoration::Position SystemClient::mousePosition(const QPoint &p) const
+KDecoration::Position SystemClient::mousePosition(const TQPoint &p) const
{
return KDecoration::mousePosition(p);
}
@@ -722,9 +722,9 @@ bool SystemDecoFactory::supports( Ability ability )
};
}
-QValueList<KDecorationFactory::BorderSize> SystemDecoFactory::borderSizes() const
+TQValueList<KDecorationFactory::BorderSize> SystemDecoFactory::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal;
+ return TQValueList< BorderSize >() << BorderNormal;
}
}
diff --git a/kwin-styles/system/systemclient.h b/kwin-styles/system/systemclient.h
index 360f204d..3ab4df8d 100644
--- a/kwin-styles/system/systemclient.h
+++ b/kwin-styles/system/systemclient.h
@@ -1,9 +1,9 @@
#ifndef __SYSTEMCLIENT_H
#define __SYSTEMCLIENT_H
-#include <qvariant.h>
-#include <qbitmap.h>
-#include <qbutton.h>
+#include <tqvariant.h>
+#include <tqbitmap.h>
+#include <tqbutton.h>
#include <kpixmap.h>
#include <kdecoration.h>
@@ -33,9 +33,9 @@ class SystemClient : public KDecoration
public:
SystemClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~SystemClient();
- virtual Position mousePosition(const QPoint& p) const;
- virtual void resize(const QSize&);
- virtual bool eventFilter(QObject* o, QEvent* e);
+ virtual Position mousePosition(const TQPoint& p) const;
+ virtual void resize(const TQSize&);
+ virtual bool eventFilter(TQObject* o, TQEvent* e);
virtual void init();
protected:
virtual void maximizeChange();
@@ -44,53 +44,53 @@ class SystemClient : public KDecoration
virtual void iconChange();
virtual void desktopChange();
virtual void activeChange();
- virtual QSize minimumSize() const;
+ virtual TQSize minimumSize() const;
virtual void borders(int&, int&, int&, int&) const;
virtual void reset( unsigned long changed );
- void drawRoundFrame(QPainter &p, int x, int y, int w, int h);
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
- void showEvent( QShowEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent(QWheelEvent *e);
+ void drawRoundFrame(TQPainter &p, int x, int y, int w, int h);
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent(TQWheelEvent *e);
void doShape();
void recalcTitleBuffer();
private:
- void addButtons(QBoxLayout* hb, const QString& buttons);
+ void addButtons(TQBoxLayout* hb, const TQString& buttons);
private slots:
void maxButtonClicked();
private:
SystemButton* button[ButtonTypeCount];
- QSpacerItem* titlebar;
- QPixmap titleBuffer;
- QString oldTitle;
+ TQSpacerItem* titlebar;
+ TQPixmap titleBuffer;
+ TQString oldTitle;
};
class SystemButton : public QButton
{
public:
SystemButton(SystemClient *parent=0, const char *name=0,
- const unsigned char *bitmap=NULL, const QString& tip=NULL);
+ const unsigned char *bitmap=NULL, const TQString& tip=NULL);
void setBitmap(const unsigned char *bitmap);
void reset();
- QSize sizeHint() const;
- void setTipText(const QString &tip);
+ TQSize sizeHint() const;
+ void setTipText(const TQString &tip);
ButtonState last_button;
protected:
- virtual void drawButton(QPainter *p);
- void drawButtonLabel(QPainter *){}
- QBitmap deco;
+ virtual void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter *){}
+ TQBitmap deco;
- void mousePressEvent( QMouseEvent* e );
- void mouseReleaseEvent( QMouseEvent* e );
+ void mousePressEvent( TQMouseEvent* e );
+ void mouseReleaseEvent( TQMouseEvent* e );
private:
SystemClient* client;
};
-class SystemDecoFactory : public QObject, public KDecorationFactory
+class SystemDecoFactory : public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -99,7 +99,7 @@ class SystemDecoFactory : public QObject, public KDecorationFactory
virtual KDecoration *createDecoration(KDecorationBridge *);
virtual bool reset(unsigned long);
virtual bool supports( Ability ability );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
private:
void readConfig();
};