summaryrefslogtreecommitdiffstats
path: root/kwin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kwin
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin')
-rw-r--r--kwin/KWinInterface.h2
-rw-r--r--kwin/activation.cpp10
-rw-r--r--kwin/atoms.cpp2
-rw-r--r--kwin/bridge.cpp32
-rw-r--r--kwin/bridge.h22
-rw-r--r--kwin/client.cpp154
-rw-r--r--kwin/client.h188
-rw-r--r--kwin/clients/b2/b2client.cpp334
-rw-r--r--kwin/clients/b2/b2client.h90
-rw-r--r--kwin/clients/b2/config/config.cpp46
-rw-r--r--kwin/clients/b2/config/config.h22
-rw-r--r--kwin/clients/default/config/config.cpp42
-rw-r--r--kwin/clients/default/config/config.h20
-rw-r--r--kwin/clients/default/kdedefault.cpp134
-rw-r--r--kwin/clients/default/kdedefault.h32
-rw-r--r--kwin/clients/keramik/config/config.cpp18
-rw-r--r--kwin/clients/keramik/config/config.h2
-rw-r--r--kwin/clients/keramik/embedtool.cpp56
-rw-r--r--kwin/clients/keramik/keramik.cpp376
-rw-r--r--kwin/clients/keramik/keramik.h72
-rw-r--r--kwin/clients/kwmtheme/cli_installer/main.cpp26
-rw-r--r--kwin/clients/kwmtheme/kwmthemeclient.cpp182
-rw-r--r--kwin/clients/kwmtheme/kwmthemeclient.h34
-rw-r--r--kwin/clients/laptop/laptopclient.cpp100
-rw-r--r--kwin/clients/laptop/laptopclient.h20
-rw-r--r--kwin/clients/modernsystem/config/config.cpp44
-rw-r--r--kwin/clients/modernsystem/config/config.h18
-rw-r--r--kwin/clients/modernsystem/modernsys.cpp142
-rw-r--r--kwin/clients/modernsystem/modernsys.h26
-rw-r--r--kwin/clients/plastik/config/config.cpp50
-rw-r--r--kwin/clients/plastik/config/config.h4
-rw-r--r--kwin/clients/plastik/misc.cpp18
-rw-r--r--kwin/clients/plastik/misc.h6
-rw-r--r--kwin/clients/plastik/plastik.cpp90
-rw-r--r--kwin/clients/plastik/plastik.h26
-rw-r--r--kwin/clients/plastik/plastikbutton.cpp60
-rw-r--r--kwin/clients/plastik/plastikbutton.h18
-rw-r--r--kwin/clients/plastik/plastikclient.cpp98
-rw-r--r--kwin/clients/plastik/plastikclient.h24
-rw-r--r--kwin/clients/quartz/config/config.cpp24
-rw-r--r--kwin/clients/quartz/config/config.h12
-rw-r--r--kwin/clients/quartz/quartz.cpp76
-rw-r--r--kwin/clients/quartz/quartz.h20
-rw-r--r--kwin/clients/redmond/redmond.cpp84
-rw-r--r--kwin/clients/redmond/redmond.h24
-rw-r--r--kwin/clients/test/test.cpp54
-rw-r--r--kwin/clients/test/test.h12
-rw-r--r--kwin/clients/web/Web.cpp56
-rw-r--r--kwin/clients/web/Web.h14
-rw-r--r--kwin/clients/web/WebButton.cpp30
-rw-r--r--kwin/clients/web/WebButton.h12
-rw-r--r--kwin/data/update_default_rules.cpp10
-rw-r--r--kwin/data/update_window_settings.cpp62
-rw-r--r--kwin/events.cpp90
-rw-r--r--kwin/geometry.cpp354
-rw-r--r--kwin/geometrytip.cpp8
-rw-r--r--kwin/geometrytip.h4
-rw-r--r--kwin/group.cpp18
-rw-r--r--kwin/group.h4
-rw-r--r--kwin/kcmkwin/kwindecoration/buttons.cpp208
-rw-r--r--kwin/kcmkwin/kwindecoration/buttons.h90
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecoration.cpp174
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecoration.h48
-rw-r--r--kwin/kcmkwin/kwindecoration/preview.cpp84
-rw-r--r--kwin/kcmkwin/kwindecoration/preview.h46
-rw-r--r--kwin/kcmkwin/kwinoptions/main.cpp44
-rw-r--r--kwin/kcmkwin/kwinoptions/main.h12
-rw-r--r--kwin/kcmkwin/kwinoptions/mouse.cpp278
-rw-r--r--kwin/kcmkwin/kwinoptions/mouse.h52
-rw-r--r--kwin/kcmkwin/kwinoptions/windows.cpp474
-rw-r--r--kwin/kcmkwin/kwinoptions/windows.h104
-rw-r--r--kwin/kcmkwin/kwinrules/detectwidget.cpp28
-rw-r--r--kwin/kcmkwin/kwinrules/detectwidget.h28
-rw-r--r--kwin/kcmkwin/kwinrules/kcm.cpp12
-rw-r--r--kwin/kcmkwin/kwinrules/kcm.h4
-rw-r--r--kwin/kcmkwin/kwinrules/main.cpp34
-rw-r--r--kwin/kcmkwin/kwinrules/ruleslist.cpp56
-rw-r--r--kwin/kcmkwin/kwinrules/ruleslist.h8
-rw-r--r--kwin/kcmkwin/kwinrules/ruleswidget.cpp90
-rw-r--r--kwin/kcmkwin/kwinrules/ruleswidget.h14
-rw-r--r--kwin/killer/killer.cpp10
-rw-r--r--kwin/killwindow.cpp4
-rw-r--r--kwin/kwinbindings.cpp8
-rw-r--r--kwin/layers.cpp2
-rw-r--r--kwin/lib/kcommondecoration.cpp148
-rw-r--r--kwin/lib/kcommondecoration.h52
-rw-r--r--kwin/lib/kdecoration.cpp48
-rw-r--r--kwin/lib/kdecoration.h62
-rw-r--r--kwin/lib/kdecoration_p.cpp36
-rw-r--r--kwin/lib/kdecoration_p.h38
-rw-r--r--kwin/lib/kdecoration_plugins_p.cpp22
-rw-r--r--kwin/lib/kdecoration_plugins_p.h16
-rw-r--r--kwin/lib/kdecorationfactory.cpp6
-rw-r--r--kwin/lib/kdecorationfactory.h4
-rw-r--r--kwin/main.cpp20
-rw-r--r--kwin/manage.cpp26
-rw-r--r--kwin/notifications.cpp14
-rw-r--r--kwin/notifications.h14
-rw-r--r--kwin/options.cpp28
-rw-r--r--kwin/options.h20
-rw-r--r--kwin/placement.cpp90
-rw-r--r--kwin/placement.h36
-rw-r--r--kwin/plugins.cpp6
-rw-r--r--kwin/plugins.h2
-rw-r--r--kwin/popupinfo.cpp40
-rw-r--r--kwin/popupinfo.h14
-rw-r--r--kwin/rules.cpp118
-rw-r--r--kwin/rules.h80
-rw-r--r--kwin/sm.cpp120
-rw-r--r--kwin/sm.h22
-rw-r--r--kwin/tabbox.cpp86
-rw-r--r--kwin/tabbox.h16
-rw-r--r--kwin/tools/decobenchmark/main.cpp14
-rw-r--r--kwin/tools/decobenchmark/main.h2
-rw-r--r--kwin/tools/decobenchmark/preview.cpp54
-rw-r--r--kwin/tools/decobenchmark/preview.h38
-rw-r--r--kwin/useractions.cpp132
-rw-r--r--kwin/utils.cpp8
-rw-r--r--kwin/utils.h18
-rw-r--r--kwin/workspace.cpp238
-rw-r--r--kwin/workspace.h112
121 files changed, 3660 insertions, 3660 deletions
diff --git a/kwin/KWinInterface.h b/kwin/KWinInterface.h
index bca7354b5..eff3a88f2 100644
--- a/kwin/KWinInterface.h
+++ b/kwin/KWinInterface.h
@@ -14,7 +14,7 @@ class KWinInterface : virtual public DCOPObject
virtual ASYNC reconfigure() = 0;
virtual ASYNC killWindow() = 0;
virtual void refresh() = 0;
- virtual void doNotManage(QString)= 0;
+ virtual void doNotManage(TQString)= 0;
virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0;
virtual void kDestopResized() = 0;
virtual void setDesktopLayout(int orientation, int x, int y)= 0;
diff --git a/kwin/activation.cpp b/kwin/activation.cpp
index a6844b737..f80a00f9a 100644
--- a/kwin/activation.cpp
+++ b/kwin/activation.cpp
@@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "workspace.h"
#include <fixx11h.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kxerrorhandler.h>
#include <kstartupinfo.h>
#include <kstringhandler.h>
@@ -44,7 +44,7 @@ namespace KWinInternal
to force focus change even in cases when ICCCM 4.2.7 doesn't allow it
(e.g. they may try to activate their main window because the user
definitely "needs" to see something happened - misusing
- of QWidget::setActiveWindow() may be such case).
+ of TQWidget::setActiveWindow() may be such case).
There are 4 ways how a window may become active:
- the user changes the active window (e.g. focus follows mouse, clicking
@@ -221,7 +221,7 @@ void Workspace::setActiveClient( Client* c, allowed_t )
closeActivePopup();
StackingUpdatesBlocker blocker( this );
++set_active_client_recursion;
- updateFocusMousePosition( QCursor::pos());
+ updateFocusMousePosition( TQCursor::pos());
if( active_client != NULL )
{ // note that this may call setActiveClient( NULL ), therefore the recursion counter
active_client->setActive( false, !c || !c->isModal() || c != active_client->transientFor() );
@@ -713,8 +713,8 @@ void Client::demandAttention( bool set )
if( demandAttentionKNotifyTimer == NULL )
{
- demandAttentionKNotifyTimer = new QTimer( this );
- connect( demandAttentionKNotifyTimer, SIGNAL( timeout()), SLOT( demandAttentionKNotify()));
+ demandAttentionKNotifyTimer = new TQTimer( this );
+ connect( demandAttentionKNotifyTimer, TQT_SIGNAL( timeout()), TQT_SLOT( demandAttentionKNotify()));
}
demandAttentionKNotifyTimer->start( 1000, true );
}
diff --git a/kwin/atoms.cpp b/kwin/atoms.cpp
index 08d95c9d6..8b838fdec 100644
--- a/kwin/atoms.cpp
+++ b/kwin/atoms.cpp
@@ -10,7 +10,7 @@ License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "atoms.h"
#include <assert.h>
diff --git a/kwin/bridge.cpp b/kwin/bridge.cpp
index 6b37c0eaa..49840e248 100644
--- a/kwin/bridge.cpp
+++ b/kwin/bridge.cpp
@@ -41,9 +41,9 @@ BRIDGE_HELPER( bool, keepAbove,,, const )
BRIDGE_HELPER( bool, keepBelow,,, const )
BRIDGE_HELPER( bool, isMovable,,, const )
BRIDGE_HELPER( bool, isResizable,,, const )
-BRIDGE_HELPER( QString, caption,,, const )
-BRIDGE_HELPER( void, processMousePressEvent, QMouseEvent* e, e, )
-BRIDGE_HELPER( QRect, geometry,,, const )
+BRIDGE_HELPER( TQString, caption,,, const )
+BRIDGE_HELPER( void, processMousePressEvent, TQMouseEvent* e, e, )
+BRIDGE_HELPER( TQRect, geometry,,, const )
BRIDGE_HELPER( void, closeWindow,,, )
BRIDGE_HELPER( void, maximize, MaximizeMode m, m, )
BRIDGE_HELPER( void, minimize,,, )
@@ -67,9 +67,9 @@ NET::WindowType Bridge::windowType( unsigned long supported_types ) const
return c->windowType( false, supported_types );
}
-QIconSet Bridge::icon() const
+TQIconSet Bridge::icon() const
{
- return QIconSet( c->miniIcon(), c->icon());
+ return TQIconSet( c->miniIcon(), c->icon());
}
bool Bridge::isSetShade() const
@@ -77,12 +77,12 @@ bool Bridge::isSetShade() const
return c->shadeMode() != ShadeNone;
}
-void Bridge::showWindowMenu( QPoint p )
+void Bridge::showWindowMenu( TQPoint p )
{
c->workspace()->showWindowMenu( p, c );
}
-void Bridge::showWindowMenu( const QRect &p )
+void Bridge::showWindowMenu( const TQRect &p )
{
c->workspace()->showWindowMenu( p, c );
}
@@ -92,7 +92,7 @@ void Bridge::performWindowOperation( WindowOperation op )
c->workspace()->performWindowOperation( c, op );
}
-void Bridge::setMask( const QRegion& r, int mode )
+void Bridge::setMask( const TQRegion& r, int mode )
{
c->setMask( r, mode );
}
@@ -102,13 +102,13 @@ bool Bridge::isPreview() const
return false;
}
-QRect Bridge::iconGeometry() const
+TQRect Bridge::iconGeometry() const
{
NETRect r = c->info->iconGeometry();
- return QRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
+ return TQRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
}
-QWidget* Bridge::workspaceWidget() const
+TQWidget* Bridge::workspaceWidget() const
{
return c->workspace()->desktopWidget();
}
@@ -125,7 +125,7 @@ void Bridge::titlebarDblClickOperation()
void Bridge::titlebarMouseWheelOperation( int delta )
{
- c->performMouseCommand( options->operationTitlebarMouseWheel( delta ), QCursor::pos());
+ c->performMouseCommand( options->operationTitlebarMouseWheel( delta ), TQCursor::pos());
}
void Bridge::setShade( bool set )
@@ -138,7 +138,7 @@ int Bridge::currentDesktop() const
return c->workspace()->currentDesktop();
}
-QWidget* Bridge::initialParentWidget() const
+TQWidget* Bridge::initialParentWidget() const
{
return NULL;
}
@@ -156,9 +156,9 @@ void Bridge::helperShowHide( bool show )
c->rawHide();
}
-QRegion Bridge::unobscuredRegion( const QRegion& r ) const
+TQRegion Bridge::unobscuredRegion( const TQRegion& r ) const
{
- QRegion reg( r );
+ TQRegion reg( r );
const ClientList stacking_order = c->workspace()->stackingOrder();
ClientList::ConstIterator it = stacking_order.find( c );
++it;
@@ -183,7 +183,7 @@ QRegion Bridge::unobscuredRegion( const QRegion& r ) const
we choose ours */
int dx = (*it)->x() - c->x();
int dy = (*it)->y() - c->y();
- QRegion creg = (*it)->mask();
+ TQRegion creg = (*it)->mask();
creg.translate(dx, dy);
reg -= creg;
if (reg.isEmpty())
diff --git a/kwin/bridge.h b/kwin/bridge.h
index 155970f04..0989a64b5 100644
--- a/kwin/bridge.h
+++ b/kwin/bridge.h
@@ -38,18 +38,18 @@ class Bridge : public KDecorationBridge
virtual bool isMovable() const;
virtual bool isResizable() const;
virtual NET::WindowType windowType( unsigned long supported_types ) const;
- virtual QIconSet icon() const;
- virtual QString caption() const;
- virtual void processMousePressEvent( QMouseEvent* );
- virtual void showWindowMenu( QPoint );
- virtual void showWindowMenu( const QRect & );
+ virtual TQIconSet icon() const;
+ virtual TQString caption() const;
+ virtual void processMousePressEvent( TQMouseEvent* );
+ virtual void showWindowMenu( TQPoint );
+ virtual void showWindowMenu( const TQRect & );
virtual void performWindowOperation( WindowOperation );
- virtual void setMask( const QRegion&, int );
+ virtual void setMask( const TQRegion&, int );
virtual bool isPreview() const;
- virtual QRect geometry() const;
- virtual QRect iconGeometry() const;
- virtual QRegion unobscuredRegion( const QRegion& r ) const;
- virtual QWidget* workspaceWidget() const;
+ virtual TQRect geometry() const;
+ virtual TQRect iconGeometry() const;
+ virtual TQRegion unobscuredRegion( const TQRegion& r ) const;
+ virtual TQWidget* workspaceWidget() const;
virtual WId windowId() const;
virtual void closeWindow();
virtual void maximize( MaximizeMode mode );
@@ -62,7 +62,7 @@ class Bridge : public KDecorationBridge
virtual void setKeepAbove( bool );
virtual void setKeepBelow( bool );
virtual int currentDesktop() const;
- virtual QWidget* initialParentWidget() const;
+ virtual TQWidget* initialParentWidget() const;
virtual Qt::WFlags initialWFlags() const;
virtual void helperShowHide( bool show );
virtual void grabXServer( bool grab );
diff --git a/kwin/client.cpp b/kwin/client.cpp
index 9fc5353df..5f281f2ab 100644
--- a/kwin/client.cpp
+++ b/kwin/client.cpp
@@ -11,13 +11,13 @@ License. See the file "COPYING" for the exact licensing terms.
#include "client.h"
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qdatetime.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
#include <kprocess.h>
#include <unistd.h>
#include <kstandarddirs.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kwin.h>
#include <kiconloader.h>
#include <stdlib.h>
@@ -67,7 +67,7 @@ namespace KWinInternal
is done in manage().
*/
Client::Client( Workspace *ws )
- : QObject( NULL ),
+ : TQObject( NULL ),
client( None ),
wrapper( None ),
frame( None ),
@@ -146,8 +146,8 @@ Client::Client( Workspace *ws )
cmap = None;
- frame_geometry = QRect( 0, 0, 100, 100 ); // so that decorations don't start with size being (0,0)
- client_size = QSize( 100, 100 );
+ frame_geometry = TQRect( 0, 0, 100, 100 ); // so that decorations don't start with size being (0,0)
+ client_size = TQSize( 100, 100 );
custom_opacity = false;
rule_opacity_active = 0;; //translucency rules
rule_opacity_inactive = 0; //dito.
@@ -277,7 +277,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force )
destroyDecoration();
if( !noBorder())
{
- setMask( QRegion()); // reset shape mask
+ setMask( TQRegion()); // reset shape mask
decoration = workspace()->createDecoration( bridge );
// TODO check decoration's minimum size?
decoration->init();
@@ -312,9 +312,9 @@ void Client::destroyDecoration()
{
delete decoration;
decoration = NULL;
- QPoint grav = calculateGravitation( true );
+ TQPoint grav = calculateGravitation( true );
border_left = border_right = border_top = border_bottom = 0;
- setMask( QRegion()); // reset shape mask
+ setMask( TQRegion()); // reset shape mask
int save_workarea_diff_x = workarea_diff_x;
int save_workarea_diff_y = workarea_diff_y;
plainResize( sizeForClientSize( clientSize()), ForceGeometrySet );
@@ -423,16 +423,16 @@ void Client::updateFrameExtents()
// re-layouts (e.g. when options()->moveResizeMaximizedWindows() changes,
// the decoration may turn on/off some borders, but the actual size
// of the decoration stays the same).
-void Client::resizeDecoration( const QSize& s )
+void Client::resizeDecoration( const TQSize& s )
{
if( decoration == NULL )
return;
- QSize oldsize = decoration->widget()->size();
+ TQSize oldsize = decoration->widget()->size();
decoration->resize( s );
if( oldsize == s )
{
- QResizeEvent e( s, oldsize );
- QApplication::sendEvent( decoration->widget(), &e );
+ TQResizeEvent e( s, oldsize );
+ TQApplication::sendEvent( decoration->widget(), &e );
}
}
@@ -509,7 +509,7 @@ void Client::updateShape()
}
}
-void Client::setMask( const QRegion& reg, int mode )
+void Client::setMask( const TQRegion& reg, int mode )
{
_mask = reg;
if( reg.isNull())
@@ -520,7 +520,7 @@ void Client::setMask( const QRegion& reg, int mode )
reg.handle(), ShapeSet );
else
{
- QMemArray< QRect > rects = reg.rects();
+ TQMemArray< TQRect > rects = reg.rects();
XRectangle* xrects = new XRectangle[ rects.count() ];
for( unsigned int i = 0;
i < rects.count();
@@ -538,10 +538,10 @@ void Client::setMask( const QRegion& reg, int mode )
updateShape();
}
-QRegion Client::mask() const
+TQRegion Client::mask() const
{
if( _mask.isEmpty())
- return QRegion( 0, 0, width(), height());
+ return TQRegion( 0, 0, width(), height());
return _mask;
}
@@ -658,22 +658,22 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
step = 40. * (11 - speed );
NETRect r = info->iconGeometry();
- QRect icongeom( r.pos.x, r.pos.y, r.size.width, r.size.height );
+ TQRect icongeom( r.pos.x, r.pos.y, r.size.width, r.size.height );
if ( !icongeom.isValid() )
return;
- QPixmap pm = animationPixmap( minimize ? width() : icongeom.width() );
+ TQPixmap pm = animationPixmap( minimize ? width() : icongeom.width() );
- QRect before, after;
+ TQRect before, after;
if ( minimize )
{
- before = QRect( x(), y(), width(), pm.height() );
- after = QRect( icongeom.x(), icongeom.y(), icongeom.width(), pm.height() );
+ before = TQRect( x(), y(), width(), pm.height() );
+ after = TQRect( icongeom.x(), icongeom.y(), icongeom.width(), pm.height() );
}
else
{
- before = QRect( icongeom.x(), icongeom.y(), icongeom.width(), pm.height() );
- after = QRect( x(), y(), width(), pm.height() );
+ before = TQRect( icongeom.x(), icongeom.y(), icongeom.width(), pm.height() );
+ after = TQRect( x(), y(), width(), pm.height() );
}
lf = (after.left() - before.left())/step;
@@ -683,23 +683,23 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
grabXServer();
- QRect area = before;
- QRect area2;
- QPixmap pm2;
+ TQRect area = before;
+ TQRect area2;
+ TQPixmap pm2;
- QTime t;
+ TQTime t;
t.start();
float diff;
- QPainter p ( workspace()->desktopWidget() );
+ TQPainter p ( workspace()->desktopWidget() );
bool need_to_clear = FALSE;
- QPixmap pm3;
+ TQPixmap pm3;
do
{
if (area2 != area)
{
pm = animationPixmap( area.width() );
- pm2 = QPixmap::grabWindow( qt_xrootwin(), area.x(), area.y(), area.width(), area.height() );
+ pm2 = TQPixmap::grabWindow( qt_xrootwin(), area.x(), area.y(), area.width(), area.height() );
p.drawPixmap( area.x(), area.y(), pm );
if ( need_to_clear )
{
@@ -739,13 +739,13 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
/*!
The pixmap shown during (un)minimalization animation
*/
-QPixmap Client::animationPixmap( int w )
+TQPixmap Client::animationPixmap( int w )
{
- QFont font = options->font(isActive());
- QFontMetrics fm( font );
- QPixmap pm( w, fm.lineSpacing() );
+ TQFont font = options->font(isActive());
+ TQFontMetrics fm( font );
+ TQPixmap pm( w, fm.lineSpacing() );
pm.fill( options->color(Options::ColorTitleBar, isActive() || isMinimized() ) );
- QPainter p( &pm );
+ TQPainter p( &pm );
p.setPen(options->color(Options::ColorFont, isActive() || isMinimized() ));
p.setFont(options->font(isActive()));
p.drawText( pm.rect(), AlignLeft|AlignVCenter|SingleLine, caption() );
@@ -801,7 +801,7 @@ void Client::setShade( ShadeMode mode )
// shade
int h = height();
shade_geometry_change = true;
- QSize s( sizeForClientSize( QSize( clientSize())));
+ TQSize s( sizeForClientSize( TQSize( clientSize())));
s.setHeight( border_top + border_bottom );
XSelectInput( qt_xdisplay(), wrapper, ClientWinMask ); // avoid getting UnmapNotify
XUnmapWindow( qt_xdisplay(), wrapper );
@@ -817,8 +817,8 @@ void Client::setShade( ShadeMode mode )
{
h -= step;
XResizeWindow( qt_xdisplay(), frameId(), s.width(), h );
- resizeDecoration( QSize( s.width(), h ));
- QApplication::syncX();
+ resizeDecoration( TQSize( s.width(), h ));
+ TQApplication::syncX();
} while ( h > s.height() + step );
// if ( !wasStaticContents )
// clearWFlags( WStaticContents );
@@ -839,7 +839,7 @@ void Client::setShade( ShadeMode mode )
{
int h = height();
shade_geometry_change = true;
- QSize s( sizeForClientSize( clientSize()));
+ TQSize s( sizeForClientSize( clientSize()));
// FRAME bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents );
int step = QMAX( 4, QABS( h - s.height() ) / as )+1;
@@ -847,11 +847,11 @@ void Client::setShade( ShadeMode mode )
{
h += step;
XResizeWindow( qt_xdisplay(), frameId(), s.width(), h );
- resizeDecoration( QSize( s.width(), h ));
+ resizeDecoration( TQSize( s.width(), h ));
// assume a border
// we do not have time to wait for X to send us paint events
// FRAME repaint( 0, h - step-5, width(), step+5, TRUE);
- QApplication::syncX();
+ TQApplication::syncX();
} while ( h < s.height() - step );
// if ( !wasStaticContents )
// clearWFlags( WStaticContents );
@@ -1099,8 +1099,8 @@ void Client::pingWindow()
return; // turned off
if( ping_timer != NULL )
return; // pinging already
- ping_timer = new QTimer( this );
- connect( ping_timer, SIGNAL( timeout()), SLOT( pingTimeout()));
+ ping_timer = new TQTimer( this );
+ connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout()));
ping_timer->start( options->killPingTimeout, true );
ping_timestamp = qt_x_time;
workspace()->sendPingToWindow( window(), ping_timestamp );
@@ -1134,7 +1134,7 @@ void Client::killProcess( bool ask, Time timestamp )
if( process_killer != NULL )
return;
Q_ASSERT( !ask || timestamp != CurrentTime );
- QCString machine = wmClientMachine( true );
+ TQCString machine = wmClientMachine( true );
pid_t pid = info->pid();
if( pid <= 0 || machine.isEmpty()) // needed properties missing
return;
@@ -1154,13 +1154,13 @@ void Client::killProcess( bool ask, Time timestamp )
{ // SELI TODO handle the window created by handler specially (on top,urgent?)
process_killer = new KProcess( this );
*process_killer << KStandardDirs::findExe( "kwin_killer_helper" )
- << "--pid" << QCString().setNum( pid ) << "--hostname" << machine
+ << "--pid" << TQCString().setNum( pid ) << "--hostname" << machine
<< "--windowname" << caption().utf8()
<< "--applicationname" << resourceClass()
- << "--wid" << QCString().setNum( window())
- << "--timestamp" << QCString().setNum( timestamp );
- connect( process_killer, SIGNAL( processExited( KProcess* )),
- SLOT( processKillerExited()));
+ << "--wid" << TQCString().setNum( window())
+ << "--timestamp" << TQCString().setNum( timestamp );
+ connect( process_killer, TQT_SIGNAL( processExited( KProcess* )),
+ TQT_SLOT( processKillerExited()));
if( !process_killer->start( KProcess::NotifyOnExit ))
{
delete process_killer;
@@ -1342,7 +1342,7 @@ void Client::showContextHelp()
if ( Pcontexthelp )
{
sendClientMessage(window(), atoms->wm_protocols, atoms->net_wm_context_help);
- QWhatsThis::enterWhatsThisMode(); // SELI?
+ TQWhatsThis::enterWhatsThisMode(); // SELI?
}
}
@@ -1356,17 +1356,17 @@ void Client::fetchName()
setCaption( readName());
}
-QString Client::readName() const
+TQString Client::readName() const
{
if ( info->name() && info->name()[ 0 ] != '\0' )
- return QString::fromUtf8( info->name() );
+ return TQString::fromUtf8( info->name() );
else
return KWin::readNameProperty( window(), XA_WM_NAME );
}
KWIN_COMPARE_PREDICATE( FetchNameInternalPredicate, const Client*, (!cl->isSpecialWindow() || cl->isToolbar()) && cl != value && cl->caption() == value->caption());
-void Client::setCaption( const QString& s, bool force )
+void Client::setCaption( const TQString& s, bool force )
{
if ( s != cap_normal || force )
{
@@ -1378,17 +1378,17 @@ void Client::setCaption( const QString& s, bool force )
s[ i ] = ' ';
cap_normal = s;
bool was_suffix = ( !cap_suffix.isEmpty());
- QString machine_suffix;
+ TQString machine_suffix;
if( wmClientMachine( false ) != "localhost" && !isLocalMachine( wmClientMachine( false )))
machine_suffix = " <@" + wmClientMachine( true ) + ">";
- QString shortcut_suffix = !shortcut().isNull() ? ( " {" + shortcut().toString() + "}" ) : "";
+ TQString shortcut_suffix = !shortcut().isNull() ? ( " {" + shortcut().toString() + "}" ) : "";
cap_suffix = machine_suffix + shortcut_suffix;
if ( ( !isSpecialWindow() || isToolbar()) && workspace()->findClient( FetchNameInternalPredicate( this )))
{
int i = 2;
do
{
- cap_suffix = machine_suffix + " <" + QString::number(i) + ">" + shortcut_suffix;
+ cap_suffix = machine_suffix + " <" + TQString::number(i) + ">" + shortcut_suffix;
i++;
} while ( workspace()->findClient( FetchNameInternalPredicate( this )));
info->setVisibleName( caption().utf8() );
@@ -1415,9 +1415,9 @@ void Client::updateCaption()
void Client::fetchIconicName()
{
- QString s;
+ TQString s;
if ( info->iconName() && info->iconName()[ 0 ] != '\0' )
- s = QString::fromUtf8( info->iconName() );
+ s = TQString::fromUtf8( info->iconName() );
else
s = KWin::readNameProperty( window(), XA_WM_ICON_NAME );
if ( s != cap_iconic )
@@ -1436,7 +1436,7 @@ void Client::fetchIconicName()
/*!\reimp
*/
-QString Client::caption( bool full ) const
+TQString Client::caption( bool full ) const
{
return full ? cap_normal + cap_suffix : cap_normal;
}
@@ -1480,7 +1480,7 @@ void Client::getMotifHints()
updateDecoration( true ); // check if noborder state has changed
}
-void Client::readIcons( Window win, QPixmap* icon, QPixmap* miniicon )
+void Client::readIcons( Window win, TQPixmap* icon, TQPixmap* miniicon )
{
// get the icons, allow scaling
if( icon != NULL )
@@ -1489,7 +1489,7 @@ void Client::readIcons( Window win, QPixmap* icon, QPixmap* miniicon )
if( icon == NULL || !icon->isNull())
*miniicon = KWin::icon( win, 16, 16, TRUE, KWin::NETWM | KWin::WMHints );
else
- *miniicon = QPixmap();
+ *miniicon = TQPixmap();
}
void Client::getIcons()
@@ -1558,7 +1558,7 @@ static int nullErrorHandler(Display *, XErrorEvent *)
/*!
Returns WM_WINDOW_ROLE property for a given window.
*/
-QCString Client::staticWindowRole(WId w)
+TQCString Client::staticWindowRole(WId w)
{
return getStringProperty(w, qt_window_role).lower();
}
@@ -1566,7 +1566,7 @@ QCString Client::staticWindowRole(WId w)
/*!
Returns SM_CLIENT_ID property for a given window.
*/
-QCString Client::staticSessionId(WId w)
+TQCString Client::staticSessionId(WId w)
{
return getStringProperty(w, qt_sm_client_id);
}
@@ -1574,7 +1574,7 @@ QCString Client::staticSessionId(WId w)
/*!
Returns WM_COMMAND property for a given window.
*/
-QCString Client::staticWmCommand(WId w)
+TQCString Client::staticWmCommand(WId w)
{
return getStringProperty(w, XA_WM_COMMAND, ' ');
}
@@ -1614,9 +1614,9 @@ void Client::getWmClientLeader()
Returns sessionId for this client,
taken either from its window or from the leader window.
*/
-QCString Client::sessionId()
+TQCString Client::sessionId()
{
- QCString result = staticSessionId(window());
+ TQCString result = staticSessionId(window());
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin!=window())
result = staticSessionId(wmClientLeaderWin);
return result;
@@ -1626,9 +1626,9 @@ QCString Client::sessionId()
Returns command property for this client,
taken either from its window or from the leader window.
*/
-QCString Client::wmCommand()
+TQCString Client::wmCommand()
{
- QCString result = staticWmCommand(window());
+ TQCString result = staticWmCommand(window());
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin!=window())
result = staticWmCommand(wmClientLeaderWin);
return result;
@@ -1647,9 +1647,9 @@ void Client::getWmClientMachine()
Returns client machine for this client,
taken either from its window or from the leader window.
*/
-QCString Client::wmClientMachine( bool use_localhost ) const
+TQCString Client::wmClientMachine( bool use_localhost ) const
{
- QCString result = client_machine;
+ TQCString result = client_machine;
if( use_localhost )
{ // special name for the local machine (localhost)
if( result != "localhost" && isLocalMachine( result ))
@@ -1754,7 +1754,7 @@ NET::WindowType Client::windowType( bool direct, int supported_types ) const
wt = NET::TopMenu;
}
// TODO change this to rule
- const char* const oo_prefix = "openoffice.org"; // QCString has no startsWith()
+ const char* const oo_prefix = "openoffice.org"; // TQCString has no startsWith()
// oo_prefix is lowercase, because resourceClass() is forced to be lowercase
if( qstrncmp( resourceClass(), oo_prefix, strlen( oo_prefix )) == 0 && wt == NET::Dialog )
wt = NET::Normal; // see bug #66065
@@ -1801,7 +1801,7 @@ void Client::setCursor( Position m )
}
// TODO mit nejake checkCursor(), ktere se zavola v manage() a pri vecech, kdy by se kurzor mohl zmenit?
-void Client::setCursor( const QCursor& c )
+void Client::setCursor( const TQCursor& c )
{
if( c.handle() == cursor.handle())
return;
@@ -1811,7 +1811,7 @@ void Client::setCursor( const QCursor& c )
XDefineCursor( qt_xdisplay(), frameId(), cursor.handle());
}
-Client::Position Client::mousePosition( const QPoint& p ) const
+Client::Position Client::mousePosition( const TQPoint& p ) const
{
if( decoration != NULL )
return decoration->mousePosition( p );
@@ -2166,9 +2166,9 @@ kdbgstream& operator<<( kdbgstream& stream, const ConstClientList& list )
}
#endif
-QPixmap * kwin_get_menu_pix_hack()
+TQPixmap * kwin_get_menu_pix_hack()
{
- static QPixmap p;
+ static TQPixmap p;
if ( p.isNull() )
p = SmallIcon( "bx2" );
return &p;
diff --git a/kwin/client.h b/kwin/client.h
index 0905b5794..806e01bec 100644
--- a/kwin/client.h
+++ b/kwin/client.h
@@ -12,9 +12,9 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_CLIENT_H
#define KWIN_CLIENT_H
-#include <qframe.h>
-#include <qvbox.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
#include <netwm.h>
#include <kdebug.h>
#include <assert.h>
@@ -43,7 +43,7 @@ class WinInfo;
class SessionInfo;
class Bridge;
-class Client : public QObject, public KDecorationDefines
+class Client : public TQObject, public KDecorationDefines
{
Q_OBJECT
public:
@@ -76,21 +76,21 @@ class Client : public QObject, public KDecorationDefines
void applyWindowRules();
void updateWindowRules();
- QRect geometry() const;
- QSize size() const;
- QSize minSize() const;
- QSize maxSize() const;
- QPoint pos() const;
- QRect rect() const;
+ TQRect geometry() const;
+ TQSize size() const;
+ TQSize minSize() const;
+ TQSize maxSize() const;
+ TQPoint pos() const;
+ TQRect rect() const;
int x() const;
int y() const;
int width() const;
int height() const;
- QPoint clientPos() const; // inside of geometry()
- QSize clientSize() const;
+ TQPoint clientPos() const; // inside of geometry()
+ TQSize clientSize() const;
bool windowEvent( XEvent* e );
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
bool manage( Window w, bool isMapped );
@@ -103,11 +103,11 @@ class Client : public QObject, public KDecorationDefines
SizemodeFixedH, // try not to affect height
SizemodeMax // try not to make it larger in either direction
};
- QSize adjustedSize( const QSize&, Sizemode mode = SizemodeAny ) const;
- QSize adjustedSize() const;
+ TQSize adjustedSize( const TQSize&, Sizemode mode = SizemodeAny ) const;
+ TQSize adjustedSize() const;
- QPixmap icon() const;
- QPixmap miniIcon() const;
+ TQPixmap icon() const;
+ TQPixmap miniIcon() const;
bool isActive() const;
void setActive( bool, bool updateOpacity = true );
@@ -132,7 +132,7 @@ class Client : public QObject, public KDecorationDefines
bool isMinimized() const;
bool isMaximizable() const;
- QRect geometryRestore() const;
+ TQRect geometryRestore() const;
MaximizeMode maximizeModeRestore() const;
MaximizeMode maximizeMode() const;
bool isMinimizable() const;
@@ -142,7 +142,7 @@ class Client : public QObject, public KDecorationDefines
bool isFullScreen() const;
bool isFullScreenable( bool fullscreen_hack = false ) const;
bool userCanSetFullScreen() const;
- QRect geometryFSRestore() const { return geom_fs_restore; } // only for session saving
+ TQRect geometryFSRestore() const { return geom_fs_restore; } // only for session saving
int fullScreenMode() const { return fullscreen_mode; } // only for session saving
bool isUserNoBorder() const;
@@ -194,8 +194,8 @@ class Client : public QObject, public KDecorationDefines
void takeFocus( allowed_t );
void demandAttention( bool set = true );
- void setMask( const QRegion& r, int mode = X::Unsorted );
- QRegion mask() const;
+ void setMask( const TQRegion& r, int mode = X::Unsorted );
+ TQRegion mask() const;
void updateDecoration( bool check_workspace_pos, bool force = false );
void checkBorderSizes();
@@ -205,16 +205,16 @@ class Client : public QObject, public KDecorationDefines
void updateShape();
void setGeometry( int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet );
- void setGeometry( const QRect& r, ForceGeometry_t force = NormalGeometrySet );
+ void setGeometry( const TQRect& r, ForceGeometry_t force = NormalGeometrySet );
void move( int x, int y, ForceGeometry_t force = NormalGeometrySet );
- void move( const QPoint & p, ForceGeometry_t force = NormalGeometrySet );
+ void move( const TQPoint & p, ForceGeometry_t force = NormalGeometrySet );
// plainResize() simply resizes
void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet );
- void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
+ void plainResize( const TQSize& s, ForceGeometry_t force = NormalGeometrySet );
// resizeWithChecks() resizes according to gravity, and checks workarea position
void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet );
- void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
- void keepInArea( QRect area, bool partial = false );
+ void resizeWithChecks( const TQSize& s, ForceGeometry_t force = NormalGeometrySet );
+ void keepInArea( TQRect area, bool partial = false );
void growHorizontal();
void shrinkHorizontal();
@@ -223,20 +223,20 @@ class Client : public QObject, public KDecorationDefines
bool providesContextHelp() const;
KShortcut shortcut() const;
- void setShortcut( const QString& cut );
+ void setShortcut( const TQString& cut );
- bool performMouseCommand( Options::MouseCommand, QPoint globalPos, bool handled = false );
+ bool performMouseCommand( Options::MouseCommand, TQPoint globalPos, bool handled = false );
- QCString windowRole() const;
- QCString sessionId();
- QCString resourceName() const;
- QCString resourceClass() const;
- QCString wmCommand();
- QCString wmClientMachine( bool use_localhost ) const;
+ TQCString windowRole() const;
+ TQCString sessionId();
+ TQCString resourceName() const;
+ TQCString resourceClass() const;
+ TQCString wmCommand();
+ TQCString wmClientMachine( bool use_localhost ) const;
Window wmClientLeader() const;
pid_t pid() const;
- QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;
+ TQRect adjustedClientArea( const TQRect& desktop, const TQRect& area ) const;
Colormap colormap() const;
@@ -245,14 +245,14 @@ class Client : public QObject, public KDecorationDefines
// hides a client - basically like minimize, but without effects, it's simply hidden
void hideClient( bool hide );
- QString caption( bool full = true ) const;
+ TQString caption( bool full = true ) const;
void updateCaption();
void keyPressEvent( uint key_code ); // FRAME ??
void updateMouseGrab();
Window moveResizeGrabWindow() const;
- const QPoint calculateGravitation( bool invert, int gravity = 0 ) const; // FRAME public?
+ const TQPoint calculateGravitation( bool invert, int gravity = 0 ) const; // FRAME public?
void NETMoveResize( int x_root, int y_root, NET::Direction direction );
void NETMoveResizeWindow( int flags, int x, int y, int width, int height );
@@ -260,10 +260,10 @@ class Client : public QObject, public KDecorationDefines
void gotPing( Time timestamp );
- static QCString staticWindowRole(WId);
- static QCString staticSessionId(WId);
- static QCString staticWmCommand(WId);
- static QCString staticWmClientMachine(WId);
+ static TQCString staticWindowRole(WId);
+ static TQCString staticSessionId(WId);
+ static TQCString staticWmCommand(WId);
+ static TQCString staticWmClientMachine(WId);
static Window staticWmClientLeader(WId);
void checkWorkspacePosition();
@@ -277,7 +277,7 @@ class Client : public QObject, public KDecorationDefines
static bool resourceMatch( const Client* c1, const Client* c2 );
static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
- static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
+ static void readIcons( Window win, TQPixmap* icon, TQPixmap* miniicon );
void minimize( bool avoid_animation = false );
void unminimize( bool avoid_animation = false );
@@ -315,22 +315,22 @@ class Client : public QObject, public KDecorationDefines
private:
friend class Bridge; // FRAME
- virtual void processMousePressEvent( QMouseEvent* e );
+ virtual void processMousePressEvent( TQMouseEvent* e );
private: // TODO cleanup the order of things in the .h file
// use Workspace::createClient()
virtual ~Client(); // use destroyClient() or releaseWindow()
- Position mousePosition( const QPoint& ) const;
+ Position mousePosition( const TQPoint& ) const;
void setCursor( Position m );
- void setCursor( const QCursor& c );
+ void setCursor( const TQCursor& c );
void animateMinimizeOrUnminimize( bool minimize );
- QPixmap animationPixmap( int w );
+ TQPixmap animationPixmap( int w );
// transparent stuff
- void drawbound( const QRect& geom );
+ void drawbound( const TQRect& geom );
void clearbound();
- void doDrawbound( const QRect& geom, bool clear );
+ void doDrawbound( const TQRect& geom, bool clear );
// handlers for X11 events
bool mapRequestEvent( XMapRequestEvent* e );
@@ -363,11 +363,11 @@ class Client : public QObject, public KDecorationDefines
bool isNormalState() const;
bool isManaged() const; // returns false if this client is not yet managed
void updateAllowedActions( bool force = false );
- QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const;
+ TQSize sizeForClientSize( const TQSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const;
void changeMaximize( bool horizontal, bool vertical, bool adjust );
void checkMaximizeGeometry();
- int checkFullScreenHack( const QRect& geom ) const; // 0 - none, 1 - one xinerama screen, 2 - full area
- void updateFullScreenHack( const QRect& geom );
+ int checkFullScreenHack( const TQRect& geom ) const; // 0 - none, 1 - one xinerama screen, 2 - full area
+ void updateFullScreenHack( const TQRect& geom );
void getWmNormalHints();
void getMotifHints();
void getIcons();
@@ -375,14 +375,14 @@ class Client : public QObject, public KDecorationDefines
void getWmClientMachine();
void fetchName();
void fetchIconicName();
- QString readName() const;
- void setCaption( const QString& s, bool force = false );
+ TQString readName() const;
+ void setCaption( const TQString& s, bool force = false );
bool hasTransientInternal( const Client* c, bool indirect, ConstClientList& set ) const;
void finishWindowRules();
void setShortcutInternal( const KShortcut& cut );
void updateWorkareaDiffs();
- void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area );
+ void checkDirection( int new_diff, int old_diff, TQRect& rect, const TQRect& area );
static int computeWorkareaDiff( int left, int right, int a_left, int a_right );
void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool );
NETExtendedStrut strut() const;
@@ -398,7 +398,7 @@ class Client : public QObject, public KDecorationDefines
void grabButton( int mod );
void ungrabButton( int mod );
void resetMaximize();
- void resizeDecoration( const QSize& s );
+ void resizeDecoration( const TQSize& s );
void setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHeight, uint leftWidth);
void unsetDecoHashProperty();
@@ -445,10 +445,10 @@ class Client : public QObject, public KDecorationDefines
}
Position mode;
- QPoint moveOffset;
- QPoint invertedMoveOffset;
- QRect moveResizeGeom;
- QRect initialMoveResizeGeom;
+ TQPoint moveOffset;
+ TQPoint invertedMoveOffset;
+ TQRect moveResizeGeom;
+ TQRect initialMoveResizeGeom;
XSizeHints xSizeHint;
void sendSyntheticConfigureNotify();
int mapping_state;
@@ -495,43 +495,43 @@ class Client : public QObject, public KDecorationDefines
void getWMHints();
void readIcons();
void getWindowProtocols();
- QPixmap icon_pix;
- QPixmap miniicon_pix;
- QCursor cursor;
+ TQPixmap icon_pix;
+ TQPixmap miniicon_pix;
+ TQCursor cursor;
// FullScreenHack - non-NETWM fullscreen (noborder,size of desktop)
// DON'T reorder - saved to config files !!!
enum FullScreenMode { FullScreenNone, FullScreenNormal, FullScreenHack };
FullScreenMode fullscreen_mode;
MaximizeMode max_mode;
- QRect geom_restore;
- QRect geom_fs_restore;
+ TQRect geom_restore;
+ TQRect geom_fs_restore;
MaximizeMode maxmode_restore;
int workarea_diff_x, workarea_diff_y;
WinInfo* info;
- QTimer* autoRaiseTimer;
- QTimer* shadeHoverTimer;
+ TQTimer* autoRaiseTimer;
+ TQTimer* shadeHoverTimer;
Colormap cmap;
- QCString resource_name;
- QCString resource_class;
- QCString client_machine;
- QString cap_normal, cap_iconic, cap_suffix;
+ TQCString resource_name;
+ TQCString resource_class;
+ TQCString client_machine;
+ TQString cap_normal, cap_iconic, cap_suffix;
WId wmClientLeaderWin;
- QCString window_role;
+ TQCString window_role;
Group* in_group;
Window window_group;
Layer in_layer;
- QTimer* ping_timer;
+ TQTimer* ping_timer;
KProcess* process_killer;
Time ping_timestamp;
Time user_time;
unsigned long allowed_actions;
- QRect frame_geometry;
- QSize client_size;
+ TQRect frame_geometry;
+ TQSize client_size;
int postpone_geometry_updates; // >0 - new geometry is remembered, but not actually set
bool pending_geometry_update;
bool shade_geometry_change;
int border_left, border_right, border_top, border_bottom;
- QRegion _mask;
+ TQRegion _mask;
static bool check_active_modal; // see Client::checkActiveModal()
KShortcut _shortcut;
friend struct FetchNameInternalPredicate;
@@ -547,7 +547,7 @@ class Client : public QObject, public KDecorationDefines
uint rule_opacity_inactive; //dto.
//int shadeOriginalHeight;
bool isBMP_;
- QTimer* demandAttentionKNotifyTimer;
+ TQTimer* demandAttentionKNotifyTimer;
friend bool performTransiencyCheck();
};
@@ -651,12 +651,12 @@ inline int Client::mappingState() const
return mapping_state;
}
-inline QCString Client::resourceName() const
+inline TQCString Client::resourceName() const
{
return resource_name; // it is always lowercase
}
-inline QCString Client::resourceClass() const
+inline TQCString Client::resourceClass() const
{
return resource_class; // it is always lowercase
}
@@ -714,17 +714,17 @@ ShadeMode Client::shadeMode() const
return shade_mode;
}
-inline QPixmap Client::icon() const
+inline TQPixmap Client::icon() const
{
return icon_pix;
}
-inline QPixmap Client::miniIcon() const
+inline TQPixmap Client::miniIcon() const
{
return miniicon_pix;
}
-inline QRect Client::geometryRestore() const
+inline TQRect Client::geometryRestore() const
{
return geom_restore;
}
@@ -810,22 +810,22 @@ inline bool Client::isManaged() const
return mapping_state != WithdrawnState;
}
-inline QCString Client::windowRole() const
+inline TQCString Client::windowRole() const
{
return window_role;
}
-inline QRect Client::geometry() const
+inline TQRect Client::geometry() const
{
return frame_geometry;
}
-inline QSize Client::size() const
+inline TQSize Client::size() const
{
return frame_geometry.size();
}
-inline QPoint Client::pos() const
+inline TQPoint Client::pos() const
{
return frame_geometry.topLeft();
}
@@ -850,37 +850,37 @@ inline int Client::height() const
return frame_geometry.height();
}
-inline QRect Client::rect() const
+inline TQRect Client::rect() const
{
- return QRect( 0, 0, width(), height());
+ return TQRect( 0, 0, width(), height());
}
-inline QPoint Client::clientPos() const
+inline TQPoint Client::clientPos() const
{
- return QPoint( border_left, border_top );
+ return TQPoint( border_left, border_top );
}
-inline QSize Client::clientSize() const
+inline TQSize Client::clientSize() const
{
return client_size;
}
-inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
+inline void Client::setGeometry( const TQRect& r, ForceGeometry_t force )
{
setGeometry( r.x(), r.y(), r.width(), r.height(), force );
}
-inline void Client::move( const QPoint & p, ForceGeometry_t force )
+inline void Client::move( const TQPoint & p, ForceGeometry_t force )
{
move( p.x(), p.y(), force );
}
-inline void Client::plainResize( const QSize& s, ForceGeometry_t force )
+inline void Client::plainResize( const TQSize& s, ForceGeometry_t force )
{
plainResize( s.width(), s.height(), force );
}
-inline void Client::resizeWithChecks( const QSize& s, ForceGeometry_t force )
+inline void Client::resizeWithChecks( const TQSize& s, ForceGeometry_t force )
{
resizeWithChecks( s.width(), s.height(), force );
}
diff --git a/kwin/clients/b2/b2client.cpp b/kwin/clients/b2/b2client.cpp
index 6a5d821b2..97d049ffb 100644
--- a/kwin/clients/b2/b2client.cpp
+++ b/kwin/clients/b2/b2client.cpp
@@ -11,9 +11,9 @@
*/
#include "b2client.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
#include <kpixmapeffect.h>
#include <kimageeffect.h>
#include <kicontheme.h>
@@ -21,9 +21,9 @@
#include <kdrawutil.h>
#include <klocale.h>
#include <kconfig.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <X11/Xlib.h>
@@ -99,7 +99,7 @@ static void read_config(B2ClientFactory *f)
{
// Force button size to be in a reasonable range.
// If the frame width is large, the button size must be large too.
- buttonSize = (QFontMetrics(options()->font(true)).height() + 1) & 0x3e;
+ buttonSize = (TQFontMetrics(options()->font(true)).height() + 1) & 0x3e;
if (buttonSize < 16) buttonSize = 16;
KConfig conf("kwinb2rc");
@@ -108,7 +108,7 @@ static void read_config(B2ClientFactory *f)
do_draw_handle = conf.readBoolEntry("DrawGrabHandle", true);
drawSmallBorders = !options()->moveResizeMaximizedWindows();
- QString opString = conf.readEntry("MenuButtonDoubleClickOperation", "NoOp");
+ TQString opString = conf.readEntry("MenuButtonDoubleClickOperation", "NoOp");
if (opString == "Close") {
menu_dbl_click_op = B2::CloseOp;
} else if (opString == "Minimize") {
@@ -140,15 +140,15 @@ static void read_config(B2ClientFactory *f)
}
}
-static void drawB2Rect(KPixmap *pix, const QColor &primary, bool down)
+static void drawB2Rect(KPixmap *pix, const TQColor &primary, bool down)
{
- QPainter p(pix);
- QColor hColor = primary.light(150);
- QColor lColor = primary.dark(150);
+ TQPainter p(pix);
+ TQColor hColor = primary.light(150);
+ TQColor lColor = primary.dark(150);
if (down) qSwap(hColor, lColor);
- if (QPixmap::defaultDepth() > 8) {
+ if (TQPixmap::defaultDepth() > 8) {
KPixmapEffect::gradient(*pix, hColor, lColor,
KPixmapEffect::DiagonalGradient);
}
@@ -166,7 +166,7 @@ static void drawB2Rect(KPixmap *pix, const QColor &primary, bool down)
}
-QPixmap* kwin_get_menu_pix_hack()
+TQPixmap* kwin_get_menu_pix_hack()
{
//return menu_pix; FIXME
return PIXMAP_A(P_MENU);
@@ -200,27 +200,27 @@ static void create_pixmaps()
// there seems to be no way to load X bitmaps from data properly, so
// we need to create new ones for each mask :P
- QBitmap pinupMask(16, 16, pinup_mask_bits, true);
+ TQBitmap pinupMask(16, 16, pinup_mask_bits, true);
PIXMAP_A(P_PINUP)->setMask(pinupMask);
PIXMAP_I(P_PINUP)->setMask(pinupMask);
- QBitmap pindownMask(16, 16, pindown_mask_bits, true);
+ TQBitmap pindownMask(16, 16, pindown_mask_bits, true);
PIXMAP_AD(P_PINUP)->setMask(pindownMask);
PIXMAP_ID(P_PINUP)->setMask(pindownMask);
- QBitmap menuMask(16, 16, menu_mask_bits, true);
+ TQBitmap menuMask(16, 16, menu_mask_bits, true);
for (i = 0; i < NumStates; i++)
pixmap[P_MENU * NumStates + i]->setMask(menuMask);
- QBitmap helpMask(16, 16, help_mask_bits, true);
+ TQBitmap helpMask(16, 16, help_mask_bits, true);
for (i = 0; i < NumStates; i++)
pixmap[P_HELP * NumStates + i]->setMask(helpMask);
- QBitmap normalizeMask(16, 16, true);
+ TQBitmap normalizeMask(16, 16, true);
// draw normalize icon mask
- QPainter mask;
+ TQPainter mask;
mask.begin(&normalizeMask);
- QBrush one(Qt::color1);
+ TQBrush one(Qt::color1);
mask.fillRect(normalizeMask.width() - 12, normalizeMask.height() - 12,
12, 12, one);
mask.fillRect(0, 0, 10, 10, one);
@@ -229,7 +229,7 @@ static void create_pixmaps()
for (i = 0; i < NumStates; i++)
pixmap[P_NORMALIZE * NumStates + i]->setMask(normalizeMask);
- QBitmap shadeMask(bsize, bsize, true);
+ TQBitmap shadeMask(bsize, bsize, true);
mask.begin(&shadeMask);
mask.fillRect(0, 0, bsize, 6, one);
mask.end();
@@ -311,10 +311,10 @@ bool B2ClientFactory::supports( Ability ability )
};
}
-QValueList< B2ClientFactory::BorderSize > B2ClientFactory::borderSizes() const
+TQValueList< B2ClientFactory::BorderSize > B2ClientFactory::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderTiny << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderTiny << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge;
}
@@ -342,7 +342,7 @@ B2Client::B2Client(KDecorationBridge *b, KDecorationFactory *f)
void B2Client::init()
{
- const QString tips[] = {
+ const TQString tips[] = {
i18n("Menu"),
isOnAllDesktops() ?
i18n("Not on all desktops") : i18n("On all desktops"),
@@ -364,35 +364,35 @@ void B2Client::init()
for (int i = 0; i < BtnCount; i++)
button[i] = NULL;
- g = new QGridLayout(widget(), 3, 3);
+ g = new TQGridLayout(widget(), 3, 3);
// Left and right border width
- leftSpacer = new QSpacerItem(thickness, 16,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightSpacer = new QSpacerItem(thickness, 16,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
+ leftSpacer = new TQSpacerItem(thickness, 16,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightSpacer = new TQSpacerItem(thickness, 16,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
g->addItem(leftSpacer, 1, 0);
g->addItem(rightSpacer, 1, 2);
// Top border height
- topSpacer = new QSpacerItem(10, buttonSize + 4,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer = new TQSpacerItem(10, buttonSize + 4,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
g->addItem(topSpacer, 0, 1);
// Bottom border height.
- bottomSpacer = new QSpacerItem(10,
+ bottomSpacer = new TQSpacerItem(10,
thickness + (mustDrawHandle() ? 4 : 0),
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
g->addItem(bottomSpacer, 2, 1);
if (isPreview()) {
- QLabel *previewLabel = new QLabel(
+ TQLabel *previewLabel = new TQLabel(
i18n("<b><center>B II preview</center></b>"),
widget());
g->addWidget(previewLabel, 1, 1);
} else {
- g->addItem(new QSpacerItem(0, 0), 1, 1);
+ g->addItem(new TQSpacerItem(0, 0), 1, 1);
}
// titlebar
@@ -402,8 +402,8 @@ void B2Client::init()
titlebar->setMinimumWidth(buttonSize + 4);
titlebar->setFixedHeight(buttonSize + 4);
- QBoxLayout *titleLayout = new QBoxLayout(titlebar,
- QBoxLayout::LeftToRight, 0, 1, 0);
+ TQBoxLayout *titleLayout = new TQBoxLayout(titlebar,
+ TQBoxLayout::LeftToRight, 0, 1, 0);
titleLayout->addSpacing(3);
if (options()->customButtonPositions()) {
@@ -418,8 +418,8 @@ void B2Client::init()
titleLayout->addSpacing(3);
- QColor c = options()->colorGroup(KDecoration::ColorTitleBar, isActive()).
- color(QColorGroup::Button);
+ TQColor c = options()->colorGroup(KDecoration::ColorTitleBar, isActive()).
+ color(TQColorGroup::Button);
for (int i = 0; i < BtnCount; i++) {
if (button[i])
@@ -432,8 +432,8 @@ void B2Client::init()
titlebar->installEventFilter(this);
}
-void B2Client::addButtons(const QString& s, const QString tips[],
- B2Titlebar* tb, QBoxLayout* titleLayout)
+void B2Client::addButtons(const TQString& s, const TQString tips[],
+ B2Titlebar* tb, TQBoxLayout* titleLayout)
{
if (s.length() <= 0)
return;
@@ -446,8 +446,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
LeftButton | RightButton);
button[BtnMenu]->setPixmaps(P_MENU);
button[BtnMenu]->setUseMiniIcon();
- connect(button[BtnMenu], SIGNAL(pressed()),
- this, SLOT(menuButtonPressed()));
+ connect(button[BtnMenu], TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(menuButtonPressed()));
titleLayout->addWidget(button[BtnMenu]);
}
break;
@@ -457,8 +457,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
button[BtnSticky]->setPixmaps(P_PINUP);
button[BtnSticky]->setToggle();
button[BtnSticky]->setDown(isOnAllDesktops());
- connect(button[BtnSticky], SIGNAL(clicked()),
- this, SLOT(toggleOnAllDesktops()));
+ connect(button[BtnSticky], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(toggleOnAllDesktops()));
titleLayout->addWidget(button[BtnSticky]);
}
break;
@@ -466,8 +466,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
if (providesContextHelp() && (!button[BtnHelp])) {
button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]);
button[BtnHelp]->setPixmaps(P_HELP);
- connect(button[BtnHelp], SIGNAL(clicked()),
- this, SLOT(showContextHelp()));
+ connect(button[BtnHelp], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(showContextHelp()));
titleLayout->addWidget(button[BtnHelp]);
}
break;
@@ -475,8 +475,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
if (isMinimizable() && (!button[BtnIconify])) {
button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]);
button[BtnIconify]->setPixmaps(P_ICONIFY);
- connect(button[BtnIconify], SIGNAL(clicked()),
- this, SLOT(minimize()));
+ connect(button[BtnIconify], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(minimize()));
titleLayout->addWidget(button[BtnIconify]);
}
break;
@@ -486,8 +486,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
LeftButton | MidButton | RightButton);
button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ?
P_NORMALIZE : P_MAX);
- connect(button[BtnMax], SIGNAL(clicked()),
- this, SLOT(maxButtonClicked()));
+ connect(button[BtnMax], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(maxButtonClicked()));
titleLayout->addWidget(button[BtnMax]);
}
break;
@@ -495,8 +495,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
if (isCloseable() && !button[BtnClose]) {
button[BtnClose] = new B2Button(this, tb, tips[BtnClose]);
button[BtnClose]->setPixmaps(P_CLOSE);
- connect(button[BtnClose], SIGNAL(clicked()),
- this, SLOT(closeWindow()));
+ connect(button[BtnClose], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(closeWindow()));
titleLayout->addWidget(button[BtnClose]);
}
break;
@@ -504,8 +504,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
if (isShadeable() && !button[BtnShade]) {
button[BtnShade] = new B2Button(this, tb, tips[BtnShade]);
button[BtnShade]->setPixmaps(P_SHADE);
- connect(button[BtnShade], SIGNAL(clicked()),
- this, SLOT(shadeButtonClicked()));
+ connect(button[BtnShade], TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(shadeButtonClicked()));
titleLayout->addWidget(button[BtnShade]);
}
break;
@@ -513,8 +513,8 @@ void B2Client::addButtons(const QString& s, const QString tips[],
if (resizable && !button[BtnResize]) {
button[BtnResize] = new B2Button(this, tb, tips[BtnResize]);
button[BtnResize]->setPixmaps(P_RESIZE);
- connect(button[BtnResize], SIGNAL(pressed()),
- this, SLOT(resizeButtonPressed()));
+ connect(button[BtnResize], TQT_SIGNAL(pressed()),
+ this, TQT_SLOT(resizeButtonPressed()));
titleLayout->addWidget(button[BtnResize]);
}
break;
@@ -575,7 +575,7 @@ void B2Client::calcHiddenButtons()
}
}
-void B2Client::resizeEvent(QResizeEvent * /*e*/)
+void B2Client::resizeEvent(TQResizeEvent * /*e*/)
{
calcHiddenButtons();
titlebar->layout()->activate();
@@ -598,14 +598,14 @@ void B2Client::captionChange()
titlebar->repaint(false);
}
-void B2Client::paintEvent(QPaintEvent* e)
+void B2Client::paintEvent(TQPaintEvent* e)
{
- QPainter p(widget());
+ TQPainter p(widget());
KDecoration::ColorType frameColorGroup = colored_frame ?
KDecoration::ColorTitleBar : KDecoration::ColorFrame;
- QRect t = titlebar->geometry();
+ TQRect t = titlebar->geometry();
// Frame height, this is used a lot of times
int fHeight = height() - t.height();
@@ -614,8 +614,8 @@ void B2Client::paintEvent(QPaintEvent* e)
int bb = mustDrawHandle() ? 4 : 0;
int bDepth = thickness + bb;
- QColorGroup fillColor = options()->colorGroup(frameColorGroup, isActive());
- QBrush fillBrush(options()->color(frameColorGroup, isActive()));
+ TQColorGroup fillColor = options()->colorGroup(frameColorGroup, isActive());
+ TQBrush fillBrush(options()->color(frameColorGroup, isActive()));
// outer frame rect
p.drawRect(0, t.bottom() - thickness + 1,
@@ -690,7 +690,7 @@ void B2Client::paintEvent(QPaintEvent* e)
*/
if (titlebar->isFullyObscured()) {
/* We first see, if our repaint contained the titlebar area */
- QRegion reg(QRect(0, 0, width(), buttonSize + 4));
+ TQRegion reg(TQRect(0, 0, width(), buttonSize + 4));
reg = reg.intersect(e->region());
if (!reg.isEmpty())
unobscureTitlebar();
@@ -699,49 +699,49 @@ void B2Client::paintEvent(QPaintEvent* e)
void B2Client::doShape()
{
- QRect t = titlebar->geometry();
- QRegion mask(widget()->rect());
+ TQRect t = titlebar->geometry();
+ TQRegion mask(widget()->rect());
// top to the tilebar right
if (bar_x_ofs) {
// left from bar
- mask -= QRect(0, 0, bar_x_ofs, t.height() - thickness);
+ mask -= TQRect(0, 0, bar_x_ofs, t.height() - thickness);
// top left point
- mask -= QRect(0, t.height() - thickness, 1, 1);
+ mask -= TQRect(0, t.height() - thickness, 1, 1);
}
if (t.right() < width() - 1) {
- mask -= QRect(width() - 1,
+ mask -= TQRect(width() - 1,
t.height() - thickness, 1, 1); //top right point
- mask -= QRect(t.right() + 1, 0,
+ mask -= TQRect(t.right() + 1, 0,
width() - t.right() - 1, t.height() - thickness);
}
// bottom right point
- mask -= QRect(width() - 1, height() - 1, 1, 1);
+ mask -= TQRect(width() - 1, height() - 1, 1, 1);
if (mustDrawHandle()) {
// bottom left point
- mask -= QRect(0, height() - 5, 1, 1);
+ mask -= TQRect(0, height() - 5, 1, 1);
// handle left point
- mask -= QRect(width() - 40, height() - 1, 1, 1);
+ mask -= TQRect(width() - 40, height() - 1, 1, 1);
// bottom left
- mask -= QRect(0, height() - 4, width() - 40, 4);
+ mask -= TQRect(0, height() - 4, width() - 40, 4);
} else {
// bottom left point
- mask -= QRect(0, height() - 1, 1, 1);
+ mask -= TQRect(0, height() - 1, 1, 1);
}
setMask(mask);
}
-void B2Client::showEvent(QShowEvent *)
+void B2Client::showEvent(TQShowEvent *)
{
calcHiddenButtons();
positionButtons();
doShape();
}
-KDecoration::Position B2Client::mousePosition(const QPoint& p) const
+KDecoration::Position B2Client::mousePosition(const TQPoint& p) const
{
const int range = 16;
- QRect t = titlebar->geometry();
+ TQRect t = titlebar->geometry();
t.setHeight(buttonSize + 4 - thickness);
int ly = t.bottom();
int lx = t.right();
@@ -809,8 +809,8 @@ void B2Client::desktopChange()
bool on = isOnAllDesktops();
if (B2Button *b = button[BtnSticky]) {
b->setDown(on);
- QToolTip::remove(b);
- QToolTip::add(b,
+ TQToolTip::remove(b);
+ TQToolTip::add(b,
on ? i18n("Not on all desktops") : i18n("On all desktops"));
}
}
@@ -821,12 +821,12 @@ void B2Client::maximizeChange()
if (button[BtnMax]) {
button[BtnMax]->setPixmaps(m ? P_NORMALIZE : P_MAX);
button[BtnMax]->repaint();
- QToolTip::remove(button[BtnMax]);
- QToolTip::add(button[BtnMax],
+ TQToolTip::remove(button[BtnMax]);
+ TQToolTip::add(button[BtnMax],
m ? i18n("Restore") : i18n("Maximize"));
}
bottomSpacer->changeSize(10, thickness + (mustDrawHandle() ? 4 : 0),
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
g->activate();
doShape();
@@ -838,8 +838,8 @@ void B2Client::activeChange()
widget()->repaint(false);
titlebar->repaint(false);
- QColor c = options()->colorGroup(
- KDecoration::ColorTitleBar, isActive()).color(QColorGroup::Button);
+ TQColor c = options()->colorGroup(
+ KDecoration::ColorTitleBar, isActive()).color(TQColorGroup::Button);
for (int i = 0; i < BtnCount; i++)
if (button[i]) {
@@ -851,23 +851,23 @@ void B2Client::activeChange()
void B2Client::shadeChange()
{
bottomSpacer->changeSize(10, thickness + (mustDrawHandle() ? 4 : 0),
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
g->activate();
doShape();
if (B2Button *b = button[BtnShade]) {
- QToolTip::remove(b);
- QToolTip::add(b, isSetShade() ? i18n("Unshade") : i18n("Shade"));
+ TQToolTip::remove(b);
+ TQToolTip::add(b, isSetShade() ? i18n("Unshade") : i18n("Shade"));
}
}
-QSize B2Client::minimumSize() const
+TQSize B2Client::minimumSize() const
{
int left, right, top, bottom;
borders(left, right, top, bottom);
- return QSize(left + right + 2 * buttonSize, top + bottom);
+ return TQSize(left + right + 2 * buttonSize, top + bottom);
}
-void B2Client::resize(const QSize& s)
+void B2Client::resize(const TQSize& s)
{
widget()->resize(s);
}
@@ -884,15 +884,15 @@ void B2Client::menuButtonPressed()
static B2Client *lastClient = NULL;
bool dbl = (lastClient == this &&
- time.elapsed() <= QApplication::doubleClickInterval());
+ time.elapsed() <= TQApplication::doubleClickInterval());
lastClient = this;
time.start();
if (!dbl) {
KDecorationFactory* f = factory();
- QRect menuRect = button[BtnMenu]->rect();
- QPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft());
- QPoint menuBottom = button[BtnMenu]->mapToGlobal(menuRect.bottomRight());
- showWindowMenu(QRect(menuTop, menuBottom));
+ TQRect menuRect = button[BtnMenu]->rect();
+ TQPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft());
+ TQPoint menuBottom = button[BtnMenu]->mapToGlobal(menuRect.bottomRight());
+ showWindowMenu(TQRect(menuTop, menuBottom));
if (!f->exists(this)) // 'this' was destroyed
return;
button[BtnMenu]->setDown(false);
@@ -924,7 +924,7 @@ void B2Client::unobscureTitlebar()
return;
}
in_unobs = 1;
- QRegion reg(QRect(0,0,width(), buttonSize + 4));
+ TQRegion reg(TQRect(0,0,width(), buttonSize + 4));
reg = unobscuredRegion(reg);
if (!reg.isEmpty()) {
// there is at least _one_ pixel from our title area, which is not
@@ -939,8 +939,8 @@ void B2Client::unobscureTitlebar()
static void redraw_pixmaps()
{
int i;
- QColorGroup aGrp = options()->colorGroup(KDecoration::ColorButtonBg, true);
- QColorGroup iGrp = options()->colorGroup(KDecoration::ColorButtonBg, false);
+ TQColorGroup aGrp = options()->colorGroup(KDecoration::ColorButtonBg, true);
+ TQColorGroup iGrp = options()->colorGroup(KDecoration::ColorButtonBg, false);
// close
drawB2Rect(PIXMAP_A(P_CLOSE), aGrp.button(), false);
@@ -958,7 +958,7 @@ static void redraw_pixmaps()
bool is_act = (i < 2);
bool is_down = ((i & 1) == 1);
KPixmap *pix = pixmap[P_SHADE * NumStates + i];
- QColor color = is_act ? aGrp.button() : iGrp.button();
+ TQColor color = is_act ? aGrp.button() : iGrp.button();
drawB2Rect(&thinBox, color, is_down);
pix->fill(Qt::black);
bitBlt(pix, 0, 0, &thinBox,
@@ -1004,7 +1004,7 @@ static void redraw_pixmaps()
}
- QPainter p;
+ TQPainter p;
// x for close + menu + help
for (int j = 0; j < 3; j++) {
int pix;
@@ -1043,7 +1043,7 @@ static void redraw_pixmaps()
// Apply the hilight effect to the 'Hover' icons
KIconEffect ie;
- QPixmap hilighted;
+ TQPixmap hilighted;
for (i = 0; i < P_NUM_BUTTON_TYPES; i++) {
int offset = i * NumStates;
hilighted = ie.apply(*pixmap[offset + Norm],
@@ -1057,8 +1057,8 @@ static void redraw_pixmaps()
// Create the titlebar gradients
- if (QPixmap::defaultDepth() > 8) {
- QColor titleColor[4] = {
+ if (TQPixmap::defaultDepth() > 8) {
+ TQColor titleColor[4] = {
options()->color(KDecoration::ColorTitleBar, true),
options()->color(KDecoration::ColorFrame, true),
@@ -1090,13 +1090,13 @@ static void redraw_pixmaps()
void B2Client::positionButtons()
{
- QFontMetrics fm(options()->font(isActive()));
- QString cap = caption();
+ TQFontMetrics fm(options()->font(isActive()));
+ TQString cap = caption();
if (cap.length() < 5) // make sure the titlebar has sufficiently wide
cap = "XXXXX"; // area for dragging the window
int textLen = fm.width(cap);
- QRect t = titlebar->captionSpacer->geometry();
+ TQRect t = titlebar->captionSpacer->geometry();
int titleWidth = titlebar->width() - t.width() + textLen + 2;
if (titleWidth > width()) titleWidth = width();
@@ -1106,24 +1106,24 @@ void B2Client::positionButtons()
// Transparent bound stuff.
-static QRect *visible_bound;
-static QPointArray bound_shape;
+static TQRect *visible_bound;
+static TQPointArray bound_shape;
-bool B2Client::drawbound(const QRect& geom, bool clear)
+bool B2Client::drawbound(const TQRect& geom, bool clear)
{
if (clear) {
if (!visible_bound) return true;
}
if (!visible_bound) {
- visible_bound = new QRect(geom);
- QRect t = titlebar->geometry();
+ visible_bound = new TQRect(geom);
+ TQRect t = titlebar->geometry();
int frameTop = geom.top() + t.bottom();
int barLeft = geom.left() + bar_x_ofs;
int barRight = barLeft + t.width() - 1;
if (barRight > geom.right()) barRight = geom.right();
// line width is 5 pixels, so compensate for the 2 outer pixels (#88657)
- QRect g = geom;
+ TQRect g = geom;
g.setLeft( g.left() + 2 );
g.setTop( g.top() + 2 );
g.setRight( g.right() - 2 );
@@ -1144,8 +1144,8 @@ bool B2Client::drawbound(const QRect& geom, bool clear)
} else {
*visible_bound = geom;
}
- QPainter p(workspaceWidget());
- p.setPen(QPen(Qt::white, 5));
+ TQPainter p(workspaceWidget());
+ p.setPen(TQPen(Qt::white, 5));
p.setRasterOp(Qt::XorROP);
p.drawPolygon(bound_shape);
@@ -1156,28 +1156,28 @@ bool B2Client::drawbound(const QRect& geom, bool clear)
return true;
}
-bool B2Client::eventFilter(QObject *o, QEvent *e)
+bool B2Client::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:
- titlebar->mouseDoubleClickEvent(static_cast< QMouseEvent* >(e));
+ case TQEvent::MouseButtonDblClick:
+ titlebar->mouseDoubleClickEvent(static_cast< TQMouseEvent* >(e));
return true;
- case QEvent::Wheel:
- titlebar->wheelEvent(static_cast< QWheelEvent* >(e));
+ case TQEvent::Wheel:
+ titlebar->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;
@@ -1187,9 +1187,9 @@ bool B2Client::eventFilter(QObject *o, QEvent *e)
// =====================================
-B2Button::B2Button(B2Client *_client, QWidget *parent,
- const QString& tip, const int realizeBtns)
- : QButton(parent, 0), hover(false)
+B2Button::B2Button(B2Client *_client, TQWidget *parent,
+ const TQString& tip, const int realizeBtns)
+ : TQButton(parent, 0), hover(false)
{
setBackgroundMode(NoBackground);
setCursor(arrowCursor);
@@ -1197,21 +1197,21 @@ B2Button::B2Button(B2Client *_client, QWidget *parent,
client = _client;
useMiniIcon = false;
setFixedSize(buttonSize, buttonSize);
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
}
-QSize B2Button::sizeHint() const
+TQSize B2Button::sizeHint() const
{
- return QSize(buttonSize, buttonSize);
+ return TQSize(buttonSize, buttonSize);
}
-QSizePolicy B2Button::sizePolicy() const
+TQSizePolicy B2Button::sizePolicy() const
{
- return(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ return(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
}
-void B2Button::drawButton(QPainter *p)
+void B2Button::drawButton(TQPainter *p)
{
KPixmap* gradient = titleGradient[client->isActive() ? 0 : 1];
if (gradient) {
@@ -1220,8 +1220,8 @@ void B2Button::drawButton(QPainter *p)
p->fillRect(rect(), bg);
}
if (useMiniIcon) {
- QPixmap miniIcon = client->icon().pixmap(QIconSet::Small,
- client->isActive() ? QIconSet::Normal : QIconSet::Disabled);
+ TQPixmap miniIcon = client->icon().pixmap(TQIconSet::Small,
+ client->isActive() ? TQIconSet::Normal : TQIconSet::Disabled);
p->drawPixmap((width() - miniIcon.width()) / 2,
(height() - miniIcon.height()) / 2, miniIcon);
} else {
@@ -1255,48 +1255,48 @@ void B2Button::setPixmaps(int button_id)
repaint(false);
}
-void B2Button::mousePressEvent(QMouseEvent * e)
+void B2Button::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 B2Button::mouseReleaseEvent(QMouseEvent * e)
+void B2Button::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);
}
-void B2Button::enterEvent(QEvent *e)
+void B2Button::enterEvent(TQEvent *e)
{
hover = true;
repaint(false);
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
}
-void B2Button::leaveEvent(QEvent *e)
+void B2Button::leaveEvent(TQEvent *e)
{
hover = false;
repaint(false);
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
}
// =====================================
B2Titlebar::B2Titlebar(B2Client *parent)
- : QWidget(parent->widget(), 0, WStyle_Customize | WRepaintNoErase),
+ : TQWidget(parent->widget(), 0, WStyle_Customize | WRepaintNoErase),
client(parent),
set_x11mask(false), isfullyobscured(false), shift_move(false)
{
setBackgroundMode(NoBackground);
- captionSpacer = new QSpacerItem(buttonSize, buttonSize + 4,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ captionSpacer = new TQSpacerItem(buttonSize, buttonSize + 4,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
}
bool B2Titlebar::x11Event(XEvent *e)
@@ -1326,14 +1326,14 @@ bool B2Titlebar::x11Event(XEvent *e)
default:
break;
}
- return QWidget::x11Event(e);
+ return TQWidget::x11Event(e);
}
-void B2Titlebar::drawTitlebar(QPainter &p, bool state)
+void B2Titlebar::drawTitlebar(TQPainter &p, bool state)
{
KPixmap* gradient = titleGradient[state ? 0 : 1];
- QRect t = rect();
+ TQRect t = rect();
// black titlebar frame
p.setPen(Qt::black);
p.drawLine(0, 0, 0, t.bottom());
@@ -1341,9 +1341,9 @@ void B2Titlebar::drawTitlebar(QPainter &p, bool state)
p.drawLine(t.right(), 0, t.right(), t.bottom());
// titlebar fill
- const QColorGroup cg =
+ const TQColorGroup cg =
options()->colorGroup(KDecoration::ColorTitleBar, state);
- QBrush brush(cg.background());
+ TQBrush brush(cg.background());
if (gradient) brush.setPixmap(*gradient);
qDrawShadeRect(&p, 1, 1, t.right() - 1, t.height() - 1,
cg, false, 1, 0, &brush);
@@ -1359,43 +1359,43 @@ void B2Titlebar::recalcBuffer()
{
titleBuffer.resize(width(), height());
- QPainter p(&titleBuffer);
+ TQPainter p(&titleBuffer);
drawTitlebar(p, true);
oldTitle = caption();
}
-void B2Titlebar::resizeEvent(QResizeEvent *)
+void B2Titlebar::resizeEvent(TQResizeEvent *)
{
recalcBuffer();
repaint(false);
}
-void B2Titlebar::paintEvent(QPaintEvent *)
+void B2Titlebar::paintEvent(TQPaintEvent *)
{
if(client->isActive())
bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(),
titleBuffer.height(), Qt::CopyROP, true);
else {
- QPainter p(this);
+ TQPainter p(this);
drawTitlebar(p, false);
}
}
-void B2Titlebar::mouseDoubleClickEvent(QMouseEvent *e)
+void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e)
{
if (e->button() == LeftButton && e->y() < height()) {
client->titlebarDblClickOperation();
}
}
-void B2Titlebar::wheelEvent(QWheelEvent *e)
+void B2Titlebar::wheelEvent(TQWheelEvent *e)
{
if (client->isSetShade() || rect().contains(e->pos()))
client->titlebarMouseWheelOperation( e->delta());
}
-void B2Titlebar::mousePressEvent(QMouseEvent * e)
+void B2Titlebar::mousePressEvent(TQMouseEvent * e)
{
shift_move = e->state() & ShiftButton;
if (shift_move) {
@@ -1405,13 +1405,13 @@ void B2Titlebar::mousePressEvent(QMouseEvent * e)
}
}
-void B2Titlebar::mouseReleaseEvent(QMouseEvent * e)
+void B2Titlebar::mouseReleaseEvent(TQMouseEvent * e)
{
if (shift_move) shift_move = false;
else e->ignore();
}
-void B2Titlebar::mouseMoveEvent(QMouseEvent * e)
+void B2Titlebar::mouseMoveEvent(TQMouseEvent * e)
{
if (shift_move) {
int oldx = mapFromGlobal(moveOffset).x();
diff --git a/kwin/clients/b2/b2client.h b/kwin/clients/b2/b2client.h
index 008b65af3..7df9a2f7d 100644
--- a/kwin/clients/b2/b2client.h
+++ b/kwin/clients/b2/b2client.h
@@ -9,10 +9,10 @@
#ifndef __B2CLIENT_H
#define __B2CLIENT_H
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qbutton.h>
-#include <qbitmap.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
+#include <tqbutton.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -28,31 +28,31 @@ class B2Client;
class B2Button : public QButton
{
public:
- B2Button(B2Client *_client=0, QWidget *parent=0, const QString& tip=NULL, const int realizeBtns = LeftButton);
+ B2Button(B2Client *_client=0, TQWidget *parent=0, const TQString& tip=NULL, const int realizeBtns = LeftButton);
~B2Button() {};
- void setBg(const QColor &c){bg = c;}
+ void setBg(const TQColor &c){bg = c;}
void setPixmaps(KPixmap *pix, KPixmap *pixDown, KPixmap *iPix,
KPixmap *iPixDown);
void setPixmaps(int button_id);
void setToggle(){setToggleType(Toggle);}
void setActive(bool on){setOn(on);}
void setUseMiniIcon(){useMiniIcon = true;}
- QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ TQSize sizeHint() const;
+ TQSizePolicy sizePolicy() const;
protected:
- virtual void drawButton(QPainter *p);
- void drawButtonLabel(QPainter *){;}
+ virtual void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter *){;}
- void mousePressEvent( QMouseEvent* e );
- void mouseReleaseEvent( QMouseEvent* e );
+ void mousePressEvent( TQMouseEvent* e );
+ void mouseReleaseEvent( TQMouseEvent* e );
private:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
bool useMiniIcon;
KPixmap *icon[6];
- QColor bg; //only use one color (the rest is pixmap) so forget QPalette ;)
+ TQColor bg; //only use one color (the rest is pixmap) so forget TQPalette ;)
public:
B2Client* client;
@@ -69,23 +69,23 @@ public:
~B2Titlebar(){;}
bool isFullyObscured() const {return isfullyobscured;}
void recalcBuffer();
- QSpacerItem *captionSpacer;
+ TQSpacerItem *captionSpacer;
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
bool x11Event(XEvent *e);
- void mouseDoubleClickEvent( QMouseEvent * );
- void wheelEvent(QWheelEvent *);
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent(QMouseEvent *);
- void resizeEvent(QResizeEvent *ev);
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void wheelEvent(TQWheelEvent *);
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent(TQMouseEvent *);
+ void resizeEvent(TQResizeEvent *ev);
private:
- void drawTitlebar(QPainter &p, bool state);
+ void drawTitlebar(TQPainter &p, bool state);
B2Client *client;
- QString oldTitle;
+ TQString oldTitle;
KPixmap titleBuffer;
- QPoint moveOffset;
+ TQPoint moveOffset;
bool set_x11mask;
bool isfullyobscured;
bool shift_move;
@@ -103,12 +103,12 @@ public:
void titleMoveAbs(int new_ofs);
void titleMoveRel(int xdiff);
// transparent stuff
- virtual bool drawbound(const QRect& geom, bool clear);
+ virtual bool drawbound(const TQRect& geom, bool clear);
protected:
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
- void showEvent( QShowEvent* );
- void windowWrapperShowEvent( QShowEvent* );
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
+ void windowWrapperShowEvent( TQShowEvent* );
void captionChange();
void desktopChange();
void shadeChange();
@@ -116,11 +116,11 @@ protected:
void maximizeChange();
void iconChange();
void doShape();
- Position mousePosition( const QPoint& p ) const;
- void resize(const QSize&);
+ Position mousePosition( const TQPoint& p ) const;
+ void resize(const TQSize&);
void borders(int &, int &, int &, int &) const;
- QSize minimumSize() const;
- bool eventFilter(QObject *, QEvent *);
+ TQSize minimumSize() const;
+ bool eventFilter(TQObject *, TQEvent *);
private slots:
void menuButtonPressed();
//void slotReset();
@@ -128,8 +128,8 @@ private slots:
void shadeButtonClicked();
void resizeButtonPressed();
private:
- void addButtons(const QString& s, const QString tips[],
- B2Titlebar* tb, QBoxLayout* titleLayout);
+ void addButtons(const TQString& s, const TQString tips[],
+ B2Titlebar* tb, TQBoxLayout* titleLayout);
void positionButtons();
void calcHiddenButtons();
bool mustDrawHandle() const;
@@ -137,20 +137,20 @@ private:
enum ButtonType{BtnMenu=0, BtnSticky, BtnIconify, BtnMax, BtnClose,
BtnHelp, BtnShade, BtnResize, BtnCount};
B2Button* button[BtnCount];
- QGridLayout *g;
+ TQGridLayout *g;
// Border spacers
- QSpacerItem *topSpacer;
- QSpacerItem *bottomSpacer;
- QSpacerItem *leftSpacer;
- QSpacerItem *rightSpacer;
+ TQSpacerItem *topSpacer;
+ TQSpacerItem *bottomSpacer;
+ TQSpacerItem *leftSpacer;
+ TQSpacerItem *rightSpacer;
B2Titlebar *titlebar;
int bar_x_ofs;
int in_unobs;
- QTime time;
+ TQTime time;
bool resizable;
};
-class B2ClientFactory : public QObject, public KDecorationFactory
+class B2ClientFactory : public TQObject, public KDecorationFactory
{
public:
B2ClientFactory();
@@ -158,7 +158,7 @@ public:
virtual KDecoration *createDecoration(KDecorationBridge *);
virtual bool reset(unsigned long changed);
virtual bool supports( Ability ability );
- QValueList< B2ClientFactory::BorderSize > borderSizes() const;
+ TQValueList< B2ClientFactory::BorderSize > borderSizes() const;
};
}
diff --git a/kwin/clients/b2/config/config.cpp b/kwin/clients/b2/config/config.cpp
index d16a90307..ca1dccc65 100644
--- a/kwin/clients/b2/config/config.cpp
+++ b/kwin/clients/b2/config/config.cpp
@@ -8,14 +8,14 @@
#include "config.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 )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new B2Config(conf, parent));
}
@@ -26,43 +26,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
*/
-B2Config::B2Config( KConfig* conf, QWidget* parent )
- : QObject( parent )
+B2Config::B2Config( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
KGlobal::locale()->insertCatalogue("kwin_b2_config");
b2Config = new KConfig("kwinb2rc");
- gb = new QVBox(parent);
+ gb = new TQVBox(parent);
- cbColorBorder = new QCheckBox(
+ cbColorBorder = new TQCheckBox(
i18n("Draw window frames using &titlebar colors"), gb);
- QWhatsThis::add(cbColorBorder,
+ TQWhatsThis::add(cbColorBorder,
i18n("When selected, the window borders "
"are drawn using the titlebar colors; otherwise, they are "
"drawn using normal border colors."));
// Grab Handle
- showGrabHandleCb = new QCheckBox(
+ showGrabHandleCb = new TQCheckBox(
i18n("Draw &resize handle"), gb);
- QWhatsThis::add(showGrabHandleCb,
+ TQWhatsThis::add(showGrabHandleCb,
i18n("When selected, decorations are drawn with a \"grab handle\" "
"in the bottom right corner of the windows; "
"otherwise, no grab handle is drawn."));
// Double click menu option support
- actionsGB = new QHGroupBox(i18n("Actions Settings"), gb);
- QLabel *menuDblClickLabel = new QLabel(actionsGB);
+ actionsGB = new TQHGroupBox(i18n("Actions Settings"), gb);
+ TQLabel *menuDblClickLabel = new TQLabel(actionsGB);
menuDblClickLabel->setText(i18n("Double click on menu button:"));
- menuDblClickOp = new QComboBox(actionsGB);
+ menuDblClickOp = new TQComboBox(actionsGB);
menuDblClickOp->insertItem(i18n("Do Nothing"));
menuDblClickOp->insertItem(i18n("Minimize Window"));
menuDblClickOp->insertItem(i18n("Shade Window"));
menuDblClickOp->insertItem(i18n("Close Window"));
- QWhatsThis::add(menuDblClickOp,
+ TQWhatsThis::add(menuDblClickOp,
i18n("An action can be associated to a double click "
"of the menu button. Leave it to none if in doubt."));
@@ -70,12 +70,12 @@ B2Config::B2Config( KConfig* conf, QWidget* parent )
load(conf);
// Ensure we track user changes properly
- connect(cbColorBorder, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()));
- connect(showGrabHandleCb, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()));
- connect(menuDblClickOp, SIGNAL(activated(int)),
- this, SLOT(slotSelectionChanged()));
+ connect(cbColorBorder, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect(showGrabHandleCb, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect(menuDblClickOp, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSelectionChanged()));
// Make the widgets visible in kwindecoration
gb->show();
}
@@ -106,7 +106,7 @@ void B2Config::load(KConfig * /*conf*/)
override = b2Config->readBoolEntry( "DrawGrabHandle", true );
showGrabHandleCb->setChecked(override);
- QString returnString = b2Config->readEntry(
+ TQString returnString = b2Config->readEntry(
"MenuButtonDoubleClickOperation", "NoOp");
int op;
@@ -124,7 +124,7 @@ void B2Config::load(KConfig * /*conf*/)
}
-static QString opToString(int op)
+static TQString opToString(int op)
{
switch (op) {
case 1:
diff --git a/kwin/clients/b2/config/config.h b/kwin/clients/b2/config/config.h
index 9985f3f4f..92c255ae6 100644
--- a/kwin/clients/b2/config/config.h
+++ b/kwin/clients/b2/config/config.h
@@ -9,11 +9,11 @@
#ifndef _KDE_B2CONFIG_H
#define _KDE_B2CONFIG_H
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <kconfig.h>
class B2Config: public QObject
@@ -21,7 +21,7 @@ class B2Config: public QObject
Q_OBJECT
public:
- B2Config( KConfig* conf, QWidget* parent );
+ B2Config( KConfig* conf, TQWidget* parent );
~B2Config();
// These public signals/slots work similar to KCM modules
@@ -38,11 +38,11 @@ class B2Config: public QObject
private:
KConfig* b2Config;
- QCheckBox* cbColorBorder;
- QCheckBox* showGrabHandleCb;
- QHGroupBox* actionsGB;
- QComboBox* menuDblClickOp;
- QWidget* gb;
+ TQCheckBox* cbColorBorder;
+ TQCheckBox* showGrabHandleCb;
+ TQHGroupBox* actionsGB;
+ TQComboBox* menuDblClickOp;
+ TQWidget* gb;
};
#endif
diff --git a/kwin/clients/default/config/config.cpp b/kwin/clients/default/config/config.cpp
index 2ad494fa9..c98fb1366 100644
--- a/kwin/clients/default/config/config.cpp
+++ b/kwin/clients/default/config/config.cpp
@@ -9,15 +9,15 @@
#include "config.h"
#include <kglobal.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <klocale.h>
-#include <qpixmap.h>
-#include <qvbox.h>
+#include <tqpixmap.h>
+#include <tqvbox.h>
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new KDEDefaultConfig(conf, parent));
}
@@ -26,33 +26,33 @@ extern "C"
// NOTE:
// '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
-KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
KGlobal::locale()->insertCatalogue("kwin_clients");
- highcolor = QPixmap::defaultDepth() > 8;
- gb = new QVBox( parent );
+ highcolor = TQPixmap::defaultDepth() > 8;
+ gb = new TQVBox( parent );
gb->setSpacing( KDialog::spacingHint() );
- cbShowStipple = new QCheckBox( i18n("Draw titlebar &stipple effect"), gb );
- QWhatsThis::add( cbShowStipple,
+ cbShowStipple = new TQCheckBox( i18n("Draw titlebar &stipple effect"), gb );
+ TQWhatsThis::add( cbShowStipple,
i18n("When selected, active titlebars are drawn "
"with a stipple (dotted) effect; otherwise, they are "
"drawn without the stipple."));
- cbShowGrabBar = new QCheckBox( i18n("Draw g&rab bar below windows"), gb );
- QWhatsThis::add( cbShowGrabBar,
+ cbShowGrabBar = new TQCheckBox( i18n("Draw g&rab bar below windows"), gb );
+ TQWhatsThis::add( cbShowGrabBar,
i18n("When selected, decorations are drawn with a \"grab bar\" "
"below windows; otherwise, no grab bar is drawn."));
// Only show the gradient checkbox for highcolor displays
if (highcolor)
{
- cbUseGradients = new QCheckBox( i18n("Draw &gradients"), gb );
- QWhatsThis::add( cbUseGradients,
+ cbUseGradients = new TQCheckBox( i18n("Draw &gradients"), gb );
+ TQWhatsThis::add( cbUseGradients,
i18n("When selected, decorations are drawn with gradients "
"for high-color displays; otherwise, no gradients are drawn.") );
}
@@ -61,13 +61,13 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
load( conf );
// Ensure we track user changes properly
- connect( cbShowStipple, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
- connect( cbShowGrabBar, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
+ connect( cbShowStipple, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbShowGrabBar, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
if (highcolor)
- connect( cbUseGradients, SIGNAL(clicked()),
- this, SLOT(slotSelectionChanged()) );
+ connect( cbUseGradients, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectionChanged()) );
// Make the widgets visible in kwindecoration
gb->show();
diff --git a/kwin/clients/default/config/config.h b/kwin/clients/default/config/config.h
index 248d851df..5857910b1 100644
--- a/kwin/clients/default/config/config.h
+++ b/kwin/clients/default/config/config.h
@@ -10,19 +10,19 @@
#ifndef _KDE_DEFAULT_CONFIG_H
#define _KDE_DEFAULT_CONFIG_H
-#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
#include <kconfig.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
class KDEDefaultConfig: public QObject
{
Q_OBJECT
public:
- KDEDefaultConfig( KConfig* conf, QWidget* parent );
+ KDEDefaultConfig( KConfig* conf, TQWidget* parent );
~KDEDefaultConfig();
// These public signals/slots work similar to KCM modules
@@ -38,10 +38,10 @@ class KDEDefaultConfig: public QObject
void slotSelectionChanged(); // Internal use
private:
- QCheckBox* cbShowStipple;
- QCheckBox* cbShowGrabBar;
- QCheckBox* cbUseGradients;
- QVBox* gb;
+ TQCheckBox* cbShowStipple;
+ TQCheckBox* cbShowGrabBar;
+ TQCheckBox* cbUseGradients;
+ TQVBox* gb;
bool highcolor;
};
diff --git a/kwin/clients/default/kdedefault.cpp b/kwin/clients/default/kdedefault.cpp
index aeb1b2065..d91ccf56b 100644
--- a/kwin/clients/default/kdedefault.cpp
+++ b/kwin/clients/default/kdedefault.cpp
@@ -18,13 +18,13 @@
#include <kimageeffect.h>
#include <kdrawutil.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <kdebug.h>
namespace Default
@@ -116,7 +116,7 @@ static const unsigned char pinup_mask_bits[] = {
// ===========================================================================
-static QPixmap* titlePix;
+static TQPixmap* titlePix;
static KPixmap* titleBuffer;
static KPixmap* aUpperGradient;
static KPixmap* iUpperGradient;
@@ -198,8 +198,8 @@ unsigned long KDEDefaultHandler::readConfig( bool update )
bool new_showGrabBar = conf->readBoolEntry("ShowGrabBar", true);
bool new_showTitleBarStipple = conf->readBoolEntry("ShowTitleBarStipple", true);
bool new_useGradients = conf->readBoolEntry("UseGradients", true);
- int new_titleHeight = QFontMetrics(options()->font(true)).height();
- int new_toolTitleHeight = QFontMetrics(options()->font(true, true)).height()-2;
+ int new_titleHeight = TQFontMetrics(options()->font(true)).height();
+ int new_toolTitleHeight = TQFontMetrics(options()->font(true, true)).height()-2;
int new_borderWidth;
switch(options()->preferredBorderSize(this)) {
@@ -257,16 +257,16 @@ unsigned long KDEDefaultHandler::readConfig( bool update )
// This paints the button pixmaps upon loading the style.
void KDEDefaultHandler::createPixmaps()
{
- bool highcolor = useGradients && (QPixmap::defaultDepth() > 8);
+ bool highcolor = useGradients && (TQPixmap::defaultDepth() > 8);
// Make the titlebar stipple optional
if (showTitleBarStipple)
{
- QPainter p;
- QPainter maskPainter;
+ TQPainter p;
+ TQPainter maskPainter;
int i, x, y;
- titlePix = new QPixmap(132, normalTitleHeight+2);
- QBitmap mask(132, normalTitleHeight+2);
+ titlePix = new TQPixmap(132, normalTitleHeight+2);
+ TQBitmap mask(132, normalTitleHeight+2);
mask.fill(Qt::color0);
p.begin(titlePix);
@@ -288,11 +288,11 @@ void KDEDefaultHandler::createPixmaps()
} else
titlePix = NULL;
- QColor activeTitleColor1(options()->color(ColorTitleBar, true));
- QColor activeTitleColor2(options()->color(ColorTitleBlend, true));
+ TQColor activeTitleColor1(options()->color(ColorTitleBar, true));
+ TQColor activeTitleColor2(options()->color(ColorTitleBlend, true));
- QColor inactiveTitleColor1(options()->color(ColorTitleBar, false));
- QColor inactiveTitleColor2(options()->color(ColorTitleBlend, false));
+ TQColor inactiveTitleColor1(options()->color(ColorTitleBar, false));
+ TQColor inactiveTitleColor2(options()->color(ColorTitleBlend, false));
// Create titlebar gradient images if required
aUpperGradient = NULL;
@@ -324,8 +324,8 @@ void KDEDefaultHandler::createPixmaps()
}
// Set the sticky pin pixmaps;
- QColorGroup g;
- QPainter p;
+ TQColorGroup g;
+ TQPainter p;
// Active pins
g = options()->colorGroup( ColorButtonBg, true );
@@ -335,7 +335,7 @@ void KDEDefaultHandler::createPixmaps()
kColorBitmaps( &p, g, 0, 0, 16, 16, true, pinup_white_bits,
pinup_gray_bits, NULL, NULL, pinup_dgray_bits, NULL );
p.end();
- pinUpPix->setMask( QBitmap(16, 16, pinup_mask_bits, true) );
+ pinUpPix->setMask( TQBitmap(16, 16, pinup_mask_bits, true) );
pinDownPix = new KPixmap();
pinDownPix->resize(16, 16);
@@ -343,7 +343,7 @@ void KDEDefaultHandler::createPixmaps()
kColorBitmaps( &p, g, 0, 0, 16, 16, true, pindown_white_bits,
pindown_gray_bits, NULL, NULL, pindown_dgray_bits, NULL );
p.end();
- pinDownPix->setMask( QBitmap(16, 16, pindown_mask_bits, true) );
+ pinDownPix->setMask( TQBitmap(16, 16, pindown_mask_bits, true) );
// Inactive pins
g = options()->colorGroup( ColorButtonBg, false );
@@ -353,7 +353,7 @@ void KDEDefaultHandler::createPixmaps()
kColorBitmaps( &p, g, 0, 0, 16, 16, true, pinup_white_bits,
pinup_gray_bits, NULL, NULL, pinup_dgray_bits, NULL );
p.end();
- ipinUpPix->setMask( QBitmap(16, 16, pinup_mask_bits, true) );
+ ipinUpPix->setMask( TQBitmap(16, 16, pinup_mask_bits, true) );
ipinDownPix = new KPixmap();
ipinDownPix->resize(16, 16);
@@ -361,7 +361,7 @@ void KDEDefaultHandler::createPixmaps()
kColorBitmaps( &p, g, 0, 0, 16, 16, true, pindown_white_bits,
pindown_gray_bits, NULL, NULL, pindown_dgray_bits, NULL );
p.end();
- ipinDownPix->setMask( QBitmap(16, 16, pindown_mask_bits, true) );
+ ipinDownPix->setMask( TQBitmap(16, 16, pindown_mask_bits, true) );
// Create a title buffer for flicker-free painting
titleBuffer = new KPixmap();
@@ -492,16 +492,16 @@ void KDEDefaultHandler::freePixmaps()
void KDEDefaultHandler::drawButtonBackground(KPixmap *pix,
- const QColorGroup &g, bool sunken)
+ const TQColorGroup &g, bool sunken)
{
- QPainter p;
+ TQPainter p;
int w = pix->width();
int h = pix->height();
int x2 = w-1;
int y2 = h-1;
- bool highcolor = useGradients && (QPixmap::defaultDepth() > 8);
- QColor c = g.background();
+ bool highcolor = useGradients && (TQPixmap::defaultDepth() > 8);
+ TQColor c = g.background();
// Fill the background with a gradient if possible
if (highcolor)
@@ -528,9 +528,9 @@ void KDEDefaultHandler::drawButtonBackground(KPixmap *pix,
p.drawLine(2, x2-2, y2-2, x2-2);
}
-QValueList< KDEDefaultHandler::BorderSize > KDEDefaultHandler::borderSizes() const
+TQValueList< KDEDefaultHandler::BorderSize > KDEDefaultHandler::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
@@ -560,7 +560,7 @@ bool KDEDefaultHandler::supports( Ability ability )
KDEDefaultButton::KDEDefaultButton(ButtonType type, KDEDefaultClient *parent, const char *name)
: KCommonDecorationButton(type, parent, name)
{
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
isMouseOver = false;
deco = NULL;
@@ -619,13 +619,13 @@ void KDEDefaultButton::setBitmap(const unsigned char *bitmap)
deco = 0;
if (bitmap) {
- deco = new QBitmap(10, 10, bitmap, true);
+ deco = new TQBitmap(10, 10, bitmap, true);
deco->setMask( *deco );
}
}
-void KDEDefaultButton::drawButton(QPainter *p)
+void KDEDefaultButton::drawButton(TQPainter *p)
{
if (!KDEDefault_initialized)
return;
@@ -660,14 +660,14 @@ void KDEDefaultButton::drawButton(QPainter *p)
// This is for sticky and menu buttons
KPixmap* grad = active ? aUpperGradient : iUpperGradient;
if (!grad) {
- QColor c = KDecoration::options()->color(KDecoration::ColorTitleBar, active);
+ TQColor c = KDecoration::options()->color(KDecoration::ColorTitleBar, active);
p->fillRect(0, 0, width(), height(), c );
} else
p->drawPixmap( 0, 0, *grad, 0,1, width(), height() );
} else {
// Draw a plain background for menus or sticky buttons on RHS
- QColor c = KDecoration::options()->color(KDecoration::ColorFrame, active);
+ TQColor c = KDecoration::options()->color(KDecoration::ColorFrame, active);
p->fillRect(0, 0, width(), height(), c);
}
@@ -698,7 +698,7 @@ void KDEDefaultButton::drawButton(QPainter *p)
else
btnpix = isOn() ? *ipinDownPix : *ipinUpPix;
} else
- btnpix = decoration()->icon().pixmap( QIconSet::Small, QIconSet::Normal );
+ btnpix = decoration()->icon().pixmap( TQIconSet::Small, TQIconSet::Normal );
// Intensify the image if required
if (isMouseOver) {
@@ -717,19 +717,19 @@ void KDEDefaultButton::drawButton(QPainter *p)
}
-void KDEDefaultButton::enterEvent(QEvent *e)
+void KDEDefaultButton::enterEvent(TQEvent *e)
{
isMouseOver=true;
repaint(false);
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
}
-void KDEDefaultButton::leaveEvent(QEvent *e)
+void KDEDefaultButton::leaveEvent(TQEvent *e)
{
isMouseOver=false;
repaint(false);
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
}
@@ -741,17 +741,17 @@ KDEDefaultClient::KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f
{
}
-QString KDEDefaultClient::visibleName() const
+TQString KDEDefaultClient::visibleName() const
{
return i18n("KDE2");
}
-QString KDEDefaultClient::defaultButtonsLeft() const
+TQString KDEDefaultClient::defaultButtonsLeft() const
{
return "MS";
}
-QString KDEDefaultClient::defaultButtonsRight() const
+TQString KDEDefaultClient::defaultButtonsRight() const
{
return "HIAX";
}
@@ -871,20 +871,20 @@ bool KDEDefaultClient::mustDrawHandle() const
}
}
-void KDEDefaultClient::paintEvent( QPaintEvent* )
+void KDEDefaultClient::paintEvent( TQPaintEvent* )
{
if (!KDEDefault_initialized)
return;
- QColorGroup g;
+ TQColorGroup g;
int offset;
KPixmap* upperGradient = isActive() ? aUpperGradient : iUpperGradient;
- QPainter p(widget());
+ TQPainter p(widget());
// Obtain widget bounds.
- QRect r(widget()->rect());
+ TQRect r(widget()->rect());
int x = r.x();
int y = r.y();
int x2 = r.width() - 1;
@@ -938,8 +938,8 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
p.drawLine(x+1, y2-1, x2-1, y2-1);
p.setPen(options()->color(ColorFrame, isActive()));
- QPointArray a;
- QBrush brush( options()->color(ColorFrame, isActive()), Qt::SolidPattern );
+ TQPointArray a;
+ TQBrush brush( options()->color(ColorFrame, isActive()), Qt::SolidPattern );
p.setBrush( brush ); // use solid, yellow brush
a.setPoints( 4, x+2, leftFrameStart+borderWidth-4,
x+borderWidth-2, leftFrameStart,
@@ -956,18 +956,18 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
if(w > 50)
{
qDrawShadePanel(&p, x+1, y2-grabBorderWidth+2, 2*borderWidth+12, grabBorderWidth-2,
- g, false, 1, &g.brush(QColorGroup::Mid));
+ g, false, 1, &g.brush(TQColorGroup::Mid));
qDrawShadePanel(&p, x+2*borderWidth+13, y2-grabBorderWidth+2, w-4*borderWidth-26, grabBorderWidth-2,
g, false, 1, isActive() ?
- &g.brush(QColorGroup::Background) :
- &g.brush(QColorGroup::Mid));
+ &g.brush(TQColorGroup::Background) :
+ &g.brush(TQColorGroup::Mid));
qDrawShadePanel(&p, x2-2*borderWidth-12, y2-grabBorderWidth+2, 2*borderWidth+12, grabBorderWidth-2,
- g, false, 1, &g.brush(QColorGroup::Mid));
+ g, false, 1, &g.brush(TQColorGroup::Mid));
} else
qDrawShadePanel(&p, x+1, y2-grabBorderWidth+2, w-2, grabBorderWidth-2,
g, false, 1, isActive() ?
- &g.brush(QColorGroup::Background) :
- &g.brush(QColorGroup::Mid));
+ &g.brush(TQColorGroup::Background) :
+ &g.brush(TQColorGroup::Mid));
offset = grabBorderWidth;
} else
{
@@ -984,13 +984,13 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
r = titleRect();
// Obtain titlebar blend colours
- QColor c1 = options()->color(ColorTitleBar, isActive() );
- QColor c2 = options()->color(ColorFrame, isActive() );
+ TQColor c1 = options()->color(ColorTitleBar, isActive() );
+ TQColor c2 = options()->color(ColorFrame, isActive() );
// Fill with frame color behind RHS buttons
p.fillRect( rightOffset, y+2, x2-rightOffset-1, titleHeight+1, c2);
- QPainter p2( titleBuffer, this );
+ TQPainter p2( titleBuffer, this );
// Draw the titlebar gradient
if (upperGradient)
@@ -1000,7 +1000,7 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
// Draw the title text on the pixmap, and with a smaller font
// for toolwindows than the default.
- QFont fnt = options()->font(true);
+ TQFont fnt = options()->font(true);
if ( isToolWindow() )
fnt.setPointSize( fnt.pointSize()-2 ); // Shrink font by 2pt
@@ -1010,7 +1010,7 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
// Draw the titlebar stipple if active and available
if (isActive() && titlePix)
{
- QFontMetrics fm(fnt);
+ TQFontMetrics fm(fnt);
int captionWidth = fm.width(caption());
if (caption().isRightToLeft())
p2.drawTiledPixmap( r.x(), 0, r.width()-captionWidth-4,
@@ -1037,23 +1037,23 @@ void KDEDefaultClient::paintEvent( QPaintEvent* )
#endif
}
-QRegion KDEDefaultClient::cornerShape(WindowCorner corner)
+TQRegion KDEDefaultClient::cornerShape(WindowCorner corner)
{
switch (corner) {
case WC_TopLeft:
- return QRect(0, 0, 1, 1);
+ return TQRect(0, 0, 1, 1);
case WC_TopRight:
- return QRect(width()-1, 0, 1, 1);
+ return TQRect(width()-1, 0, 1, 1);
case WC_BottomLeft:
- return QRect(0, height()-1, 1, 1);
+ return TQRect(0, height()-1, 1, 1);
case WC_BottomRight:
- return QRect(width()-1, height()-1, 1, 1);
+ return TQRect(width()-1, height()-1, 1, 1);
default:
- return QRegion();
+ return TQRegion();
}
}
diff --git a/kwin/clients/default/kdedefault.h b/kwin/clients/default/kdedefault.h
index 53ad23fa2..6e09025f1 100644
--- a/kwin/clients/default/kdedefault.h
+++ b/kwin/clients/default/kdedefault.h
@@ -13,9 +13,9 @@
#ifndef _KDE_DEFAULT_H
#define _KDE_DEFAULT_H
-#include <qbutton.h>
-#include <qbitmap.h>
-#include <qdatetime.h>
+#include <tqbutton.h>
+#include <tqbitmap.h>
+#include <tqdatetime.h>
#include <kpixmap.h>
#include <kcommondecoration.h>
#include <kdecorationfactory.h>
@@ -35,7 +35,7 @@ class KDEDefaultHandler: public KDecorationFactory
~KDEDefaultHandler();
KDecoration* createDecoration( KDecorationBridge* b );
bool reset( unsigned long changed );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
virtual bool supports( Ability ability );
private:
@@ -43,11 +43,11 @@ class KDEDefaultHandler: public KDecorationFactory
void createPixmaps();
void freePixmaps();
void drawButtonBackground(KPixmap *pix,
- const QColorGroup &g, bool sunken);
+ const TQColorGroup &g, bool sunken);
};
-// class KDEDefaultButton : public QButton, public KDecorationDefines
+// class KDEDefaultButton : public TQButton, public KDecorationDefines
class KDEDefaultButton : public KCommonDecorationButton
{
public:
@@ -59,12 +59,12 @@ class KDEDefaultButton : public KCommonDecorationButton
void setBitmap(const unsigned char *bitmap);
protected:
- void enterEvent(QEvent *);
- void leaveEvent(QEvent *);
- void drawButton(QPainter *p);
- void drawButtonLabel(QPainter*) {;}
+ void enterEvent(TQEvent *);
+ void leaveEvent(TQEvent *);
+ void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter*) {;}
- QBitmap* deco;
+ TQBitmap* deco;
bool large;
bool isMouseOver;
};
@@ -76,20 +76,20 @@ class KDEDefaultClient : public KCommonDecoration
KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f );
~KDEDefaultClient() {;}
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
- virtual QRegion cornerShape(WindowCorner corner);
+ virtual TQRegion cornerShape(WindowCorner corner);
void init();
void reset( unsigned long changed );
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
private:
bool mustDrawHandle() const;
diff --git a/kwin/clients/keramik/config/config.cpp b/kwin/clients/keramik/config/config.cpp
index c548ca184..b4b6ced9b 100644
--- a/kwin/clients/keramik/config/config.cpp
+++ b/kwin/clients/keramik/config/config.cpp
@@ -26,14 +26,14 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "config.h"
#include "config.moc"
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return ( new KeramikConfig( conf, parent ) );
}
@@ -44,21 +44,21 @@ 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
*/
-KeramikConfig::KeramikConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+KeramikConfig::KeramikConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
KGlobal::locale()->insertCatalogue("kwin_clients");
c = new KConfig( "kwinkeramikrc" );
ui = new KeramikConfigUI( parent );
- connect( ui->showAppIcons, SIGNAL(clicked()), SIGNAL(changed()) );
- connect( ui->smallCaptions, SIGNAL(clicked()), SIGNAL(changed()) );
- connect( ui->largeGrabBars, SIGNAL(clicked()), SIGNAL(changed()) );
- connect( ui->useShadowedText, SIGNAL(clicked()), SIGNAL(changed()) );
+ connect( ui->showAppIcons, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
+ connect( ui->smallCaptions, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
+ connect( ui->largeGrabBars, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
+ connect( ui->useShadowedText, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) );
load( conf );
ui->show();
diff --git a/kwin/clients/keramik/config/config.h b/kwin/clients/keramik/config/config.h
index 71090531d..4207424c7 100644
--- a/kwin/clients/keramik/config/config.h
+++ b/kwin/clients/keramik/config/config.h
@@ -34,7 +34,7 @@ class KeramikConfig: public QObject
Q_OBJECT
public:
- KeramikConfig( KConfig* conf, QWidget* parent );
+ KeramikConfig( KConfig* conf, TQWidget* parent );
~KeramikConfig();
// These public signals/slots work similar to KCM modules
diff --git a/kwin/clients/keramik/embedtool.cpp b/kwin/clients/keramik/embedtool.cpp
index b0e5f1c72..4f5135a3f 100644
--- a/kwin/clients/keramik/embedtool.cpp
+++ b/kwin/clients/keramik/embedtool.cpp
@@ -19,12 +19,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
+#include <tqimage.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
#include <iostream>
@@ -37,11 +37,11 @@ static int primes[] = {
};
struct EmbedImage {
- QString string;
+ TQString string;
int width;
int height;
bool alpha;
- QString name;
+ TQString name;
};
class KeramikEmbedder {
@@ -53,17 +53,17 @@ public:
void writeIndex();
private:
- QFile *file;
- QPtrList<EmbedImage> *index;
- QTextStream stream;
+ TQFile *file;
+ TQPtrList<EmbedImage> *index;
+ TQTextStream stream;
};
KeramikEmbedder::KeramikEmbedder()
{
- QDateTime date( QDateTime::currentDateTime() );
- QString datestring( date.toString() );
+ TQDateTime date( TQDateTime::currentDateTime() );
+ TQString datestring( date.toString() );
- file = new QFile( "tiles.h" );
+ file = new TQFile( "tiles.h" );
file->open( IO_WriteOnly | IO_Truncate );
stream.setDevice( file );
@@ -74,11 +74,11 @@ KeramikEmbedder::KeramikEmbedder()
stream << "#ifndef __TILES_H\n";
stream << "#define __TILES_H\n\n";
- stream << "#include <qimage.h>\n";
- stream << "#include <qdict.h>\n\n";
+ stream << "#include <tqimage.h>\n";
+ stream << "#include <tqdict.h>\n\n";
stream << "namespace Keramik {\n\n";
- index = new QPtrList<EmbedImage>;
+ index = new TQPtrList<EmbedImage>;
index->setAutoDelete( true );
}
@@ -95,15 +95,15 @@ KeramikEmbedder::~KeramikEmbedder()
void KeramikEmbedder::embed( const char *name )
{
- QFileInfo fileinfo( name );
- QString basename( fileinfo.baseName() );
- QString codename( basename );
- QImage image( name );
+ TQFileInfo fileinfo( name );
+ TQString basename( fileinfo.baseName() );
+ TQString codename( basename );
+ TQImage image( name );
- codename = codename.replace( QRegExp("[^a-zA-Z0-9]"), "_" );
+ codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" );
stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t";
- stream.setf( QTextStream::hex | QTextStream::right );
+ stream.setf( TQTextStream::hex | TQTextStream::right );
stream.fill( '0' );
int pixels = image.width() * image.height();
@@ -174,14 +174,14 @@ void KeramikEmbedder::writeIndex()
stream << "\tclass KeramikImageDb {\n";
stream << "\tprivate:\n";
stream << "\t\tstatic KeramikImageDb *m_inst;\n";
- stream << "\t\tQDict<QImage> *db;\n\n";
+ stream << "\t\tQDict<TQImage> *db;\n\n";
stream << "\t\tKeramikImageDb() {\n";
- stream << "\t\t\tdb = new QDict<QImage>( " << prime << " );\n";
+ stream << "\t\t\tdb = new TQDict<TQImage>( " << prime << " );\n";
stream << "\t\t\tdb->setAutoDelete( true );\n\n";
stream << "\t\t\tfor ( int i = 0; i < " << index->count() << "; i++ ) {\n";
- stream << "\t\t\t\tQImage *img = new QImage( (uchar*)image_db[i].data,\n";
+ stream << "\t\t\t\tQImage *img = new TQImage( (uchar*)image_db[i].data,\n";
stream << "\t\t\t\t\t\timage_db[i].width, image_db[i].height,\n";
- stream << "\t\t\t\t\t\t32, NULL, 0, QImage::LittleEndian );\n\n";
+ stream << "\t\t\t\t\t\t32, NULL, 0, TQImage::LittleEndian );\n\n";
stream << "\t\t\t\tif ( image_db[i].alpha )\n";
stream << "\t\t\t\t\timg->setAlphaBuffer( true );\n\n";
stream << "\t\t\t\tdb->insert( image_db[i].name, img );\n";
@@ -199,7 +199,7 @@ void KeramikEmbedder::writeIndex()
stream << "\t\t\tif ( m_inst ) delete m_inst;\n";
stream << "\t\t\tm_inst = NULL;\n";
stream << "\t\t}\n\n";
- stream << "\t\tQImage *image( const QString &name ) const {\n";
+ stream << "\t\tQImage *image( const TQString &name ) const {\n";
stream << "\t\t\treturn db->find( name );\n";
stream << "\t\t}\n\n";
stream << "\t}; // class KeramikImageDb\n\n";
diff --git a/kwin/clients/keramik/keramik.cpp b/kwin/clients/keramik/keramik.cpp
index 57a51bce1..48a187098 100644
--- a/kwin/clients/keramik/keramik.cpp
+++ b/kwin/clients/keramik/keramik.cpp
@@ -24,13 +24,13 @@
#include <klocale.h>
#include <kiconeffect.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qbitmap.h>
-#include <qstyle.h>
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqbitmap.h>
+#include <tqstyle.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
#include <X11/Xlib.h>
@@ -41,16 +41,16 @@
// -------------------------------------------------------------------------------------------
-static void flip( QPixmap *&pix )
+static void flip( TQPixmap *&pix )
{
- QPixmap *tmp = new QPixmap( pix->xForm( QWMatrix(-1,0,0,1,pix->width(),0) ) );
+ TQPixmap *tmp = new TQPixmap( pix->xForm( TQWMatrix(-1,0,0,1,pix->width(),0) ) );
delete pix;
pix = tmp;
}
-static void flip( QBitmap *&pix )
+static void flip( TQBitmap *&pix )
{
- QBitmap *tmp = new QBitmap( pix->xForm( QWMatrix(-1,0,0,1,pix->width(),0) ) );
+ TQBitmap *tmp = new TQBitmap( pix->xForm( TQWMatrix(-1,0,0,1,pix->width(),0) ) );
delete pix;
pix = tmp;
}
@@ -186,27 +186,27 @@ KeramikHandler::KeramikHandler()
imageDb = KeramikImageDb::instance();
// Create the button deco bitmaps
- buttonDecos[ Menu ] = new QBitmap( 17, 17, menu_bits, true );
- buttonDecos[ OnAllDesktops ] = new QBitmap( 17, 17, on_all_desktops_bits, true );
- buttonDecos[ NotOnAllDesktops ] = new QBitmap( 17, 17, not_on_all_desktops_bits, true );
- buttonDecos[ Help ] = new QBitmap( 17, 17, help_bits, true );
- buttonDecos[ Minimize ] = new QBitmap( 17, 17, minimize_bits, true );
- buttonDecos[ Maximize ] = new QBitmap( 17, 17, maximize_bits, true );
- buttonDecos[ Restore ] = new QBitmap( 17, 17, restore_bits, true );
- buttonDecos[ Close ] = new QBitmap( 17, 17, close_bits, true );
- buttonDecos[ AboveOn ] = new QBitmap( 17, 17, above_on_bits, true );
- buttonDecos[ AboveOff ] = new QBitmap( 17, 17, above_off_bits, true );
- buttonDecos[ BelowOn ] = new QBitmap( 17, 17, below_on_bits, true );
- buttonDecos[ BelowOff ] = new QBitmap( 17, 17, below_off_bits, true );
- buttonDecos[ ShadeOn ] = new QBitmap( 17, 17, shade_on_bits, true );
- buttonDecos[ ShadeOff ] = new QBitmap( 17, 17, shade_off_bits, true );
+ buttonDecos[ Menu ] = new TQBitmap( 17, 17, menu_bits, true );
+ buttonDecos[ OnAllDesktops ] = new TQBitmap( 17, 17, on_all_desktops_bits, true );
+ buttonDecos[ NotOnAllDesktops ] = new TQBitmap( 17, 17, not_on_all_desktops_bits, true );
+ buttonDecos[ Help ] = new TQBitmap( 17, 17, help_bits, true );
+ buttonDecos[ Minimize ] = new TQBitmap( 17, 17, minimize_bits, true );
+ buttonDecos[ Maximize ] = new TQBitmap( 17, 17, maximize_bits, true );
+ buttonDecos[ Restore ] = new TQBitmap( 17, 17, restore_bits, true );
+ buttonDecos[ Close ] = new TQBitmap( 17, 17, close_bits, true );
+ buttonDecos[ AboveOn ] = new TQBitmap( 17, 17, above_on_bits, true );
+ buttonDecos[ AboveOff ] = new TQBitmap( 17, 17, above_off_bits, true );
+ buttonDecos[ BelowOn ] = new TQBitmap( 17, 17, below_on_bits, true );
+ buttonDecos[ BelowOff ] = new TQBitmap( 17, 17, below_off_bits, true );
+ buttonDecos[ ShadeOn ] = new TQBitmap( 17, 17, shade_on_bits, true );
+ buttonDecos[ ShadeOff ] = new TQBitmap( 17, 17, shade_off_bits, true );
// Selfmask the bitmaps
for ( int i = 0; i < NumButtonDecos; i++ )
buttonDecos[i]->setMask( *buttonDecos[i] );
// Flip the bitmaps horizontally in right-to-left mode
- if ( QApplication::reverseLayout() ) {
+ if ( TQApplication::reverseLayout() ) {
for ( int i = 0; i < Help; ++i )
::flip( buttonDecos[i] );
@@ -268,14 +268,14 @@ void KeramikHandler::createPixmaps()
widthOffset = 0;
heightOffset = 0;
}
- int fontHeight = QFontMetrics(options()->font(true)).height();
+ int fontHeight = TQFontMetrics(options()->font(true)).height();
if (fontHeight > heightOffset + 20)
heightOffset = fontHeight - 20;
- QString size = (heightOffset < 8) ? "" : (heightOffset < 20) ? "-large" : "-huge";
+ TQString size = (heightOffset < 8) ? "" : (heightOffset < 20) ? "-large" : "-huge";
- QColor titleColor, captionColor, buttonColor;
- QImage *titleCenter = NULL, *captionLeft = NULL,
+ TQColor titleColor, captionColor, buttonColor;
+ TQImage *titleCenter = NULL, *captionLeft = NULL,
*captionRight = NULL, *captionCenter = NULL;
@@ -320,7 +320,7 @@ void KeramikHandler::createPixmaps()
delete captionCenter;
// Create the titlebar center tile
- activeTiles[ TitleCenter ] = new QPixmap( *titleCenter );
+ activeTiles[ TitleCenter ] = new TQPixmap( *titleCenter );
delete titleCenter;
@@ -361,7 +361,7 @@ void KeramikHandler::createPixmaps()
delete captionRight;
delete captionCenter;
- inactiveTiles[ TitleCenter ] = new QPixmap( *titleCenter );
+ inactiveTiles[ TitleCenter ] = new TQPixmap( *titleCenter );
delete titleCenter;
@@ -380,7 +380,7 @@ void KeramikHandler::createPixmaps()
// Buttons
// -------------------------------------------------------------------------
- buttonColor = QColor(); //KDecoration::options()->color( ButtonBg, true );
+ buttonColor = TQColor(); //KDecoration::options()->color( ButtonBg, true );
titleButtonRound = loadPixmap( "titlebutton-round"+size, buttonColor );
titleButtonSquare = loadPixmap( "titlebutton-square"+size, buttonColor );
@@ -388,7 +388,7 @@ void KeramikHandler::createPixmaps()
// Prepare the tiles for use
// -------------------------------------------------------------------------
- if ( QApplication::reverseLayout() ) {
+ if ( TQApplication::reverseLayout() ) {
// Fix lighting
flip( activeTiles[CaptionSmallLeft], activeTiles[CaptionSmallRight] );
@@ -476,13 +476,13 @@ void KeramikHandler::destroyPixmaps()
}
-void KeramikHandler::addWidth (int width, QPixmap *&pix, bool left, QPixmap *bottomPix) {
+void KeramikHandler::addWidth (int width, TQPixmap *&pix, bool left, TQPixmap *bottomPix) {
int w = pix->width()+width;
int h = pix->height();
- QPixmap *tmp = new QPixmap (w, h);
+ TQPixmap *tmp = new TQPixmap (w, h);
tmp->fill ();
- QPainter p;
+ TQPainter p;
p.begin (tmp);
for (int i = 0; i < h; i++)
@@ -500,12 +500,12 @@ void KeramikHandler::addWidth (int width, QPixmap *&pix, bool left, QPixmap *bot
}
-void KeramikHandler::addHeight (int height, QPixmap *&pix) {
+void KeramikHandler::addHeight (int height, TQPixmap *&pix) {
int w = pix->width();
int h = pix->height()+height;
- QPixmap *tmp = new QPixmap (w, h);
- QPainter p;
+ TQPixmap *tmp = new TQPixmap (w, h);
+ TQPainter p;
p.begin (tmp);
if (pix->height() > 10) {
p.drawPixmap(0, 0, *pix, 0, 0, w, 11);
@@ -527,28 +527,28 @@ void KeramikHandler::addHeight (int height, QPixmap *&pix) {
}
-void KeramikHandler::flip( QPixmap *&pix1, QPixmap *&pix2 )
+void KeramikHandler::flip( TQPixmap *&pix1, TQPixmap *&pix2 )
{
// Flip the pixmaps horizontally
- QPixmap *tmp = new QPixmap( pix1->xForm( QWMatrix(-1,0,0,1,pix1->width(),0) ) );
+ TQPixmap *tmp = new TQPixmap( pix1->xForm( TQWMatrix(-1,0,0,1,pix1->width(),0) ) );
delete pix1;
- pix1 = new QPixmap( pix2->xForm( QWMatrix(-1,0,0,1,pix2->width(),0) ) );
+ pix1 = new TQPixmap( pix2->xForm( TQWMatrix(-1,0,0,1,pix2->width(),0) ) );
delete pix2;
pix2 = tmp;
}
-void KeramikHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir )
+void KeramikHandler::pretile( TQPixmap *&pix, int size, Qt::Orientation dir )
{
- QPixmap *newpix;
- QPainter p;
+ TQPixmap *newpix;
+ TQPainter p;
if ( dir == Qt::Horizontal )
- newpix = new QPixmap( size, pix->height() );
+ newpix = new TQPixmap( size, pix->height() );
else
- newpix = new QPixmap( pix->width(), size );
+ newpix = new TQPixmap( pix->width(), size );
p.begin( newpix );
p.drawTiledPixmap( newpix->rect(), *pix ) ;
@@ -579,9 +579,9 @@ void KeramikHandler::readConfig()
}
-QPixmap *KeramikHandler::composite( QImage *over, QImage *under )
+TQPixmap *KeramikHandler::composite( TQImage *over, TQImage *under )
{
- QImage dest( over->width(), over->height(), 32 );
+ TQImage dest( over->width(), over->height(), 32 );
int width = over->width(), height = over->height();
// Clear the destination image
@@ -624,25 +624,25 @@ QPixmap *KeramikHandler::composite( QImage *over, QImage *under )
}
// Create the final pixmap and return it
- return new QPixmap( dest );
+ return new TQPixmap( dest );
}
-QImage *KeramikHandler::loadImage( const QString &name, const QColor &col )
+TQImage *KeramikHandler::loadImage( const TQString &name, const TQColor &col )
{
if ( col.isValid() ) {
- QImage *img = new QImage( imageDb->image(name)->copy() );
+ TQImage *img = new TQImage( imageDb->image(name)->copy() );
KIconEffect::colorize( *img, col, 1.0 );
return img;
} else
- return new QImage( imageDb->image(name)->copy() );
+ return new TQImage( imageDb->image(name)->copy() );
}
-QPixmap *KeramikHandler::loadPixmap( const QString &name, const QColor &col )
+TQPixmap *KeramikHandler::loadPixmap( const TQString &name, const TQColor &col )
{
- QImage *img = loadImage( name, col );
- QPixmap *pix = new QPixmap( *img );
+ TQImage *img = loadImage( name, col );
+ TQPixmap *pix = new TQPixmap( *img );
delete img;
return pix;
@@ -735,7 +735,7 @@ bool KeramikHandler::supports( Ability ability )
}
-const QPixmap *KeramikHandler::tile( TilePixmap tilePix, bool active ) const
+const TQPixmap *KeramikHandler::tile( TilePixmap tilePix, bool active ) const
{
return ( active ? activeTiles[ tilePix ] : inactiveTiles[ tilePix ] );
}
@@ -745,9 +745,9 @@ KDecoration* KeramikHandler::createDecoration( KDecorationBridge* bridge )
return new KeramikClient( bridge, this );
}
-QValueList< KeramikHandler::BorderSize > KeramikHandler::borderSizes() const
+TQValueList< KeramikHandler::BorderSize > KeramikHandler::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
@@ -756,13 +756,13 @@ QValueList< KeramikHandler::BorderSize > KeramikHandler::borderSizes() const
-KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, const QString &tip, const int realizeBtns )
- : QButton( c->widget(), name ),
+KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, const TQString &tip, const int realizeBtns )
+ : TQButton( c->widget(), name ),
client( c ), button( btn ), hover( false ), lastbutton( NoButton )
{
realizeButtons = realizeBtns;
- QToolTip::add( this, tip ); // FRAME
+ TQToolTip::add( this, tip ); // FRAME
setBackgroundMode( NoBackground );
setCursor( arrowCursor );
int size = clientHandler->roundButton()->height();
@@ -778,44 +778,44 @@ KeramikButton::~KeramikButton()
}
-void KeramikButton::enterEvent( QEvent *e )
+void KeramikButton::enterEvent( TQEvent *e )
{
- QButton::enterEvent( e );
+ TQButton::enterEvent( e );
hover = true;
repaint( false );
}
-void KeramikButton::leaveEvent( QEvent *e )
+void KeramikButton::leaveEvent( TQEvent *e )
{
- QButton::leaveEvent( e );
+ TQButton::leaveEvent( e );
hover = false;
repaint( false );
}
-void KeramikButton::mousePressEvent( QMouseEvent *e )
+void KeramikButton::mousePressEvent( TQMouseEvent *e )
{
lastbutton = e->button();
- QMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mousePressEvent( &me );
+ TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
+ TQButton::mousePressEvent( &me );
}
-void KeramikButton::mouseReleaseEvent( QMouseEvent *e )
+void KeramikButton::mouseReleaseEvent( TQMouseEvent *e )
{
lastbutton = e->button();
- QMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
- QButton::mouseReleaseEvent( &me );
+ TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() );
+ TQButton::mouseReleaseEvent( &me );
}
-void KeramikButton::drawButton( QPainter *p )
+void KeramikButton::drawButton( TQPainter *p )
{
- const QPixmap *pix;
- const QBitmap *deco;
+ const TQPixmap *pix;
+ const TQBitmap *deco;
int size = clientHandler->roundButton()->height();
// Get the bevel from the client handler
@@ -825,20 +825,20 @@ void KeramikButton::drawButton( QPainter *p )
pix = clientHandler->squareButton();
// Draw the button background
- const QPixmap *background = clientHandler->tile( TitleCenter, client->isActive() );
+ const TQPixmap *background = clientHandler->tile( TitleCenter, client->isActive() );
p->drawPixmap( 0, 0, *background,
0, (background->height()-size+1)/2, size, size );
if ( isDown() ) {
// Pressed
- p->drawPixmap( QPoint(), *pix, QStyle::visualRect( QRect(2*size, 0, size, size), pix->rect() ) );
- p->translate( QApplication::reverseLayout() ? -1 : 1, 1 );
+ p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(2*size, 0, size, size), pix->rect() ) );
+ p->translate( TQApplication::reverseLayout() ? -1 : 1, 1 );
} else if ( hover )
// Mouse over
- p->drawPixmap( QPoint(), *pix, QStyle::visualRect( QRect(size, 0, size, size), pix->rect() ) );
+ p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(size, 0, size, size), pix->rect() ) );
else
// Normal
- p->drawPixmap( QPoint(), *pix, QStyle::visualRect( QRect(0, 0, size, size), pix->rect() ) );
+ p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(0, 0, size, size), pix->rect() ) );
// Draw the button deco on the bevel
@@ -856,7 +856,7 @@ void KeramikButton::drawButton( QPainter *p )
// The '?' won't be flipped around in the ctor, so we need to
// shift it to the right to compensate for the button shadow
// being on the left side of the button in RTL mode.
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
p->translate( 2, 0 );
break;
@@ -906,8 +906,8 @@ KeramikClient::KeramikClient( KDecorationBridge* bridge, KDecorationFactory* fac
void KeramikClient::init()
{
- 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 )));
createMainWidget( WStaticContents | WResizeNoErase | WRepaintNoErase );
widget()->installEventFilter( this );
@@ -924,9 +924,9 @@ void KeramikClient::init()
void KeramikClient::createLayout()
{
- 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();
largeTitlebar = ( !maximizedVertical() && clientHandler->largeCaptionBubbles() );
largeCaption = ( isActive() && largeTitlebar );
@@ -935,8 +935,8 @@ void KeramikClient::createLayout()
int topSpacing = ( largeTitlebar ? 4 : 1 );
int leftBorderWidth = clientHandler->tile( BorderLeft, true )->width();
int rightBorderWidth = clientHandler->tile( BorderRight, true )->width();
- topSpacer = new QSpacerItem( 10, topSpacing,
- QSizePolicy::Expanding, QSizePolicy::Minimum );
+ topSpacer = new TQSpacerItem( 10, topSpacing,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum );
mainLayout->addItem( topSpacer );
@@ -948,22 +948,22 @@ void KeramikClient::createLayout()
titleLayout->addSpacing( buttonMargin ); // Left button margin
addButtons( titleLayout, options()->customButtonPositions() ?
- options()->titleButtonsLeft() : QString(default_left) );
+ options()->titleButtonsLeft() : TQString(default_left) );
- titlebar = new QSpacerItem( 10, clientHandler->titleBarHeight(largeTitlebar)
- - topSpacing, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem( 10, clientHandler->titleBarHeight(largeTitlebar)
+ - topSpacing, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
titleLayout->addItem( titlebar );
titleLayout->addSpacing( buttonSpacing );
addButtons( titleLayout, options()->customButtonPositions() ?
- options()->titleButtonsRight() : QString(default_right) );
+ options()->titleButtonsRight() : TQString(default_right) );
titleLayout->addSpacing( buttonMargin - 1 ); // Right button margin
windowLayout->addSpacing( leftBorderWidth ); // Left border
if( isPreview())
- windowLayout->addWidget( new QLabel( i18n( "<center><b>Keramik preview</b></center>" ), widget()));
+ windowLayout->addWidget( new TQLabel( i18n( "<center><b>Keramik preview</b></center>" ), widget()));
else
- windowLayout->addItem( new QSpacerItem( 0, 0 )); //no widget in the middle
+ windowLayout->addItem( new TQSpacerItem( 0, 0 )); //no widget in the middle
windowLayout->addSpacing( rightBorderWidth ); // Right border
}
@@ -983,7 +983,7 @@ void KeramikClient::reset( unsigned long )
{
// We're switching from small caption bubbles to large
if ( !maximizedVertical() ) {
- topSpacer->changeSize( 10, 4, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ topSpacer->changeSize( 10, 4, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
largeTitlebar = true;
largeCaption = isActive();
@@ -999,7 +999,7 @@ void KeramikClient::reset( unsigned long )
else if ( !clientHandler->largeCaptionBubbles() && largeTitlebar )
{
// We're switching from large caption bubbles to small
- topSpacer->changeSize( 10, 1, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ topSpacer->changeSize( 10, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
largeTitlebar = largeCaption = false;
widget()->layout()->activate();
@@ -1024,7 +1024,7 @@ void KeramikClient::reset( unsigned long )
}
-void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
+void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s )
{
for ( uint i=0; i < s.length(); i++ )
{
@@ -1034,7 +1034,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'M' :
if ( !button[MenuButton] ) {
button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), LeftButton|RightButton );
- connect( button[MenuButton], SIGNAL( pressed() ), SLOT( menuButtonPressed() ) );
+ connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) );
layout->addWidget( button[MenuButton] );
}
break;
@@ -1046,7 +1046,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
OnAllDesktopsButton, isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops") );
if(isOnAllDesktops())
button[OnAllDesktopsButton]->toggle();
- connect( button[OnAllDesktopsButton], SIGNAL( clicked() ), SLOT( toggleOnAllDesktops() ) );
+ connect( button[OnAllDesktopsButton], TQT_SIGNAL( clicked() ), TQT_SLOT( toggleOnAllDesktops() ) );
layout->addWidget( button[OnAllDesktopsButton] );
}
break;
@@ -1055,7 +1055,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'H' :
if ( !button[HelpButton] && providesContextHelp() ) {
button[HelpButton] = new KeramikButton( this, "help", HelpButton, i18n("Help") );
- connect( button[HelpButton], SIGNAL( clicked() ), SLOT( showContextHelp() ) );
+ connect( button[HelpButton], TQT_SIGNAL( clicked() ), TQT_SLOT( showContextHelp() ) );
layout->addWidget( button[HelpButton] );
}
break;
@@ -1064,7 +1064,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'I' :
if ( !button[MinButton] && isMinimizable() ) {
button[MinButton] = new KeramikButton( this, "minimize", MinButton, i18n("Minimize") );
- connect( button[MinButton], SIGNAL( clicked() ), SLOT( minimize() ) );
+ connect( button[MinButton], TQT_SIGNAL( clicked() ), TQT_SLOT( minimize() ) );
layout->addWidget( button[MinButton] );
}
break;
@@ -1073,7 +1073,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'A' :
if ( !button[MaxButton] && isMaximizable() ) {
button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), LeftButton|MidButton|RightButton );
- connect( button[MaxButton], SIGNAL( clicked() ), SLOT( slotMaximize() ) );
+ connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) );
layout->addWidget( button[MaxButton] );
}
break;
@@ -1082,7 +1082,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'X' :
if ( !button[CloseButton] && isCloseable() ) {
button[CloseButton] = new KeramikButton( this, "close", CloseButton, i18n("Close") );
- connect( button[CloseButton], SIGNAL( clicked() ), SLOT( closeWindow() ) );
+ connect( button[CloseButton], TQT_SIGNAL( clicked() ), TQT_SLOT( closeWindow() ) );
layout->addWidget( button[CloseButton] );
}
break;
@@ -1091,7 +1091,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'F' :
if ( !button[AboveButton]) {
button[AboveButton] = new KeramikButton( this, "above", AboveButton, i18n("Keep Above Others") );
- connect( button[AboveButton], SIGNAL( clicked() ), SLOT( slotAbove() ) );
+ connect( button[AboveButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotAbove() ) );
layout->addWidget( button[AboveButton] );
}
break;
@@ -1100,7 +1100,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
case 'B' :
if ( !button[BelowButton]) {
button[BelowButton] = new KeramikButton( this, "below", BelowButton, i18n("Keep Below Others") );
- connect( button[BelowButton], SIGNAL( clicked() ), SLOT( slotBelow() ) );
+ connect( button[BelowButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotBelow() ) );
layout->addWidget( button[BelowButton] );
}
break;
@@ -1110,7 +1110,7 @@ void KeramikClient::addButtons( QBoxLayout *layout, const QString &s )
if ( !button[ShadeButton] && isShadeable() ) {
button[ShadeButton] = new KeramikButton( this, "shade", ShadeButton,
isSetShade() ? i18n("Unshade") : i18n( "Shade" ));
- connect( button[ShadeButton], SIGNAL( clicked() ), SLOT( slotShade() ) );
+ connect( button[ShadeButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotShade() ) );
layout->addWidget( button[ShadeButton] );
}
break;
@@ -1134,19 +1134,19 @@ void KeramikClient::updateMask()
// pixmap, paint the mask on it and then have the X server iterate
// over the pixels to compute the bounding rects from it.
- QRegion r;
+ TQRegion r;
register int w, y = 0;
int nrects;
- if ( QApplication::reverseLayout() ) {
+ if ( TQApplication::reverseLayout() ) {
// If the caption bubble is visible and extends above the titlebar
if ( largeCaption && captionRect.width() >= 25 ) {
register int x = captionRect.left();
w = captionRect.width();
- r += QRegion( x + 11, y++, w - 19, 1 );
- r += QRegion( x + 9, y++, w - 15, 1 );
- r += QRegion( x + 7, y++, w - 12, 1 );
+ r += TQRegion( x + 11, y++, w - 19, 1 );
+ r += TQRegion( x + 9, y++, w - 15, 1 );
+ r += TQRegion( x + 7, y++, w - 12, 1 );
} else {
nrects = 8;
@@ -1160,13 +1160,13 @@ void KeramikClient::updateMask()
w = width(); // FRAME
// The rounded titlebar corners
- r += QRegion( 9, y++, w - 17, 1 );
- r += QRegion( 7, y++, w - 13, 1 );
- r += QRegion( 5, y++, w - 9, 1 );
- r += QRegion( 4, y++, w - 7, 1 );
- r += QRegion( 3, y++, w - 5, 1 );
- r += QRegion( 2, y++, w - 4, 1 );
- r += QRegion( 1, y++, w - 2, 2 );
+ r += TQRegion( 9, y++, w - 17, 1 );
+ r += TQRegion( 7, y++, w - 13, 1 );
+ r += TQRegion( 5, y++, w - 9, 1 );
+ r += TQRegion( 4, y++, w - 7, 1 );
+ r += TQRegion( 3, y++, w - 5, 1 );
+ r += TQRegion( 2, y++, w - 4, 1 );
+ r += TQRegion( 1, y++, w - 2, 2 );
} else {
// If the caption bubble is visible and extends above the titlebar
@@ -1174,9 +1174,9 @@ void KeramikClient::updateMask()
nrects = 11;
register int x = captionRect.left();
w = captionRect.width();
- r += QRegion( x + 8, y++, w - 19, 1 );
- r += QRegion( x + 6, y++, w - 15, 1 );
- r += QRegion( x + 5, y++, w - 12, 1 );
+ r += TQRegion( x + 8, y++, w - 19, 1 );
+ r += TQRegion( x + 6, y++, w - 15, 1 );
+ r += TQRegion( x + 5, y++, w - 12, 1 );
} else {
nrects = 8;
@@ -1190,19 +1190,19 @@ void KeramikClient::updateMask()
w = width(); // FRAME
// The rounded titlebar corners
- r += QRegion( 8, y++, w - 17, 1 );
- r += QRegion( 6, y++, w - 13, 1 );
- r += QRegion( 4, y++, w - 9, 1 );
- r += QRegion( 3, y++, w - 7, 1 );
- r += QRegion( 2, y++, w - 5, 1 );
- r += QRegion( 2, y++, w - 4, 1 );
- r += QRegion( 1, y++, w - 2, 2 );
+ r += TQRegion( 8, y++, w - 17, 1 );
+ r += TQRegion( 6, y++, w - 13, 1 );
+ r += TQRegion( 4, y++, w - 9, 1 );
+ r += TQRegion( 3, y++, w - 7, 1 );
+ r += TQRegion( 2, y++, w - 5, 1 );
+ r += TQRegion( 2, y++, w - 4, 1 );
+ r += TQRegion( 1, y++, w - 2, 2 );
}
y++;
// The part of the window below the titlebar
- r += QRegion( 0, y, w, height() - y );
+ r += TQRegion( 0, y, w, height() - y );
setMask( r, YXBanded );
@@ -1216,7 +1216,7 @@ void KeramikClient::updateCaptionBuffer()
return;
bool active = isActive();
- QPixmap *icon = NULL;
+ TQPixmap *icon = NULL;
if ( captionBuffer.size() != captionRect.size() )
captionBuffer.resize( captionRect.size() );
@@ -1224,7 +1224,7 @@ void KeramikClient::updateCaptionBuffer()
if ( captionBuffer.isNull() )
return;
- QPainter p( &captionBuffer );
+ TQPainter p( &captionBuffer );
// Draw the caption bubble
if ( active && largeCaption ) {
@@ -1243,13 +1243,13 @@ void KeramikClient::updateCaptionBuffer()
{
if ( active ) {
if ( ! activeIcon )
- activeIcon = new QPixmap( this->icon().pixmap( QIconSet::Small, QIconSet::Normal )); // FRAME
+ activeIcon = new TQPixmap( this->icon().pixmap( TQIconSet::Small, TQIconSet::Normal )); // FRAME
icon = activeIcon;
} else {
if ( ! inactiveIcon ) {
- QImage img = this->icon().pixmap( QIconSet::Small, QIconSet::Normal ).convertToImage();
+ TQImage img = this->icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).convertToImage();
KIconEffect::semiTransparent( img );
- inactiveIcon = new QPixmap( img );
+ inactiveIcon = new TQPixmap( img );
}
icon = inactiveIcon;
}
@@ -1260,7 +1260,7 @@ void KeramikClient::updateCaptionBuffer()
( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 );
int xpos = QMAX( (captionRect.width() - tw) / 3, 8 );
- QRect tr = QStyle::visualRect( QRect(xpos, 1, captionRect.width() - xpos - 10,
+ TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10,
captionRect.height() - 4), captionBuffer.rect() );
//p.setPen( Qt::red ); // debug
@@ -1269,17 +1269,17 @@ void KeramikClient::updateCaptionBuffer()
// Application icon
if ( clientHandler->showAppIcons() )
{
- QRect iconRect = QStyle::visualRect( QRect(tr.x(),
+ TQRect iconRect = TQStyle::visualRect( TQRect(tr.x(),
1 + (captionRect.height() - 4 - 16) / 2, 16, 16), tr );
- QRect r( icon->rect() );
+ TQRect r( icon->rect() );
r.moveCenter( iconRect.center() );
if ( tr.width() > 16 ) {
p.drawPixmap( r, *icon );
} else {
- QRect sr( 0, 0, icon->width(), icon->height() );
+ TQRect sr( 0, 0, icon->width(), icon->height() );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
sr.addCoords( icon->width() - tr.width(), 0, 0, 0 );
else
sr.addCoords( 0, 0, -( icon->width() - tr.width() ), 0 );
@@ -1290,7 +1290,7 @@ void KeramikClient::updateCaptionBuffer()
//p.drawRect( r ); // debug
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
tr.addCoords( 0, 0, -(16 + iconSpacing), 0 );
else
tr.addCoords( (16 + iconSpacing), 0, 0, 0 );
@@ -1298,18 +1298,18 @@ void KeramikClient::updateCaptionBuffer()
// Draw the titlebar text
int flags = AlignVCenter | SingleLine;
- flags |= ( QApplication::reverseLayout() ? AlignRight : AlignLeft );
+ flags |= ( TQApplication::reverseLayout() ? AlignRight : AlignLeft );
if ( clientHandler->useShadowedText() )
{
- p.translate( QApplication::reverseLayout() ? -1 : 1, 1 );
+ p.translate( TQApplication::reverseLayout() ? -1 : 1, 1 );
//p.setPen( options()->color(ColorTitleBar, active).dark() );
if (qGray(options()->color(ColorFont, active).rgb()) < 100)
- p.setPen( QColor(200,200,200) );
+ p.setPen( TQColor(200,200,200) );
else
p.setPen( black );
p.drawText( tr, flags, caption() );
- p.translate( QApplication::reverseLayout() ? 1 : -1, -1 );
+ p.translate( TQApplication::reverseLayout() ? 1 : -1, -1 );
}
p.setPen( options()->color( ColorFont, active ) );
@@ -1321,7 +1321,7 @@ void KeramikClient::updateCaptionBuffer()
void KeramikClient::calculateCaptionRect()
{
- QFontMetrics fm( options()->font(isActive()) );
+ TQFontMetrics fm( options()->font(isActive()) );
int cw = fm.width( caption() ) + 95;
int titleBaseY = ( largeTitlebar ? 3 : 0 );
@@ -1329,7 +1329,7 @@ void KeramikClient::calculateCaptionRect()
cw += 16 + 4; // icon width + space
cw = QMIN( cw, titlebar->geometry().width() );
- captionRect = QStyle::visualRect( QRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY),
+ captionRect = TQStyle::visualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY),
cw, clientHandler->titleBarHeight(largeCaption) ),
titlebar->geometry() );
}
@@ -1337,7 +1337,7 @@ void KeramikClient::calculateCaptionRect()
void KeramikClient::captionChange()
{
- QRect r( captionRect );
+ TQRect r( captionRect );
calculateCaptionRect();
if ( r.size() != captionRect.size() )
@@ -1393,7 +1393,7 @@ void KeramikClient::maximizeChange()
{
if ( maximizeMode() & MaximizeVertical ) {
// We've been maximized - shrink the titlebar by 3 pixels
- topSpacer->changeSize( 10, 1, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ topSpacer->changeSize( 10, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
largeCaption = largeTitlebar = false;
calculateCaptionRect();
@@ -1403,7 +1403,7 @@ void KeramikClient::maximizeChange()
widget()->repaint( false );
} else if (( maximizeMode() & MaximizeVertical ) == 0 && !largeTitlebar ) {
// We've been restored - enlarge the titlebar by 3 pixels
- topSpacer->changeSize( 10, 4, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ topSpacer->changeSize( 10, 4, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
largeCaption = largeTitlebar = true;
calculateCaptionRect();
@@ -1415,8 +1415,8 @@ void KeramikClient::maximizeChange()
}
if ( button[ MaxButton ] ) {
- QToolTip::remove( button[ MaxButton ] );
- QToolTip::add( button[ MaxButton ], maximizeMode() == MaximizeFull ? i18n("Restore") : i18n("Maximize") );
+ TQToolTip::remove( button[ MaxButton ] );
+ TQToolTip::add( button[ MaxButton ], maximizeMode() == MaximizeFull ? i18n("Restore") : i18n("Maximize") );
button[ MaxButton ]->repaint();
}
}
@@ -1427,8 +1427,8 @@ void KeramikClient::desktopChange()
if ( button[ OnAllDesktopsButton ] )
{
button[ OnAllDesktopsButton ]->repaint( true );
- QToolTip::remove( button[ OnAllDesktopsButton ] );
- QToolTip::add( button[ OnAllDesktopsButton ], isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops") );
+ TQToolTip::remove( button[ OnAllDesktopsButton ] );
+ TQToolTip::add( button[ OnAllDesktopsButton ], isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops") );
}
}
@@ -1438,8 +1438,8 @@ void KeramikClient::shadeChange()
if ( button[ ShadeButton ] )
{
button[ ShadeButton ]->repaint( true );
- QToolTip::remove( button[ ShadeButton ] );
- QToolTip::add( button[ ShadeButton ], isSetShade() ? i18n("Unshade") : i18n("Shade") );
+ TQToolTip::remove( button[ ShadeButton ] );
+ TQToolTip::add( button[ ShadeButton ], isSetShade() ? i18n("Unshade") : i18n("Shade") );
}
}
@@ -1460,12 +1460,12 @@ void KeramikClient::keepBelowChange( bool )
void KeramikClient::menuButtonPressed()
{
- QPoint menuTop ( button[MenuButton]->rect().topLeft() );
- QPoint menuBottom ( button[MenuButton]->rect().bottomRight() );
- menuTop += QPoint(-6, -3);
- menuBottom += QPoint(6, 3);
+ TQPoint menuTop ( button[MenuButton]->rect().topLeft() );
+ TQPoint menuBottom ( button[MenuButton]->rect().bottomRight() );
+ menuTop += TQPoint(-6, -3);
+ menuBottom += TQPoint(6, 3);
KDecorationFactory* f = factory();
- showWindowMenu( QRect( button[MenuButton]->mapToGlobal( menuTop ),
+ showWindowMenu( TQRect( button[MenuButton]->mapToGlobal( menuTop ),
button[MenuButton]->mapToGlobal( menuBottom )) );
if( !f->exists( this )) // 'this' was destroyed
return;
@@ -1500,13 +1500,13 @@ void KeramikClient::slotShade()
}
-void KeramikClient::paintEvent( QPaintEvent *e )
+void KeramikClient::paintEvent( TQPaintEvent *e )
{
if ( !keramik_initialized )
return;
- QPainter p( widget());
- QRect updateRect( e->rect() );
+ TQPainter p( widget());
+ TQRect updateRect( e->rect() );
bool active = isActive();
int titleBaseY = ( largeTitlebar ? 3 : 0 );
@@ -1607,18 +1607,18 @@ void KeramikClient::paintEvent( QPaintEvent *e )
*clientHandler->tile( GrabBarRight, active ) );
}
- // Extra drawline for the 1 pixel empty space QLayout leaves when a window is shaded.
+ // Extra drawline for the 1 pixel empty space TQLayout leaves when a window is shaded.
p.setPen( options()->color( ColorTitleBlend, active ) );
p.drawLine( leftBorderWidth, height() - grabBarHeight - 1,
width() - rightBorderWidth - 1, height() - grabBarHeight - 1 );
}
-void KeramikClient::resizeEvent( QResizeEvent *e )
+void KeramikClient::resizeEvent( TQResizeEvent *e )
{
// FRAME Client::resizeEvent( e );
- QRect r( captionRect );
+ TQRect r( captionRect );
calculateCaptionRect();
if ( r.size() != captionRect.size() )
@@ -1644,31 +1644,31 @@ void KeramikClient::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,
+ 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 KeramikClient::mouseDoubleClickEvent( QMouseEvent *e )
+void KeramikClient::mouseDoubleClickEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton
- && QRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
+ && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
titlebarDblClickOperation();
}
-void KeramikClient::wheelEvent( QWheelEvent *e )
+void KeramikClient::wheelEvent( TQWheelEvent *e )
{
if (isSetShade()
- || QRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
+ || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta());
}
-KeramikClient::Position KeramikClient::mousePosition( const QPoint &p ) const
+KeramikClient::Position KeramikClient::mousePosition( const TQPoint &p ) const
{
int titleBaseY = (largeTitlebar ? 3 : 0);
@@ -1745,7 +1745,7 @@ KeramikClient::Position KeramikClient::mousePosition( const QPoint &p ) const
}
-void KeramikClient::resize( const QSize& s )
+void KeramikClient::resize( const TQSize& s )
{
widget()->resize( s );
}
@@ -1774,37 +1774,37 @@ void KeramikClient::borders( int& left, int& right, int& top, int& bottom ) cons
}
-QSize KeramikClient::minimumSize() const
+TQSize KeramikClient::minimumSize() const
{
return widget()->minimumSize();
}
-bool KeramikClient::eventFilter( QObject* o, QEvent* e )
+bool KeramikClient::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:
diff --git a/kwin/clients/keramik/keramik.h b/kwin/clients/keramik/keramik.h
index 40a24a058..6f5a4a6e4 100644
--- a/kwin/clients/keramik/keramik.h
+++ b/kwin/clients/keramik/keramik.h
@@ -24,7 +24,7 @@
#ifndef __KERAMIK_H
#define __KERAMIK_H
-#include <qbutton.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -60,7 +60,7 @@ namespace Keramik {
KeramikHandler();
~KeramikHandler();
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
virtual bool reset( unsigned long changed );
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool supports( Ability ability );
@@ -77,36 +77,36 @@ namespace Keramik {
int grabBarHeight() const
{ return activeTiles[GrabBarCenter]->height(); }
- const QPixmap *roundButton() const { return titleButtonRound; }
- const QPixmap *squareButton() const { return titleButtonSquare; }
- const QBitmap *buttonDeco( ButtonDeco deco ) const
+ const TQPixmap *roundButton() const { return titleButtonRound; }
+ const TQPixmap *squareButton() const { return titleButtonSquare; }
+ const TQBitmap *buttonDeco( ButtonDeco deco ) const
{ return buttonDecos[ deco ]; }
- inline const QPixmap *tile( TilePixmap tilePix, bool active ) const;
+ inline const TQPixmap *tile( TilePixmap tilePix, bool active ) const;
private:
void readConfig();
void createPixmaps();
void destroyPixmaps();
- void addWidth (int width, QPixmap *&pix, bool left, QPixmap *bottomPix);
- void addHeight (int height, QPixmap *&pix);
- void flip( QPixmap *&, QPixmap *& );
- void pretile( QPixmap *&, int, Qt::Orientation );
- QPixmap *composite( QImage *, QImage * );
- QImage *loadImage( const QString &, const QColor & );
- QPixmap *loadPixmap( const QString &, const QColor & );
+ void addWidth (int width, TQPixmap *&pix, bool left, TQPixmap *bottomPix);
+ void addHeight (int height, TQPixmap *&pix);
+ void flip( TQPixmap *&, TQPixmap *& );
+ void pretile( TQPixmap *&, int, Qt::Orientation );
+ TQPixmap *composite( TQImage *, TQImage * );
+ TQImage *loadImage( const TQString &, const TQColor & );
+ TQPixmap *loadPixmap( const TQString &, const TQColor & );
bool showIcons:1, shadowedText:1,
smallCaptionBubbles:1, largeGrabBars:1;
SettingsCache *settings_cache;
KeramikImageDb *imageDb;
- QPixmap *activeTiles[ NumTiles ];
- QPixmap *inactiveTiles[ NumTiles ];
- QBitmap *buttonDecos[ NumButtonDecos ];
+ TQPixmap *activeTiles[ NumTiles ];
+ TQPixmap *inactiveTiles[ NumTiles ];
+ TQBitmap *buttonDecos[ NumButtonDecos ];
- QPixmap *titleButtonRound, *titleButtonSquare;
+ TQPixmap *titleButtonRound, *titleButtonSquare;
}; // class KeramikHandler
@@ -114,17 +114,17 @@ namespace Keramik {
class KeramikButton : public QButton
{
public:
- KeramikButton( KeramikClient *, const char *, Button, const QString &, const int realizeBtns = LeftButton );
+ KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = LeftButton );
~KeramikButton();
ButtonState lastButton() const { return lastbutton; }
private:
- void enterEvent( QEvent * );
- void leaveEvent( QEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void drawButton( QPainter * );
+ void enterEvent( TQEvent * );
+ void leaveEvent( TQEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void drawButton( TQPainter * );
private:
KeramikClient *client;
@@ -145,11 +145,11 @@ namespace Keramik {
~KeramikClient();
virtual void init();
virtual void reset( unsigned long changed );
- virtual Position mousePosition( const QPoint& p ) const;
+ virtual Position mousePosition( const TQPoint& p ) const;
virtual void borders( int& left, int& right, int& top, int& bottom ) const;
- virtual void resize( const QSize& s );
- virtual QSize minimumSize() const;
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual void resize( const TQSize& s );
+ virtual TQSize minimumSize() const;
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
virtual void activeChange();
virtual void captionChange();
virtual void maximizeChange();
@@ -158,14 +158,14 @@ namespace Keramik {
private:
void createLayout();
- void addButtons( QBoxLayout*, const QString & );
+ void addButtons( TQBoxLayout*, const TQString & );
void updateMask(); // FRAME
void updateCaptionBuffer();
void iconChange();
- void resizeEvent( QResizeEvent *); // FRAME
- void paintEvent( QPaintEvent *); // FRAME
- void mouseDoubleClickEvent( QMouseEvent * ); // FRAME
- void wheelEvent( QWheelEvent *); //FRAME
+ void resizeEvent( TQResizeEvent *); // FRAME
+ void paintEvent( TQPaintEvent *); // FRAME
+ void mouseDoubleClickEvent( TQMouseEvent * ); // FRAME
+ void wheelEvent( TQWheelEvent *); //FRAME
int width() const { return widget()->width(); }
int height() const { return widget()->height(); }
@@ -185,11 +185,11 @@ namespace Keramik {
void keepBelowChange( bool );
private:
- QSpacerItem *topSpacer, *titlebar;
+ TQSpacerItem *topSpacer, *titlebar;
KeramikButton *button[ NumButtons ];
- QRect captionRect;
- QPixmap captionBuffer;
- QPixmap *activeIcon, *inactiveIcon;
+ TQRect captionRect;
+ TQPixmap captionBuffer;
+ TQPixmap *activeIcon, *inactiveIcon;
bool captionBufferDirty:1, maskDirty:1;
bool largeCaption:1, largeTitlebar:1;
}; // class KeramikClient
diff --git a/kwin/clients/kwmtheme/cli_installer/main.cpp b/kwin/clients/kwmtheme/cli_installer/main.cpp
index bdc04a1de..abf2bad3d 100644
--- a/kwin/clients/kwmtheme/cli_installer/main.cpp
+++ b/kwin/clients/kwmtheme/cli_installer/main.cpp
@@ -1,5 +1,5 @@
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <ksimpleconfig.h>
#include <kglobal.h>
@@ -17,10 +17,10 @@ static KCmdLineOptions options[] =
KCmdLineLastOption
};
-void copy(const QString &src, const QString &dest)
+void copy(const TQString &src, const TQString &dest)
{
- QFile copyInput(src);
- QFile copyOutput(dest);
+ TQFile copyInput(src);
+ TQFile copyOutput(dest);
if(!copyInput.open(IO_ReadOnly)){
kdWarning() << "Couldn't open " << src << endl;
return;
@@ -48,25 +48,25 @@ int main(int argc, char **argv)
return(1);
}
- QString srcStr = QString(QFile::decodeName(args->arg(0)));
- QFile f(srcStr);
- QString tmpStr;
+ TQString srcStr = TQString(TQFile::decodeName(args->arg(0)));
+ TQFile f(srcStr);
+ TQString tmpStr;
if(!f.exists()){
kdWarning() << "Specified theme config file doesn't exist!" << endl;
return(2);
}
- QStringList appDirs = KGlobal::dirs()->findDirs("data", "kwin");
- QString localDirStr = *(appDirs.end());
+ TQStringList appDirs = KGlobal::dirs()->findDirs("data", "kwin");
+ TQString localDirStr = *(appDirs.end());
if(localDirStr.isEmpty()){
localDirStr = KGlobal::dirs()->saveLocation("data", "kwin");
}
localDirStr += "/pics/";
- if(!QFile::exists(localDirStr))
- QDir().mkdir(localDirStr);
+ if(!TQFile::exists(localDirStr))
+ TQDir().mkdir(localDirStr);
- QFileInfo fi(f);
+ TQFileInfo fi(f);
KSimpleConfig input(fi.absFilePath());
srcStr = fi.dirPath(true) + "/";
KConfig *output = KGlobal::config();
diff --git a/kwin/clients/kwmtheme/kwmthemeclient.cpp b/kwin/clients/kwmtheme/kwmthemeclient.cpp
index a422f31fb..89dc6a564 100644
--- a/kwin/clients/kwmtheme/kwmthemeclient.cpp
+++ b/kwin/clients/kwmtheme/kwmthemeclient.cpp
@@ -1,26 +1,26 @@
#include <kconfig.h>
#include "kwmthemeclient.h"
#include <kglobal.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kpixmapeffect.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qbitmap.h>
-#include <qstyle.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqbitmap.h>
+#include <tqstyle.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
namespace KWMTheme {
-/* static QPixmap stretchPixmap(QPixmap& src, bool stretchVert){
- QPixmap dest;
- QBitmap *srcMask, *destMask;
+/* static TQPixmap stretchPixmap(TQPixmap& src, bool stretchVert){
+ TQPixmap dest;
+ TQBitmap *srcMask, *destMask;
int w, h, w2, h2;
- QPainter p;
+ TQPainter p;
if (src.isNull()) return src;
@@ -46,9 +46,9 @@ namespace KWMTheme {
p.drawTiledPixmap(0, 0, w2, h2, src);
p.end();
- srcMask = (QBitmap*)src.mask();
+ srcMask = (TQBitmap*)src.mask();
if (srcMask){
- destMask = (QBitmap*)dest.mask();
+ destMask = (TQBitmap*)dest.mask();
p.begin(destMask);
p.drawTiledPixmap(0, 0, w2, h2, *srcMask);
p.end();
@@ -62,8 +62,8 @@ inline const KDecorationOptions* options() { return KDecoration::options(); }
enum FramePixmap{FrameTop=0, FrameBottom, FrameLeft, FrameRight, FrameTopLeft,
FrameTopRight, FrameBottomLeft, FrameBottomRight};
-static QPixmap *framePixmaps[8];
-static QPixmap *menuPix, *iconifyPix, *closePix, *maxPix, *minmaxPix,
+static TQPixmap *framePixmaps[8];
+static TQPixmap *menuPix, *iconifyPix, *closePix, *maxPix, *minmaxPix,
*pinupPix, *pindownPix;
static KPixmap *aTitlePix = 0;
static KPixmap *iTitlePix = 0;
@@ -85,11 +85,11 @@ static void create_pixmaps()
KConfig *config = KGlobal::config();
config->setGroup("General");
- QString tmpStr;
+ TQString tmpStr;
for(int i=0; i < 8; ++i)
{
- framePixmaps[i] = new QPixmap(locate("data",
+ framePixmaps[i] = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry(keys[i], " ")));
if(framePixmaps[i]->isNull())
kdWarning() << "Unable to load frame pixmap for " << keys[i] << endl;
@@ -110,19 +110,19 @@ static void create_pixmaps()
maxExtent++;
- menuPix = new QPixmap(locate("data",
+ menuPix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("menu", " ")));
- iconifyPix = new QPixmap(locate("data",
+ iconifyPix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("iconify", " ")));
- maxPix = new QPixmap(locate("appdata",
+ maxPix = new TQPixmap(locate("appdata",
"pics/"+config->readEntry("maximize", " ")));
- minmaxPix = new QPixmap(locate("data",
+ minmaxPix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("maximizedown", " ")));
- closePix = new QPixmap(locate("data",
+ closePix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("close", " ")));
- pinupPix = new QPixmap(locate("data",
+ pinupPix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("pinup", " ")));
- pindownPix = new QPixmap(locate("data",
+ pindownPix = new TQPixmap(locate("data",
"kwin/pics/"+config->readEntry("pindown", " ")));
if(menuPix->isNull())
menuPix->load(locate("data", "kwin/pics/menu.png"));
@@ -222,7 +222,7 @@ static void delete_pixmaps()
titleSunken = false;
}
-void MyButton::drawButtonLabel(QPainter *p)
+void MyButton::drawButtonLabel(TQPainter *p)
{
if(pixmap()){
// If we have a theme who's button covers the entire width or
@@ -230,9 +230,9 @@ void MyButton::drawButtonLabel(QPainter *p)
// some visual notification of button presses. i.e. for MGBriezh
int offset = (isDown() && ((pixmap()->width() >= width()) ||
(pixmap()->height() >= height()))) ? 1 : 0;
- style().drawItem(p, QRect( offset, offset, width(), height() ),
+ style().drawItem(p, TQRect( offset, offset, width(), height() ),
AlignCenter, colorGroup(),
- true, pixmap(), QString::null);
+ true, pixmap(), TQString::null);
}
}
@@ -247,32 +247,32 @@ void KWMThemeClient::init()
widget()->installEventFilter( this );
stickyBtn = maxBtn = mnuBtn = 0;
- layout = new QGridLayout(widget());
+ layout = new TQGridLayout(widget());
layout->addColSpacing(0, maxExtent);
layout->addColSpacing(2, maxExtent);
layout->addRowSpacing(0, maxExtent);
- layout->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed,
- QSizePolicy::Expanding));
+ layout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed,
+ TQSizePolicy::Expanding));
if( isPreview())
- layout->addWidget( new QLabel( i18n( "<center><b>KWMTheme</b></center>" ), widget()), 2, 1);
+ layout->addWidget( new TQLabel( i18n( "<center><b>KWMTheme</b></center>" ), widget()), 2, 1);
else
- layout->addItem( new QSpacerItem( 0, 0 ), 2, 1);
+ layout->addItem( new TQSpacerItem( 0, 0 ), 2, 1);
// Without the next line, shading flickers
- layout->addItem( new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding) );
+ layout->addItem( new TQSpacerItem(0, 0, TQSizePolicy::Fixed, TQSizePolicy::Expanding) );
layout->addRowSpacing(3, maxExtent);
layout->setRowStretch(2, 10);
layout->setColStretch(1, 10);
- QBoxLayout* hb = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ TQBoxLayout* hb = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
layout->addLayout( hb, 1, 1 );
KConfig *config = KGlobal::config();
config->setGroup("Buttons");
- QString val;
+ TQString val;
MyButton *btn;
int i;
static const char *defaultButtons[]={"Menu","Sticky","Off","Iconify",
@@ -280,54 +280,54 @@ void KWMThemeClient::init()
static const char keyOffsets[]={"ABCDEF"};
for(i=0; i < 6; ++i){
if(i == 3){
- titlebar = new QSpacerItem(10, 20, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ titlebar = new TQSpacerItem(10, 20, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
hb->addItem( titlebar );
}
- QString key("Button");
- key += QChar(keyOffsets[i]);
+ TQString key("Button");
+ key += TQChar(keyOffsets[i]);
val = config->readEntry(key, defaultButtons[i]);
if(val == "Menu"){
mnuBtn = new MyButton(widget(), "menu");
- QToolTip::add( mnuBtn, i18n("Menu"));
+ TQToolTip::add( mnuBtn, i18n("Menu"));
iconChange();
hb->addWidget(mnuBtn);
mnuBtn->setFixedSize(20, 20);
- connect(mnuBtn, SIGNAL(pressed()), this,
- SLOT(menuButtonPressed()));
+ connect(mnuBtn, TQT_SIGNAL(pressed()), this,
+ TQT_SLOT(menuButtonPressed()));
}
else if(val == "Sticky"){
stickyBtn = new MyButton(widget(), "sticky");
- QToolTip::add( stickyBtn, i18n("Sticky"));
+ TQToolTip::add( stickyBtn, i18n("Sticky"));
if (isOnAllDesktops())
stickyBtn->setPixmap(*pindownPix);
else
stickyBtn->setPixmap(*pinupPix);
- connect(stickyBtn, SIGNAL( clicked() ), this, SLOT(toggleOnAllDesktops()));
+ connect(stickyBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT(toggleOnAllDesktops()));
hb->addWidget(stickyBtn);
stickyBtn->setFixedSize(20, 20);
}
else if((val == "Iconify") && isMinimizable()){
btn = new MyButton(widget(), "iconify");
- QToolTip::add( btn, i18n("Minimize"));
+ TQToolTip::add( btn, i18n("Minimize"));
btn->setPixmap(*iconifyPix);
- connect(btn, SIGNAL(clicked()), this, SLOT(minimize()));
+ connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize()));
hb->addWidget(btn);
btn->setFixedSize(20, 20);
}
else if((val == "Maximize") && isMaximizable()){
maxBtn = new MyButton(widget(), "max");
- QToolTip::add( maxBtn, i18n("Maximize"));
+ TQToolTip::add( maxBtn, i18n("Maximize"));
maxBtn->setPixmap(*maxPix);
- connect(maxBtn, SIGNAL(clicked()), this, SLOT(maximize()));
+ connect(maxBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(maximize()));
hb->addWidget(maxBtn);
maxBtn->setFixedSize(20, 20);
}
else if((val == "Close") && isCloseable()){
btn = new MyButton(widget(), "close");
- QToolTip::add( btn, i18n("Close"));
+ TQToolTip::add( btn, i18n("Close"));
btn->setPixmap(*closePix);
- connect(btn, SIGNAL(clicked()), this, SLOT(closeWindow()));
+ connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow()));
hb->addWidget(btn);
btn->setFixedSize(20, 20);
}
@@ -350,17 +350,17 @@ void KWMThemeClient::init()
widget()->setBackgroundMode(NoBackground);
}
-void KWMThemeClient::drawTitle(QPainter &dest)
+void KWMThemeClient::drawTitle(TQPainter &dest)
{
- QRect titleRect = titlebar->geometry();
- QRect r(0, 0, titleRect.width(), titleRect.height());
- QPixmap buffer;
+ TQRect titleRect = titlebar->geometry();
+ TQRect r(0, 0, titleRect.width(), titleRect.height());
+ TQPixmap buffer;
if(buffer.width() == r.width())
return;
buffer.resize(r.size());
- QPainter p;
+ TQPainter p;
p.begin(&buffer);
if(titleSunken){
@@ -385,7 +385,7 @@ void KWMThemeClient::drawTitle(QPainter &dest)
}
else{
p.fillRect(r, options()->colorGroup(KDecorationOptions::ColorTitleBar, isActive()).
- brush(QColorGroup::Button));
+ brush(TQColorGroup::Button));
}
p.setFont(options()->font(isActive()));
p.setPen(options()->color(KDecorationOptions::ColorFont, isActive()));
@@ -399,7 +399,7 @@ void KWMThemeClient::drawTitle(QPainter &dest)
}
-void KWMThemeClient::resizeEvent( QResizeEvent* )
+void KWMThemeClient::resizeEvent( TQResizeEvent* )
{
doShape();
widget()->repaint();
@@ -410,9 +410,9 @@ void KWMThemeClient::captionChange()
widget()->repaint( titlebar->geometry(), false );
}
-void KWMThemeClient::paintEvent( QPaintEvent *)
+void KWMThemeClient::paintEvent( TQPaintEvent *)
{
- QPainter p;
+ TQPainter p;
p.begin(widget());
int x,y;
// first the corners
@@ -445,8 +445,8 @@ void KWMThemeClient::paintEvent( QPaintEvent *)
framePixmaps[FrameBottomRight]->height()-h4,
w4, h4);
- QPixmap pm;
- QWMatrix m;
+ TQPixmap pm;
+ TQWMatrix m;
int n,s,w;
//top
pm = *framePixmaps[FrameTop];
@@ -557,7 +557,7 @@ void KWMThemeClient::paintEvent( QPaintEvent *)
}
drawTitle(p);
- QColor c = widget()->colorGroup().background();
+ TQColor c = widget()->colorGroup().background();
// KWM evidently had a 1 pixel border around the client window. We
// emulate it here, but should be removed at some point in order to
@@ -568,7 +568,7 @@ void KWMThemeClient::paintEvent( QPaintEvent *)
// We fill the area behind the wrapped widget to ensure that
// shading animation is drawn as smoothly as possible
- QRect r(layout->cellGeometry(2, 1));
+ TQRect r(layout->cellGeometry(2, 1));
p.fillRect( r.x(), r.y(), r.width(), r.height(), c);
p.end();
}
@@ -576,9 +576,9 @@ void KWMThemeClient::paintEvent( QPaintEvent *)
void KWMThemeClient::doShape()
{
- QBitmap shapemask(width(), height());
+ TQBitmap shapemask(width(), height());
shapemask.fill(color0);
- QPainter p;
+ TQPainter p;
p.begin(&shapemask);
p.setBrush(color1);
p.setPen(color1);
@@ -625,8 +625,8 @@ void KWMThemeClient::doShape()
else
p.fillRect(width()-w4,height()-h4,w4,h4,color1);
- QPixmap pm;
- QWMatrix m;
+ TQPixmap pm;
+ TQWMatrix m;
int n,s,w;
//top
if (framePixmaps[FrameTop]->mask())
@@ -744,13 +744,13 @@ void KWMThemeClient::doShape()
}
-void KWMThemeClient::showEvent(QShowEvent *)
+void KWMThemeClient::showEvent(TQShowEvent *)
{
doShape();
widget()->repaint(false);
}
-void KWMThemeClient::mouseDoubleClickEvent( QMouseEvent * e )
+void KWMThemeClient::mouseDoubleClickEvent( TQMouseEvent * e )
{
if (e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation();
@@ -761,8 +761,8 @@ void KWMThemeClient::desktopChange()
if (stickyBtn) {
bool on = isOnAllDesktops();
stickyBtn->setPixmap(on ? *pindownPix : *pinupPix);
- QToolTip::remove( stickyBtn );
- QToolTip::add( stickyBtn, on ? i18n("Unsticky") : i18n("Sticky") );
+ TQToolTip::remove( stickyBtn );
+ TQToolTip::add( stickyBtn, on ? i18n("Unsticky") : i18n("Sticky") );
}
}
@@ -771,8 +771,8 @@ void KWMThemeClient::maximizeChange()
if (maxBtn) {
bool m = maximizeMode() == MaximizeFull;
maxBtn->setPixmap(m ? *minmaxPix : *maxPix);
- QToolTip::remove( maxBtn );
- QToolTip::add( maxBtn, m ? i18n("Restore") : i18n("Maximize"));
+ TQToolTip::remove( maxBtn );
+ TQToolTip::add( maxBtn, m ? i18n("Restore") : i18n("Maximize"));
}
}
@@ -786,7 +786,7 @@ void KWMThemeClient::activeChange()
widget()->update();
}
-KDecoration::Position KWMThemeClient::mousePosition(const QPoint &p) const
+KDecoration::Position KWMThemeClient::mousePosition(const TQPoint &p) const
{
Position m = KDecoration::mousePosition(p);
// corners
@@ -820,47 +820,47 @@ KDecoration::Position KWMThemeClient::mousePosition(const QPoint &p) const
void KWMThemeClient::menuButtonPressed()
{
mnuBtn->setDown(false); // will stay down if I don't do this
- QPoint pos = mnuBtn->mapToGlobal(mnuBtn->rect().bottomLeft());
+ TQPoint pos = mnuBtn->mapToGlobal(mnuBtn->rect().bottomLeft());
showWindowMenu( pos );
}
void KWMThemeClient::iconChange()
{
if(mnuBtn){
- if( icon().pixmap( QIconSet::Small, QIconSet::Normal ).isNull()){
+ if( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ).isNull()){
mnuBtn->setPixmap(*menuPix);
}
else{
- mnuBtn->setPixmap(icon().pixmap( QIconSet::Small, QIconSet::Normal ));
+ mnuBtn->setPixmap(icon().pixmap( TQIconSet::Small, TQIconSet::Normal ));
}
}
}
-bool KWMThemeClient::eventFilter( QObject* o, QEvent* e )
+bool KWMThemeClient::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;
default:
@@ -868,12 +868,12 @@ bool KWMThemeClient::eventFilter( QObject* o, QEvent* e )
}
}
-QSize KWMThemeClient::minimumSize() const
+TQSize KWMThemeClient::minimumSize() const
{
- return widget()->minimumSize().expandedTo( QSize( 100, 50 ));
+ return widget()->minimumSize().expandedTo( TQSize( 100, 50 ));
}
-void KWMThemeClient::resize( const QSize& s )
+void KWMThemeClient::resize( const TQSize& s )
{
widget()->resize( s );
}
diff --git a/kwin/clients/kwmtheme/kwmthemeclient.h b/kwin/clients/kwmtheme/kwmthemeclient.h
index b1d623965..7357f6c26 100644
--- a/kwin/clients/kwmtheme/kwmthemeclient.h
+++ b/kwin/clients/kwmtheme/kwmthemeclient.h
@@ -1,8 +1,8 @@
#ifndef __KWMTHEMECLIENT_H
#define __KWMTHEMECLIENT_H
-#include <qbutton.h>
-#include <qtoolbutton.h>
+#include <tqbutton.h>
+#include <tqtoolbutton.h>
#include <kpixmap.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -16,10 +16,10 @@ namespace KWMTheme {
class MyButton : public QToolButton
{
public:
- MyButton(QWidget *parent=0, const char *name=0)
- : QToolButton(parent, name){setAutoRaise(true);setCursor( arrowCursor ); }
+ MyButton(TQWidget *parent=0, const char *name=0)
+ : TQToolButton(parent, name){setAutoRaise(true);setCursor( arrowCursor ); }
protected:
- void drawButtonLabel(QPainter *p);
+ void drawButtonLabel(TQPainter *p);
};
class KWMThemeClient : public KDecoration
@@ -29,34 +29,34 @@ public:
KWMThemeClient( KDecorationBridge* b, KDecorationFactory* f );
~KWMThemeClient(){;}
void init();
- void resize( const QSize& s );
- QSize minimumSize() const;
+ void resize( const TQSize& s );
+ TQSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const;
protected:
void doShape();
- void drawTitle(QPainter &p);
- void resizeEvent( QResizeEvent* );
- void paintEvent( QPaintEvent* );
- void showEvent( QShowEvent* );
- void mouseDoubleClickEvent( QMouseEvent * );
- bool eventFilter( QObject* o, QEvent* e );
+ void drawTitle(TQPainter &p);
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ bool eventFilter( TQObject* o, TQEvent* e );
void captionChange();
void desktopChange();
void maximizeChange();
void iconChange();
void activeChange();
void shadeChange() {};
- Position mousePosition(const QPoint &) const;
+ Position mousePosition(const TQPoint &) const;
protected slots:
//void slotReset();
void menuButtonPressed();
void slotMaximize();
private:
- QPixmap buffer;
+ TQPixmap buffer;
KPixmap *aGradient, *iGradient;
MyButton *maxBtn, *stickyBtn, *mnuBtn;
- QSpacerItem *titlebar;
- QGridLayout* layout;
+ TQSpacerItem *titlebar;
+ TQGridLayout* layout;
};
class KWMThemeFactory : public KDecorationFactory
diff --git a/kwin/clients/laptop/laptopclient.cpp b/kwin/clients/laptop/laptopclient.cpp
index 4d959ff8c..db91cf15d 100644
--- a/kwin/clients/laptop/laptopclient.cpp
+++ b/kwin/clients/laptop/laptopclient.cpp
@@ -8,12 +8,12 @@
#include <kconfig.h> // up here to avoid X11 header conflict :P
#include "laptopclient.h"
-#include <qdrawutil.h>
+#include <tqdrawutil.h>
#include <kpixmapeffect.h>
#include <kdrawutil.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qbitmap.h>
+#include <tqbitmap.h>
namespace Laptop {
@@ -41,7 +41,7 @@ static const unsigned char unsticky_bits[] = {
static const unsigned char sticky_bits[] = {
0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c};
-static QPixmap *titlePix;
+static TQPixmap *titlePix;
static KPixmap *aUpperGradient;
static KPixmap *iUpperGradient;
// buttons active, inactive, up, down, and 2 sizes :P
@@ -53,7 +53,7 @@ static KPixmap *btnPix2;
static KPixmap *btnDownPix2;
static KPixmap *iBtnPix2;
static KPixmap *iBtnDownPix2;
-static QColor btnForeground;
+static TQColor btnForeground;
static int titleHeight = 14;
static int btnWidth1 = 17;
@@ -77,9 +77,9 @@ static inline const KDecorationOptions* options()
return KDecoration::options();
}
-static void drawButtonFrame(KPixmap *pix, const QColorGroup &g, bool sunken)
+static void drawButtonFrame(KPixmap *pix, const TQColorGroup &g, bool sunken)
{
- QPainter p;
+ TQPainter p;
int w = pix->width();
int h = pix->height();
int x2 = w-1;
@@ -107,7 +107,7 @@ static void create_pixmaps()
return;
pixmaps_created = true;
- titleHeight = QFontMetrics(options()->font(true)).height() + 2;
+ titleHeight = TQFontMetrics(options()->font(true)).height() + 2;
if (titleHeight < handleSize) titleHeight = handleSize;
titleHeight &= ~1; // Make title height even
if (titleHeight < 14) titleHeight = 14;
@@ -116,11 +116,11 @@ static void create_pixmaps()
btnWidth2 = 3*titleHeight/2 + 6;
// titlebar
- QPainter p;
- QPainter maskPainter;
+ TQPainter p;
+ TQPainter maskPainter;
int i, x, y;
- titlePix = new QPixmap(33, 12);
- QBitmap mask(33, 12);
+ titlePix = new TQPixmap(33, 12);
+ TQBitmap mask(33, 12);
mask.fill(Qt::color0);
p.begin(titlePix);
@@ -140,12 +140,12 @@ static void create_pixmaps()
maskPainter.end();
titlePix->setMask(mask);
- if(QPixmap::defaultDepth() > 8){
+ if(TQPixmap::defaultDepth() > 8){
aUpperGradient = new KPixmap;
aUpperGradient->resize(32, titleHeight+2);
iUpperGradient = new KPixmap;
iUpperGradient->resize(32, titleHeight+2);
- QColor bgColor = options()->color(KDecoration::ColorTitleBar, true);
+ TQColor bgColor = options()->color(KDecoration::ColorTitleBar, true);
KPixmapEffect::gradient(*aUpperGradient,
bgColor.light(120),
bgColor.dark(120),
@@ -157,8 +157,8 @@ static void create_pixmaps()
KPixmapEffect::VerticalGradient);
}
// buttons (active/inactive, sunken/unsunken, 2 sizes each)
- QColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true);
- QColor c = g.background();
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true);
+ TQColor c = g.background();
btnPix1 = new KPixmap;
btnPix1->resize(btnWidth1, titleHeight);
btnDownPix1 = new KPixmap;
@@ -175,7 +175,7 @@ static void create_pixmaps()
iBtnPix2->resize(btnWidth2, titleHeight);
iBtnDownPix2 = new KPixmap;
iBtnDownPix2->resize(btnWidth2, titleHeight);
- if(QPixmap::defaultDepth() > 8){
+ if(TQPixmap::defaultDepth() > 8){
KPixmapEffect::gradient(*btnPix1, c.light(120), c.dark(130),
KPixmapEffect::DiagonalGradient);
KPixmapEffect::gradient(*btnDownPix1, c.dark(130), c.light(120),
@@ -249,7 +249,7 @@ static void delete_pixmaps()
LaptopButton::LaptopButton(ButtonType type, LaptopClient *parent, const char *name)
: KCommonDecorationButton(type, parent, name)
{
- setBackgroundMode(QWidget::NoBackground);
+ setBackgroundMode(TQWidget::NoBackground);
}
void LaptopButton::reset(unsigned long changed)
@@ -287,16 +287,16 @@ void LaptopButton::reset(unsigned long changed)
void LaptopButton::setBitmap(const unsigned char *bitmap)
{
if (bitmap)
- deco = QBitmap(8, 8, bitmap, true);
+ deco = TQBitmap(8, 8, bitmap, true);
else {
- deco = QBitmap(8,8);
+ deco = TQBitmap(8,8);
deco.fill(Qt::color0);
}
deco.setMask(deco);
repaint();
}
-void LaptopButton::drawButton(QPainter *p)
+void LaptopButton::drawButton(TQPainter *p)
{
bool smallBtn = width() == btnWidth1;
if(btnPix1){
@@ -314,7 +314,7 @@ void LaptopButton::drawButton(QPainter *p)
}
}
else{
- QColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, decoration()->isActive());
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, decoration()->isActive());
int w = width();
int h = height();
p->fillRect(1, 1, w-2, h-2, isDown() ? g.mid() : g.button());
@@ -348,17 +348,17 @@ LaptopClient::~LaptopClient()
{
}
-QString LaptopClient::visibleName() const
+TQString LaptopClient::visibleName() const
{
return i18n("Laptop");
}
-QString LaptopClient::defaultButtonsLeft() const
+TQString LaptopClient::defaultButtonsLeft() const
{
return "X";
}
-QString LaptopClient::defaultButtonsRight() const
+TQString LaptopClient::defaultButtonsRight() const
{
return "HSIA";
}
@@ -466,12 +466,12 @@ void LaptopClient::captionChange()
KCommonDecoration::captionChange();
}
-void LaptopClient::paintEvent( QPaintEvent* )
+void LaptopClient::paintEvent( TQPaintEvent* )
{
- QPainter p(widget());
- QColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive());
+ TQPainter p(widget());
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive());
- QRect r(widget()->rect());
+ TQRect r(widget()->rect());
p.setPen(Qt::black);
p.drawRect(r);
@@ -511,18 +511,18 @@ void LaptopClient::paintEvent( QPaintEvent* )
if (r.width() > 3*handleSize + 20) {
int range = 8 + 3*handleSize/2;
qDrawShadePanel(&p, r.x() + 1, r.bottom() - bs, range,
- handleSize - 2, g, false, 1, &g.brush(QColorGroup::Mid));
+ handleSize - 2, g, false, 1, &g.brush(TQColorGroup::Mid));
qDrawShadePanel(&p, r.x() + range + 1, r.bottom() - bs,
r.width() - 2*range - 2, handleSize - 2, g, false, 1,
- isActive() ? &g.brush(QColorGroup::Background) :
- &g.brush(QColorGroup::Mid));
+ isActive() ? &g.brush(TQColorGroup::Background) :
+ &g.brush(TQColorGroup::Mid));
qDrawShadePanel(&p, r.right() - range, r.bottom() - bs,
- range, bs, g, false, 1, &g.brush(QColorGroup::Mid));
+ range, bs, g, false, 1, &g.brush(TQColorGroup::Mid));
} else {
qDrawShadePanel(&p, r.x() + 1, r.bottom() - bs,
r.width() - 2, bs, g, false, 1,
- isActive() ? &g.brush(QColorGroup::Background) :
- &g.brush(QColorGroup::Mid));
+ isActive() ? &g.brush(TQColorGroup::Background) :
+ &g.brush(TQColorGroup::Mid));
}
}
@@ -545,7 +545,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
options()->color(KDecoration::ColorTitleBar, false));
p.setFont(options()->font(false, isToolWindow() ));
- QFontMetrics fm(options()->font(false));
+ TQFontMetrics fm(options()->font(false));
g = options()->colorGroup(KDecoration::ColorTitleBar, false);
if(iUpperGradient)
p.drawTiledPixmap(r.x()+((r.width()-fm.width(caption()))/2)-4,
@@ -554,7 +554,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
else
p.fillRect(r.x()+((r.width()-fm.width(caption()))/2)-4, r.y(),
fm.width(caption())+8, r.height()-1,
- g.brush(QColorGroup::Background));
+ g.brush(TQColorGroup::Background));
p.setPen(g.mid());
p.drawLine(r.x(), r.y(), r.right(), r.y());
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
@@ -572,23 +572,23 @@ void LaptopClient::paintEvent( QPaintEvent* )
}
}
-QRegion LaptopClient::cornerShape(WindowCorner corner)
+TQRegion LaptopClient::cornerShape(WindowCorner corner)
{
switch (corner) {
case WC_TopLeft:
- return QRect(0, 0, 1, 1);
+ return TQRect(0, 0, 1, 1);
case WC_TopRight:
- return QRect(width()-1, 0, 1, 1);
+ return TQRect(width()-1, 0, 1, 1);
case WC_BottomLeft:
- return QRect(0, height()-1, 1, 1);
+ return TQRect(0, height()-1, 1, 1);
case WC_BottomRight:
- return QRect(width()-1, height()-1, 1, 1);
+ return TQRect(width()-1, height()-1, 1, 1);
default:
- return QRegion();
+ return TQRegion();
}
}
@@ -605,7 +605,7 @@ bool LaptopClient::mustDrawHandle() const
void LaptopClient::updateActiveBuffer( )
{
- QRect rTitle = titleRect();
+ TQRect rTitle = titleRect();
if( !bufferDirty && (lastBufferWidth == rTitle.width()))
return;
if ( rTitle.width() <= 0 || rTitle.height() <= 0 )
@@ -615,8 +615,8 @@ void LaptopClient::updateActiveBuffer( )
activeBuffer.resize(rTitle.width(),
rTitle.height());
- QPainter p;
- QRect r(0, 0, activeBuffer.width(), activeBuffer.height());
+ TQPainter p;
+ TQRect r(0, 0, activeBuffer.width(), activeBuffer.height());
p.begin(&activeBuffer);
if(aUpperGradient){
p.drawTiledPixmap(r, *aUpperGradient);
@@ -628,8 +628,8 @@ void LaptopClient::updateActiveBuffer( )
p.drawTiledPixmap(r, *titlePix);
p.setFont(options()->font(true, isToolWindow() ));
- QFontMetrics fm(options()->font(true));
- QColorGroup g = options()->colorGroup(KDecoration::ColorTitleBar, true);
+ TQFontMetrics fm(options()->font(true));
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorTitleBar, true);
if(aUpperGradient)
p.drawTiledPixmap(r.x()+((r.width()-fm.width(caption()))/2)-4,
r.y(), fm.width(caption())+8, r.height()-1,
@@ -637,7 +637,7 @@ void LaptopClient::updateActiveBuffer( )
else
p.fillRect(r.x()+((r.width()-fm.width(caption()))/2)-4, 0,
fm.width(caption())+8, r.height(),
- g.brush(QColorGroup::Background));
+ g.brush(TQColorGroup::Background));
p.setPen(g.mid());
p.drawLine(r.x(), r.y(), r.right(), r.y());
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
@@ -723,11 +723,11 @@ bool LaptopClientFactory::supports( Ability ability )
};
}
-QValueList< LaptopClientFactory::BorderSize >
+TQValueList< LaptopClientFactory::BorderSize >
LaptopClientFactory::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
diff --git a/kwin/clients/laptop/laptopclient.h b/kwin/clients/laptop/laptopclient.h
index b2e8c3555..3413b490a 100644
--- a/kwin/clients/laptop/laptopclient.h
+++ b/kwin/clients/laptop/laptopclient.h
@@ -7,7 +7,7 @@
#ifndef __KDECLIENT_H
#define __KDECLIENT_H
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include <kcommondecoration.h>
#include <kdecorationfactory.h>
@@ -24,8 +24,8 @@ public:
virtual void reset(unsigned long changed);
protected:
- virtual void drawButton(QPainter *p);
- QBitmap deco;
+ virtual void drawButton(TQPainter *p);
+ TQBitmap deco;
};
class LaptopClient : public KCommonDecoration
@@ -34,18 +34,18 @@ public:
LaptopClient( KDecorationBridge* b, KDecorationFactory* f );
~LaptopClient();
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
- virtual QRegion cornerShape(WindowCorner corner);
+ virtual TQRegion cornerShape(WindowCorner corner);
void init();
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
void reset( unsigned long );
void updateActiveBuffer();
void captionChange();
@@ -58,7 +58,7 @@ private:
bool bufferDirty;
};
-class LaptopClientFactory : public QObject, public KDecorationFactory
+class LaptopClientFactory : public TQObject, public KDecorationFactory
{
public:
LaptopClientFactory();
@@ -66,7 +66,7 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool reset( unsigned long changed );
virtual bool supports( Ability ability );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
private:
void findPreferredHandleSize();
};
diff --git a/kwin/clients/modernsystem/config/config.cpp b/kwin/clients/modernsystem/config/config.cpp
index 542494d28..8a94c1748 100644
--- a/kwin/clients/modernsystem/config/config.cpp
+++ b/kwin/clients/modernsystem/config/config.cpp
@@ -5,14 +5,14 @@
#include <kdialog.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include "config.h"
extern "C"
{
- KDE_EXPORT QObject* allocate_config(KConfig* conf, QWidget* parent)
+ KDE_EXPORT TQObject* allocate_config(KConfig* conf, TQWidget* parent)
{
return(new ModernSysConfig(conf, parent));
}
@@ -22,54 +22,54 @@ 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
-ModernSysConfig::ModernSysConfig(KConfig* conf, QWidget* parent) : QObject(parent)
+ModernSysConfig::ModernSysConfig(KConfig* conf, TQWidget* parent) : TQObject(parent)
{
clientrc = new KConfig("kwinmodernsysrc");
KGlobal::locale()->insertCatalogue("kwin_clients");
- mainw = new QWidget(parent);
- vbox = new QVBoxLayout(mainw);
+ mainw = new TQWidget(parent);
+ vbox = new TQVBoxLayout(mainw);
vbox->setSpacing(6);
vbox->setMargin(0);
- handleBox = new QWidget(mainw);
- QGridLayout* layout = new QGridLayout(handleBox, 0, KDialog::spacingHint());
+ handleBox = new TQWidget(mainw);
+ TQGridLayout* layout = new TQGridLayout(handleBox, 0, KDialog::spacingHint());
- cbShowHandle = new QCheckBox(i18n("&Show window resize handle"), handleBox);
- QWhatsThis::add(cbShowHandle,
+ cbShowHandle = new TQCheckBox(i18n("&Show window resize handle"), handleBox);
+ TQWhatsThis::add(cbShowHandle,
i18n("When selected, all windows are drawn with a resize "
"handle at the lower right corner. This makes window resizing "
"easier, especially for trackballs and other mouse replacements "
"on laptops."));
layout->addMultiCellWidget(cbShowHandle, 0, 0, 0, 1);
- connect(cbShowHandle, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()));
+ connect(cbShowHandle, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()));
- sliderBox = new QVBox(handleBox);
- handleSizeSlider = new QSlider(0, 4, 1, 0, QSlider::Horizontal, sliderBox);
- QWhatsThis::add(handleSizeSlider,
+ sliderBox = new TQVBox(handleBox);
+ handleSizeSlider = new TQSlider(0, 4, 1, 0, TQSlider::Horizontal, sliderBox);
+ TQWhatsThis::add(handleSizeSlider,
i18n("Here you can change the size of the resize handle."));
handleSizeSlider->setTickInterval(1);
- handleSizeSlider->setTickmarks(QSlider::Below);
- connect(handleSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSelectionChanged()));
+ handleSizeSlider->setTickmarks(TQSlider::Below);
+ connect(handleSizeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSelectionChanged()));
- hbox = new QHBox(sliderBox);
+ hbox = new TQHBox(sliderBox);
hbox->setSpacing(6);
bool rtl = kapp->reverseLayout();
- label1 = new QLabel(i18n("Small"), hbox);
+ label1 = new TQLabel(i18n("Small"), hbox);
label1->setAlignment(rtl ? AlignRight : AlignLeft);
- label2 = new QLabel(i18n("Medium"), hbox);
+ label2 = new TQLabel(i18n("Medium"), hbox);
label2->setAlignment(AlignHCenter);
- label3 = new QLabel(i18n("Large"), hbox);
+ label3 = new TQLabel(i18n("Large"), hbox);
label3->setAlignment(rtl ? AlignLeft : AlignRight);
vbox->addWidget(handleBox);
vbox->addStretch(1);
// layout->setColSpacing(0, 30);
- layout->addItem(new QSpacerItem(30, 10, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0);
+ layout->addItem(new TQSpacerItem(30, 10, TQSizePolicy::Fixed, TQSizePolicy::Fixed), 1, 0);
layout->addWidget(sliderBox, 1, 1);
load(conf);
diff --git a/kwin/clients/modernsystem/config/config.h b/kwin/clients/modernsystem/config/config.h
index 4f4b97123..dcf4a588f 100644
--- a/kwin/clients/modernsystem/config/config.h
+++ b/kwin/clients/modernsystem/config/config.h
@@ -1,19 +1,19 @@
#ifndef __KDE_MODSYSTEMCONFIG_H
#define __KDE_MODSYSTEMCONFIG_H
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqslider.h>
+#include <tqlabel.h>
class ModernSysConfig : public QObject
{
Q_OBJECT
public:
- ModernSysConfig(KConfig* conf, QWidget* parent);
+ ModernSysConfig(KConfig* conf, TQWidget* parent);
~ModernSysConfig();
// These public signals/slots work similar to KCM modules
@@ -32,8 +32,8 @@ class ModernSysConfig : public QObject
KConfig *clientrc;
QWidget *mainw;
QVBoxLayout *vbox;
- QWidget *handleBox;
- QCheckBox *cbShowHandle;
+ TQWidget *handleBox;
+ TQCheckBox *cbShowHandle;
QVBox *sliderBox;
QSlider *handleSizeSlider;
QHBox *hbox;
diff --git a/kwin/clients/modernsystem/modernsys.cpp b/kwin/clients/modernsystem/modernsys.cpp
index d75816343..ce7545cdf 100644
--- a/kwin/clients/modernsystem/modernsys.cpp
+++ b/kwin/clients/modernsystem/modernsys.cpp
@@ -4,19 +4,19 @@
#include <kconfig.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
#include <kpixmapeffect.h>
#include <kdrawutil.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include "modernsys.h"
#include "buttondata.h"
#include "btnhighcolor.h"
-#include <qimage.h>
+#include <tqimage.h>
namespace ModernSystem {
@@ -73,19 +73,19 @@ static unsigned char btnhighcolor_mask_bits[] = {
static KPixmap *aUpperGradient=0;
static KPixmap *iUpperGradient=0;
-static QPixmap *buttonPix=0;
-static QPixmap *buttonPixDown=0;
-static QPixmap *iButtonPix=0;
-static QPixmap *iButtonPixDown=0;
+static TQPixmap *buttonPix=0;
+static TQPixmap *buttonPixDown=0;
+static TQPixmap *iButtonPix=0;
+static TQPixmap *iButtonPixDown=0;
-static QColor *buttonFg;
+static TQColor *buttonFg;
static bool pixmaps_created = false;
-static QBitmap *lcDark1;
-static QBitmap *lcDark2;
-static QBitmap *lcDark3;
-static QBitmap *lcLight1;
-static QImage *btnSource;
+static TQBitmap *lcDark1;
+static TQBitmap *lcDark2;
+static TQBitmap *lcDark3;
+static TQBitmap *lcLight1;
+static TQImage *btnSource;
static bool show_handle;
static int handle_size;
@@ -98,25 +98,25 @@ static inline const KDecorationOptions* options()
return KDecoration::options();
}
-static void make_button_fx(const QColorGroup &g, QPixmap *pix, bool light=false)
+static void make_button_fx(const TQColorGroup &g, TQPixmap *pix, bool light=false)
{
pix->fill(g.background());
- QPainter p(pix);
+ TQPainter p(pix);
- if(QPixmap::defaultDepth() > 8){
+ if(TQPixmap::defaultDepth() > 8){
int i, destH, destS, destV, srcH, srcS, srcV;
- QColor btnColor = g.background();
+ TQColor btnColor = g.background();
if(btnSource->depth() < 32)
*btnSource = btnSource->convertDepth(32);
if(light)
btnColor = btnColor.light(120);
btnColor.hsv(&destH, &destS, &destV);
- QImage btnDest(14, 15, 32);
+ TQImage btnDest(14, 15, 32);
unsigned int *srcData = (unsigned int *)btnSource->bits();
unsigned int *destData = (unsigned int *)btnDest.bits();
- QColor srcColor;
+ TQColor srcColor;
for(i=0; i < btnSource->width()*btnSource->height(); ++i){
srcColor.setRgb(srcData[i]);
srcColor.hsv(&srcH, &srcS, &srcV);
@@ -150,13 +150,13 @@ static void create_pixmaps()
return;
pixmaps_created = true;
- lcDark1 = new QBitmap(14, 15, lowcolor_6a696a_bits, true);
- lcDark2 = new QBitmap(14, 15, lowcolor_949194_bits, true);
- lcDark3 = new QBitmap(14, 15, lowcolor_b4b6b4_bits, true);
- lcLight1 = new QBitmap(14, 15, lowcolor_e6e6e6_bits, true);
- btnSource = new QImage(btnhighcolor_xpm);
+ lcDark1 = new TQBitmap(14, 15, lowcolor_6a696a_bits, true);
+ lcDark2 = new TQBitmap(14, 15, lowcolor_949194_bits, true);
+ lcDark3 = new TQBitmap(14, 15, lowcolor_b4b6b4_bits, true);
+ lcLight1 = new TQBitmap(14, 15, lowcolor_e6e6e6_bits, true);
+ btnSource = new TQImage(btnhighcolor_xpm);
- if(QPixmap::defaultDepth() > 8){
+ if(TQPixmap::defaultDepth() > 8){
aUpperGradient = new KPixmap;
aUpperGradient->resize(32, title_height+2);
iUpperGradient = new KPixmap;
@@ -171,23 +171,23 @@ static void create_pixmaps()
KPixmapEffect::VerticalGradient);
}
// buttons
- QColorGroup btnColor(options()->colorGroup(KDecoration::ColorButtonBg, true));
- buttonPix = new QPixmap(14, 15);
+ TQColorGroup btnColor(options()->colorGroup(KDecoration::ColorButtonBg, true));
+ buttonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPix);
- buttonPixDown = new QPixmap(14, 15);
+ buttonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPixDown, true);
btnColor = options()->colorGroup(KDecoration::ColorButtonBg, false);
- iButtonPix = new QPixmap(14, 15);
+ iButtonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPix);
- iButtonPixDown = new QPixmap(14, 15);
+ iButtonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPixDown, true);
if(qGray(btnColor.background().rgb()) < 150)
- buttonFg = new QColor(Qt::white);
+ buttonFg = new TQColor(Qt::white);
else
- buttonFg = new QColor(Qt::black);
+ buttonFg = new TQColor(Qt::black);
delete lcDark1;
delete lcDark2;
@@ -263,7 +263,7 @@ void ModernSysFactory::read_config()
bwidth = 4;
}
- theight = QFontMetrics(options()->font(true)).height() + 2;
+ theight = TQFontMetrics(options()->font(true)).height() + 2;
if (theight < 16)
theight = 16;
if (theight < bwidth)
@@ -276,9 +276,9 @@ void ModernSysFactory::read_config()
title_height = theight;
}
-QValueList< ModernSysFactory::BorderSize > ModernSysFactory::borderSizes() const
+TQValueList< ModernSysFactory::BorderSize > ModernSysFactory::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge;
// as long as the buttons don't scale don't offer the largest two sizes.
// BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
@@ -289,7 +289,7 @@ ModernButton::ModernButton(ButtonType type, ModernSys *parent, const char *name)
{
setBackgroundMode( NoBackground );
- QBitmap mask(14, 15, QPixmap::defaultDepth() > 8 ?
+ TQBitmap mask(14, 15, TQPixmap::defaultDepth() > 8 ?
btnhighcolor_mask_bits : lowcolor_mask_bits, true);
resize(14, 15);
@@ -339,15 +339,15 @@ void ModernButton::reset(unsigned long changed)
void ModernButton::setBitmap(const unsigned char *bitmap)
{
if (bitmap)
- deco = QBitmap(8, 8, bitmap, true);
+ deco = TQBitmap(8, 8, bitmap, true);
else {
- deco = QBitmap(8,8);
+ deco = TQBitmap(8,8);
deco.fill(Qt::color0);
}
deco.setMask(deco);
}
-void ModernButton::drawButton(QPainter *p)
+void ModernButton::drawButton(TQPainter *p)
{
if(decoration()->isActive()){
if(buttonPix)
@@ -378,17 +378,17 @@ ModernSys::ModernSys( KDecorationBridge* b, KDecorationFactory* f )
{
}
-QString ModernSys::visibleName() const
+TQString ModernSys::visibleName() const
{
return i18n("Modern System");
}
-QString ModernSys::defaultButtonsLeft() const
+TQString ModernSys::defaultButtonsLeft() const
{
return "X";
}
-QString ModernSys::defaultButtonsRight() const
+TQString ModernSys::defaultButtonsRight() const
{
return "HSIA";
}
@@ -495,7 +495,7 @@ KCommonDecorationButton *ModernSys::createButton(ButtonType type)
void ModernSys::init()
{
- reverse = QApplication::reverseLayout();
+ reverse = TQApplication::reverseLayout();
KCommonDecoration::init();
@@ -507,24 +507,24 @@ void ModernSys::recalcTitleBuffer()
if(oldTitle == caption() && width() == titleBuffer.width())
return;
- QFontMetrics fm(options()->font(true));
+ TQFontMetrics fm(options()->font(true));
titleBuffer.resize(width(), title_height+2);
- QPainter p;
+ TQPainter p;
p.begin(&titleBuffer);
if(aUpperGradient)
p.drawTiledPixmap(0, 0, width(), title_height+2, *aUpperGradient);
else
p.fillRect(0, 0, width(), title_height+2,
options()->colorGroup(ColorTitleBar, true).
- brush(QColorGroup::Button));
+ brush(TQColorGroup::Button));
- QRect t = titleRect(); // titlebar->geometry();
+ TQRect t = titleRect(); // titlebar->geometry();
t.setTop( 2 );
t.setLeft( t.left() );
t.setRight( t.right() - 2 );
- QRegion r(t.x(), 0, t.width(), title_height+2);
- r -= QRect(t.x()+((t.width()-fm.width(caption()))/2)-4,
+ TQRegion r(t.x(), 0, t.width(), title_height+2);
+ r -= TQRect(t.x()+((t.width()-fm.width(caption()))/2)-4,
0, fm.width(caption())+8, title_height+2);
p.setClipRegion(r);
int i, ly;
@@ -551,14 +551,14 @@ void ModernSys::updateCaption()
widget()->update(titleRect() );
}
-void ModernSys::drawRoundFrame(QPainter &p, int x, int y, int w, int h)
+void ModernSys::drawRoundFrame(TQPainter &p, int x, int y, int w, int h)
{
kDrawRoundButton(&p, x, y, w, h,
options()->colorGroup(ColorFrame, isActive()), false);
}
-void ModernSys::paintEvent( QPaintEvent* )
+void ModernSys::paintEvent( TQPaintEvent* )
{
// update title buffer...
if (oldTitle != caption() || width() != titleBuffer.width() )
@@ -567,13 +567,13 @@ void ModernSys::paintEvent( QPaintEvent* )
int hs = handle_size;
int hw = handle_width;
- QPainter p( widget() );
- QRect t = titleRect(); // titlebar->geometry();
+ TQPainter p( widget() );
+ TQRect t = titleRect(); // 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(ColorFrame, isActive()).
- brush(QColorGroup::Button));
+ brush(TQColorGroup::Button));
p.fillRect(1, title_height+3, width()-2, height()-(title_height+3), fillBrush);
p.fillRect(width()-6, 0, width()-1, height(), fillBrush);
@@ -586,7 +586,7 @@ void ModernSys::paintEvent( QPaintEvent* )
int h = height() - hw;
// titlebar
- QColorGroup g = options()->colorGroup(ColorTitleBar, isActive());
+ TQColorGroup g = options()->colorGroup(ColorTitleBar, isActive());
if(isActive()){
p.drawPixmap(1, 1, titleBuffer, 0, 0, w-2, title_height+2);
}
@@ -649,20 +649,20 @@ void ModernSys::updateWindowShape()
{
int hs = handle_size;
int hw = handle_width;
- QRegion mask;
- mask += QRect(0, 0, width()-hw, height()-hw);
+ TQRegion mask;
+ mask += TQRect(0, 0, width()-hw, height()-hw);
//single points
- mask -= QRect(0, 0, 1, 1);
- mask -= QRect(width()-hw-1, 0, 1, 1);
- mask -= QRect(0, height()-hw-1, 1, 1);
+ mask -= TQRect(0, 0, 1, 1);
+ mask -= TQRect(width()-hw-1, 0, 1, 1);
+ mask -= TQRect(0, height()-hw-1, 1, 1);
if (show_handle) {
- mask += QRect(width()-hs, height()-hs, hs-1, hs-1);
- mask -= QRect(width()-2, height()-2, 1, 1);
- mask -= QRect(width()-2, height()-hs, 1, 1);
- mask -= QRect(width()-hs, height()-2, 1, 1);
+ mask += TQRect(width()-hs, height()-hs, hs-1, hs-1);
+ mask -= TQRect(width()-2, height()-2, 1, 1);
+ mask -= TQRect(width()-2, height()-hs, 1, 1);
+ mask -= TQRect(width()-hs, height()-2, 1, 1);
} else
- mask -= QRect(width()-1, height()-1, 1, 1);
+ mask -= TQRect(width()-1, height()-1, 1, 1);
setMask(mask);
}
diff --git a/kwin/clients/modernsystem/modernsys.h b/kwin/clients/modernsystem/modernsys.h
index d185be048..2606d8786 100644
--- a/kwin/clients/modernsystem/modernsys.h
+++ b/kwin/clients/modernsystem/modernsys.h
@@ -1,7 +1,7 @@
#ifndef __MODSYSTEMCLIENT_H
#define __MODSYSTEMCLIENT_H
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include <kcommondecoration.h>
#include <kdecorationfactory.h>
@@ -21,9 +21,9 @@ public:
virtual void reset(unsigned long changed);
protected:
- virtual void drawButton(QPainter *p);
- void drawButtonLabel(QPainter *){;}
- QBitmap deco;
+ virtual void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter *){;}
+ TQBitmap deco;
};
class ModernSys : public KCommonDecoration
@@ -32,9 +32,9 @@ public:
ModernSys( KDecorationBridge* b, KDecorationFactory* f );
~ModernSys(){;}
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
@@ -44,17 +44,17 @@ public:
void init();
protected:
- void drawRoundFrame(QPainter &p, int x, int y, int w, int h);
- void paintEvent( QPaintEvent* );
+ void drawRoundFrame(TQPainter &p, int x, int y, int w, int h);
+ void paintEvent( TQPaintEvent* );
void recalcTitleBuffer();
void reset( unsigned long );
private:
- QPixmap titleBuffer;
- QString oldTitle;
+ TQPixmap titleBuffer;
+ TQString oldTitle;
bool reverse;
};
-class ModernSysFactory : public QObject, public KDecorationFactory
+class ModernSysFactory : public TQObject, public KDecorationFactory
{
public:
ModernSysFactory();
@@ -62,7 +62,7 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool reset( unsigned long changed );
virtual bool supports( Ability ability );
- QValueList< BorderSize > borderSizes() const;
+ TQValueList< BorderSize > borderSizes() const;
private:
void read_config();
};
diff --git a/kwin/clients/plastik/config/config.cpp b/kwin/clients/plastik/config/config.cpp
index 91ec501d0..0352bff91 100644
--- a/kwin/clients/plastik/config/config.cpp
+++ b/kwin/clients/plastik/config/config.cpp
@@ -20,12 +20,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <klocale.h>
@@ -34,8 +34,8 @@
#include "config.h"
#include "configdialog.h"
-PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
- : QObject(parent), m_config(0), m_dialog(0)
+PlastikConfig::PlastikConfig(KConfig* config, TQWidget* parent)
+ : TQObject(parent), m_config(0), m_dialog(0)
{
// create the configuration object
m_config = new KConfig("kwinplastikrc");
@@ -49,16 +49,16 @@ PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
load(config);
// setup the connections
- connect(m_dialog->titleAlign, SIGNAL(clicked(int)),
- this, SIGNAL(changed()));
- connect(m_dialog->animateButtons, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
- connect(m_dialog->menuClose, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
- connect(m_dialog->titleShadow, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
- connect(m_dialog->coloredBorder, SIGNAL(toggled(bool)),
- this, SIGNAL(changed()));
+ connect(m_dialog->titleAlign, TQT_SIGNAL(clicked(int)),
+ this, TQT_SIGNAL(changed()));
+ connect(m_dialog->animateButtons, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SIGNAL(changed()));
+ connect(m_dialog->menuClose, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SIGNAL(changed()));
+ connect(m_dialog->titleShadow, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SIGNAL(changed()));
+ connect(m_dialog->coloredBorder, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SIGNAL(changed()));
}
PlastikConfig::~PlastikConfig()
@@ -72,8 +72,8 @@ void PlastikConfig::load(KConfig*)
m_config->setGroup("General");
- QString value = m_config->readEntry("TitleAlignment", "AlignLeft");
- QRadioButton *button = (QRadioButton*)m_dialog->titleAlign->child(value.latin1());
+ TQString value = m_config->readEntry("TitleAlignment", "AlignLeft");
+ TQRadioButton *button = (TQRadioButton*)m_dialog->titleAlign->child(value.latin1());
if (button) button->setChecked(true);
bool animateButtons = m_config->readBoolEntry("AnimateButtons", true);
m_dialog->animateButtons->setChecked(animateButtons);
@@ -89,8 +89,8 @@ void PlastikConfig::save(KConfig*)
{
m_config->setGroup("General");
- QRadioButton *button = (QRadioButton*)m_dialog->titleAlign->selected();
- if (button) m_config->writeEntry("TitleAlignment", QString(button->name()));
+ TQRadioButton *button = (TQRadioButton*)m_dialog->titleAlign->selected();
+ if (button) m_config->writeEntry("TitleAlignment", TQString(button->name()));
m_config->writeEntry("AnimateButtons", m_dialog->animateButtons->isChecked() );
m_config->writeEntry("CloseOnMenuDoubleClick", m_dialog->menuClose->isChecked() );
m_config->writeEntry("TitleShadow", m_dialog->titleShadow->isChecked() );
@@ -100,8 +100,8 @@ void PlastikConfig::save(KConfig*)
void PlastikConfig::defaults()
{
- QRadioButton *button =
- (QRadioButton*)m_dialog->titleAlign->child("AlignLeft");
+ TQRadioButton *button =
+ (TQRadioButton*)m_dialog->titleAlign->child("AlignLeft");
if (button) button->setChecked(true);
m_dialog->animateButtons->setChecked(true);
m_dialog->menuClose->setChecked(false);
@@ -115,7 +115,7 @@ void PlastikConfig::defaults()
extern "C"
{
- KDE_EXPORT QObject* allocate_config(KConfig* config, QWidget* parent) {
+ KDE_EXPORT TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return (new PlastikConfig(config, parent));
}
}
diff --git a/kwin/clients/plastik/config/config.h b/kwin/clients/plastik/config/config.h
index 540a27cda..249f5f7dd 100644
--- a/kwin/clients/plastik/config/config.h
+++ b/kwin/clients/plastik/config/config.h
@@ -23,7 +23,7 @@
#ifndef KNIFTYCONFIG_H
#define KNIFTYCONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
class QButtonGroup;
class QGroupBox;
@@ -34,7 +34,7 @@ class PlastikConfig : public QObject
{
Q_OBJECT
public:
- PlastikConfig(KConfig* config, QWidget* parent);
+ PlastikConfig(KConfig* config, TQWidget* parent);
~PlastikConfig();
signals:
diff --git a/kwin/clients/plastik/misc.cpp b/kwin/clients/plastik/misc.cpp
index da491b2ba..43786fe46 100644
--- a/kwin/clients/plastik/misc.cpp
+++ b/kwin/clients/plastik/misc.cpp
@@ -23,13 +23,13 @@
#include <kpixmap.h>
#include <kpixmapeffect.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include "misc.h"
-QColor hsvRelative(const QColor& baseColor, int relativeH, int relativeS, int relativeV)
+TQColor hsvRelative(const TQColor& baseColor, int relativeH, int relativeS, int relativeV)
{
int h, s, v;
baseColor.hsv(&h, &s, &v);
@@ -45,12 +45,12 @@ QColor hsvRelative(const QColor& baseColor, int relativeH, int relativeS, int re
if(v < 0) { v = 0; }
else if(v > 255) { v = 255; }
- QColor c;
+ TQColor c;
c.setHsv( h, s, v );
return c;
}
-QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
+TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a)
{
// normal button...
@@ -61,15 +61,15 @@ QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
+ TQColor result = TQColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
return result;
}
-QImage recolorImage(QImage *img, QColor color) {
- QImage destImg(img->width(),img->height(),32);
+TQImage recolorImage(TQImage *img, TQColor color) {
+ TQImage destImg(img->width(),img->height(),32);
destImg.setAlphaBuffer(true);
for (int x = 0; x < img->width(); x++) {
for (int y = 0; y < img->height(); y++) {
diff --git a/kwin/clients/plastik/misc.h b/kwin/clients/plastik/misc.h
index 6c06b282b..985b405e8 100644
--- a/kwin/clients/plastik/misc.h
+++ b/kwin/clients/plastik/misc.h
@@ -23,8 +23,8 @@
#ifndef MISC_H
#define MISC_H
-QColor hsvRelative(const QColor& baseColor, int relativeH, int relativeS = 0, int relativeV = 0);
-QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha);
-QImage recolorImage(QImage *img, QColor color);
+TQColor hsvRelative(const TQColor& baseColor, int relativeH, int relativeS = 0, int relativeV = 0);
+TQColor alphaBlendColors(const TQColor &backgroundColor, const TQColor &foregroundColor, const int alpha);
+TQImage recolorImage(TQImage *img, TQColor color);
#endif // MISC_H
diff --git a/kwin/clients/plastik/plastik.cpp b/kwin/clients/plastik/plastik.cpp
index 25e6d2563..a6313cd1c 100644
--- a/kwin/clients/plastik/plastik.cpp
+++ b/kwin/clients/plastik/plastik.cpp
@@ -20,9 +20,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <kconfig.h>
#include <kpixmap.h>
@@ -39,8 +39,8 @@ namespace KWinPlastik
PlastikHandler::PlastikHandler()
{
- memset(m_pixmaps, 0, sizeof(QPixmap*)*NumPixmaps*2*2); // set elements to 0
- memset(m_bitmaps, 0, sizeof(QBitmap*)*NumButtonIcons*2);
+ memset(m_pixmaps, 0, sizeof(TQPixmap*)*NumPixmaps*2*2); // set elements to 0
+ memset(m_bitmaps, 0, sizeof(TQBitmap*)*NumButtonIcons*2);
reset(0);
}
@@ -88,7 +88,7 @@ bool PlastikHandler::reset(unsigned long changed)
}
// check if we are in reverse layout mode
- m_reverse = QApplication::reverseLayout();
+ m_reverse = TQApplication::reverseLayout();
// read in the configuration
readConfig();
@@ -168,7 +168,7 @@ void PlastikHandler::readConfig()
// grab settings
m_titleShadow = config.readBoolEntry("TitleShadow", true);
- QFontMetrics fm(m_titleFont); // active font = inactive font
+ TQFontMetrics fm(m_titleFont); // active font = inactive font
int titleHeightMin = config.readNumEntry("MinTitleHeight", 16);
// The title should strech with bigger font sizes!
m_titleHeight = QMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
@@ -176,7 +176,7 @@ void PlastikHandler::readConfig()
if ( m_titleHeight%2 == 0)
m_titleHeight++;
- fm = QFontMetrics(m_titleFontTool); // active font = inactive font
+ fm = TQFontMetrics(m_titleFontTool); // active font = inactive font
int titleHeightToolMin = config.readNumEntry("MinTitleHeightTool", 13);
// The title should strech with bigger font sizes!
m_titleHeightTool = QMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
@@ -184,7 +184,7 @@ void PlastikHandler::readConfig()
if ( m_titleHeightTool%2 == 0)
m_titleHeightTool++;
- QString value = config.readEntry("TitleAlignment", "AlignLeft");
+ TQString value = config.readEntry("TitleAlignment", "AlignLeft");
if (value == "AlignLeft") m_titleAlign = Qt::AlignLeft;
else if (value == "AlignHCenter") m_titleAlign = Qt::AlignHCenter;
else if (value == "AlignRight") m_titleAlign = Qt::AlignRight;
@@ -194,7 +194,7 @@ void PlastikHandler::readConfig()
m_menuClose = config.readBoolEntry("CloseOnMenuDoubleClick", true);
}
-QColor PlastikHandler::getColor(KWinPlastik::ColorType type, const bool active)
+TQColor PlastikHandler::getColor(KWinPlastik::ColorType type, const bool active)
{
switch (type) {
case WindowContour:
@@ -225,15 +225,15 @@ QColor PlastikHandler::getColor(KWinPlastik::ColorType type, const bool active)
}
}
-void PlastikHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir ) const
+void PlastikHandler::pretile( TQPixmap *&pix, int size, Qt::Orientation dir ) const
{
- QPixmap *newpix;
- QPainter p;
+ TQPixmap *newpix;
+ TQPainter p;
if ( dir == Qt::Horizontal )
- newpix = new QPixmap( size, pix->height() );
+ newpix = new TQPixmap( size, pix->height() );
else
- newpix = new QPixmap( pix->width(), size );
+ newpix = new TQPixmap( pix->width(), size );
p.begin( newpix );
p.drawTiledPixmap( newpix->rect(), *pix ) ;
@@ -243,12 +243,12 @@ void PlastikHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir ) con
pix = newpix;
}
-const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
+const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow)
{
if (m_pixmaps[toolWindow][active][type])
return *m_pixmaps[toolWindow][active][type];
- QPixmap *pm = 0;
+ TQPixmap *pm = 0;
switch (type) {
case TitleBarTileTop:
@@ -257,8 +257,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
const int titleBarTileHeight = (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
// gradient used as well in TitleBarTileTop as TitleBarTile
const int gradientHeight = 2 + titleBarTileHeight-1;
- QPixmap gradient(1, gradientHeight);
- QPainter painter(&gradient);
+ TQPixmap gradient(1, gradientHeight);
+ TQPainter painter(&gradient);
KPixmap tempPixmap;
tempPixmap.resize(1, 4);
KPixmapEffect::gradient(tempPixmap,
@@ -276,7 +276,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
// actual titlebar tiles
if (type == TitleBarTileTop) {
- pm = new QPixmap(1, 4);
+ pm = new TQPixmap(1, 4);
painter.begin(pm);
// contour
painter.setPen(getColor(WindowContour, active) );
@@ -288,7 +288,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
painter.drawPixmap(0, 2, gradient);
painter.end();
} else {
- pm = new QPixmap(1, titleBarTileHeight);
+ pm = new TQPixmap(1, titleBarTileHeight);
painter.begin(pm);
painter.drawPixmap(0, 0, gradient, 0,2);
if (m_coloredBorder) {
@@ -310,8 +310,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
const int w = m_borderSize;
const int h = 4 + (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
- pm = new QPixmap(w, h);
- QPainter painter(pm);
+ pm = new TQPixmap(w, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0, w, 4, pixmap(TitleBarTileTop, active, toolWindow) );
painter.drawTiledPixmap(0,4, w, h-4, pixmap(TitleBarTile, active, toolWindow) );
@@ -320,7 +320,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
painter.drawLine(0,0, 0,h);
painter.drawPoint(1,1);
- const QColor highlightTitleLeft = getColor(ShadeTitleLight, active);
+ const TQColor highlightTitleLeft = getColor(ShadeTitleLight, active);
painter.setPen(highlightTitleLeft);
painter.drawLine(1,2, 1,h);
@@ -330,7 +330,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
}
// outside the region normally masked by doShape
- painter.setPen(QColor(0,0,0) );
+ painter.setPen(TQColor(0,0,0) );
painter.drawLine(0, 0, 1, 0 );
painter.drawPoint(0, 1);
@@ -342,8 +342,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
const int w = m_borderSize;
const int h = 4 + (toolWindow ? m_titleHeightTool : m_titleHeight) + 2;
- pm = new QPixmap(w, h);
- QPainter painter(pm);
+ pm = new TQPixmap(w, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0, w, 4, pixmap(TitleBarTileTop, active, toolWindow) );
painter.drawTiledPixmap(0,4, w, h-4, pixmap(TitleBarTile, active, toolWindow) );
@@ -352,7 +352,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
painter.drawLine(w-1,0, w-1,h);
painter.drawPoint(w-2,1);
- const QColor highlightTitleRight = getColor(ShadeTitleDark, active);
+ const TQColor highlightTitleRight = getColor(ShadeTitleDark, active);
painter.setPen(highlightTitleRight);
painter.drawLine(w-2,2, w-2,h);
@@ -362,7 +362,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
}
// outside the region normally masked by doShape
- painter.setPen(QColor(0,0,0) );
+ painter.setPen(TQColor(0,0,0) );
painter.drawLine(w-2, 0, w-1, 0 );
painter.drawPoint(w-1, 1);
@@ -373,8 +373,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
{
const int w = m_borderSize;
- pm = new QPixmap(w, 1);
- QPainter painter(pm);
+ pm = new TQPixmap(w, 1);
+ TQPainter painter(pm);
if (m_coloredBorder) {
painter.setPen(getColor(WindowContour, active) );
painter.drawPoint(0, 0);
@@ -408,8 +408,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
{
const int w = m_borderSize;
- pm = new QPixmap(w, 1);
- QPainter painter(pm);
+ pm = new TQPixmap(w, 1);
+ TQPainter painter(pm);
if (m_coloredBorder) {
painter.setPen(getColor(TitleGradient3, active).dark(110) );
painter.drawPoint(0,0);
@@ -443,8 +443,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
const int w = m_borderSize;
const int h = m_borderSize;
- pm = new QPixmap(w, h);
- QPainter painter(pm);
+ pm = new TQPixmap(w, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0,w,h, pixmap(BorderBottomTile, active, toolWindow) );
painter.setPen(getColor(WindowContour, active) );
painter.drawLine(0,0, 0,h);
@@ -473,8 +473,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
const int w = m_borderSize;
const int h = m_borderSize;
- pm = new QPixmap(w, h);
- QPainter painter(pm);
+ pm = new TQPixmap(w, h);
+ TQPainter painter(pm);
painter.drawTiledPixmap(0,0,w,h, pixmap(BorderBottomTile, active, toolWindow) );
painter.setPen(getColor(WindowContour, active) );
painter.drawLine(w-1,0, w-1,h);
@@ -501,8 +501,8 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
{
const int h = m_borderSize;
- pm = new QPixmap(1, m_borderSize);
- QPainter painter(pm);
+ pm = new TQPixmap(1, m_borderSize);
+ TQPainter painter(pm);
if (m_coloredBorder) {
painter.setPen(getColor(TitleGradient3, active).dark(110) );
@@ -533,7 +533,7 @@ const QPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindow
return *pm;
}
-const QBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const QSize &size, bool toolWindow)
+const TQBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const TQSize &size, bool toolWindow)
{
int typeIndex = type;
@@ -552,7 +552,7 @@ const QBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const QSize &size,
int w = size.width() - reduceW;
int h = size.height() - reduceH;
- if (m_bitmaps[toolWindow][typeIndex] && m_bitmaps[toolWindow][typeIndex]->size()==QSize(w,h) )
+ if (m_bitmaps[toolWindow][typeIndex] && m_bitmaps[toolWindow][typeIndex]->size()==TQSize(w,h) )
return *m_bitmaps[toolWindow][typeIndex];
// no matching pixmap found, create a new one...
@@ -560,17 +560,17 @@ const QBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const QSize &size,
delete m_bitmaps[toolWindow][typeIndex];
m_bitmaps[toolWindow][typeIndex] = 0;
- QBitmap bmp = IconEngine::icon(type /*icon*/, QMIN(w,h) );
- QBitmap *bitmap = new QBitmap(bmp);
+ TQBitmap bmp = IconEngine::icon(type /*icon*/, QMIN(w,h) );
+ TQBitmap *bitmap = new TQBitmap(bmp);
m_bitmaps[toolWindow][typeIndex] = bitmap;
return *bitmap;
}
-QValueList< PlastikHandler::BorderSize >
+TQValueList< PlastikHandler::BorderSize >
PlastikHandler::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/clients/plastik/plastik.h b/kwin/clients/plastik/plastik.h
index 16972c9ac..974df622b 100644
--- a/kwin/clients/plastik/plastik.h
+++ b/kwin/clients/plastik/plastik.h
@@ -23,7 +23,7 @@
#ifndef PLASTIK_H
#define PLASTIK_H
-#include <qfont.h>
+#include <tqfont.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -71,7 +71,7 @@ enum ButtonIcon {
NumButtonIcons
};
-class PlastikHandler: public QObject, public KDecorationFactory
+class PlastikHandler: public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -82,26 +82,26 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool supports( Ability ability );
- const QPixmap &pixmap(Pixmaps type, bool active, bool toolWindow);
- const QBitmap &buttonBitmap(ButtonIcon type, const QSize &size, bool toolWindow);
+ const TQPixmap &pixmap(Pixmaps type, bool active, bool toolWindow);
+ const TQBitmap &buttonBitmap(ButtonIcon type, const TQSize &size, bool toolWindow);
int titleHeight() { return m_titleHeight; }
int titleHeightTool() { return m_titleHeightTool; }
- const QFont &titleFont() { return m_titleFont; }
- const QFont &titleFontTool() { return m_titleFontTool; }
+ const TQFont &titleFont() { return m_titleFont; }
+ const TQFont &titleFontTool() { return m_titleFontTool; }
bool titleShadow() { return m_titleShadow; }
int borderSize() { return m_borderSize; }
bool animateButtons() { return m_animateButtons; }
bool menuClose() { return m_menuClose; }
Qt::AlignmentFlags titleAlign() { return m_titleAlign; }
bool reverseLayout() { return m_reverse; }
- QColor getColor(KWinPlastik::ColorType type, const bool active = true);
+ TQColor getColor(KWinPlastik::ColorType type, const bool active = true);
- QValueList< PlastikHandler::BorderSize > borderSizes() const;
+ TQValueList< PlastikHandler::BorderSize > borderSizes() const;
private:
void readConfig();
- void pretile(QPixmap *&pix, int size, Qt::Orientation dir) const;
+ void pretile(TQPixmap *&pix, int size, Qt::Orientation dir) const;
bool m_coloredBorder;
bool m_titleShadow;
@@ -111,13 +111,13 @@ private:
int m_borderSize;
int m_titleHeight;
int m_titleHeightTool;
- QFont m_titleFont;
- QFont m_titleFontTool;
+ TQFont m_titleFont;
+ TQFont m_titleFontTool;
Qt::AlignmentFlags m_titleAlign;
// pixmap cache
- QPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
- QBitmap *m_bitmaps[2][NumButtonIcons];
+ TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
+ TQBitmap *m_bitmaps[2][NumButtonIcons];
};
PlastikHandler* Handler();
diff --git a/kwin/clients/plastik/plastikbutton.cpp b/kwin/clients/plastik/plastikbutton.cpp
index 5917465ab..27a3eb127 100644
--- a/kwin/clients/plastik/plastikbutton.cpp
+++ b/kwin/clients/plastik/plastikbutton.cpp
@@ -22,12 +22,12 @@
// #include <kwin/options.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "plastikbutton.h"
#include "plastikbutton.moc"
@@ -50,8 +50,8 @@ PlastikButton::PlastikButton(ButtonType type, PlastikClient *parent, const char
// no need to reset here as the button will be resetted on first resize.
- animTmr = new QTimer(this);
- connect(animTmr, SIGNAL(timeout() ), this, SLOT(animate() ) );
+ animTmr = new TQTimer(this);
+ connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) );
animProgress = 0;
}
@@ -143,43 +143,43 @@ void PlastikButton::animate()
repaint(false);
}
-void PlastikButton::enterEvent(QEvent *e)
+void PlastikButton::enterEvent(TQEvent *e)
{
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
hover = true;
animate();
}
-void PlastikButton::leaveEvent(QEvent *e)
+void PlastikButton::leaveEvent(TQEvent *e)
{
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
hover = false;
animate();
}
-void PlastikButton::drawButton(QPainter *painter)
+void PlastikButton::drawButton(TQPainter *painter)
{
- QRect r(0,0,width(),height());
+ TQRect r(0,0,width(),height());
bool active = m_client->isActive();
KPixmap tempKPixmap;
- QColor highlightColor;
+ TQColor highlightColor;
if(type() == CloseButton) {
- highlightColor = QColor(255,64,0);
+ highlightColor = TQColor(255,64,0);
} else {
highlightColor = Qt::white;
}
- QColor contourTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
+ TQColor contourTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
Qt::black, 215);
- QColor contourBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
+ TQColor contourBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
Qt::black, 215);
- QColor sourfaceTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
+ TQColor sourfaceTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
Qt::white, 210);
- QColor sourfaceBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
+ TQColor sourfaceBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
Qt::white, 210);
int highlightAlpha = static_cast<int>(255-((60/static_cast<double>(ANIMATIONSTEPS))*
@@ -196,9 +196,9 @@ void PlastikButton::drawButton(QPainter *painter)
sourfaceBottom = alphaBlendColors(sourfaceBottom, Qt::black, 200);
}
- QPixmap buffer;
+ TQPixmap buffer;
buffer.resize(width(), height());
- QPainter bP(&buffer);
+ TQPainter bP(&buffer);
// fake the titlebar background
bP.drawTiledPixmap(0, 0, width(), width(), m_client->getTitleBarTile(active) );
@@ -251,7 +251,7 @@ void PlastikButton::drawButton(QPainter *painter)
if (type() == MenuButton)
{
- QPixmap menuIcon(m_client->icon().pixmap( QIconSet::Small, QIconSet::Normal));
+ TQPixmap menuIcon(m_client->icon().pixmap( TQIconSet::Small, TQIconSet::Normal));
if (width() < menuIcon.width() || height() < menuIcon.height() ) {
menuIcon.convertFromImage( menuIcon.convertToImage().smoothScale(width(), height()));
}
@@ -260,7 +260,7 @@ void PlastikButton::drawButton(QPainter *painter)
else
{
int dX,dY;
- const QBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() );
+ const TQBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() );
dX = r.x()+(r.width()-icon.width())/2;
dY = r.y()+(r.height()-icon.height())/2;
if (isDown() ) {
@@ -268,11 +268,11 @@ void PlastikButton::drawButton(QPainter *painter)
}
if(!isDown() && Handler()->titleShadow() ) {
- QColor shadowColor;
+ TQColor shadowColor;
if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
- shadowColor = QColor(255, 255, 255);
+ shadowColor = TQColor(255, 255, 255);
else
- shadowColor = QColor(0,0,0);
+ shadowColor = TQColor(0,0,0);
bP.setPen(alphaBlendColors(sourfaceTop, shadowColor, 180) );
bP.drawPixmap(dX+1, dY+1, icon);
}
@@ -285,18 +285,18 @@ void PlastikButton::drawButton(QPainter *painter)
painter->drawPixmap(0, 0, buffer);
}
-QBitmap IconEngine::icon(ButtonIcon icon, int size)
+TQBitmap IconEngine::icon(ButtonIcon icon, int size)
{
if (size%2 == 0)
--size;
- QBitmap bitmap(size,size);
+ TQBitmap bitmap(size,size);
bitmap.fill(Qt::color0);
- QPainter p(&bitmap);
+ TQPainter p(&bitmap);
p.setPen(Qt::color1);
- QRect r = bitmap.rect();
+ TQRect r = bitmap.rect();
// line widths
int lwTitleBar = 1;
@@ -554,7 +554,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size)
return bitmap;
}
-void IconEngine::drawObject(QPainter &p, Object object, int x, int y, int length, int lineWidth)
+void IconEngine::drawObject(TQPainter &p, Object object, int x, int y, int length, int lineWidth)
{
switch(object) {
case DiagonalLine:
diff --git a/kwin/clients/plastik/plastikbutton.h b/kwin/clients/plastik/plastikbutton.h
index 0be8dddea..69ba6d8e0 100644
--- a/kwin/clients/plastik/plastikbutton.h
+++ b/kwin/clients/plastik/plastikbutton.h
@@ -23,8 +23,8 @@
#ifndef PLASTIKBUTTON_H
#define PLASTIKBUTTON_H
-#include <qbutton.h>
-#include <qimage.h>
+#include <tqbutton.h>
+#include <tqimage.h>
#include "plastik.h"
#include <kcommondecoration.h>
@@ -49,30 +49,30 @@ protected slots:
void animate();
private:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
- void drawButton(QPainter *painter);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
+ void drawButton(TQPainter *painter);
private:
PlastikClient *m_client;
ButtonIcon m_iconType;
bool hover;
- QTimer *animTmr;
+ TQTimer *animTmr;
uint animProgress;
};
/**
* This class creates bitmaps which can be used as icons on buttons. The icons
* are "hardcoded".
- * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->QPixmap" solution
+ * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->TQPixmap" solution
* it has the important advantage that icons are more scalable and at the same
* time sharp and not blurred.
*/
class IconEngine
{
public:
- static QBitmap icon(ButtonIcon icon, int size);
+ static TQBitmap icon(ButtonIcon icon, int size);
private:
enum Object {
@@ -82,7 +82,7 @@ class IconEngine
CrossDiagonalLine
};
- static void drawObject(QPainter &p, Object object, int x, int y, int length, int lineWidth);
+ static void drawObject(TQPainter &p, Object object, int x, int y, int length, int lineWidth);
};
} // namespace KWinPlastik
diff --git a/kwin/clients/plastik/plastikclient.cpp b/kwin/clients/plastik/plastikclient.cpp
index 722761a5f..604c66641 100644
--- a/kwin/clients/plastik/plastikclient.cpp
+++ b/kwin/clients/plastik/plastikclient.cpp
@@ -22,15 +22,15 @@
#include <klocale.h>
-#include <qbitmap.h>
-#include <qdatetime.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qdesktopwidget.h>
+#include <tqbitmap.h>
+#include <tqdatetime.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqdesktopwidget.h>
#include "plastikclient.h"
#include "plastikbutton.h"
@@ -41,9 +41,9 @@ namespace KWinPlastik
PlastikClient::PlastikClient(KDecorationBridge* bridge, KDecorationFactory* factory)
: KCommonDecoration (bridge, factory),
- s_titleFont(QFont() )
+ s_titleFont(TQFont() )
{
- memset(m_captionPixmaps, 0, sizeof(QPixmap*)*2);
+ memset(m_captionPixmaps, 0, sizeof(TQPixmap*)*2);
}
PlastikClient::~PlastikClient()
@@ -51,17 +51,17 @@ PlastikClient::~PlastikClient()
clearCaptionPixmaps();
}
-QString PlastikClient::visibleName() const
+TQString PlastikClient::visibleName() const
{
return i18n("Plastik");
}
-QString PlastikClient::defaultButtonsLeft() const
+TQString PlastikClient::defaultButtonsLeft() const
{
return "M";
}
-QString PlastikClient::defaultButtonsRight() const
+TQString PlastikClient::defaultButtonsRight() const
{
return "HIAX";
}
@@ -197,7 +197,7 @@ void PlastikClient::init()
KCommonDecoration::init();
}
-QRegion PlastikClient::cornerShape(WindowCorner corner)
+TQRegion PlastikClient::cornerShape(WindowCorner corner)
{
int w = widget()->width();
int h = widget()->height();
@@ -205,37 +205,37 @@ QRegion PlastikClient::cornerShape(WindowCorner corner)
switch (corner) {
case WC_TopLeft:
if (layoutMetric(LM_TitleEdgeLeft) > 0)
- return QRegion(0, 0, 1, 2) + QRegion(1, 0, 1, 1);
+ return TQRegion(0, 0, 1, 2) + TQRegion(1, 0, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_TopRight:
if (layoutMetric(LM_TitleEdgeRight) > 0)
- return QRegion(w-1, 0, 1, 2) + QRegion(w-2, 0, 1, 1);
+ return TQRegion(w-1, 0, 1, 2) + TQRegion(w-2, 0, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_BottomLeft:
if (layoutMetric(LM_BorderBottom) > 0)
- return QRegion(0, h-1, 1, 1);
+ return TQRegion(0, h-1, 1, 1);
else
- return QRegion();
+ return TQRegion();
case WC_BottomRight:
if (layoutMetric(LM_BorderBottom) > 0)
- return QRegion(w-1, h-1, 1, 1);
+ return TQRegion(w-1, h-1, 1, 1);
else
- return QRegion();
+ return TQRegion();
default:
- return QRegion();
+ return TQRegion();
}
}
-void PlastikClient::paintEvent(QPaintEvent *e)
+void PlastikClient::paintEvent(TQPaintEvent *e)
{
- QRegion region = e->region();
+ TQRegion region = e->region();
PlastikHandler *handler = Handler();
@@ -245,10 +245,10 @@ void PlastikClient::paintEvent(QPaintEvent *e)
bool active = isActive();
bool toolWindow = isToolWindow();
- QPainter painter(widget() );
+ TQPainter painter(widget() );
// often needed coordinates
- QRect r = widget()->rect();
+ TQRect r = widget()->rect();
int r_w = r.width();
// int r_h = r.height();
@@ -270,11 +270,11 @@ void PlastikClient::paintEvent(QPaintEvent *e)
const int sideHeight = borderBottomTop-titleEdgeBottomBottom-1;
- QRect Rtitle = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
+ TQRect Rtitle = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
- QRect tempRect;
+ TQRect tempRect;
// topSpacer
if(titleEdgeTop > 0)
@@ -308,7 +308,7 @@ void PlastikClient::paintEvent(QPaintEvent *e)
}
// titleSpacer
- const QPixmap &caption = captionPixmap();
+ const TQPixmap &caption = captionPixmap();
if(Rtitle.width() > 0)
{
m_captionRect = captionRect(); // also update m_captionRect!
@@ -376,10 +376,10 @@ void PlastikClient::paintEvent(QPaintEvent *e)
}
}
-QRect PlastikClient::captionRect() const
+TQRect PlastikClient::captionRect() const
{
- const QPixmap &caption = captionPixmap();
- QRect r = widget()->rect();
+ const TQPixmap &caption = captionPixmap();
+ TQRect r = widget()->rect();
const int titleHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom);
@@ -413,12 +413,12 @@ QRect PlastikClient::captionRect() const
tX = titleLeft+titleWidth-caption.width();
}
- return QRect(tX, r.top()+titleEdgeTop, tW, titleHeight+titleEdgeBottom);
+ return TQRect(tX, r.top()+titleEdgeTop, tW, titleHeight+titleEdgeBottom);
}
void PlastikClient::updateCaption()
{
- QRect oldCaptionRect = m_captionRect;
+ TQRect oldCaptionRect = m_captionRect;
if (oldCaption != caption() )
clearCaptionPixmaps();
@@ -453,12 +453,12 @@ void PlastikClient::reset( unsigned long changed )
KCommonDecoration::reset(changed);
}
-const QPixmap &PlastikClient::getTitleBarTile(bool active) const
+const TQPixmap &PlastikClient::getTitleBarTile(bool active) const
{
return Handler()->pixmap(TitleBarTile, active, isToolWindow() );
}
-const QPixmap &PlastikClient::captionPixmap() const
+const TQPixmap &PlastikClient::captionPixmap() const
{
bool active = isActive();
@@ -469,44 +469,44 @@ const QPixmap &PlastikClient::captionPixmap() const
// not found, create new pixmap...
const uint maxCaptionLength = 300; // truncate captions longer than this!
- QString c(caption() );
+ TQString c(caption() );
if (c.length() > maxCaptionLength) {
c.truncate(maxCaptionLength);
c.append(" [...]");
}
- QFontMetrics fm(s_titleFont);
+ TQFontMetrics fm(s_titleFont);
int captionWidth = fm.width(c);
int captionHeight = fm.height();
const int th = layoutMetric(LM_TitleHeight, false) + layoutMetric(LM_TitleEdgeBottom, false);
- QPainter painter;
+ TQPainter painter;
const int thickness = 2;
- QPixmap *captionPixmap = new QPixmap(captionWidth+2*thickness, th);
+ TQPixmap *captionPixmap = new TQPixmap(captionWidth+2*thickness, th);
painter.begin(captionPixmap);
painter.drawTiledPixmap(captionPixmap->rect(),
Handler()->pixmap(TitleBarTile, active, isToolWindow()) );
painter.setFont(s_titleFont);
- QPoint tp(1, captionHeight-1);
+ TQPoint tp(1, captionHeight-1);
if(Handler()->titleShadow())
{
- QColor shadowColor;
+ TQColor shadowColor;
if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100)
- shadowColor = QColor(255, 255, 255);
+ shadowColor = TQColor(255, 255, 255);
else
- shadowColor = QColor(0,0,0);
+ shadowColor = TQColor(0,0,0);
painter.setPen(alphaBlendColors(options()->color(ColorTitleBar, active), shadowColor, 205) );
- painter.drawText(tp+QPoint(1,2), c);
+ painter.drawText(tp+TQPoint(1,2), c);
painter.setPen(alphaBlendColors(options()->color(ColorTitleBar, active), shadowColor, 225) );
- painter.drawText(tp+QPoint(2,2), c);
+ painter.drawText(tp+TQPoint(2,2), c);
painter.setPen(alphaBlendColors(options()->color(ColorTitleBar, active), shadowColor, 165) );
- painter.drawText(tp+QPoint(1,1), c);
+ painter.drawText(tp+TQPoint(1,1), c);
}
painter.setPen(Handler()->getColor(TitleFont,active) );
painter.drawText(tp, c );
diff --git a/kwin/clients/plastik/plastikclient.h b/kwin/clients/plastik/plastikclient.h
index 28b611b8e..e83bf75a5 100644
--- a/kwin/clients/plastik/plastikclient.h
+++ b/kwin/clients/plastik/plastikclient.h
@@ -37,35 +37,35 @@ public:
PlastikClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~PlastikClient();
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
- virtual QRegion cornerShape(WindowCorner corner);
+ virtual TQRegion cornerShape(WindowCorner corner);
virtual KCommonDecorationButton *createButton(ButtonType type);
virtual void init();
virtual void reset( unsigned long changed );
- virtual void paintEvent(QPaintEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
virtual void updateCaption();
- const QPixmap &getTitleBarTile(bool active) const;
+ const TQPixmap &getTitleBarTile(bool active) const;
private:
- QRect captionRect() const;
+ TQRect captionRect() const;
- const QPixmap &captionPixmap() const;
+ const TQPixmap &captionPixmap() const;
void clearCaptionPixmaps();
- mutable QPixmap *m_captionPixmaps[2];
+ mutable TQPixmap *m_captionPixmaps[2];
- QRect m_captionRect;
- QString oldCaption;
+ TQRect m_captionRect;
+ TQString oldCaption;
// settings...
- QFont s_titleFont;
+ TQFont s_titleFont;
};
} // KWinPlastik
diff --git a/kwin/clients/quartz/config/config.cpp b/kwin/clients/quartz/config/config.cpp
index 8c7070b9d..d15eb4da1 100644
--- a/kwin/clients/quartz/config/config.cpp
+++ b/kwin/clients/quartz/config/config.cpp
@@ -9,13 +9,13 @@
#include "config.h"
#include <kglobal.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new QuartzConfig(conf, parent));
}
@@ -26,31 +26,31 @@ 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
*/
-QuartzConfig::QuartzConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+QuartzConfig::QuartzConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
quartzConfig = new KConfig("kwinquartzrc");
KGlobal::locale()->insertCatalogue("kwin_clients");
- gb = new QVBox( parent );
- cbColorBorder = new QCheckBox(
+ gb = new TQVBox( parent );
+ cbColorBorder = new TQCheckBox(
i18n("Draw window frames using &titlebar colors"), gb );
- QWhatsThis::add( cbColorBorder,
+ 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.") );
- cbExtraSmall = new QCheckBox( i18n("Quartz &extra slim"), gb );
- QWhatsThis::add( cbExtraSmall,
+ cbExtraSmall = new TQCheckBox( i18n("Quartz &extra slim"), gb );
+ TQWhatsThis::add( cbExtraSmall,
i18n("Quartz window decorations with extra-small title bar.") );
// Load configuration options
load( conf );
// Ensure we track user changes properly
- connect( cbColorBorder, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) );
- connect( cbExtraSmall, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) );
+ connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
// Make the widgets visible in kwindecoration
gb->show();
diff --git a/kwin/clients/quartz/config/config.h b/kwin/clients/quartz/config/config.h
index 815cc9644..0a952c4e9 100644
--- a/kwin/clients/quartz/config/config.h
+++ b/kwin/clients/quartz/config/config.h
@@ -10,8 +10,8 @@
#ifndef __KDE_QUARTZCONFIG_H
#define __KDE_QUARTZCONFIG_H
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
#include <kconfig.h>
class QuartzConfig: public QObject
@@ -19,7 +19,7 @@ class QuartzConfig: public QObject
Q_OBJECT
public:
- QuartzConfig( KConfig* conf, QWidget* parent );
+ QuartzConfig( KConfig* conf, TQWidget* parent );
~QuartzConfig();
// These public signals/slots work similar to KCM modules
@@ -36,9 +36,9 @@ class QuartzConfig: public QObject
private:
KConfig* quartzConfig;
- QCheckBox* cbColorBorder;
- QCheckBox* cbExtraSmall;
- QVBox* gb;
+ TQCheckBox* cbColorBorder;
+ TQCheckBox* cbExtraSmall;
+ TQVBox* gb;
};
diff --git a/kwin/clients/quartz/quartz.cpp b/kwin/clients/quartz/quartz.cpp
index 857971780..82caabb45 100644
--- a/kwin/clients/quartz/quartz.cpp
+++ b/kwin/clients/quartz/quartz.cpp
@@ -19,10 +19,10 @@
#include <kglobal.h>
#include <klocale.h>
#include <kpixmapeffect.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include "quartz.h"
@@ -208,7 +208,7 @@ void QuartzHandler::readConfig()
// A small hack to make the on all desktops button look nicer
onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().contains( 'S' );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
onAllDesktopsButtonOnLeft = !onAllDesktopsButtonOnLeft;
switch(options()->preferredBorderSize(this)) {
case BorderLarge:
@@ -232,13 +232,13 @@ void QuartzHandler::readConfig()
borderWidth = extraSlim?2:4;
}
- normalTitleHeight = QFontMetrics(options()->font(true)).height();
+ normalTitleHeight = TQFontMetrics(options()->font(true)).height();
int nTH_limit=extraSlim?14:18;
- normalTitleHeight = QFontMetrics(options()->font(true)).height()-(extraSlim?1:0);
+ normalTitleHeight = TQFontMetrics(options()->font(true)).height()-(extraSlim?1:0);
if (normalTitleHeight < nTH_limit) normalTitleHeight = nTH_limit;
if (normalTitleHeight < borderWidth) normalTitleHeight = borderWidth;
- toolTitleHeight = QFontMetrics(options()->font(true, true)).height();
+ toolTitleHeight = TQFontMetrics(options()->font(true, true)).height();
if (toolTitleHeight < 12) toolTitleHeight = 12;
if (toolTitleHeight < borderWidth) toolTitleHeight = borderWidth;
}
@@ -246,9 +246,9 @@ void QuartzHandler::readConfig()
// This does the colour transition magic. (You say "Oh, is that it?")
// This may be made configurable at a later stage
-void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2 )
+void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2 )
{
- QPainter px;
+ TQPainter px;
px.begin( pi );
@@ -291,10 +291,10 @@ void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const QColor &c1, const
void QuartzHandler::createPixmaps()
{
// Obtain titlebar blend colours, and create the block stuff on pixmaps.
- QColorGroup g2 = options()->colorGroup(ColorTitleBlend, true);
- QColor c2 = g2.background();
+ TQColorGroup g2 = options()->colorGroup(ColorTitleBlend, true);
+ TQColor c2 = g2.background();
g2 = options()->colorGroup(ColorTitleBar, true );
- QColor c = g2.background().light(130);
+ TQColor c = g2.background().light(130);
titleBlocks = new KPixmap();
titleBlocks->resize( normalTitleHeight*25/18, normalTitleHeight );
@@ -310,8 +310,8 @@ void QuartzHandler::createPixmaps()
drawBlocks( ititleBlocks, *ititleBlocks, c, c2 );
// Set the on all desktops pin pixmaps;
- QColorGroup g;
- QPainter p;
+ TQColorGroup g;
+ TQPainter p;
g = options()->colorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, true );
c = onAllDesktopsButtonOnLeft ? g.background().light(130) : g.background();
@@ -370,9 +370,9 @@ void QuartzHandler::freePixmaps()
}
-QValueList< QuartzHandler::BorderSize > QuartzHandler::borderSizes() const
+TQValueList< QuartzHandler::BorderSize > QuartzHandler::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
@@ -381,7 +381,7 @@ QuartzButton::QuartzButton(ButtonType type, QuartzClient *parent, const char *na
: KCommonDecorationButton(type, parent, name)
{
// Eliminate any possible background flicker
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
deco = 0;
}
@@ -435,19 +435,19 @@ void QuartzButton::setBitmap(const unsigned char *bitmap)
deco = 0;
if (bitmap) {
- deco = new QBitmap(10, 10, bitmap, true);
+ deco = new TQBitmap(10, 10, bitmap, true);
deco->setMask( *deco );
repaint( false );
}
}
-void QuartzButton::drawButton(QPainter *p)
+void QuartzButton::drawButton(TQPainter *p)
{
// Never paint if the pixmaps have not been created
if (!quartz_initialized)
return;
- QColor c;
+ TQColor c;
if (isLeft() )
c = KDecoration::options()->color(KDecoration::ColorTitleBar, decoration()->isActive()).light(130);
@@ -469,7 +469,7 @@ void QuartzButton::drawButton(QPainter *p)
p->drawPixmap(isDown() ? xOff+1: xOff, isDown() ? yOff+1 : yOff, *deco);
} else
{
- QPixmap btnpix;
+ TQPixmap btnpix;
int Offset = 0;
if (type() == OnAllDesktopsButton)
@@ -484,12 +484,12 @@ void QuartzButton::drawButton(QPainter *p)
btnpix = isOn() ? *ipinDownPix : *ipinUpPix;
} else
- btnpix = decoration()->icon().pixmap( QIconSet::Small, QIconSet::Normal);
+ btnpix = decoration()->icon().pixmap( TQIconSet::Small, TQIconSet::Normal);
// Shrink the miniIcon for tiny titlebars.
if ( height() < 16)
{
- QPixmap tmpPix;
+ TQPixmap tmpPix;
// Smooth scale the image
tmpPix.convertFromImage( btnpix.convertToImage().smoothScale(height(), height()));
@@ -508,17 +508,17 @@ QuartzClient::QuartzClient(KDecorationBridge* bridge, KDecorationFactory* factor
{
}
-QString QuartzClient::visibleName() const
+TQString QuartzClient::visibleName() const
{
return i18n("Quartz");
}
-QString QuartzClient::defaultButtonsLeft() const
+TQString QuartzClient::defaultButtonsLeft() const
{
return "M";
}
-QString QuartzClient::defaultButtonsRight() const
+TQString QuartzClient::defaultButtonsRight() const
{
return "HIAX";
}
@@ -652,7 +652,7 @@ void QuartzClient::reset( unsigned long changed )
// Quartz Paint magic goes here.
-void QuartzClient::paintEvent( QPaintEvent* )
+void QuartzClient::paintEvent( TQPaintEvent* )
{
// Never paint if the pixmaps have not been created
if (!quartz_initialized)
@@ -660,11 +660,11 @@ void QuartzClient::paintEvent( QPaintEvent* )
const bool maxFull = (maximizeMode()==MaximizeFull) && !options()->moveResizeMaximizedWindows();
- QColorGroup g;
- QPainter p(widget());
+ TQColorGroup g;
+ TQPainter p(widget());
// Obtain widget bounds.
- QRect r(widget()->rect());
+ TQRect r(widget()->rect());
int x = r.x();
int y = r.y();
int x2 = r.width() - 1;
@@ -688,7 +688,7 @@ void QuartzClient::paintEvent( QPaintEvent* )
p.drawLine( x, y2, x2, y2 );
// Fill out the border edges
- QColor frameColor;
+ TQColor frameColor;
if ( coloredFrame)
frameColor = g.background().light(130);
else
@@ -730,19 +730,19 @@ void QuartzClient::paintEvent( QPaintEvent* )
const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom);
const int ttlHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1;
- r = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
+ r = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
// Obtain titlebar blend colours
- QColor c1 = options()->color(ColorTitleBar, isActive() ).light(130);
- QColor c2 = options()->color(ColorTitleBlend, isActive() );
+ TQColor c1 = options()->color(ColorTitleBar, isActive() ).light(130);
+ TQColor c2 = options()->color(ColorTitleBlend, isActive() );
// Create a disposable pixmap buffer for the titlebar
KPixmap* titleBuffer = new KPixmap;
titleBuffer->resize( maxFull?w-2:(w-2*(borderSize-1)), titleHeight );
- QPainter p2( titleBuffer, this );
+ TQPainter p2( titleBuffer, this );
// subtract titleBlocks pixmap width and some
int rightoffset = r.x()+r.width()-titleBlocks->width()-borderSize;
@@ -758,12 +758,12 @@ void QuartzClient::paintEvent( QPaintEvent* )
// Draw the title text on the pixmap, and with a smaller font
// for toolwindows than the default.
- QFont fnt;
+ TQFont fnt;
if ( largeButtons ) {
fnt = options()->font(true, false); // font not small
} else {
fnt = options()->font(true, true); // font small
- fnt.setWeight( QFont::Normal ); // and disable bold
+ fnt.setWeight( TQFont::Normal ); // and disable bold
}
p2.setFont( fnt );
diff --git a/kwin/clients/quartz/quartz.h b/kwin/clients/quartz/quartz.h
index 37f3dff6e..1133a7ae4 100644
--- a/kwin/clients/quartz/quartz.h
+++ b/kwin/clients/quartz/quartz.h
@@ -16,7 +16,7 @@
#ifndef __KDEGALLIUM_QUARTZ_H
#define __KDEGALLIUM_QUARTZ_H
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include "../../lib/kcommondecoration.h"
#include "../../lib/kdecorationfactory.h"
@@ -28,7 +28,7 @@ namespace Quartz {
class QuartzClient;
-class QuartzHandler: public QObject, public KDecorationFactory
+class QuartzHandler: public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -38,13 +38,13 @@ class QuartzHandler: public QObject, public KDecorationFactory
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool reset(unsigned long changed);
virtual bool supports( Ability ability );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
private:
void readConfig();
void createPixmaps();
void freePixmaps();
- void drawBlocks(KPixmap* pi, KPixmap &p, const QColor &c1, const QColor &c2);
+ void drawBlocks(KPixmap* pi, KPixmap &p, const TQColor &c1, const TQColor &c2);
};
@@ -58,9 +58,9 @@ class QuartzButton : public KCommonDecorationButton
void reset(unsigned long changed);
protected:
- void drawButton(QPainter *p);
+ void drawButton(TQPainter *p);
- QBitmap* deco;
+ TQBitmap* deco;
};
@@ -70,9 +70,9 @@ class QuartzClient : public KCommonDecoration
QuartzClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~QuartzClient() {;}
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
@@ -81,7 +81,7 @@ class QuartzClient : public KCommonDecoration
protected:
virtual void reset( unsigned long changed );
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
private:
int titleHeight, borderSize;
diff --git a/kwin/clients/redmond/redmond.cpp b/kwin/clients/redmond/redmond.cpp
index e41eb6353..7f74479ed 100644
--- a/kwin/clients/redmond/redmond.cpp
+++ b/kwin/clients/redmond/redmond.cpp
@@ -14,16 +14,16 @@
#include "redmond.h"
-#include <qdrawutil.h>
-#include <qdatetime.h>
+#include <tqdrawutil.h>
+#include <tqdatetime.h>
#include <kpixmapeffect.h>
#include <kimageeffect.h>
#include <kdrawutil.h>
#include <klocale.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqapplication.h>
namespace Redmond {
@@ -87,8 +87,8 @@ static KPixmap *iMiniBtnPix1;
static KPixmap *miniBtnDownPix1;
static KPixmap *iMiniBtnDownPix1;
-static QPixmap *defaultMenuPix;
-static QColor *btnForeground;
+static TQPixmap *defaultMenuPix;
+static TQColor *btnForeground;
static bool pixmaps_created = false;
static int toolTitleHeight;
@@ -100,9 +100,9 @@ static inline const KDecorationOptions *options()
return KDecoration::options();
}
-static void drawButtonFrame( KPixmap *pix, const QColorGroup &g, bool sunken )
+static void drawButtonFrame( KPixmap *pix, const TQColorGroup &g, bool sunken )
{
- QPainter p;
+ TQPainter p;
int x2 = pix->width() - 1;
int y2 = pix->height() - 1;
p.begin(pix);
@@ -136,7 +136,7 @@ static void create_pixmaps ()
pixmaps_created = true;
- bool highcolor = QPixmap::defaultDepth() > 8;
+ bool highcolor = TQPixmap::defaultDepth() > 8;
btnPix1 = new KPixmap;
btnDownPix1 = new KPixmap;
@@ -146,11 +146,11 @@ static void create_pixmaps ()
miniBtnDownPix1 = new KPixmap;
iMiniBtnPix1 = new KPixmap;
iMiniBtnDownPix1 = new KPixmap;
- defaultMenuPix = new QPixmap(kdelogo);
+ defaultMenuPix = new TQPixmap(kdelogo);
// buttons (active/inactive, sunken/unsunken)
- QColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true);
- QColor c = g.background();
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true);
+ TQColor c = g.background();
btnPix1->resize(normalTitleHeight, normalTitleHeight-2);
btnDownPix1->resize(normalTitleHeight, normalTitleHeight-2);
iBtnPix1->resize(normalTitleHeight, normalTitleHeight-2);
@@ -210,9 +210,9 @@ static void create_pixmaps ()
// Make sure button pixmaps contrast with the current colour scheme.
if (qGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 127)
- btnForeground = new QColor(Qt::black);
+ btnForeground = new TQColor(Qt::black);
else
- btnForeground = new QColor(Qt::white);
+ btnForeground = new TQColor(Qt::white);
}
void delete_pixmaps()
@@ -257,7 +257,7 @@ void RedmondButton::reset(unsigned long changed)
break;
case MenuButton:
{
- QPixmap miniIcon = decoration()->icon().pixmap(QIconSet::Small, QIconSet::Normal);
+ TQPixmap miniIcon = decoration()->icon().pixmap(TQIconSet::Small, TQIconSet::Normal);
if (!miniIcon.isNull()) {
setPixmap(miniIcon);
} else {
@@ -280,16 +280,16 @@ void RedmondButton::setBitmap(const unsigned char *bitmap)
pix.resize(0, 0);
if (bitmap)
- deco = QBitmap(10, 10, bitmap, true);
+ deco = TQBitmap(10, 10, bitmap, true);
else {
- deco = QBitmap(10,10);
+ deco = TQBitmap(10,10);
deco.fill(Qt::color0);
}
deco.setMask(deco);
}
-void RedmondButton::setPixmap( const QPixmap &p )
+void RedmondButton::setPixmap( const TQPixmap &p )
{
deco.resize(0, 0);
pix = p;
@@ -298,7 +298,7 @@ void RedmondButton::setPixmap( const QPixmap &p )
}
-void RedmondButton::drawButton(QPainter *p)
+void RedmondButton::drawButton(TQPainter *p)
{
if ( pix.isNull() ) {
if ( decoration()->isActive() ) {
@@ -327,7 +327,7 @@ void RedmondButton::drawButton(QPainter *p)
}
if ( type()==MenuButton && height() < 16) {
- QPixmap tmpPix;
+ TQPixmap tmpPix;
// Smooth scale the menu button pixmap
tmpPix.convertFromImage(
@@ -348,17 +348,17 @@ RedmondDeco::RedmondDeco(KDecorationBridge *b, KDecorationFactory *f)
{
}
-QString RedmondDeco::visibleName() const
+TQString RedmondDeco::visibleName() const
{
return i18n("Redmond");
}
-QString RedmondDeco::defaultButtonsLeft() const
+TQString RedmondDeco::defaultButtonsLeft() const
{
return "M";
}
-QString RedmondDeco::defaultButtonsRight() const
+TQString RedmondDeco::defaultButtonsRight() const
{
return "HIA_X";
}
@@ -463,19 +463,19 @@ void RedmondDeco::reset( unsigned long changed )
KCommonDecoration::reset(changed);
}
-void RedmondDeco::paintEvent( QPaintEvent* )
+void RedmondDeco::paintEvent( TQPaintEvent* )
{
- bool hicolor = QPixmap::defaultDepth() > 8;
+ bool hicolor = TQPixmap::defaultDepth() > 8;
int fontoffset = 1;
// Modify borderWith used by titlebar to 0, when maximized and not move or resize able
bool border = !(maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows());
int modBorderWidth = border ? borderWidth : 0;
- QPainter p(widget());
+ TQPainter p(widget());
// Obtain widget bounds.
- QRect r(widget()->rect());
+ TQRect r(widget()->rect());
int x = r.x();
int y = r.y();
int x2 = r.width()-1;
@@ -485,7 +485,7 @@ void RedmondDeco::paintEvent( QPaintEvent* )
// Draw part of the frame that is the frame color
// ==============================================
- QColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive());
+ TQColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive());
p.setPen( g.background() );
p.drawLine( x, y, x2-1, y );
p.drawLine( x, y, x, y2-1 );
@@ -520,15 +520,15 @@ void RedmondDeco::paintEvent( QPaintEvent* )
// Draw the title bar.
// ===================
r = titleRect();
-// QFontMetrics fm(options()->font(true));
+// TQFontMetrics fm(options()->font(true));
// Obtain blend colours.
- QColor c1 = options()->color(KDecoration::ColorTitleBar, isActive() );
- QColor c2 = options()->color(KDecoration::ColorTitleBlend, isActive() );
+ TQColor c1 = options()->color(KDecoration::ColorTitleBar, isActive() );
+ TQColor c2 = options()->color(KDecoration::ColorTitleBlend, isActive() );
- QFont fnt = options()->font(true, isToolWindow() );
+ TQFont fnt = options()->font(true, isToolWindow() );
if (isToolWindow() ) {
- fnt.setWeight( QFont::Normal );
+ fnt.setWeight( TQFont::Normal );
fontoffset = 0;
}
@@ -547,13 +547,13 @@ void RedmondDeco::paintEvent( QPaintEvent* )
} else {
// This enables dithering on 15 and 16bit displays, preventing
// some pretty horrible banding effects
- QImage image = KImageEffect::gradient(titleBuffer->size(), c1, c2,
+ TQImage image = KImageEffect::gradient(titleBuffer->size(), c1, c2,
KImageEffect::HorizontalGradient);
titleBuffer->convertFromImage(image, Qt::OrderedDither);
}
- QPainter p2( titleBuffer, this );
+ TQPainter p2( titleBuffer, this );
// Since drawing the gradient is (relatively) slow, it is best
// to draw the title text on the pixmap.
@@ -583,10 +583,10 @@ void RedmondDeco::paintEvent( QPaintEvent* )
}
void RedmondDecoFactory::readConfig() {
- normalTitleHeight = QFontMetrics(options()->font(true)).height();
- QFont toolFont = options()->font(true, true);
- toolFont.setWeight(QFont::Normal);
- toolTitleHeight = QFontMetrics(toolFont).height();
+ normalTitleHeight = TQFontMetrics(options()->font(true)).height();
+ TQFont toolFont = options()->font(true, true);
+ toolFont.setWeight(TQFont::Normal);
+ toolTitleHeight = TQFontMetrics(toolFont).height();
switch(options()->preferredBorderSize(this)) {
case BorderLarge:
borderWidth = 8;
@@ -670,9 +670,9 @@ bool RedmondDecoFactory::supports( Ability ability )
}
}
-QValueList< RedmondDecoFactory::BorderSize > RedmondDecoFactory::borderSizes() const
+TQValueList< RedmondDecoFactory::BorderSize > RedmondDecoFactory::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
diff --git a/kwin/clients/redmond/redmond.h b/kwin/clients/redmond/redmond.h
index 340fdd1b0..fdc5047bc 100644
--- a/kwin/clients/redmond/redmond.h
+++ b/kwin/clients/redmond/redmond.h
@@ -18,7 +18,7 @@
#ifndef __KDE_REDMOND_H
#define __KDE_REDMOND_H
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include <kcommondecoration.h>
#include <kdecorationfactory.h>
@@ -33,15 +33,15 @@ class RedmondButton : public KCommonDecorationButton
public:
RedmondButton(ButtonType type, RedmondDeco *parent, const char *name);
void setBitmap(const unsigned char *bitmap);
- void setPixmap(const QPixmap &p);
+ void setPixmap(const TQPixmap &p);
void reset(unsigned long changed);
protected:
- virtual void drawButton(QPainter *p);
- void drawButtonLabel(QPainter *){;}
+ virtual void drawButton(TQPainter *p);
+ void drawButtonLabel(TQPainter *){;}
- QBitmap deco;
- QPixmap pix;
+ TQBitmap deco;
+ TQPixmap pix;
bool miniBtn;
};
@@ -52,9 +52,9 @@ public:
RedmondDeco(KDecorationBridge *, KDecorationFactory *);
~RedmondDeco() {;}
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
@@ -64,13 +64,13 @@ public:
protected:
virtual void reset( unsigned long changed );
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
private:
int titleHeight;
};
-class RedmondDecoFactory : public QObject, public KDecorationFactory
+class RedmondDecoFactory : public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -79,7 +79,7 @@ public:
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();
};
diff --git a/kwin/clients/test/test.cpp b/kwin/clients/test/test.cpp
index abac77e64..a04437067 100644
--- a/kwin/clients/test/test.cpp
+++ b/kwin/clients/test/test.cpp
@@ -1,6 +1,6 @@
#include "test.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -20,16 +20,16 @@ void Decoration::init()
widget()->installEventFilter( this );
if( isCloseable())
{
- button = new QPushButton( widget());
+ button = new TQPushButton( widget());
button->show();
button->setCursor( arrowCursor );
button->move( 0, 0 );
- connect( button, SIGNAL( clicked()), SLOT( closeWindow()));
- QToolTip::add( button, "Zelva Mana" );
+ connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( closeWindow()));
+ TQToolTip::add( button, "Zelva Mana" );
}
}
-Decoration::MousePosition Decoration::mousePosition( const QPoint& p ) const
+Decoration::MousePosition Decoration::mousePosition( const TQPoint& p ) const
{
const int range = 16;
const int border = 4;
@@ -88,30 +88,30 @@ void Decoration::reset( unsigned long )
{
}
-void Decoration::resize( const QSize& s )
+void Decoration::resize( const TQSize& s )
{
widget()->resize( s );
}
-QSize Decoration::minimumSize() const
+TQSize Decoration::minimumSize() const
{
- return QSize( 100, 50 );
+ return TQSize( 100, 50 );
}
-bool Decoration::eventFilter( QObject* o, QEvent* e )
+bool Decoration::eventFilter( TQObject* o, TQEvent* e )
{
if( o == widget())
{
switch( e->type())
{
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{ // FRAME
- processMousePressEvent( static_cast< QMouseEvent* >( e ));
+ processMousePressEvent( static_cast< TQMouseEvent* >( e ));
return true;
}
- case QEvent::Show:
+ case TQEvent::Show:
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
break;
default:
break;
@@ -121,8 +121,8 @@ bool Decoration::eventFilter( QObject* o, QEvent* e )
}
}
-#include <qapplication.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
#include <X11/Xlib.h>
#include <math.h>
#include <unistd.h>
@@ -146,7 +146,7 @@ bool Decoration::animateMinimize(bool iconify)
helperShowHide( false );
qApp->syncX();
- QRect r = iconGeometry();
+ TQRect r = iconGeometry();
if (!r.isValid())
return true;
@@ -178,7 +178,7 @@ bool Decoration::animateMinimize(bool iconify)
double delta = finalAngle / steps;
- QPainter p( workspaceWidget());
+ TQPainter p( workspaceWidget());
p.setRasterOp(Qt::NotROP);
for (double angle = 0; ; angle += delta) {
@@ -190,10 +190,10 @@ bool Decoration::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();
@@ -240,12 +240,12 @@ bool Decoration::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++) {
@@ -271,21 +271,21 @@ bool Decoration::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
+ TQRegion( workspaceWidget()->rect()) - wingeom
);
#endif
diff --git a/kwin/clients/test/test.h b/kwin/clients/test/test.h
index 56e21dbc0..bfe36fa7c 100644
--- a/kwin/clients/test/test.h
+++ b/kwin/clients/test/test.h
@@ -3,7 +3,7 @@
#include <kdecoration.h>
#include <kdecorationfactory.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
namespace KWinTest
{
@@ -19,21 +19,21 @@ class Decoration
public:
Decoration( KDecorationBridge* bridge, KDecorationFactory* factory );
virtual void init();
- virtual MousePosition mousePosition( const QPoint& p ) const;
+ virtual MousePosition mousePosition( const TQPoint& p ) const;
virtual void borders( int& left, int& right, int& top, int& bottom ) const;
- virtual void resize( const QSize& s );
- virtual QSize minimumSize() const;
+ virtual void resize( const TQSize& s );
+ virtual TQSize minimumSize() const;
virtual void activeChange() {};
virtual void captionChange() {};
virtual void maximizeChange() {};
virtual void desktopChange() {};
virtual void shadeChange() {};
virtual void iconChange() {};
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
virtual void reset( unsigned long changed );
virtual bool animateMinimize( bool minimize );
private:
- QPushButton* button;
+ TQPushButton* button;
};
class Factory
diff --git a/kwin/clients/web/Web.cpp b/kwin/clients/web/Web.cpp
index 7d63b7d72..43d1b9f42 100644
--- a/kwin/clients/web/Web.cpp
+++ b/kwin/clients/web/Web.cpp
@@ -20,7 +20,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kconfig.h>
@@ -48,17 +48,17 @@ WebClient::~WebClient()
// Empty.
}
-QString WebClient::visibleName() const
+TQString WebClient::visibleName() const
{
return i18n("Web");
}
-QString WebClient::defaultButtonsLeft() const
+TQString WebClient::defaultButtonsLeft() const
{
return "S";
}
-QString WebClient::defaultButtonsRight() const
+TQString WebClient::defaultButtonsRight() const
{
return "HIAX";
}
@@ -156,7 +156,7 @@ WebClient::init()
{
// title height
const int textVMargin = 2;
- QFontMetrics fm(options()->font(isActive(), isToolWindow()));
+ TQFontMetrics fm(options()->font(isActive(), isToolWindow()));
// border size
switch(options()->preferredBorderSize( factory())) {
@@ -201,7 +201,7 @@ WebClient::reset( unsigned long changed )
// font has changed -- update title height
// title height
const int textVMargin = 2;
- QFontMetrics fm(options()->font(isActive(), isToolWindow()));
+ TQFontMetrics fm(options()->font(isActive(), isToolWindow()));
titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_);
if (0 != titleHeight_ % 2)
titleHeight_ += 1;
@@ -213,7 +213,7 @@ WebClient::reset( unsigned long changed )
}
void
-WebClient::paintEvent(QPaintEvent * pe)
+WebClient::paintEvent(TQPaintEvent * pe)
{
int r_x, r_y, r_x2, r_y2;
widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
@@ -223,12 +223,12 @@ WebClient::paintEvent(QPaintEvent * pe)
const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom);
const int ttlHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1;
- QRect titleRect = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
+ TQRect titleRect = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
titleRect.setTop(1);
- QPainter p(widget());
+ TQPainter p(widget());
p.setPen(Qt::black);
p.setBrush(options()->colorGroup(ColorFrame, isActive()).background());
@@ -291,38 +291,38 @@ void WebClient::updateWindowShape()
if (!shape_)
return;
- QRegion mask(0, 0, width(), height());
+ TQRegion mask(0, 0, width(), height());
int r(width());
int b(height());
// Remove top-left corner.
- 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 -= TQRegion(0, 0, 5, 1);
+ mask -= TQRegion(0, 1, 3, 1);
+ mask -= TQRegion(0, 2, 2, 1);
+ mask -= TQRegion(0, 3, 1, 2);
// Remove top-right corner.
- 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(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);
// Remove bottom-left corner.
- mask -= QRegion(0, b - 5, 1, 3);
- mask -= QRegion(0, b - 3, 2, 1);
- mask -= QRegion(0, b - 2, 3, 1);
- mask -= QRegion(0, b - 1, 5, 1);
+ mask -= TQRegion(0, b - 5, 1, 3);
+ mask -= TQRegion(0, b - 3, 2, 1);
+ mask -= TQRegion(0, b - 2, 3, 1);
+ mask -= TQRegion(0, b - 1, 5, 1);
// Remove bottom-right corner.
- mask -= QRegion(r - 5, b - 1, 5, 1);
- mask -= QRegion(r - 3, b - 2, 3, 1);
- mask -= QRegion(r - 2, b - 3, 2, 1);
- mask -= QRegion(r - 1, b - 5, 1, 2);
+ mask -= TQRegion(r - 5, b - 1, 5, 1);
+ mask -= TQRegion(r - 3, b - 2, 3, 1);
+ mask -= TQRegion(r - 2, b - 3, 2, 1);
+ mask -= TQRegion(r - 1, b - 5, 1, 2);
setMask(mask);
}
@@ -372,9 +372,9 @@ bool WebFactory::supports( Ability ability )
};
}
-QValueList< WebFactory::BorderSize > WebFactory::borderSizes() const
+TQValueList< WebFactory::BorderSize > WebFactory::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
diff --git a/kwin/clients/web/Web.h b/kwin/clients/web/Web.h
index 183829e8d..7d7d53bfb 100644
--- a/kwin/clients/web/Web.h
+++ b/kwin/clients/web/Web.h
@@ -42,9 +42,9 @@ namespace Web
WebClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~WebClient();
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
@@ -56,7 +56,7 @@ namespace Web
protected:
virtual void reset( unsigned long changed );
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
private:
@@ -64,10 +64,10 @@ namespace Web
bool shape_;
- QBitmap _buttonBitmap(ButtonType t) const;
+ TQBitmap _buttonBitmap(ButtonType t) const;
};
- class WebFactory : public QObject, public KDecorationFactory
+ class WebFactory : public TQObject, public KDecorationFactory
{
Q_OBJECT
@@ -78,7 +78,7 @@ namespace Web
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool reset( unsigned long changed );
virtual bool supports( Ability ability );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
};
}
diff --git a/kwin/clients/web/WebButton.cpp b/kwin/clients/web/WebButton.cpp
index 66bedc19f..61811accc 100644
--- a/kwin/clients/web/WebButton.cpp
+++ b/kwin/clients/web/WebButton.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "WebButton.h"
#include "Web.h"
@@ -124,35 +124,35 @@ void WebButton::reset(unsigned long changed)
}
void
-WebButton::enterEvent(QEvent * e)
+WebButton::enterEvent(TQEvent * e)
{
mouseOver_ = true;
repaint();
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
}
void
-WebButton::leaveEvent(QEvent * e)
+WebButton::leaveEvent(TQEvent * e)
{
mouseOver_ = false;
repaint();
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
}
void
-WebButton::drawButton(QPainter *p)
+WebButton::drawButton(TQPainter *p)
{
- QPen highlightPen;
+ TQPen highlightPen;
if (isDown() )
- highlightPen = QPen(colorGroup().light());
+ highlightPen = TQPen(colorGroup().light());
else
{
if (mouseOver_)
- highlightPen = QPen(colorGroup().highlight());
+ highlightPen = TQPen(colorGroup().highlight());
else
- highlightPen = QPen(NoPen);
+ highlightPen = TQPen(NoPen);
}
p->fillRect(rect(), colorGroup().background());
@@ -188,7 +188,7 @@ WebButton::drawButton(QPainter *p)
p->setPen(highlightPen);
if (shape_)
- p->setClipRegion(QRegion(rect()) - QRect(0, 0, 6, 6));
+ p->setClipRegion(TQRegion(rect()) - TQRect(0, 0, 6, 6));
p->drawRect(2, 2, width() - 4, height() - 4);
if (shape_)
@@ -224,7 +224,7 @@ WebButton::drawButton(QPainter *p)
p->setPen(highlightPen);
if (shape_)
- p->setClipRegion(QRegion(rect()) - QRect(width() - 6, 0, 6, 6));
+ p->setClipRegion(TQRegion(rect()) - TQRect(width() - 6, 0, 6, 6));
p->drawRect(2, 2, width() - 4, height() - 4);
if (shape_)
@@ -260,7 +260,7 @@ WebButton::drawButton(QPainter *p)
// Draw icon.
- QPoint center(rect().center());
+ TQPoint center(rect().center());
int bwby2(bitmap_.width() / 2); // Bitmap Width BY 2
int bhby2(bitmap_.height() / 2); // Bitmap Height BY 2
@@ -275,9 +275,9 @@ WebButton::drawButton(QPainter *p)
WebButton::setBitmap(const unsigned char *bitmap)
{
if (bitmap)
- bitmap_ = QBitmap(8,8, bitmap, true);
+ bitmap_ = TQBitmap(8,8, bitmap, true);
else
- bitmap_ = QBitmap(8,8);
+ bitmap_ = TQBitmap(8,8);
bitmap_.setMask(bitmap_);
}
diff --git a/kwin/clients/web/WebButton.h b/kwin/clients/web/WebButton.h
index 6c1530f42..da94ea3f7 100644
--- a/kwin/clients/web/WebButton.h
+++ b/kwin/clients/web/WebButton.h
@@ -22,8 +22,8 @@
#ifndef KWIN_WEB_BUTTON_H
#define KWIN_WEB_BUTTON_H
-#include <qwidget.h>
-#include <qbitmap.h>
+#include <tqwidget.h>
+#include <tqbitmap.h>
#include <klocale.h>
#include "../../lib/kcommondecoration.h"
@@ -50,12 +50,12 @@ namespace Web
protected:
void setBitmap(const unsigned char *bitmap);
- void enterEvent(QEvent *);
- void leaveEvent(QEvent *);
- void drawButton(QPainter *p);
+ void enterEvent(TQEvent *);
+ void leaveEvent(TQEvent *);
+ void drawButton(TQPainter *p);
private:
- QBitmap bitmap_;
+ TQBitmap bitmap_;
bool mouseOver_;
diff --git a/kwin/data/update_default_rules.cpp b/kwin/data/update_default_rules.cpp
index 78adc6164..e43323ec9 100644
--- a/kwin/data/update_default_rules.cpp
+++ b/kwin/data/update_default_rules.cpp
@@ -21,7 +21,7 @@ int main( int argc, char* argv[] )
if( argc != 2 )
return 1;
KInstance inst( "kwin_update_default_rules" );
- QString file = locate( "data", QString( "kwin/default_rules/" ) + argv[ 1 ] );
+ TQString file = locate( "data", TQString( "kwin/default_rules/" ) + argv[ 1 ] );
if( file.isEmpty())
{
kdWarning() << "File " << argv[ 1 ] << " not found!" << endl;
@@ -37,11 +37,11 @@ int main( int argc, char* argv[] )
group <= count;
++group )
{
- QMap< QString, QString > entries = src_cfg.entryMap( QString::number( group ));
+ TQMap< TQString, TQString > entries = src_cfg.entryMap( TQString::number( group ));
++pos;
- dest_cfg.deleteGroup( QString::number( pos ));
- dest_cfg.setGroup( QString::number( pos ));
- for( QMap< QString, QString >::ConstIterator it = entries.begin();
+ dest_cfg.deleteGroup( TQString::number( pos ));
+ dest_cfg.setGroup( TQString::number( pos ));
+ for( TQMap< TQString, TQString >::ConstIterator it = entries.begin();
it != entries.end();
++it )
dest_cfg.writeEntry( it.key(), *it );
diff --git a/kwin/data/update_window_settings.cpp b/kwin/data/update_window_settings.cpp
index 369c1e4ea..0a39850d7 100644
--- a/kwin/data/update_window_settings.cpp
+++ b/kwin/data/update_window_settings.cpp
@@ -17,16 +17,16 @@ License. See the file "COPYING" for the exact licensing terms.
struct SessionInfo
{
- QCString sessionId;
- QCString windowRole;
- QCString wmCommand;
- QCString wmClientMachine;
- QCString resourceName;
- QCString resourceClass;
+ TQCString sessionId;
+ TQCString windowRole;
+ TQCString wmCommand;
+ TQCString wmClientMachine;
+ TQCString resourceName;
+ TQCString resourceClass;
- QRect geometry;
- QRect restore;
- QRect fsrestore;
+ TQRect geometry;
+ TQRect restore;
+ TQRect fsrestore;
int maximized;
int fullscreen;
int desktop;
@@ -43,7 +43,7 @@ struct SessionInfo
bool fake; // fake session, i.e. 'save window settings', not SM restored
};
-QPtrList<SessionInfo> fakeSession;
+TQPtrList<SessionInfo> fakeSession;
static const char* const window_type_names[] =
{
@@ -69,28 +69,28 @@ void loadFakeSessionInfo( KConfig* config )
int count = config->readNumEntry( "count" );
for ( int i = 1; i <= count; i++ )
{
- QString n = QString::number(i);
+ TQString n = TQString::number(i);
SessionInfo* info = new SessionInfo;
fakeSession.append( info );
- info->windowRole = config->readEntry( QString("windowRole")+n ).latin1();
- info->resourceName = config->readEntry( QString("resourceName")+n ).latin1();
- info->resourceClass = config->readEntry( QString("resourceClass")+n ).lower().latin1();
- info->wmClientMachine = config->readEntry( QString("clientMachine")+n ).latin1();
- info->geometry = config->readRectEntry( QString("geometry")+n );
- info->restore = config->readRectEntry( QString("restore")+n );
- info->fsrestore = config->readRectEntry( QString("fsrestore")+n );
- info->maximized = config->readNumEntry( QString("maximize")+n, 0 );
- info->fullscreen = config->readNumEntry( QString("fullscreen")+n, 0 );
- info->desktop = config->readNumEntry( QString("desktop")+n, 0 );
- info->minimized = config->readBoolEntry( QString("iconified")+n, FALSE );
- info->onAllDesktops = config->readBoolEntry( QString("sticky")+n, FALSE );
- info->shaded = config->readBoolEntry( QString("shaded")+n, FALSE );
- info->keepAbove = config->readBoolEntry( QString("staysOnTop")+n, FALSE );
- info->keepBelow = config->readBoolEntry( QString("keepBelow")+n, FALSE );
- info->skipTaskbar = config->readBoolEntry( QString("skipTaskbar")+n, FALSE );
- info->skipPager = config->readBoolEntry( QString("skipPager")+n, FALSE );
- info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE );
- info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1());
+ info->windowRole = config->readEntry( TQString("windowRole")+n ).latin1();
+ info->resourceName = config->readEntry( TQString("resourceName")+n ).latin1();
+ info->resourceClass = config->readEntry( TQString("resourceClass")+n ).lower().latin1();
+ info->wmClientMachine = config->readEntry( TQString("clientMachine")+n ).latin1();
+ info->geometry = config->readRectEntry( TQString("geometry")+n );
+ info->restore = config->readRectEntry( TQString("restore")+n );
+ info->fsrestore = config->readRectEntry( TQString("fsrestore")+n );
+ info->maximized = config->readNumEntry( TQString("maximize")+n, 0 );
+ info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 );
+ info->desktop = config->readNumEntry( TQString("desktop")+n, 0 );
+ info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE );
+ info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE );
+ info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE );
+ info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE );
+ info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE );
+ info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE );
+ info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE );
+ info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE );
+ info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1());
info->active = false;
info->fake = true;
}
@@ -106,7 +106,7 @@ void writeRules( KConfig& cfg )
if( info->resourceName.isEmpty() && info->resourceClass.isEmpty())
continue;
++pos;
- cfg.setGroup( QString::number( pos ));
+ cfg.setGroup( TQString::number( pos ));
cfg.writeEntry( "description", ( const char* ) ( info->resourceClass + " (KDE3.2)" ));
cfg.writeEntry( "wmclass", ( const char* )( info->resourceName + ' ' + info->resourceClass ));
cfg.writeEntry( "wmclasscomplete", true );
diff --git a/kwin/events.cpp b/kwin/events.cpp
index 039c760b4..ba6321a7c 100644
--- a/kwin/events.cpp
+++ b/kwin/events.cpp
@@ -22,9 +22,9 @@ License. See the file "COPYING" for the exact licensing terms.
#include "group.h"
#include "rules.h"
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kkeynative.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <X11/extensions/shape.h>
#include <X11/Xatom.h>
@@ -289,7 +289,7 @@ bool Workspace::workspaceEvent( XEvent * e )
{
case CreateNotify:
if ( e->xcreatewindow.parent == root &&
- !QWidget::find( e->xcreatewindow.window) &&
+ !TQWidget::find( e->xcreatewindow.window) &&
!e->xcreatewindow.override_redirect )
{
// see comments for allowClientActivation()
@@ -365,7 +365,7 @@ bool Workspace::workspaceEvent( XEvent * e )
c = createClient( e->xmaprequest.window, false );
if ( c != NULL && root != qt_xrootwin() )
{ // TODO what is this?
- // TODO may use QWidget::create
+ // TODO may use TQWidget::create
XReparentWindow( qt_xdisplay(), c->frameId(), root, 0, 0 );
}
if( c == NULL ) // refused to manage, simply map it (most probably override redirect)
@@ -382,11 +382,11 @@ bool Workspace::workspaceEvent( XEvent * e )
}
case EnterNotify:
{
- if ( QWhatsThis::inWhatsThisMode() )
+ if ( TQWhatsThis::inWhatsThisMode() )
{
- QWidget* w = QWidget::find( e->xcrossing.window );
+ TQWidget* w = TQWidget::find( e->xcrossing.window );
if ( w )
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::leaveWhatsThisMode();
}
if( electricBorder(e))
return true;
@@ -394,12 +394,12 @@ bool Workspace::workspaceEvent( XEvent * e )
}
case LeaveNotify:
{
- if ( !QWhatsThis::inWhatsThisMode() )
+ if ( !TQWhatsThis::inWhatsThisMode() )
break;
// TODO is this cliente ever found, given that client events are searched above?
Client* c = findClient( FrameIdMatchPredicate( e->xcrossing.window ));
if ( c && e->xcrossing.detail != NotifyInferior )
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::leaveWhatsThisMode();
break;
}
case ConfigureRequest:
@@ -430,7 +430,7 @@ bool Workspace::workspaceEvent( XEvent * e )
return FALSE;
break;
case FocusIn:
- if( e->xfocus.window == rootWin() && QCString( getenv("KDE_MULTIHEAD")).lower() != "true"
+ if( e->xfocus.window == rootWin() && TQCString( getenv("KDE_MULTIHEAD")).lower() != "true"
&& ( e->xfocus.detail == NotifyDetailNone || e->xfocus.detail == NotifyPointerRoot ))
{
updateXTime(); // focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp)
@@ -583,7 +583,7 @@ bool Client::windowEvent( XEvent* e )
case MotionNotify:
motionNotifyEvent( e->xmotion.window, e->xmotion.state,
e->xmotion.x, e->xmotion.y, e->xmotion.x_root, e->xmotion.y_root );
- workspace()->updateFocusMousePosition( QPoint( e->xmotion.x_root, e->xmotion.y_root ));
+ workspace()->updateFocusMousePosition( TQPoint( e->xmotion.x_root, e->xmotion.y_root ));
break;
case EnterNotify:
enterNotifyEvent( &e->xcrossing );
@@ -594,14 +594,14 @@ bool Client::windowEvent( XEvent* e )
// events simpler (Qt does that too).
motionNotifyEvent( e->xcrossing.window, e->xcrossing.state,
e->xcrossing.x, e->xcrossing.y, e->xcrossing.x_root, e->xcrossing.y_root );
- workspace()->updateFocusMousePosition( QPoint( e->xcrossing.x_root, e->xcrossing.y_root ));
+ workspace()->updateFocusMousePosition( TQPoint( e->xcrossing.x_root, e->xcrossing.y_root ));
break;
case LeaveNotify:
motionNotifyEvent( e->xcrossing.window, e->xcrossing.state,
e->xcrossing.x, e->xcrossing.y, e->xcrossing.x_root, e->xcrossing.y_root );
leaveNotifyEvent( &e->xcrossing );
// not here, it'd break following enter notify handling
- // workspace()->updateFocusMousePosition( QPoint( e->xcrossing.x_root, e->xcrossing.y_root ));
+ // workspace()->updateFocusMousePosition( TQPoint( e->xcrossing.x_root, e->xcrossing.y_root ));
break;
case FocusIn:
focusInEvent( &e->xfocus );
@@ -879,8 +879,8 @@ void Client::enterNotifyEvent( XCrossingEvent* e )
if (options->shadeHover && isShade())
{
delete shadeHoverTimer;
- shadeHoverTimer = new QTimer( this );
- connect( shadeHoverTimer, SIGNAL( timeout() ), this, SLOT( shadeHover() ));
+ shadeHoverTimer = new TQTimer( this );
+ connect( shadeHoverTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( shadeHover() ));
shadeHoverTimer->start( options->shadeHoverInterval, TRUE );
}
@@ -892,12 +892,12 @@ void Client::enterNotifyEvent( XCrossingEvent* e )
workspace()->topClientOnDesktop( workspace()->currentDesktop()) != this )
{
delete autoRaiseTimer;
- autoRaiseTimer = new QTimer( this );
- connect( autoRaiseTimer, SIGNAL( timeout() ), this, SLOT( autoRaise() ) );
+ autoRaiseTimer = new TQTimer( this );
+ connect( autoRaiseTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoRaise() ) );
autoRaiseTimer->start( options->autoRaiseInterval, TRUE );
}
- QPoint currentPos( e->x_root, e->y_root );
+ TQPoint currentPos( e->x_root, e->y_root );
if ( options->focusPolicy != Options::FocusStrictlyUnderMouse && ( isDesktop() || isDock() || isTopMenu() ) )
return;
// for FocusFollowsMouse, change focus only if the mouse has actually been moved, not if the focus
@@ -925,7 +925,7 @@ void Client::leaveNotifyEvent( XCrossingEvent* e )
mode = PositionCenter;
setCursor( arrowCursor );
}
- bool lostMouse = !rect().contains( QPoint( e->x, e->y ) );
+ bool lostMouse = !rect().contains( TQPoint( e->x, e->y ) );
// 'lostMouse' wouldn't work with e.g. B2 or Keramik, which have non-rectangular decorations
// (i.e. the LeaveNotify event comes before leaving the rect and no LeaveNotify event
// comes after leaving the rect) - so lets check if the pointer is really outside the window
@@ -1076,41 +1076,41 @@ int qtToX11State( Qt::ButtonState state )
// Qt propagates mouse events up the widget hierachy, which means events
// for the decoration window cannot be (easily) intercepted as X11 events
-bool Client::eventFilter( QObject* o, QEvent* e )
+bool Client::eventFilter( TQObject* o, TQEvent* e )
{
if( decoration == NULL
|| o != decoration->widget())
return false;
- if( e->type() == QEvent::MouseButtonPress )
+ if( e->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent* ev = static_cast< QMouseEvent* >( e );
+ TQMouseEvent* ev = static_cast< TQMouseEvent* >( e );
return buttonPressEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
- if( e->type() == QEvent::MouseButtonRelease )
+ if( e->type() == TQEvent::MouseButtonRelease )
{
- QMouseEvent* ev = static_cast< QMouseEvent* >( e );
+ TQMouseEvent* ev = static_cast< TQMouseEvent* >( e );
return buttonReleaseEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
- if( e->type() == QEvent::MouseMove ) // FRAME i fake z enter/leave?
+ if( e->type() == TQEvent::MouseMove ) // FRAME i fake z enter/leave?
{
- QMouseEvent* ev = static_cast< QMouseEvent* >( e );
+ TQMouseEvent* ev = static_cast< TQMouseEvent* >( e );
return motionNotifyEvent( decorationId(), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
- if( e->type() == QEvent::Wheel )
+ if( e->type() == TQEvent::Wheel )
{
- QWheelEvent* ev = static_cast< QWheelEvent* >( e );
+ TQWheelEvent* ev = static_cast< TQWheelEvent* >( e );
bool r = buttonPressEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
r = r || buttonReleaseEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
return r;
}
- if( e->type() == QEvent::Resize )
+ if( e->type() == TQEvent::Resize )
{
- QResizeEvent* ev = static_cast< QResizeEvent* >( e );
+ TQResizeEvent* ev = static_cast< TQResizeEvent* >( e );
// Filter out resize events that inform about size different than frame size.
// This will ensure that decoration->width() etc. and decoration->widget()->width() will be in sync.
// These events only seem to be delayed events from initial resizing before show() was called
@@ -1204,7 +1204,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in
}
if( was_action )
{
- bool replay = performMouseCommand( com, QPoint( x_root, y_root), perform_handled );
+ bool replay = performMouseCommand( com, TQPoint( x_root, y_root), perform_handled );
if ( isSpecialWindow())
replay = TRUE;
@@ -1247,20 +1247,20 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int
&& com != Options::MouseOperationsMenu // actions where it's not possible to get the matching
&& com != Options::MouseMinimize ) // mouse release event
{
- mode = mousePosition( QPoint( x, y ));
+ mode = mousePosition( TQPoint( x, y ));
buttonDown = TRUE;
- moveOffset = QPoint( x, y );
+ moveOffset = TQPoint( x, y );
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = false;
setCursor( mode ); // update to sizeAllCursor if about to move
}
- performMouseCommand( com, QPoint( x_root, y_root ));
+ performMouseCommand( com, TQPoint( x_root, y_root ));
}
// called from decoration
-void Client::processMousePressEvent( QMouseEvent* e )
+void Client::processMousePressEvent( TQMouseEvent* e )
{
- if( e->type() != QEvent::MouseButtonPress )
+ if( e->type() != TQEvent::MouseButtonPress )
{
kdWarning() << "processMousePressEvent()" << endl;
return;
@@ -1304,7 +1304,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int
{
finishMoveResize( false );
// mouse position is still relative to old Client position, adjust it
- QPoint mousepos( x_root - x, y_root - y );
+ TQPoint mousepos( x_root - x, y_root - y );
mode = mousePosition( mousepos );
}
setCursor( mode );
@@ -1353,7 +1353,7 @@ bool Client::motionNotifyEvent( Window w, int /*state*/, int x, int y, int x_roo
return true; // care only about the whole frame
if ( !buttonDown )
{
- Position newmode = mousePosition( QPoint( x, y ));
+ Position newmode = mousePosition( TQPoint( x, y ));
if( newmode != mode )
setCursor( newmode );
mode = newmode;
@@ -1452,7 +1452,7 @@ void Client::focusOutEvent( XFocusOutEvent* e )
&& e->detail != NotifyNonlinearVirtual )
// SELI check all this
return; // hack for motif apps like netscape
- if ( QApplication::activePopupWidget() )
+ if ( TQApplication::activePopupWidget() )
return;
if( !check_follows_focusin( this ))
setActive( FALSE );
@@ -1462,7 +1462,7 @@ void Client::focusOutEvent( XFocusOutEvent* e )
void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
{
if( direction == NET::Move )
- performMouseCommand( Options::MouseMove, QPoint( x_root, y_root ));
+ performMouseCommand( Options::MouseMove, TQPoint( x_root, y_root ));
else if( moveResizeMode && direction == NET::MoveResizeCancel )
{
finishMoveResize( true );
@@ -1487,7 +1487,7 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
if( moveResizeMode )
finishMoveResize( false );
buttonDown = TRUE;
- moveOffset = QPoint( x_root - x(), y_root - y()); // map from global
+ moveOffset = TQPoint( x_root - x(), y_root - y()); // map from global
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = false;
mode = convert[ direction ];
@@ -1500,12 +1500,12 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
}
else if( direction == NET::KeyboardMove )
{ // ignore mouse coordinates given in the message, mouse position is used by the moving algorithm
- QCursor::setPos( geometry().center() );
+ TQCursor::setPos( geometry().center() );
performMouseCommand( Options::MouseUnrestrictedMove, geometry().center());
}
else if( direction == NET::KeyboardSize )
{ // ignore mouse coordinates given in the message, mouse position is used by the resizing algorithm
- QCursor::setPos( geometry().bottomRight());
+ TQCursor::setPos( geometry().bottomRight());
performMouseCommand( Options::MouseUnrestrictedResize, geometry().bottomRight());
}
}
@@ -1519,7 +1519,7 @@ void Client::keyPressEvent( uint key_code )
bool is_alt = key_code & Qt::ALT;
key_code = key_code & 0xffff;
int delta = is_control?1:is_alt?32:8;
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
switch ( key_code )
{
case Key_Left:
@@ -1549,7 +1549,7 @@ void Client::keyPressEvent( uint key_code )
default:
return;
}
- QCursor::setPos( pos );
+ TQCursor::setPos( pos );
}
// ****************************************
diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index 4aa520d6f..f531bdfb8 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kapplication.h>
#include <kglobal.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kwin.h>
#include "placement.h"
@@ -44,7 +44,7 @@ namespace KWinInternal
void Workspace::desktopResized()
{
//printf("Workspace::desktopResized()\n\r");
- QRect geom = KApplication::desktop()->geometry();
+ TQRect geom = KApplication::desktop()->geometry();
NETSize desktop_geometry;
desktop_geometry.width = geom.width();
desktop_geometry.height = geom.height();
@@ -60,7 +60,7 @@ void Workspace::desktopResized()
void Workspace::kDestopResized()
{
//printf("Workspace::kDesktopResized()\n\r");
- QRect geom = KApplication::desktop()->geometry();
+ TQRect geom = KApplication::desktop()->geometry();
NETSize desktop_geometry;
desktop_geometry.width = geom.width();
desktop_geometry.height = geom.height();
@@ -84,13 +84,13 @@ void Workspace::kDestopResized()
void Workspace::updateClientArea( bool force )
{
- QDesktopWidget *desktopwidget = KApplication::desktop();
+ TQDesktopWidget *desktopwidget = KApplication::desktop();
int nscreens = desktopwidget -> numScreens ();
// kdDebug () << "screens: " << nscreens << endl;
- QRect* new_wareas = new QRect[ numberOfDesktops() + 1 ];
- QRect** new_sareas = new QRect*[ numberOfDesktops() + 1];
- QRect* screens = new QRect [ nscreens ];
- QRect desktopArea = desktopwidget -> geometry ();
+ TQRect* new_wareas = new QRect[ numberOfDesktops() + 1 ];
+ TQRect** new_sareas = new TQRect*[ numberOfDesktops() + 1];
+ TQRect* screens = new TQRect [ nscreens ];
+ TQRect desktopArea = desktopwidget -> geometry ();
for( int iS = 0;
iS < nscreens;
iS ++ )
@@ -102,7 +102,7 @@ void Workspace::updateClientArea( bool force )
++i )
{
new_wareas[ i ] = desktopArea;
- new_sareas[ i ] = new QRect [ nscreens ];
+ new_sareas[ i ] = new TQRect [ nscreens ];
for( int iS = 0;
iS < nscreens;
iS ++ )
@@ -112,7 +112,7 @@ void Workspace::updateClientArea( bool force )
{
if( !(*it)->hasStrut())
continue;
- QRect r = (*it)->adjustedClientArea( desktopArea, desktopArea );
+ TQRect r = (*it)->adjustedClientArea( desktopArea, desktopArea );
if( (*it)->isOnAllDesktops())
for( int i = 1;
i <= numberOfDesktops();
@@ -156,7 +156,7 @@ void Workspace::updateClientArea( bool force )
// TODO topmenu update for screenarea changes?
if( topmenu_space != NULL )
{
- QRect topmenu_area = desktopArea;
+ TQRect topmenu_area = desktopArea;
topmenu_area.setTop( topMenuHeight());
for( int i = 1;
i <= numberOfDesktops();
@@ -228,15 +228,15 @@ void Workspace::updateClientArea()
\sa geometry()
*/
-QRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) const
+TQRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) const
{
if( desktop == NETWinInfo::OnAllDesktops || desktop == 0 )
desktop = currentDesktop();
- QDesktopWidget *desktopwidget = kapp->desktop();
- QRect sarea = screenarea // may be NULL during KWin initialization
+ TQDesktopWidget *desktopwidget = kapp->desktop();
+ TQRect sarea = screenarea // may be NULL during KWin initialization
? screenarea[ desktop ][ screen ]
: desktopwidget->screenGeometry( screen );
- QRect warea = workarea[ desktop ].isNull()
+ TQRect warea = workarea[ desktop ].isNull()
? kapp->desktop()->geometry()
: workarea[ desktop ];
switch (opt)
@@ -292,19 +292,19 @@ QRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) con
return desktopwidget->screenGeometry( screen );
}
assert( false );
- return QRect();
+ return TQRect();
}
-QRect Workspace::clientArea( clientAreaOption opt, const QPoint& p, int desktop ) const
+TQRect Workspace::clientArea( clientAreaOption opt, const TQPoint& p, int desktop ) const
{
- QDesktopWidget *desktopwidget = KApplication::desktop();
+ TQDesktopWidget *desktopwidget = KApplication::desktop();
int screen = desktopwidget->screenNumber( p );
if( screen < 0 )
screen = desktopwidget->primaryScreen();
return clientArea( opt, screen, desktop );
}
-QRect Workspace::clientArea( clientAreaOption opt, const Client* c ) const
+TQRect Workspace::clientArea( clientAreaOption opt, const Client* c ) const
{
return clientArea( opt, c->geometry().center(), c->desktop());
}
@@ -315,7 +315,7 @@ QRect Workspace::clientArea( clientAreaOption opt, const Client* c ) const
workspace the opportunity to interveniate and to implement
snap-to-windows functionality.
*/
-QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
+TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
{
//CT 16mar98, 27May98 - magics: BorderSnapZone, WindowSnapZone
//CT adapted for kwin on 25Nov1999
@@ -323,7 +323,7 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
if (options->windowSnapZone || options->borderSnapZone )
{
const bool sOWO=options->snapOnlyWhenOverlapping;
- const QRect maxRect = clientArea(MovementArea, pos+c->rect().center(), c->desktop());
+ const TQRect maxRect = clientArea(MovementArea, pos+c->rect().center(), c->desktop());
const int xmin = maxRect.left();
const int xmax = maxRect.right()+1; //desk size
const int ymin = maxRect.top();
@@ -373,7 +373,7 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
snap = options->windowSnapZone;
if (snap)
{
- QValueList<Client *>::ConstIterator l;
+ TQValueList<Client *>::ConstIterator l;
for (l = clients.begin();l != clients.end();++l )
{
if ((*l)->isOnDesktop(currentDesktop()) &&
@@ -420,12 +420,12 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
}
}
}
- pos = QPoint(nx, ny);
+ pos = TQPoint(nx, ny);
}
return pos;
}
-QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
+TQRect Workspace::adjustClientSize( Client* c, TQRect moveResizeGeom, int mode )
{
//adapted from adjustClientPosition on 29May2004
//this function is called when resizing a window and will modify
@@ -434,7 +434,7 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
{
const bool sOWO=options->snapOnlyWhenOverlapping;
- const QRect maxRect = clientArea(MovementArea, c->rect().center(), c->desktop());
+ const TQRect maxRect = clientArea(MovementArea, c->rect().center(), c->desktop());
const int xmin = maxRect.left();
const int xmax = maxRect.right(); //desk size
const int ymin = maxRect.top();
@@ -530,7 +530,7 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
{
deltaX = int(snap);
deltaY = int(snap);
- QValueList<Client *>::ConstIterator l;
+ TQValueList<Client *>::ConstIterator l;
for (l = clients.begin();l != clients.end();++l )
{
if ((*l)->isOnDesktop(currentDesktop()) &&
@@ -616,7 +616,7 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
}
}
}
- moveResizeGeom = QRect(QPoint(newcx, newcy), QPoint(newrx, newry));
+ moveResizeGeom = TQRect(TQPoint(newcx, newcy), TQPoint(newrx, newry));
}
return moveResizeGeom;
}
@@ -644,7 +644,7 @@ void Workspace::cascadeDesktop()
Q_ASSERT( block_stacking_updates == 0 );
ClientList::ConstIterator it(stackingOrder().begin());
initPositioning->reinitCascading( currentDesktop());
- QRect area = clientArea( PlacementArea, QPoint( 0, 0 ), currentDesktop());
+ TQRect area = clientArea( PlacementArea, TQPoint( 0, 0 ), currentDesktop());
for (; it != stackingOrder().end(); ++it)
{
if((!(*it)->isOnDesktop(currentDesktop())) ||
@@ -670,7 +670,7 @@ void Workspace::unclutterDesktop()
((*it)->isOnAllDesktops()) ||
(!(*it)->isMovable()) )
continue;
- initPositioning->placeSmart(*it, QRect());
+ initPositioning->placeSmart(*it, TQRect());
}
}
@@ -699,8 +699,8 @@ void Workspace::updateTopMenuGeometry( Client* c )
return;
}
// c == NULL - update all, including topmenu_space
- QRect area;
- area = clientArea( MaximizeFullArea, QPoint( 0, 0 ), 1 ); // HACK desktop ?
+ TQRect area;
+ area = clientArea( MaximizeFullArea, TQPoint( 0, 0 ), 1 ); // HACK desktop ?
area.setHeight( topMenuHeight());
topmenu_space->setGeometry( area );
for( ClientList::ConstIterator it = topmenus.begin();
@@ -714,7 +714,7 @@ void Workspace::updateTopMenuGeometry( Client* c )
//********************************************
-void Client::keepInArea( QRect area, bool partial )
+void Client::keepInArea( TQRect area, bool partial )
{
if( partial )
{
@@ -747,29 +747,29 @@ void Client::keepInArea( QRect area, bool partial )
*/
// TODO move to Workspace?
-QRect Client::adjustedClientArea( const QRect &desktopArea, const QRect& area ) const
+TQRect Client::adjustedClientArea( const TQRect &desktopArea, const TQRect& area ) const
{
- QRect r = area;
+ TQRect r = area;
// topmenu area is reserved in updateClientArea()
if( isTopMenu())
return r;
NETExtendedStrut str = strut();
- QRect stareaL = QRect(
+ TQRect stareaL = TQRect(
0,
str . left_start,
str . left_width,
str . left_end - str . left_start + 1 );
- QRect stareaR = QRect (
+ TQRect stareaR = TQRect (
desktopArea . right () - str . right_width + 1,
str . right_start,
str . right_width,
str . right_end - str . right_start + 1 );
- QRect stareaT = QRect (
+ TQRect stareaT = TQRect (
str . top_start,
0,
str . top_end - str . top_start + 1,
str . top_width);
- QRect stareaB = QRect (
+ TQRect stareaB = TQRect (
str . bottom_start,
desktopArea . bottom () - str . bottom_width + 1,
str . bottom_end - str . bottom_start + 1,
@@ -807,20 +807,20 @@ QRect Client::adjustedClientArea( const QRect &desktopArea, const QRect& area )
}
}
- QRect screenarea = workspace()->clientArea( ScreenArea, this );
+ TQRect screenarea = workspace()->clientArea( ScreenArea, this );
// HACK: workarea handling is not xinerama aware, so if this strut
// reserves place at a xinerama edge that's inside the virtual screen,
// ignore the strut for workspace setting.
if( area == kapp->desktop()->geometry())
{
if( stareaL.left() < screenarea.left())
- stareaL = QRect();
+ stareaL = TQRect();
if( stareaR.right() > screenarea.right())
- stareaR = QRect();
+ stareaR = TQRect();
if( stareaT.top() < screenarea.top())
- stareaT = QRect();
+ stareaT = TQRect();
if( stareaB.bottom() < screenarea.bottom())
- stareaB = QRect();
+ stareaB = TQRect();
}
// Handle struts at xinerama edges that are inside the virtual screen.
// They're given in virtual screen coordinates, make them affect only
@@ -897,8 +897,8 @@ bool Client::hasStrut() const
// updates differences to workarea edges for all directions
void Client::updateWorkareaDiffs()
{
- QRect area = workspace()->clientArea( WorkArea, this );
- QRect geom = geometry();
+ TQRect area = workspace()->clientArea( WorkArea, this );
+ TQRect geom = geometry();
workarea_diff_x = computeWorkareaDiff( geom.left(), geom.right(), area.left(), area.right());
workarea_diff_y = computeWorkareaDiff( geom.top(), geom.bottom(), area.top(), area.bottom());
}
@@ -933,14 +933,14 @@ void Client::checkWorkspacePosition()
{
if( isDesktop())
{
- QRect area = workspace()->clientArea( FullArea, this );
+ TQRect area = workspace()->clientArea( FullArea, this );
if( geometry() != area )
setGeometry( area );
return;
}
if( isFullScreen())
{
- QRect area = workspace()->clientArea( FullScreenArea, this );
+ TQRect area = workspace()->clientArea( FullScreenArea, this );
if( geometry() != area )
setGeometry( area );
return;
@@ -951,12 +951,12 @@ void Client::checkWorkspacePosition()
{
if( workspace()->managingTopMenus())
{
- QRect area;
+ TQRect area;
ClientList mainclients = mainClients();
if( mainclients.count() == 1 )
area = workspace()->clientArea( MaximizeFullArea, mainclients.first());
else
- area = workspace()->clientArea( MaximizeFullArea, QPoint( 0, 0 ), desktop());
+ area = workspace()->clientArea( MaximizeFullArea, TQPoint( 0, 0 ), desktop());
area.setHeight( workspace()->topMenuHeight());
// kdDebug() << "TOPMENU size adjust: " << area << ":" << this << endl;
setGeometry( area );
@@ -982,17 +982,17 @@ void Client::checkWorkspacePosition()
if( workspace()->initializing())
return;
- QRect area = workspace()->clientArea( WorkArea, this );
- QRect new_geom = geometry();
- QRect tmp_rect_x( new_geom.left(), 0, new_geom.width(), 0 );
- QRect tmp_area_x( area.left(), 0, area.width(), 0 );
+ TQRect area = workspace()->clientArea( WorkArea, this );
+ TQRect new_geom = geometry();
+ TQRect tmp_rect_x( new_geom.left(), 0, new_geom.width(), 0 );
+ TQRect tmp_area_x( area.left(), 0, area.width(), 0 );
checkDirection( workarea_diff_x, old_diff_x, tmp_rect_x, tmp_area_x );
// the x<->y swapping
- QRect tmp_rect_y( new_geom.top(), 0, new_geom.height(), 0 );
- QRect tmp_area_y( area.top(), 0, area.height(), 0 );
+ TQRect tmp_rect_y( new_geom.top(), 0, new_geom.height(), 0 );
+ TQRect tmp_area_y( area.top(), 0, area.height(), 0 );
checkDirection( workarea_diff_y, old_diff_y, tmp_rect_y, tmp_area_y );
- new_geom = QRect( tmp_rect_x.left(), tmp_rect_y.left(), tmp_rect_x.width(), tmp_rect_y.width());
- QRect final_geom( new_geom.topLeft(), adjustedSize( new_geom.size()));
+ new_geom = TQRect( tmp_rect_x.left(), tmp_rect_y.left(), tmp_rect_x.width(), tmp_rect_y.width());
+ TQRect final_geom( new_geom.topLeft(), adjustedSize( new_geom.size()));
if( final_geom != new_geom ) // size increments, or size restrictions
{ // adjusted size differing matters only for right and bottom edge
if( old_diff_x != INT_MAX && old_diff_x > 0 )
@@ -1016,7 +1016,7 @@ void Client::checkWorkspacePosition()
// again (not fully, as that could(?) be potentionally annoying) by
// moving it slightly inside the workarea (those '+ 5').
// Again, this is done for the x direction, y direction will be done by x<->y swapping
-void Client::checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area )
+void Client::checkDirection( int new_diff, int old_diff, TQRect& rect, const TQRect& area )
{
if( old_diff != INT_MIN ) // was inside workarea
{
@@ -1068,21 +1068,21 @@ void Client::checkDirection( int new_diff, int old_diff, QRect& rect, const QRec
/*!
Adjust the frame size \a frame according to he window's size hints.
*/
-QSize Client::adjustedSize( const QSize& frame, Sizemode mode ) const
+TQSize Client::adjustedSize( const TQSize& frame, Sizemode mode ) const
{
// first, get the window size for the given frame size s
- QSize wsize( frame.width() - ( border_left + border_right ),
+ TQSize wsize( frame.width() - ( border_left + border_right ),
frame.height() - ( border_top + border_bottom ));
if( wsize.isEmpty())
- wsize = QSize( 1, 1 );
+ wsize = TQSize( 1, 1 );
return sizeForClientSize( wsize, mode, false );
}
// this helper returns proper size even if the window is shaded
// see also the comment in Client::setGeometry()
-QSize Client::adjustedSize() const
+TQSize Client::adjustedSize() const
{
return sizeForClientSize( clientSize());
}
@@ -1095,7 +1095,7 @@ QSize Client::adjustedSize() const
maximum and incremental size changes).
*/
-QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode, bool noframe ) const
+TQSize Client::sizeForClientSize( const TQSize& wsize, Sizemode mode, bool noframe ) const
{
int w = wsize.width();
int h = wsize.height();
@@ -1109,12 +1109,12 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode, bool noframe
// basesize, minsize, maxsize, paspect and resizeinc have all values defined,
// even if they're not set in flags - see getWmNormalHints()
- QSize min_size = minSize();
- QSize max_size = maxSize();
+ TQSize min_size = minSize();
+ TQSize max_size = maxSize();
if( decoration != NULL )
{
- QSize decominsize = decoration->minimumSize();
- QSize border_size( border_left + border_right, border_top + border_bottom );
+ TQSize decominsize = decoration->minimumSize();
+ TQSize border_size( border_left + border_right, border_top + border_bottom );
if( border_size.width() > decominsize.width()) // just in case
decominsize.setWidth( border_size.width());
if( border_size.height() > decominsize.height())
@@ -1268,7 +1268,7 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode, bool noframe
w += border_left + border_right;
h += border_top + border_bottom;
}
- return rules()->checkSize( QSize( w, h ));
+ return rules()->checkSize( TQSize( w, h ));
}
/*!
@@ -1329,16 +1329,16 @@ void Client::getWmNormalHints()
xSizeHint.win_gravity = NorthWestGravity;
if( isManaged())
{ // update to match restrictions
- QSize new_size = adjustedSize();
+ TQSize new_size = adjustedSize();
if( new_size != size() && !isFullScreen())
{
- QRect orig_geometry = geometry();
+ TQRect orig_geometry = geometry();
resizeWithChecks( new_size );
if( ( !isSpecialWindow() || isToolbar()) && !isFullScreen())
{
// try to keep the window in its xinerama screen if possible,
// if that fails at least keep it visible somewhere
- QRect area = workspace()->clientArea( MovementArea, this );
+ TQRect area = workspace()->clientArea( MovementArea, this );
if( area.contains( orig_geometry ))
keepInArea( area );
area = workspace()->clientArea( WorkArea, this );
@@ -1350,14 +1350,14 @@ void Client::getWmNormalHints()
updateAllowedActions(); // affects isResizeable()
}
-QSize Client::minSize() const
+TQSize Client::minSize() const
{
- return rules()->checkMinSize( QSize( xSizeHint.min_width, xSizeHint.min_height ));
+ return rules()->checkMinSize( TQSize( xSizeHint.min_width, xSizeHint.min_height ));
}
-QSize Client::maxSize() const
+TQSize Client::maxSize() const
{
- return rules()->checkMaxSize( QSize( xSizeHint.max_width, xSizeHint.max_height ));
+ return rules()->checkMaxSize( TQSize( xSizeHint.max_width, xSizeHint.max_height ));
}
/*!
@@ -1382,7 +1382,7 @@ void Client::sendSyntheticConfigureNotify()
XSendEvent( qt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c );
}
-const QPoint Client::calculateGravitation( bool invert, int gravity ) const
+const TQPoint Client::calculateGravitation( bool invert, int gravity ) const
{
int dx, dy;
dx = dy = 0;
@@ -1444,9 +1444,9 @@ const QPoint Client::calculateGravitation( bool invert, int gravity ) const
dy = - ( border_top + border_bottom ) / 2;
}
if( !invert )
- return QPoint( x() + dx, y() + dy );
+ return TQPoint( x() + dx, y() + dy );
else
- return QPoint( x() - dx, y() - dy );
+ return TQPoint( x() - dx, y() - dy );
}
void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool )
@@ -1455,7 +1455,7 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
gravity = xSizeHint.win_gravity;
if( value_mask & ( CWX | CWY ))
{
- QPoint new_pos = calculateGravitation( true, gravity ); // undo gravitation
+ TQPoint new_pos = calculateGravitation( true, gravity ); // undo gravitation
if ( value_mask & CWX )
new_pos.setX( rx );
if ( value_mask & CWY )
@@ -1478,20 +1478,20 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
nw = rw;
if ( value_mask & CWHeight )
nh = rh;
- QSize ns = sizeForClientSize( QSize( nw, nh ) );
+ TQSize ns = sizeForClientSize( TQSize( nw, nh ) );
new_pos = rules()->checkPosition( new_pos );
// TODO what to do with maximized windows?
if ( maximizeMode() != MaximizeFull
|| ns != size())
{
- QRect orig_geometry = geometry();
+ TQRect orig_geometry = geometry();
GeometryUpdatesPostponer blocker( this );
move( new_pos );
plainResize( ns );
- setGeometry( QRect( calculateGravitation( false, gravity ), size()));
- updateFullScreenHack( QRect( new_pos, QSize( nw, nh )));
- QRect area = workspace()->clientArea( WorkArea, this );
+ setGeometry( TQRect( calculateGravitation( false, gravity ), size()));
+ updateFullScreenHack( TQRect( new_pos, TQSize( nw, nh )));
+ TQRect area = workspace()->clientArea( WorkArea, this );
if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen()
&& area.contains( orig_geometry ))
keepInArea( area );
@@ -1514,22 +1514,22 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
nw = rw;
if ( value_mask & CWHeight )
nh = rh;
- QSize ns = sizeForClientSize( QSize( nw, nh ) );
+ TQSize ns = sizeForClientSize( TQSize( nw, nh ) );
if( ns != size()) // don't restore if some app sets its own size again
{
- QRect orig_geometry = geometry();
+ TQRect orig_geometry = geometry();
GeometryUpdatesPostponer blocker( this );
int save_gravity = xSizeHint.win_gravity;
xSizeHint.win_gravity = gravity;
resizeWithChecks( ns );
xSizeHint.win_gravity = save_gravity;
- updateFullScreenHack( QRect( calculateGravitation( true, xSizeHint.win_gravity ), QSize( nw, nh )));
+ updateFullScreenHack( TQRect( calculateGravitation( true, xSizeHint.win_gravity ), TQSize( nw, nh )));
if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen())
{
// try to keep the window in its xinerama screen if possible,
// if that fails at least keep it visible somewhere
- QRect area = workspace()->clientArea( MovementArea, this );
+ TQRect area = workspace()->clientArea( MovementArea, this );
if( area.contains( orig_geometry ))
keepInArea( area );
area = workspace()->clientArea( WorkArea, this );
@@ -1557,13 +1557,13 @@ void Client::resizeWithChecks( int w, int h, ForceGeometry_t force )
}
int newx = x();
int newy = y();
- QRect area = workspace()->clientArea( WorkArea, this );
+ TQRect area = workspace()->clientArea( WorkArea, this );
// don't allow growing larger than workarea
if( w > area.width())
w = area.width();
if( h > area.height())
h = area.height();
- QSize tmp = adjustedSize( QSize( w, h )); // checks size constraints, including min/max size
+ TQSize tmp = adjustedSize( TQSize( w, h )); // checks size constraints, including min/max size
w = tmp.width();
h = tmp.height();
switch( xSizeHint.win_gravity )
@@ -1668,11 +1668,11 @@ bool Client::isResizable() const
return false;
if( maximizeMode() == MaximizeFull && !options->moveResizeMaximizedWindows() )
return false;
- if( rules()->checkSize( QSize()).isValid()) // forced size
+ if( rules()->checkSize( TQSize()).isValid()) // forced size
return false;
- QSize min = minSize();
- QSize max = maxSize();
+ TQSize min = minSize();
+ TQSize max = maxSize();
return min.width() < max.width() || min.height() < max.height();
}
@@ -1689,14 +1689,14 @@ bool Client::isMaximizable() const
}
if ( maximizeMode() != MaximizeRestore )
return TRUE;
- QSize max = maxSize();
+ TQSize max = maxSize();
#if 0
if( max.width() < 32767 || max.height() < 32767 ) // sizes are 16bit with X
return false;
#else
// apparently there are enough apps which specify some arbitrary value
// for their maximum size just for the fun of it
- QSize areasize = workspace()->clientArea( MaximizeArea, this ).size();
+ TQSize areasize = workspace()->clientArea( MaximizeArea, this ).size();
if( max.width() < areasize.width() || max.height() < areasize.height())
return false;
#endif
@@ -1731,29 +1731,29 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force )
}
else
{
- client_size = QSize( w - border_left - border_right, h - border_top - border_bottom );
+ client_size = TQSize( w - border_left - border_right, h - border_top - border_bottom );
h = border_top + border_bottom;
}
}
else
{
- client_size = QSize( w - border_left - border_right, h - border_top - border_bottom );
+ client_size = TQSize( w - border_left - border_right, h - border_top - border_bottom );
}
- if( force == NormalGeometrySet && frame_geometry == QRect( x, y, w, h ))
+ if( force == NormalGeometrySet && frame_geometry == TQRect( x, y, w, h ))
return;
- frame_geometry = QRect( x, y, w, h );
+ frame_geometry = TQRect( x, y, w, h );
updateWorkareaDiffs();
if( postpone_geometry_updates != 0 )
{
pending_geometry_update = true;
return;
}
- resizeDecoration( QSize( w, h ));
+ resizeDecoration( TQSize( w, h ));
XMoveResizeWindow( qt_xdisplay(), frameId(), x, y, w, h );
-// resizeDecoration( QSize( w, h ));
+// resizeDecoration( TQSize( w, h ));
if( !isShade())
{
- QSize cs = clientSize();
+ TQSize cs = clientSize();
XMoveResizeWindow( qt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(),
cs.width(), cs.height());
XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height());
@@ -1781,34 +1781,34 @@ void Client::plainResize( int w, int h, ForceGeometry_t force )
}
else
{
- client_size = QSize( w - border_left - border_right, h - border_top - border_bottom );
+ client_size = TQSize( w - border_left - border_right, h - border_top - border_bottom );
h = border_top + border_bottom;
}
}
else
{
- client_size = QSize( w - border_left - border_right, h - border_top - border_bottom );
+ client_size = TQSize( w - border_left - border_right, h - border_top - border_bottom );
}
- if( QSize( w, h ) != rules()->checkSize( QSize( w, h )))
+ if( TQSize( w, h ) != rules()->checkSize( TQSize( w, h )))
{
- kdDebug() << "forced size fail:" << QSize( w,h ) << ":" << rules()->checkSize( QSize( w, h )) << endl;
+ kdDebug() << "forced size fail:" << TQSize( w,h ) << ":" << rules()->checkSize( TQSize( w, h )) << endl;
kdDebug() << kdBacktrace() << endl;
}
- if( force == NormalGeometrySet && frame_geometry.size() == QSize( w, h ))
+ if( force == NormalGeometrySet && frame_geometry.size() == TQSize( w, h ))
return;
- frame_geometry.setSize( QSize( w, h ));
+ frame_geometry.setSize( TQSize( w, h ));
updateWorkareaDiffs();
if( postpone_geometry_updates != 0 )
{
pending_geometry_update = true;
return;
}
- resizeDecoration( QSize( w, h ));
+ resizeDecoration( TQSize( w, h ));
XResizeWindow( qt_xdisplay(), frameId(), w, h );
-// resizeDecoration( QSize( w, h ));
+// resizeDecoration( TQSize( w, h ));
if( !isShade())
{
- QSize cs = clientSize();
+ TQSize cs = clientSize();
XMoveResizeWindow( qt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(),
cs.width(), cs.height());
XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height());
@@ -1826,9 +1826,9 @@ void Client::plainResize( int w, int h, ForceGeometry_t force )
*/
void Client::move( int x, int y, ForceGeometry_t force )
{
- if( force == NormalGeometrySet && frame_geometry.topLeft() == QPoint( x, y ))
+ if( force == NormalGeometrySet && frame_geometry.topLeft() == TQPoint( x, y ))
return;
- frame_geometry.moveTopLeft( QPoint( x, y ));
+ frame_geometry.moveTopLeft( TQPoint( x, y ));
updateWorkareaDiffs();
if( postpone_geometry_updates != 0 )
{
@@ -1858,7 +1858,7 @@ void Client::postponeGeometryUpdates( bool postpone )
if( pending_geometry_update )
{
if( isShade())
- setGeometry( QRect( pos(), adjustedSize()), ForceGeometrySet );
+ setGeometry( TQRect( pos(), adjustedSize()), ForceGeometrySet );
else
setGeometry( geometry(), ForceGeometrySet );
pending_geometry_update = false;
@@ -1908,7 +1908,7 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
Q_ASSERT( !( vertical && horizontal )
|| ((( max_mode & MaximizeVertical ) != 0 ) == (( max_mode & MaximizeHorizontal ) != 0 )));
- QRect clientArea = workspace()->clientArea( MaximizeArea, this );
+ TQRect clientArea = workspace()->clientArea( MaximizeArea, this );
// save sizes for restoring, if maximalizing
if( !adjust && !( y() == clientArea.top() && height() == clientArea.height()))
@@ -1958,16 +1958,16 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
{
if( geom_restore.width() == 0 )
{ // needs placement
- plainResize( adjustedSize(QSize(width(), clientArea.height()), SizemodeFixedH ));
+ plainResize( adjustedSize(TQSize(width(), clientArea.height()), SizemodeFixedH ));
workspace()->placeSmart( this, clientArea );
}
else
- setGeometry( QRect(QPoint( geom_restore.x(), clientArea.top()),
- adjustedSize(QSize( geom_restore.width(), clientArea.height()), SizemodeFixedH )), ForceGeometrySet);
+ setGeometry( TQRect(TQPoint( geom_restore.x(), clientArea.top()),
+ adjustedSize(TQSize( geom_restore.width(), clientArea.height()), SizemodeFixedH )), ForceGeometrySet);
}
else
- setGeometry( QRect(QPoint(x(), clientArea.top()),
- adjustedSize(QSize(width(), clientArea.height()), SizemodeFixedH )), ForceGeometrySet);
+ setGeometry( TQRect(TQPoint(x(), clientArea.top()),
+ adjustedSize(TQSize(width(), clientArea.height()), SizemodeFixedH )), ForceGeometrySet);
info->setState( NET::MaxVert, NET::Max );
break;
}
@@ -1978,23 +1978,23 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
{
if( geom_restore.height() == 0 )
{ // needs placement
- plainResize( adjustedSize(QSize(clientArea.width(), height()), SizemodeFixedW ));
+ plainResize( adjustedSize(TQSize(clientArea.width(), height()), SizemodeFixedW ));
workspace()->placeSmart( this, clientArea );
}
else
- setGeometry( QRect( QPoint(clientArea.left(), geom_restore.y()),
- adjustedSize(QSize(clientArea.width(), geom_restore.height()), SizemodeFixedW )), ForceGeometrySet);
+ setGeometry( TQRect( TQPoint(clientArea.left(), geom_restore.y()),
+ adjustedSize(TQSize(clientArea.width(), geom_restore.height()), SizemodeFixedW )), ForceGeometrySet);
}
else
- setGeometry( QRect( QPoint(clientArea.left(), y()),
- adjustedSize(QSize(clientArea.width(), height()), SizemodeFixedW )), ForceGeometrySet);
+ setGeometry( TQRect( TQPoint(clientArea.left(), y()),
+ adjustedSize(TQSize(clientArea.width(), height()), SizemodeFixedW )), ForceGeometrySet);
info->setState( NET::MaxHoriz, NET::Max );
break;
}
case MaximizeRestore:
{
- QRect restore = geometry();
+ TQRect restore = geometry();
// when only partially maximized, geom_restore may not have the other dimension remembered
if( old_mode & MaximizeVertical )
{
@@ -2008,7 +2008,7 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
}
if( !restore.isValid())
{
- QSize s = QSize( clientArea.width()*2/3, clientArea.height()*2/3 );
+ TQSize s = TQSize( clientArea.width()*2/3, clientArea.height()*2/3 );
if( geom_restore.width() > 0 )
s.setWidth( geom_restore.width());
if( geom_restore.height() > 0 )
@@ -2035,8 +2035,8 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
if( old_mode & MaximizeHorizontal )
maxmode_restore = MaximizeHorizontal;
}
- QSize adjSize = adjustedSize(clientArea.size(), SizemodeMax );
- QRect r = QRect(clientArea.topLeft(), adjSize);
+ TQSize adjSize = adjustedSize(clientArea.size(), SizemodeMax );
+ TQRect r = TQRect(clientArea.topLeft(), adjSize);
setGeometry( r, ForceGeometrySet );
info->setState( NET::Max, NET::Max );
break;
@@ -2062,7 +2062,7 @@ void Client::resetMaximize()
if( decoration != NULL )
decoration->borders( border_left, border_right, border_top, border_bottom );
if( isShade())
- setGeometry( QRect( pos(), sizeForClientSize( clientSize())), ForceGeometrySet );
+ setGeometry( TQRect( pos(), sizeForClientSize( clientSize())), ForceGeometrySet );
else
setGeometry( geometry(), ForceGeometrySet );
if( decoration != NULL )
@@ -2086,7 +2086,7 @@ void Client::checkMaximizeGeometry()
return;
}
++recursion_protection;
- QRect max_area = workspace()->clientArea( MaximizeArea, this );
+ TQRect max_area = workspace()->clientArea( MaximizeArea, this );
if( geometry() == max_area )
{
if( max_mode != MaximizeFull )
@@ -2118,7 +2118,7 @@ bool Client::isFullScreenable( bool fullscreen_hack ) const
if( rules()->checkStrictGeometry( false ))
{
// the app wouldn't fit exactly fullscreen geometry due its strict geometry requirements
- QRect fsarea = workspace()->clientArea( FullScreenArea, this );
+ TQRect fsarea = workspace()->clientArea( FullScreenArea, this );
if( sizeForClientSize( fsarea.size(), SizemodeAny, true ) != fsarea.size())
return false;
}
@@ -2163,7 +2163,7 @@ void Client::setFullScreen( bool set, bool user )
else
{
if( !geom_fs_restore.isNull())
- setGeometry( QRect( geom_fs_restore.topLeft(), adjustedSize( geom_fs_restore.size())));
+ setGeometry( TQRect( geom_fs_restore.topLeft(), adjustedSize( geom_fs_restore.size())));
// TODO isShaded() ?
else
{ // does this ever happen?
@@ -2173,7 +2173,7 @@ void Client::setFullScreen( bool set, bool user )
updateWindowRules();
}
-int Client::checkFullScreenHack( const QRect& geom ) const
+int Client::checkFullScreenHack( const TQRect& geom ) const
{
// if it's noborder window, and has size of one screen or the whole desktop geometry, it's fullscreen hack
if( noBorder() && !isUserNoBorder() && isFullScreenable( true ))
@@ -2186,14 +2186,14 @@ int Client::checkFullScreenHack( const QRect& geom ) const
return 0;
}
-void Client::updateFullScreenHack( const QRect& geom )
+void Client::updateFullScreenHack( const TQRect& geom )
{
int type = checkFullScreenHack( geom );
if( fullscreen_mode == FullScreenNone && type != 0 )
{
fullscreen_mode = FullScreenHack;
updateDecoration( false, false );
- QRect geom;
+ TQRect geom;
if( rules()->checkStrictGeometry( false ))
{
geom = type == 2 // 1 - it's xinerama-aware fullscreen hack, 2 - it's full area
@@ -2214,13 +2214,13 @@ void Client::updateFullScreenHack( const QRect& geom )
workspace()->updateClientLayer( this ); // active fullscreens get different layer
}
-static QRect* visible_bound = 0;
+static TQRect* visible_bound = 0;
static GeometryTip* geometryTip = 0;
-void Client::drawbound( const QRect& geom )
+void Client::drawbound( const TQRect& geom )
{
assert( visible_bound == NULL );
- visible_bound = new QRect( geom );
+ visible_bound = new TQRect( geom );
doDrawbound( *visible_bound, false );
}
@@ -2233,16 +2233,16 @@ void Client::clearbound()
visible_bound = 0;
}
-void Client::doDrawbound( const QRect& geom, bool clear )
+void Client::doDrawbound( const TQRect& geom, bool clear )
{
if( decoration != NULL && decoration->drawbound( geom, clear ))
return; // done by decoration
- QPainter p ( workspace()->desktopWidget() );
- p.setPen( QPen( Qt::white, 5 ) );
+ TQPainter p ( workspace()->desktopWidget() );
+ p.setPen( TQPen( Qt::white, 5 ) );
p.setRasterOp( Qt::XorROP );
// the line is 5 pixel thick, so compensate for the extra two pixels
// on outside (#88657)
- QRect g = geom;
+ TQRect g = geom;
if( g.width() > 5 )
{
g.setLeft( g.left() + 2 );
@@ -2268,7 +2268,7 @@ void Client::positionGeometryTip()
|| ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque );
geometryTip = new GeometryTip( &xSizeHint, save_under );
}
- QRect wgeom( moveResizeGeom ); // position of the frame, size of the window itself
+ TQRect wgeom( moveResizeGeom ); // position of the frame, size of the window itself
wgeom.setWidth( wgeom.width() - ( width() - clientSize().width()));
wgeom.setHeight( wgeom.height() - ( height() - clientSize().height()));
if( isShade())
@@ -2286,8 +2286,8 @@ class EatAllPaintEvents
: public QObject
{
protected:
- virtual bool eventFilter( QObject* o, QEvent* e )
- { return e->type() == QEvent::Paint && o != geometryTip; }
+ virtual bool eventFilter( TQObject* o, TQEvent* e )
+ { return e->type() == TQEvent::Paint && o != geometryTip; }
};
static EatAllPaintEvents* eater = 0;
@@ -2295,16 +2295,16 @@ static EatAllPaintEvents* eater = 0;
bool Client::startMoveResize()
{
assert( !moveResizeMode );
- assert( QWidget::keyboardGrabber() == NULL );
- assert( QWidget::mouseGrabber() == NULL );
- if( QApplication::activePopupWidget() != NULL )
+ assert( TQWidget::keyboardGrabber() == NULL );
+ assert( TQWidget::mouseGrabber() == NULL );
+ if( TQApplication::activePopupWidget() != NULL )
return false; // popups have grab
bool has_grab = false;
// This reportedly improves smoothness of the moveresize operation,
// something with Enter/LeaveNotify events, looks like XFree performance problem or something *shrug*
// (http://lists.kde.org/?t=107302193400001&r=1&w=2)
XSetWindowAttributes attrs;
- QRect r = workspace()->clientArea( FullArea, this );
+ TQRect r = workspace()->clientArea( FullArea, this );
move_resize_grab_window = XCreateWindow( qt_xdisplay(), workspace()->rootWin(), r.x(), r.y(),
r.width(), r.height(), 0, CopyFromParent, InputOnly, CopyFromParent, 0, &attrs );
XMapRaised( qt_xdisplay(), move_resize_grab_window );
@@ -2400,7 +2400,7 @@ void Client::checkUnrestrictedMoveResize()
{
if( unrestrictedMoveResize )
return;
- QRect desktopArea = workspace()->clientArea( WorkArea, moveResizeGeom.center(), desktop());
+ TQRect desktopArea = workspace()->clientArea( WorkArea, moveResizeGeom.center(), desktop());
int left_marge, right_marge, top_marge, bottom_marge, titlebar_marge;
// restricted move/resize - keep at least part of the titlebar always visible
// how much must remain visible when moved away in that direction
@@ -2445,7 +2445,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if ( !moveResizeMode )
{
- QPoint p( QPoint( x, y ) - moveOffset );
+ TQPoint p( TQPoint( x, y ) - moveOffset );
if (p.manhattanLength() >= 6)
{
if( !startMoveResize())
@@ -2463,18 +2463,18 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if ( mode != PositionCenter && shade_mode != ShadeNone )
setShade( ShadeNone );
- QPoint globalPos( x_root, y_root );
+ TQPoint globalPos( x_root, y_root );
// these two points limit the geometry rectangle, i.e. if bottomleft resizing is done,
// the bottomleft corner should be at is at (topleft.x(), bottomright().y())
- QPoint topleft = globalPos - moveOffset;
- QPoint bottomright = globalPos + invertedMoveOffset;
- QRect previousMoveResizeGeom = moveResizeGeom;
+ TQPoint topleft = globalPos - moveOffset;
+ TQPoint bottomright = globalPos + invertedMoveOffset;
+ TQRect previousMoveResizeGeom = moveResizeGeom;
// TODO move whole group when moving its leader or when the leader is not mapped?
// compute bounds
// NOTE: This is duped in checkUnrestrictedMoveResize().
- QRect desktopArea = workspace()->clientArea( WorkArea, globalPos, desktop());
+ TQRect desktopArea = workspace()->clientArea( WorkArea, globalPos, desktop());
int left_marge, right_marge, top_marge, bottom_marge, titlebar_marge;
if( unrestrictedMoveResize ) // unrestricted, just don't let it go out completely
left_marge = right_marge = top_marge = bottom_marge = titlebar_marge = 5;
@@ -2493,36 +2493,36 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if( isResize())
{
// first resize (without checking constrains), then snap, then check bounds, then check constrains
- QRect orig = initialMoveResizeGeom;
+ TQRect orig = initialMoveResizeGeom;
Sizemode sizemode = SizemodeAny;
switch ( mode )
{
case PositionTopLeft:
- moveResizeGeom = QRect( topleft, orig.bottomRight() ) ;
+ moveResizeGeom = TQRect( topleft, orig.bottomRight() ) ;
break;
case PositionBottomRight:
- moveResizeGeom = QRect( orig.topLeft(), bottomright ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), bottomright ) ;
break;
case PositionBottomLeft:
- moveResizeGeom = QRect( QPoint( topleft.x(), orig.y() ), QPoint( orig.right(), bottomright.y()) ) ;
+ moveResizeGeom = TQRect( TQPoint( topleft.x(), orig.y() ), TQPoint( orig.right(), bottomright.y()) ) ;
break;
case PositionTopRight:
- moveResizeGeom = QRect( QPoint( orig.x(), topleft.y() ), QPoint( bottomright.x(), orig.bottom()) ) ;
+ moveResizeGeom = TQRect( TQPoint( orig.x(), topleft.y() ), TQPoint( bottomright.x(), orig.bottom()) ) ;
break;
case PositionTop:
- moveResizeGeom = QRect( QPoint( orig.left(), topleft.y() ), orig.bottomRight() ) ;
+ moveResizeGeom = TQRect( TQPoint( orig.left(), topleft.y() ), orig.bottomRight() ) ;
sizemode = SizemodeFixedH; // try not to affect height
break;
case PositionBottom:
- moveResizeGeom = QRect( orig.topLeft(), QPoint( orig.right(), bottomright.y() ) ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), TQPoint( orig.right(), bottomright.y() ) ) ;
sizemode = SizemodeFixedH;
break;
case PositionLeft:
- moveResizeGeom = QRect( QPoint( topleft.x(), orig.top() ), orig.bottomRight() ) ;
+ moveResizeGeom = TQRect( TQPoint( topleft.x(), orig.top() ), orig.bottomRight() ) ;
sizemode = SizemodeFixedW;
break;
case PositionRight:
- moveResizeGeom = QRect( orig.topLeft(), QPoint( bottomright.x(), orig.bottom() ) ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), TQPoint( bottomright.x(), orig.bottom() ) ) ;
sizemode = SizemodeFixedW;
break;
case PositionCenter:
@@ -2546,39 +2546,39 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if( !unrestrictedMoveResize && moveResizeGeom.top() < desktopArea.top() ) // titlebar mustn't go out
moveResizeGeom.setTop( desktopArea.top());
- QSize size = adjustedSize( moveResizeGeom.size(), sizemode );
+ TQSize size = adjustedSize( moveResizeGeom.size(), sizemode );
// the new topleft and bottomright corners (after checking size constrains), if they'll be needed
- topleft = QPoint( moveResizeGeom.right() - size.width() + 1, moveResizeGeom.bottom() - size.height() + 1 );
- bottomright = QPoint( moveResizeGeom.left() + size.width() - 1, moveResizeGeom.top() + size.height() - 1 );
+ topleft = TQPoint( moveResizeGeom.right() - size.width() + 1, moveResizeGeom.bottom() - size.height() + 1 );
+ bottomright = TQPoint( moveResizeGeom.left() + size.width() - 1, moveResizeGeom.top() + size.height() - 1 );
orig = moveResizeGeom;
switch ( mode )
{ // these 4 corners ones are copied from above
case PositionTopLeft:
- moveResizeGeom = QRect( topleft, orig.bottomRight() ) ;
+ moveResizeGeom = TQRect( topleft, orig.bottomRight() ) ;
break;
case PositionBottomRight:
- moveResizeGeom = QRect( orig.topLeft(), bottomright ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), bottomright ) ;
break;
case PositionBottomLeft:
- moveResizeGeom = QRect( QPoint( topleft.x(), orig.y() ), QPoint( orig.right(), bottomright.y()) ) ;
+ moveResizeGeom = TQRect( TQPoint( topleft.x(), orig.y() ), TQPoint( orig.right(), bottomright.y()) ) ;
break;
case PositionTopRight:
- moveResizeGeom = QRect( QPoint( orig.x(), topleft.y() ), QPoint( bottomright.x(), orig.bottom()) ) ;
+ moveResizeGeom = TQRect( TQPoint( orig.x(), topleft.y() ), TQPoint( bottomright.x(), orig.bottom()) ) ;
break;
// The side ones can't be copied exactly - if aspect ratios are specified, both dimensions may change.
// Therefore grow to the right/bottom if needed.
// TODO it should probably obey gravity rather than always using right/bottom ?
case PositionTop:
- moveResizeGeom = QRect( QPoint( orig.left(), topleft.y() ), QPoint( bottomright.x(), orig.bottom()) ) ;
+ moveResizeGeom = TQRect( TQPoint( orig.left(), topleft.y() ), TQPoint( bottomright.x(), orig.bottom()) ) ;
break;
case PositionBottom:
- moveResizeGeom = QRect( orig.topLeft(), QPoint( bottomright.x(), bottomright.y() ) ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), TQPoint( bottomright.x(), bottomright.y() ) ) ;
break;
case PositionLeft:
- moveResizeGeom = QRect( QPoint( topleft.x(), orig.top() ), QPoint( orig.right(), bottomright.y()));
+ moveResizeGeom = TQRect( TQPoint( topleft.x(), orig.top() ), TQPoint( orig.right(), bottomright.y()));
break;
case PositionRight:
- moveResizeGeom = QRect( orig.topLeft(), QPoint( bottomright.x(), bottomright.y() ) ) ;
+ moveResizeGeom = TQRect( orig.topLeft(), TQPoint( bottomright.x(), bottomright.y() ) ) ;
break;
case PositionCenter:
default:
diff --git a/kwin/geometrytip.cpp b/kwin/geometrytip.cpp
index c8a046950..8577abfbc 100644
--- a/kwin/geometrytip.cpp
+++ b/kwin/geometrytip.cpp
@@ -14,12 +14,12 @@ namespace KWinInternal
{
GeometryTip::GeometryTip( const XSizeHints* xSizeHints, bool save_under ):
- QLabel(NULL, "kwingeometry" )
+ TQLabel(NULL, "kwingeometry" )
{
setMargin(1);
setIndent(0);
setLineWidth(1);
- setFrameStyle( QFrame::Raised | QFrame::StyledPanel );
+ setFrameStyle( TQFrame::Raised | TQFrame::StyledPanel );
setAlignment( AlignCenter | AlignTop );
sizeHints = xSizeHints;
if( save_under )
@@ -34,7 +34,7 @@ GeometryTip::~GeometryTip()
{
}
-void GeometryTip::setGeometry( const QRect& geom )
+void GeometryTip::setGeometry( const TQRect& geom )
{
int w = geom.width();
int h = geom.height();
@@ -49,7 +49,7 @@ void GeometryTip::setGeometry( const QRect& geom )
}
h = QMAX( h, 0 ); // in case of isShade() and PBaseSize
- QString pos;
+ TQString pos;
pos.sprintf( "%+d,%+d<br>(<b>%d&nbsp;x&nbsp;%d</b>)",
geom.x(), geom.y(), w, h );
setText( pos );
diff --git a/kwin/geometrytip.h b/kwin/geometrytip.h
index 6fdd2599d..6dac49f2f 100644
--- a/kwin/geometrytip.h
+++ b/kwin/geometrytip.h
@@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_GEOMETRY_TIP_H
#define KWIN_GEOMETRY_TIP_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include "client.h"
namespace KWinInternal
@@ -23,7 +23,7 @@ class GeometryTip: public QLabel
public:
GeometryTip( const XSizeHints* xSizeHints, bool save_under );
~GeometryTip();
- void setGeometry( const QRect& geom );
+ void setGeometry( const TQRect& geom );
private:
const XSizeHints* sizeHints;
diff --git a/kwin/group.cpp b/kwin/group.cpp
index 405e32927..0d543dc4a 100644
--- a/kwin/group.cpp
+++ b/kwin/group.cpp
@@ -141,11 +141,11 @@ bool performTransiencyCheck()
return ret;
}
-static QString transiencyCheckStartBt;
+static TQString transiencyCheckStartBt;
static const Client* transiencyCheckClient;
static int transiencyCheck = 0;
-static void startTransiencyCheck( const QString& bt, const Client* c, bool ne )
+static void startTransiencyCheck( const TQString& bt, const Client* c, bool ne )
{
if( ++transiencyCheck == 1 )
{
@@ -171,7 +171,7 @@ static void checkTransiency()
class TransiencyChecker
{
public:
- TransiencyChecker( const QString& bt, const Client*c ) { startTransiencyCheck( bt, c, false ); }
+ TransiencyChecker( const TQString& bt, const Client*c ) { startTransiencyCheck( bt, c, false ); }
~TransiencyChecker() { checkTransiency(); }
};
@@ -220,30 +220,30 @@ Group::~Group()
delete leader_info;
}
-QPixmap Group::icon() const
+TQPixmap Group::icon() const
{
if( leader_client != NULL )
return leader_client->icon();
else if( leader_wid != None )
{
- QPixmap ic;
+ TQPixmap ic;
Client::readIcons( leader_wid, &ic, NULL );
return ic;
}
- return QPixmap();
+ return TQPixmap();
}
-QPixmap Group::miniIcon() const
+TQPixmap Group::miniIcon() const
{
if( leader_client != NULL )
return leader_client->miniIcon();
else if( leader_wid != None )
{
- QPixmap ic;
+ TQPixmap ic;
Client::readIcons( leader_wid, NULL, &ic );
return ic;
}
- return QPixmap();
+ return TQPixmap();
}
void Group::addMember( Client* member_P )
diff --git a/kwin/group.h b/kwin/group.h
index 21ebb8d17..081239291 100644
--- a/kwin/group.h
+++ b/kwin/group.h
@@ -31,8 +31,8 @@ class Group
const Client* leaderClient() const;
Client* leaderClient();
const ClientList& members() const;
- QPixmap icon() const;
- QPixmap miniIcon() const;
+ TQPixmap icon() const;
+ TQPixmap miniIcon() const;
void addMember( Client* member );
void removeMember( Client* member );
void gotLeader( Client* leader );
diff --git a/kwin/kcmkwin/kwindecoration/buttons.cpp b/kwin/kcmkwin/kwindecoration/buttons.cpp
index 888e092e7..5d1d96d85 100644
--- a/kwin/kcmkwin/kwindecoration/buttons.cpp
+++ b/kwin/kcmkwin/kwindecoration/buttons.cpp
@@ -28,11 +28,11 @@
*/
-#include <qheader.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstyle.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstyle.h>
#include <kdebug.h>
@@ -47,11 +47,11 @@
#define BUTTONDRAGMIMETYPE "application/x-kde_kwindecoration_buttons"
-ButtonDrag::ButtonDrag( Button btn, QWidget* parent, const char* name)
- : QStoredDrag( BUTTONDRAGMIMETYPE, parent, name)
+ButtonDrag::ButtonDrag( Button btn, TQWidget* parent, const char* name)
+ : TQStoredDrag( BUTTONDRAGMIMETYPE, parent, name)
{
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << btn.name;
stream << btn.icon;
stream << btn.type.unicode();
@@ -61,23 +61,23 @@ ButtonDrag::ButtonDrag( Button btn, QWidget* parent, const char* name)
}
-bool ButtonDrag::canDecode( QDropEvent* e )
+bool ButtonDrag::canDecode( TQDropEvent* e )
{
return e->provides( BUTTONDRAGMIMETYPE );
}
-bool ButtonDrag::decode( QDropEvent* e, Button& btn )
+bool ButtonDrag::decode( TQDropEvent* e, Button& btn )
{
- QByteArray data = e->data( BUTTONDRAGMIMETYPE );
+ TQByteArray data = e->data( BUTTONDRAGMIMETYPE );
if ( data.size() )
{
e->accept();
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
stream >> btn.name;
stream >> btn.icon;
ushort type;
stream >> type;
- btn.type = QChar(type);
+ btn.type = TQChar(type);
int duplicate;
stream >> duplicate;
btn.duplicate = duplicate;
@@ -94,7 +94,7 @@ Button::Button()
{
}
-Button::Button(const QString& n, const QBitmap& i, QChar t, bool d, bool s)
+Button::Button(const TQString& n, const TQBitmap& i, TQChar t, bool d, bool s)
: name(n),
icon(i),
type(t),
@@ -108,11 +108,11 @@ Button::~Button()
}
// helper function to deal with the Button's bitmaps more easily...
-QPixmap bitmapPixmap(const QBitmap& bm, const QColor& color)
+TQPixmap bitmapPixmap(const TQBitmap& bm, const TQColor& color)
{
- QPixmap pm(bm.size() );
+ TQPixmap pm(bm.size() );
pm.setMask(bm);
- QPainter p(&pm);
+ TQPainter p(&pm);
p.setPen(color);
p.drawPixmap(0,0,bm);
p.end();
@@ -120,12 +120,12 @@ QPixmap bitmapPixmap(const QBitmap& bm, const QColor& color)
}
-ButtonSource::ButtonSource(QWidget *parent, const char* name)
+ButtonSource::ButtonSource(TQWidget *parent, const char* name)
: KListView(parent, name)
{
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
- setResizeMode(QListView::AllColumns);
+ setResizeMode(TQListView::AllColumns);
setDragEnabled(true);
setAcceptDrops(true);
setDropVisualizer(false);
@@ -140,20 +140,20 @@ ButtonSource::~ButtonSource()
{
}
-QSize ButtonSource::sizeHint() const
+TQSize ButtonSource::sizeHint() const
{
- // make the sizeHint height a bit smaller than the one of QListView...
+ // make the sizeHint height a bit smaller than the one of TQListView...
if ( cachedSizeHint().isValid() )
return cachedSizeHint();
constPolish();
- QSize s( header()->sizeHint() );
+ TQSize s( header()->sizeHint() );
if ( verticalScrollBar()->isVisible() )
- s.setWidth( s.width() + style().pixelMetric(QStyle::PM_ScrollBarExtent) );
- s += QSize(frameWidth()*2,frameWidth()*2);
+ s.setWidth( s.width() + style().pixelMetric(TQStyle::PM_ScrollBarExtent) );
+ s += TQSize(frameWidth()*2,frameWidth()*2);
// size hint: 4 lines of text...
s.setHeight( s.height() + fontMetrics().lineSpacing()*3 );
@@ -165,7 +165,7 @@ QSize ButtonSource::sizeHint() const
void ButtonSource::hideAllButtons()
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while (it.current() ) {
it.current()->setVisible(false);
++it;
@@ -174,16 +174,16 @@ void ButtonSource::hideAllButtons()
void ButtonSource::showAllButtons()
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while (it.current() ) {
it.current()->setVisible(true);
++it;
}
}
-void ButtonSource::showButton( QChar btn )
+void ButtonSource::showButton( TQChar btn )
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while (it.current() ) {
ButtonSourceItem *item = dynamic_cast<ButtonSourceItem*>(it.current() );
if (item && item->button().type == btn) {
@@ -194,9 +194,9 @@ void ButtonSource::showButton( QChar btn )
}
}
-void ButtonSource::hideButton( QChar btn )
+void ButtonSource::hideButton( TQChar btn )
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while (it.current() ) {
ButtonSourceItem *item = dynamic_cast<ButtonSourceItem*>(it.current() );
if (item && item->button().type == btn && !item->button().duplicate) {
@@ -207,12 +207,12 @@ void ButtonSource::hideButton( QChar btn )
}
}
-bool ButtonSource::acceptDrag(QDropEvent* e) const
+bool ButtonSource::acceptDrag(TQDropEvent* e) const
{
return acceptDrops() && ButtonDrag::canDecode(e);
}
-QDragObject *ButtonSource::dragObject()
+TQDragObject *ButtonSource::dragObject()
{
ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(selectedItem() );
@@ -251,20 +251,20 @@ int ButtonDropSiteItem::height()
return 20;
}
-void ButtonDropSiteItem::draw(QPainter *p, const QColorGroup& cg, QRect r)
+void ButtonDropSiteItem::draw(TQPainter *p, const TQColorGroup& cg, TQRect r)
{
// p->fillRect(r, cg.base() );
if (m_button.supported)
p->setPen(cg.foreground() );
else
p->setPen(cg.mid() );
- QBitmap &i = m_button.icon;
+ TQBitmap &i = m_button.icon;
p->drawPixmap(r.left()+(r.width()-i.width())/2, r.top()+(r.height()-i.height())/2, i);
}
-ButtonDropSite::ButtonDropSite( QWidget* parent, const char* name )
- : QFrame( parent, name ),
+ButtonDropSite::ButtonDropSite( TQWidget* parent, const char* name )
+ : TQFrame( parent, name ),
m_selected(0)
{
setAcceptDrops( TRUE );
@@ -303,14 +303,14 @@ void ButtonDropSite::clearRight()
}
}
-void ButtonDropSite::dragMoveEvent( QDragMoveEvent* e )
+void ButtonDropSite::dragMoveEvent( TQDragMoveEvent* e )
{
- QPoint p = e->pos();
+ TQPoint p = e->pos();
if (leftDropArea().contains(p) || rightDropArea().contains(p) || buttonAt(p) ) {
e->accept();
// 2 pixel wide drop visualizer...
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int x = -1;
if (leftDropArea().contains(p) ) {
x = leftDropArea().left();
@@ -327,7 +327,7 @@ void ButtonDropSite::dragMoveEvent( QDragMoveEvent* e )
}
}
if (x != -1) {
- QRect tmpRect(x, r.y(), 2, r.height() );
+ TQRect tmpRect(x, r.y(), 2, r.height() );
if (tmpRect != m_oldDropVisualizer) {
cleanDropVisualizer();
m_oldDropVisualizer = tmpRect;
@@ -346,28 +346,28 @@ void ButtonDropSite::cleanDropVisualizer()
{
if (m_oldDropVisualizer.isValid())
{
- QRect rect = m_oldDropVisualizer;
- m_oldDropVisualizer = QRect(); // rect is invalid
+ TQRect rect = m_oldDropVisualizer;
+ m_oldDropVisualizer = TQRect(); // rect is invalid
update(rect);
}
}
-void ButtonDropSite::dragEnterEvent( QDragEnterEvent* e )
+void ButtonDropSite::dragEnterEvent( TQDragEnterEvent* e )
{
if ( ButtonDrag::canDecode( e ) )
e->accept();
}
-void ButtonDropSite::dragLeaveEvent( QDragLeaveEvent* /* e */ )
+void ButtonDropSite::dragLeaveEvent( TQDragLeaveEvent* /* e */ )
{
cleanDropVisualizer();
}
-void ButtonDropSite::dropEvent( QDropEvent* e )
+void ButtonDropSite::dropEvent( TQDropEvent* e )
{
cleanDropVisualizer();
- QPoint p = e->pos();
+ TQPoint p = e->pos();
// collect information where to insert the dropped button
ButtonList *buttonList = 0;
@@ -393,7 +393,7 @@ void ButtonDropSite::dropEvent( QDropEvent* e )
// got the list and the aboveItem position. now determine if the item should be inserted
// before aboveItem or after aboveItem.
- QRect aboveItemRect = aboveItem->rect;
+ TQRect aboveItemRect = aboveItem->rect;
if (!aboveItemRect.isValid() )
return;
@@ -463,25 +463,25 @@ bool ButtonDropSite::getItemIterator(ButtonDropSiteItem *item, ButtonList* &list
return true;
}
-QRect ButtonDropSite::leftDropArea()
+TQRect ButtonDropSite::leftDropArea()
{
// return a 10 pixel drop area...
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int leftButtonsWidth = calcButtonListWidth(buttonsLeft);
- return QRect(r.left()+leftButtonsWidth, r.top(), 10, r.height() );
+ return TQRect(r.left()+leftButtonsWidth, r.top(), 10, r.height() );
}
-QRect ButtonDropSite::rightDropArea()
+TQRect ButtonDropSite::rightDropArea()
{
// return a 10 pixel drop area...
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int rightButtonsWidth = calcButtonListWidth(buttonsRight);
- return QRect(r.right()-rightButtonsWidth-10, r.top(), 10, r.height() );
+ return TQRect(r.right()-rightButtonsWidth-10, r.top(), 10, r.height() );
}
-void ButtonDropSite::mousePressEvent( QMouseEvent* e )
+void ButtonDropSite::mousePressEvent( TQMouseEvent* e )
{
// TODO: only start the real drag after some drag distance
m_selected = buttonAt(e->pos() );
@@ -492,20 +492,20 @@ void ButtonDropSite::mousePressEvent( QMouseEvent* e )
}
}
-void ButtonDropSite::resizeEvent(QResizeEvent*)
+void ButtonDropSite::resizeEvent(TQResizeEvent*)
{
recalcItemGeometry();
}
void ButtonDropSite::recalcItemGeometry()
{
- QRect r = contentsRect();
+ TQRect r = contentsRect();
// update the geometry of the items in the left button list
int offset = r.left();
for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) {
int w = (*it)->width();
- (*it)->rect = QRect(offset, r.top(), w, (*it)->height() );
+ (*it)->rect = TQRect(offset, r.top(), w, (*it)->height() );
offset += w;
}
@@ -513,12 +513,12 @@ void ButtonDropSite::recalcItemGeometry()
offset = r.right() - calcButtonListWidth(buttonsRight);
for (ButtonList::const_iterator it = buttonsRight.begin(); it != buttonsRight.end(); ++it) {
int w = (*it)->width();
- (*it)->rect = QRect(offset, r.top(), w, (*it)->height() );
+ (*it)->rect = TQRect(offset, r.top(), w, (*it)->height() );
offset += w;
}
}
-ButtonDropSiteItem *ButtonDropSite::buttonAt(QPoint p) {
+ButtonDropSiteItem *ButtonDropSite::buttonAt(TQPoint p) {
// try to find the item in the left button list
for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) {
if ( (*it)->rect.contains(p) ) {
@@ -578,10 +578,10 @@ bool ButtonDropSite::removeSelectedButton()
return succ;
}
-void ButtonDropSite::drawButtonList(QPainter *p, const ButtonList& btns, int offset)
+void ButtonDropSite::drawButtonList(TQPainter *p, const ButtonList& btns, int offset)
{
for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
- QRect itemRect = (*it)->rect;
+ TQRect itemRect = (*it)->rect;
if (itemRect.isValid() ) {
(*it)->draw(p, colorGroup(), itemRect);
}
@@ -589,13 +589,13 @@ void ButtonDropSite::drawButtonList(QPainter *p, const ButtonList& btns, int off
}
}
-void ButtonDropSite::drawContents( QPainter* p )
+void ButtonDropSite::drawContents( TQPainter* p )
{
int leftoffset = calcButtonListWidth( buttonsLeft );
int rightoffset = calcButtonListWidth( buttonsRight );
int offset = 3;
- QRect r = contentsRect();
+ TQRect r = contentsRect();
// Shrink by 1
r.moveBy(1 + leftoffset, 1);
@@ -604,10 +604,10 @@ void ButtonDropSite::drawContents( QPainter* p )
drawButtonList( p, buttonsLeft, offset );
- QColor c1( 0x0A, 0x5F, 0x89 ); // KDE 2 titlebar default colour
+ TQColor c1( 0x0A, 0x5F, 0x89 ); // KDE 2 titlebar default colour
p->fillRect( r, c1 );
p->setPen( Qt::white );
- p->setFont( QFont( KGlobalSettings::generalFont().family(), 12, QFont::Bold) );
+ p->setFont( TQFont( KGlobalSettings::generalFont().family(), 12, TQFont::Bold) );
p->drawText( r, AlignLeft | AlignVCenter, i18n("KDE") );
offset = geometry().width() - 3 - rightoffset;
@@ -619,8 +619,8 @@ void ButtonDropSite::drawContents( QPainter* p )
}
}
-ButtonSourceItem::ButtonSourceItem(QListView * parent, const Button& btn)
- : QListViewItem(parent),
+ButtonSourceItem::ButtonSourceItem(TQListView * parent, const Button& btn)
+ : TQListViewItem(parent),
m_button(btn),
m_dirty(true)
{
@@ -631,7 +631,7 @@ ButtonSourceItem::~ButtonSourceItem()
{
}
-void ButtonSourceItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+void ButtonSourceItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
// we need the color group cg, so to the work here, not in setButton...
if (m_dirty) {
@@ -644,12 +644,12 @@ void ButtonSourceItem::paintCell(QPainter *p, const QColorGroup &cg, int column,
}
if (m_button.supported) {
- QListViewItem::paintCell(p,cg,column,width,align);
+ TQListViewItem::paintCell(p,cg,column,width,align);
} else {
// grey out unsupported buttons
- QColorGroup cg2 = cg;
- cg2.setColor(QColorGroup::Text, cg.mid() );
- QListViewItem::paintCell(p,cg2,column,width,align);
+ TQColorGroup cg2 = cg;
+ cg2.setColor(TQColorGroup::Text, cg.mid() );
+ TQListViewItem::paintCell(p,cg2,column,width,align);
}
}
@@ -670,16 +670,16 @@ Button ButtonSourceItem::button() const
}
-ButtonPositionWidget::ButtonPositionWidget(QWidget *parent, const char* name)
- : QWidget(parent,name),
+ButtonPositionWidget::ButtonPositionWidget(TQWidget *parent, const char* name)
+ : TQWidget(parent,name),
m_factory(0)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum);
- QLabel* label = new QLabel( this );
+ TQLabel* label = new TQLabel( this );
m_dropSite = new ButtonDropSite( this );
- label->setAlignment( int( QLabel::WordBreak ) );
+ label->setAlignment( int( TQLabel::WordBreak ) );
label->setText( i18n( "To add or remove titlebar buttons, simply <i>drag</i> items "
"between the available item list and the titlebar preview. Similarly, "
"drag items within the titlebar preview to re-position them.") );
@@ -689,11 +689,11 @@ ButtonPositionWidget::ButtonPositionWidget(QWidget *parent, const char* name)
layout->addWidget(m_dropSite);
layout->addWidget(m_buttonSource);
- connect( m_dropSite, SIGNAL(buttonAdded(QChar)), m_buttonSource, SLOT(hideButton(QChar)) );
- connect( m_dropSite, SIGNAL(buttonRemoved(QChar)), m_buttonSource, SLOT(showButton(QChar)) );
- connect( m_buttonSource, SIGNAL(dropped(QDropEvent*, QListViewItem*)), m_dropSite, SLOT(removeSelectedButton()) );
+ connect( m_dropSite, TQT_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQT_SLOT(hideButton(TQChar)) );
+ connect( m_dropSite, TQT_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQT_SLOT(showButton(TQChar)) );
+ connect( m_buttonSource, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQT_SLOT(removeSelectedButton()) );
- connect( m_dropSite, SIGNAL(changed()), SIGNAL(changed()) );
+ connect( m_dropSite, TQT_SIGNAL(changed()), TQT_SIGNAL(changed()) );
// insert all possible buttons into the source (backwards to keep the preferred order...)
bool dummy;
@@ -723,7 +723,7 @@ void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory)
// get the list of supported buttons
if (m_factory->supports(KDecorationDefines::AbilityAnnounceButtons) ) {
- QString supportedButtons;
+ TQString supportedButtons;
if (m_factory->supports(KDecorationDefines::AbilityButtonMenu) )
supportedButtons.append('M');
@@ -756,7 +756,7 @@ void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory)
// update the button lists...
// 1. set status on the source items...
- QListViewItemIterator it(m_buttonSource);
+ TQListViewItemIterator it(m_buttonSource);
while (it.current() ) {
ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(it.current() );
if (i) {
@@ -771,51 +771,51 @@ void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory)
setButtonsRight(buttonsRight() );
}
-Button ButtonPositionWidget::getButton(QChar type, bool& success) {
+Button ButtonPositionWidget::getButton(TQChar type, bool& success) {
success = true;
if (type == 'R') {
- QBitmap bmp(resize_width, resize_height, resize_bits, true);
+ TQBitmap bmp(resize_width, resize_height, resize_bits, true);
bmp.setMask(bmp);
return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.contains('R') );
} else if (type == 'L') {
- QBitmap bmp(shade_width, shade_height, shade_bits, true);
+ TQBitmap bmp(shade_width, shade_height, shade_bits, true);
bmp.setMask(bmp);
return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.contains('L') );
} else if (type == 'B') {
- QBitmap bmp(keepbelowothers_width, keepbelowothers_height, keepbelowothers_bits, true);
+ TQBitmap bmp(keepbelowothers_width, keepbelowothers_height, keepbelowothers_bits, true);
bmp.setMask(bmp);
return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.contains('B') );
} else if (type == 'F') {
- QBitmap bmp(keepaboveothers_width, keepaboveothers_height, keepaboveothers_bits, true);
+ TQBitmap bmp(keepaboveothers_width, keepaboveothers_height, keepaboveothers_bits, true);
bmp.setMask(bmp);
return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.contains('F') );
} else if (type == 'X') {
- QBitmap bmp(close_width, close_height, close_bits, true);
+ TQBitmap bmp(close_width, close_height, close_bits, true);
bmp.setMask(bmp);
return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.contains('X') );
} else if (type == 'A') {
- QBitmap bmp(maximize_width, maximize_height, maximize_bits, true);
+ TQBitmap bmp(maximize_width, maximize_height, maximize_bits, true);
bmp.setMask(bmp);
return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.contains('A') );
} else if (type == 'I') {
- QBitmap bmp(minimize_width, minimize_height, minimize_bits, true);
+ TQBitmap bmp(minimize_width, minimize_height, minimize_bits, true);
bmp.setMask(bmp);
return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.contains('I') );
} else if (type == 'H') {
- QBitmap bmp(help_width, help_height, help_bits, true);
+ TQBitmap bmp(help_width, help_height, help_bits, true);
bmp.setMask(bmp);
return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.contains('H') );
} else if (type == 'S') {
- QBitmap bmp(onalldesktops_width, onalldesktops_height, onalldesktops_bits, true);
+ TQBitmap bmp(onalldesktops_width, onalldesktops_height, onalldesktops_bits, true);
bmp.setMask(bmp);
return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.contains('S') );
} else if (type == 'M') {
- QBitmap bmp(menu_width, menu_height, menu_bits, true);
+ TQBitmap bmp(menu_width, menu_height, menu_bits, true);
bmp.setMask(bmp);
return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.contains('M') );
} else if (type == '_') {
- QBitmap bmp(spacer_width, spacer_height, spacer_bits, true);
+ TQBitmap bmp(spacer_width, spacer_height, spacer_bits, true);
bmp.setMask(bmp);
return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.contains('_') );
} else {
@@ -824,27 +824,27 @@ Button ButtonPositionWidget::getButton(QChar type, bool& success) {
}
}
-QString ButtonPositionWidget::buttonsLeft() const
+TQString ButtonPositionWidget::buttonsLeft() const
{
ButtonList btns = m_dropSite->buttonsLeft;
- QString btnString = "";
+ TQString btnString = "";
for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
btnString.append( (*it)->button().type );
}
return btnString;
}
-QString ButtonPositionWidget::buttonsRight() const
+TQString ButtonPositionWidget::buttonsRight() const
{
ButtonList btns = m_dropSite->buttonsRight;
- QString btnString = "";
+ TQString btnString = "";
for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
btnString.append( (*it)->button().type );
}
return btnString;
}
-void ButtonPositionWidget::setButtonsLeft(const QString &buttons)
+void ButtonPositionWidget::setButtonsLeft(const TQString &buttons)
{
// to keep the button lists consistent, first remove all left buttons, then add buttons again...
m_dropSite->clearLeft();
@@ -861,7 +861,7 @@ void ButtonPositionWidget::setButtonsLeft(const QString &buttons)
m_dropSite->update();
}
-void ButtonPositionWidget::setButtonsRight(const QString &buttons)
+void ButtonPositionWidget::setButtonsRight(const TQString &buttons)
{
// to keep the button lists consistent, first remove all left buttons, then add buttons again...
m_dropSite->clearRight();
diff --git a/kwin/kcmkwin/kwindecoration/buttons.h b/kwin/kcmkwin/kwindecoration/buttons.h
index a3db6266e..0fcbff085 100644
--- a/kwin/kcmkwin/kwindecoration/buttons.h
+++ b/kwin/kcmkwin/kwindecoration/buttons.h
@@ -31,10 +31,10 @@
#ifndef __BUTTONS_H_
#define __BUTTONS_H_
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qlistbox.h>
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqlistbox.h>
#include <klistview.h>
@@ -47,12 +47,12 @@ class Button
{
public:
Button();
- Button(const QString& name, const QBitmap& icon, QChar type, bool duplicate, bool supported);
+ Button(const TQString& name, const TQBitmap& icon, TQChar type, bool duplicate, bool supported);
virtual ~Button();
- QString name;
- QBitmap icon;
- QChar type;
+ TQString name;
+ TQBitmap icon;
+ TQChar type;
bool duplicate;
bool supported;
};
@@ -60,11 +60,11 @@ class Button
class ButtonDrag : public QStoredDrag
{
public:
- ButtonDrag( Button btn, QWidget* parent, const char* name=0 );
+ ButtonDrag( Button btn, TQWidget* parent, const char* name=0 );
~ButtonDrag() {};
- static bool canDecode( QDropEvent* e );
- static bool decode( QDropEvent* e, Button& btn );
+ static bool canDecode( TQDropEvent* e );
+ static bool decode( TQDropEvent* e, Button& btn );
};
/**
@@ -78,11 +78,11 @@ class ButtonDropSiteItem
Button button();
- QRect rect;
+ TQRect rect;
int width();
int height();
- void draw(QPainter *p, const QColorGroup& cg, QRect rect);
+ void draw(TQPainter *p, const TQColorGroup& cg, TQRect rect);
private:
Button m_button;
@@ -94,10 +94,10 @@ class ButtonDropSiteItem
class ButtonSourceItem : public QListViewItem
{
public:
- ButtonSourceItem(QListView * parent, const Button& btn);
+ ButtonSourceItem(TQListView * parent, const Button& btn);
virtual ~ButtonSourceItem();
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
void setButton(const Button& btn);
Button button() const;
@@ -114,24 +114,24 @@ class ButtonSource : public KListView
Q_OBJECT
public:
- ButtonSource(QWidget *parent = 0, const char* name = 0);
+ ButtonSource(TQWidget *parent = 0, const char* name = 0);
virtual ~ButtonSource();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
void hideAllButtons();
void showAllButtons();
public slots:
- void hideButton(QChar btn);
- void showButton(QChar btn);
+ void hideButton(TQChar btn);
+ void showButton(TQChar btn);
protected:
- bool acceptDrag(QDropEvent* e) const;
- virtual QDragObject *dragObject();
+ bool acceptDrag(TQDropEvent* e) const;
+ virtual TQDragObject *dragObject();
};
-typedef QValueList<ButtonDropSiteItem*> ButtonList;
+typedef TQValueList<ButtonDropSiteItem*> ButtonList;
/**
* This class renders and handles the demo titlebar dropsite
@@ -141,7 +141,7 @@ class ButtonDropSite: public QFrame
Q_OBJECT
public:
- ButtonDropSite( QWidget* parent=0, const char* name=0 );
+ ButtonDropSite( TQWidget* parent=0, const char* name=0 );
~ButtonDropSite();
// Allow external classes access our buttons - ensure buttons are
@@ -152,8 +152,8 @@ class ButtonDropSite: public QFrame
void clearRight();
signals:
- void buttonAdded(QChar btn);
- void buttonRemoved(QChar btn);
+ void buttonAdded(TQChar btn);
+ void buttonRemoved(TQChar btn);
void changed();
public slots:
@@ -161,21 +161,21 @@ class ButtonDropSite: public QFrame
void recalcItemGeometry(); ///< Call this whenever the item list changes... updates the items' rect property
protected:
- void resizeEvent(QResizeEvent*);
- void dragEnterEvent( QDragEnterEvent* e );
- void dragMoveEvent( QDragMoveEvent* e );
- void dragLeaveEvent( QDragLeaveEvent* e );
- void dropEvent( QDropEvent* e );
- void mousePressEvent( QMouseEvent* e ); ///< Starts dragging a button...
-
- void drawContents( QPainter* p );
- ButtonDropSiteItem *buttonAt(QPoint p);
+ void resizeEvent(TQResizeEvent*);
+ void dragEnterEvent( TQDragEnterEvent* e );
+ void dragMoveEvent( TQDragMoveEvent* e );
+ void dragLeaveEvent( TQDragLeaveEvent* e );
+ void dropEvent( TQDropEvent* e );
+ void mousePressEvent( TQMouseEvent* e ); ///< Starts dragging a button...
+
+ void drawContents( TQPainter* p );
+ ButtonDropSiteItem *buttonAt(TQPoint p);
bool removeButton(ButtonDropSiteItem *item);
int calcButtonListWidth(const ButtonList& buttons); ///< Computes the total space the buttons will take in the titlebar
- void drawButtonList(QPainter *p, const ButtonList& buttons, int offset);
+ void drawButtonList(TQPainter *p, const ButtonList& buttons, int offset);
- QRect leftDropArea();
- QRect rightDropArea();
+ TQRect leftDropArea();
+ TQRect rightDropArea();
private:
/**
@@ -184,7 +184,7 @@ class ButtonDropSite: public QFrame
bool getItemIterator(ButtonDropSiteItem *item, ButtonList* &list, ButtonList::iterator &iterator);
void cleanDropVisualizer();
- QRect m_oldDropVisualizer;
+ TQRect m_oldDropVisualizer;
ButtonDropSiteItem *m_selected;
};
@@ -194,7 +194,7 @@ class ButtonPositionWidget : public QWidget
Q_OBJECT
public:
- ButtonPositionWidget(QWidget *parent = 0, const char* name = 0);
+ ButtonPositionWidget(TQWidget *parent = 0, const char* name = 0);
~ButtonPositionWidget();
/**
@@ -202,23 +202,23 @@ class ButtonPositionWidget : public QWidget
*/
void setDecorationFactory(KDecorationFactory *factory);
- QString buttonsLeft() const;
- QString buttonsRight() const;
- void setButtonsLeft(const QString &buttons);
- void setButtonsRight(const QString &buttons);
+ TQString buttonsLeft() const;
+ TQString buttonsRight() const;
+ void setButtonsLeft(const TQString &buttons);
+ void setButtonsRight(const TQString &buttons);
signals:
void changed();
private:
void clearButtonList(const ButtonList& btns);
- Button getButton(QChar type, bool& success);
+ Button getButton(TQChar type, bool& success);
ButtonDropSite* m_dropSite;
ButtonSource *m_buttonSource;
KDecorationFactory *m_factory;
- QString m_supportedButtons;
+ TQString m_supportedButtons;
};
diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp
index 7435781bc..68aec85ff 100644
--- a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp
+++ b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp
@@ -28,17 +28,17 @@
*/
#include <assert.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qslider.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqslider.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -59,10 +59,10 @@
// KCModule plugin interface
// =========================
-typedef KGenericFactory<KWinDecorationModule, QWidget> KWinDecoFactory;
+typedef KGenericFactory<KWinDecorationModule, TQWidget> KWinDecoFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kwindecoration, KWinDecoFactory("kcmkwindecoration") )
-KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, const QStringList &)
+KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, const TQStringList &)
: DCOPObject("KWinClientDecoration"),
KCModule(KWinDecoFactory::instance(), parent, name),
kwinConfig("kwinrc"),
@@ -71,28 +71,28 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
kwinConfig.setGroup("Style");
plugins = new KDecorationPreviewPlugins( &kwinConfig );
- QVBoxLayout* layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
// Save this for later...
-// cbUseMiniWindows = new QCheckBox( i18n( "Render mini &titlebars for all windows"), checkGroup );
-// QWhatsThis::add( cbUseMiniWindows, i18n( "Note that this option is not available on all styles yet!" ) );
+// cbUseMiniWindows = new TQCheckBox( i18n( "Render mini &titlebars for all windows"), checkGroup );
+// TQWhatsThis::add( cbUseMiniWindows, i18n( "Note that this option is not available on all styles yet!" ) );
- tabWidget = new QTabWidget( this );
+ tabWidget = new TQTabWidget( this );
layout->addWidget( tabWidget );
// Page 1 (General Options)
- QWidget *pluginPage = new QWidget( tabWidget );
+ TQWidget *pluginPage = new TQWidget( tabWidget );
- QVBoxLayout* pluginLayout = new QVBoxLayout(pluginPage, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* pluginLayout = new TQVBoxLayout(pluginPage, KDialog::marginHint(), KDialog::spacingHint());
// decoration chooser
decorationList = new KComboBox( pluginPage );
- QString whatsThis = i18n("Select the window decoration. This is the look and feel of both "
+ TQString whatsThis = i18n("Select the window decoration. This is the look and feel of both "
"the window borders and the window handle.");
- QWhatsThis::add(decorationList, whatsThis);
+ TQWhatsThis::add(decorationList, whatsThis);
pluginLayout->addWidget(decorationList);
- QGroupBox *pluginSettingsGrp = new QGroupBox( i18n("Decoration Options"), pluginPage );
+ TQGroupBox *pluginSettingsGrp = new TQGroupBox( i18n("Decoration Options"), pluginPage );
pluginSettingsGrp->setColumnLayout( 0, Vertical );
pluginSettingsGrp->setFlat( true );
pluginSettingsGrp->layout()->setMargin( 0 );
@@ -102,33 +102,33 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
pluginLayout->addStretch();
// Border size chooser
- lBorder = new QLabel (i18n("B&order size:"), pluginSettingsGrp);
- cBorder = new QComboBox(pluginSettingsGrp);
+ lBorder = new TQLabel (i18n("B&order size:"), pluginSettingsGrp);
+ cBorder = new TQComboBox(pluginSettingsGrp);
lBorder->setBuddy(cBorder);
- QWhatsThis::add( cBorder, i18n( "Use this combobox to change the border size of the decoration." ));
+ TQWhatsThis::add( cBorder, i18n( "Use this combobox to change the border size of the decoration." ));
lBorder->hide();
cBorder->hide();
- QHBoxLayout *borderSizeLayout = new QHBoxLayout(pluginSettingsGrp->layout() );
+ TQHBoxLayout *borderSizeLayout = new TQHBoxLayout(pluginSettingsGrp->layout() );
borderSizeLayout->addWidget(lBorder);
borderSizeLayout->addWidget(cBorder);
borderSizeLayout->addStretch();
- pluginConfigWidget = new QVBox(pluginSettingsGrp);
+ pluginConfigWidget = new TQVBox(pluginSettingsGrp);
pluginSettingsGrp->layout()->add( pluginConfigWidget );
// Page 2 (Button Selector)
- QWidget* buttonPage = new QWidget( tabWidget );
- QVBoxLayout* buttonLayout = new QVBoxLayout(buttonPage, KDialog::marginHint(), KDialog::spacingHint());
+ TQWidget* buttonPage = new TQWidget( tabWidget );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout(buttonPage, KDialog::marginHint(), KDialog::spacingHint());
- cbShowToolTips = new QCheckBox(
+ cbShowToolTips = new TQCheckBox(
i18n("&Show window button tooltips"), buttonPage );
- QWhatsThis::add( cbShowToolTips,
+ TQWhatsThis::add( cbShowToolTips,
i18n( "Enabling this checkbox will show window button tooltips. "
"If this checkbox is off, no window button tooltips will be shown."));
- cbUseCustomButtonPositions = new QCheckBox(
+ cbUseCustomButtonPositions = new TQCheckBox(
i18n("Use custom titlebar button &positions"), buttonPage );
- QWhatsThis::add( cbUseCustomButtonPositions,
+ TQWhatsThis::add( cbUseCustomButtonPositions,
i18n( "The appropriate settings can be found in the \"Buttons\" Tab; "
"please note that this option is not available on all styles yet." ) );
@@ -138,20 +138,20 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
// Add nifty dnd button modification widgets
buttonPositionWidget = new ButtonPositionWidget(buttonPage, "button_position_widget");
buttonPositionWidget->setDecorationFactory(plugins->factory() );
- QHBoxLayout* buttonControlLayout = new QHBoxLayout(buttonLayout);
+ TQHBoxLayout* buttonControlLayout = new TQHBoxLayout(buttonLayout);
buttonControlLayout->addSpacing(20);
buttonControlLayout->addWidget(buttonPositionWidget);
// buttonLayout->addStretch();
// preview
- QVBoxLayout* previewLayout = new QVBoxLayout(layout, KDialog::spacingHint() );
+ TQVBoxLayout* previewLayout = new TQVBoxLayout(layout, KDialog::spacingHint() );
previewLayout->setMargin( KDialog::marginHint() );
preview = new KDecorationPreview( this );
previewLayout->addWidget(preview);
- preview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- tabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
+ preview->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ tabWidget->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum);
// Load all installed decorations into memory
// Set up the decoration lists and other UI settings
@@ -163,17 +163,17 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
tabWidget->insertTab( pluginPage, i18n("&Window Decoration") );
tabWidget->insertTab( buttonPage, i18n("&Buttons") );
- connect( buttonPositionWidget, SIGNAL(changed()), this, SLOT(slotButtonsChanged()) ); // update preview etc.
- connect( buttonPositionWidget, SIGNAL(changed()), this, SLOT(slotSelectionChanged()) ); // emit changed()...
- connect( decorationList, SIGNAL(activated(const QString&)), SLOT(slotSelectionChanged()) );
- connect( decorationList, SIGNAL(activated(const QString&)),
- SLOT(slotChangeDecoration(const QString&)) );
- connect( cbUseCustomButtonPositions, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
- connect(cbUseCustomButtonPositions, SIGNAL(toggled(bool)), buttonPositionWidget, SLOT(setEnabled(bool)));
- connect(cbUseCustomButtonPositions, SIGNAL(toggled(bool)), this, SLOT(slotButtonsChanged()) );
- connect( cbShowToolTips, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
- connect( cBorder, SIGNAL( activated( int )), SLOT( slotBorderChanged( int )));
-// connect( cbUseMiniWindows, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
+ connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotButtonsChanged()) ); // update preview etc.
+ connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); // emit changed()...
+ connect( decorationList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) );
+ connect( decorationList, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotChangeDecoration(const TQString&)) );
+ connect( cbUseCustomButtonPositions, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
+ connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), buttonPositionWidget, TQT_SLOT(setEnabled(bool)));
+ connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsChanged()) );
+ connect( cbShowToolTips, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
+ connect( cBorder, TQT_SIGNAL( activated( int )), TQT_SLOT( slotBorderChanged( int )));
+// connect( cbUseMiniWindows, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) );
// Allow kwin dcop signal to update our selection list
connectDCOPSignal("kwin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false);
@@ -199,20 +199,20 @@ KWinDecorationModule::~KWinDecorationModule()
// And insert these into a DecorationInfo structure
void KWinDecorationModule::findDecorations()
{
- QStringList dirList = KGlobal::dirs()->findDirs("data", "kwin");
- QStringList::ConstIterator it;
+ TQStringList dirList = KGlobal::dirs()->findDirs("data", "kwin");
+ TQStringList::ConstIterator it;
for (it = dirList.begin(); it != dirList.end(); it++)
{
- QDir d(*it);
+ TQDir d(*it);
if (d.exists())
for (QFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it)
{
- QString filename(it.current()->absFilePath());
+ TQString filename(it.current()->absFilePath());
if (KDesktopFile::isDesktopFile(filename))
{
KDesktopFile desktopFile(filename);
- QString libName = desktopFile.readEntry("X-KDE-Library");
+ TQString libName = desktopFile.readEntry("X-KDE-Library");
if (!libName.isEmpty() && libName.startsWith( "kwin3_" ))
{
@@ -230,10 +230,10 @@ void KWinDecorationModule::findDecorations()
// Fills the decorationList with a list of available kwin decorations
void KWinDecorationModule::createDecorationList()
{
- QValueList<DecorationInfo>::ConstIterator it;
+ TQValueList<DecorationInfo>::ConstIterator it;
// Sync with kwin hardcoded KDE2 style which has no desktop item
- QStringList decorationNames;
+ TQStringList decorationNames;
decorationNames.append( i18n("KDE 2") );
for (it = decorations.begin(); it != decorations.end(); ++it)
{
@@ -245,7 +245,7 @@ void KWinDecorationModule::createDecorationList()
// Reset the decoration plugin to what the user just selected
-void KWinDecorationModule::slotChangeDecoration( const QString & text)
+void KWinDecorationModule::slotChangeDecoration( const TQString & text)
{
KConfig kwinConfig("kwinrc");
kwinConfig.setGroup("Style");
@@ -272,10 +272,10 @@ static const char* const border_names[ KDecorationDefines::BordersCount ] =
I18N_NOOP( "Oversized" )
};
-int KWinDecorationModule::borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes )
+int KWinDecorationModule::borderSizeToIndex( BorderSize size, TQValueList< BorderSize > sizes )
{
int pos = 0;
- for( QValueList< BorderSize >::ConstIterator it = sizes.begin();
+ for( TQValueList< BorderSize >::ConstIterator it = sizes.begin();
it != sizes.end();
++it, ++pos )
if( size <= *it )
@@ -284,9 +284,9 @@ int KWinDecorationModule::borderSizeToIndex( BorderSize size, QValueList< Border
}
KDecorationDefines::BorderSize KWinDecorationModule::indexToBorderSize( int index,
- QValueList< BorderSize > sizes )
+ TQValueList< BorderSize > sizes )
{
- QValueList< BorderSize >::ConstIterator it = sizes.begin();
+ TQValueList< BorderSize >::ConstIterator it = sizes.begin();
for(;
it != sizes.end();
++it, --index )
@@ -300,7 +300,7 @@ void KWinDecorationModule::slotBorderChanged( int size )
if( lBorder->isHidden())
return;
emit KCModule::changed( true );
- QValueList< BorderSize > sizes;
+ TQValueList< BorderSize > sizes;
if( plugins->factory() != NULL )
sizes = plugins->factory()->borderSizes();
assert( sizes.count() >= 2 );
@@ -316,11 +316,11 @@ void KWinDecorationModule::slotButtonsChanged()
preview->setTempButtons(plugins, cbUseCustomButtonPositions->isChecked(), buttonPositionWidget->buttonsLeft(), buttonPositionWidget->buttonsRight() );
}
-QString KWinDecorationModule::decorationName( QString& libName )
+TQString KWinDecorationModule::decorationName( TQString& libName )
{
- QString decoName;
+ TQString decoName;
- QValueList<DecorationInfo>::Iterator it;
+ TQValueList<DecorationInfo>::Iterator it;
for( it = decorations.begin(); it != decorations.end(); ++it )
if ( (*it).libraryName == libName )
{
@@ -332,13 +332,13 @@ QString KWinDecorationModule::decorationName( QString& libName )
}
-QString KWinDecorationModule::decorationLibName( const QString& name )
+TQString KWinDecorationModule::decorationLibName( const TQString& name )
{
- QString libName;
+ TQString libName;
// Find the corresponding library name to that of
// the current plugin name
- QValueList<DecorationInfo>::Iterator it;
+ TQValueList<DecorationInfo>::Iterator it;
for( it = decorations.begin(); it != decorations.end(); ++it )
if ( (*it).name == name )
{
@@ -355,14 +355,14 @@ QString KWinDecorationModule::decorationLibName( const QString& name )
// Loads/unloads and inserts the decoration config plugin into the
// pluginConfigWidget, allowing for dynamic configuration of decorations
-void KWinDecorationModule::resetPlugin( KConfig* conf, const QString& currentDecoName )
+void KWinDecorationModule::resetPlugin( KConfig* conf, const TQString& currentDecoName )
{
// Config names are "kwin_icewm_config"
// for "kwin3_icewm" kwin client
- QString oldName = styleToConfigLib( oldLibraryName );
+ TQString oldName = styleToConfigLib( oldLibraryName );
- QString currentName;
+ TQString currentName;
if (!currentDecoName.isEmpty())
currentName = decorationLibName( currentDecoName ); // Use what the user selected
else
@@ -391,23 +391,23 @@ void KWinDecorationModule::resetPlugin( KConfig* conf, const QString& currentDec
// Free the old library if possible
if (!oldLibraryName.isNull())
- loader->unloadLibrary( QFile::encodeName(oldName) );
+ loader->unloadLibrary( TQFile::encodeName(oldName) );
- KLibrary* library = loader->library( QFile::encodeName(currentName) );
+ KLibrary* library = loader->library( TQFile::encodeName(currentName) );
if (library != NULL)
{
void* alloc_ptr = library->symbol("allocate_config");
if (alloc_ptr != NULL)
{
- allocatePlugin = (QObject* (*)(KConfig* conf, QWidget* parent))alloc_ptr;
- pluginObject = (QObject*)(allocatePlugin( conf, pluginConfigWidget ));
+ allocatePlugin = (TQObject* (*)(KConfig* conf, TQWidget* parent))alloc_ptr;
+ pluginObject = (TQObject*)(allocatePlugin( conf, pluginConfigWidget ));
// connect required signals and slots together...
- connect( pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()) );
- connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
- connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
- connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
+ connect( pluginObject, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) );
+ connect( this, TQT_SIGNAL(pluginLoad(KConfig*)), pluginObject, TQT_SLOT(load(KConfig*)) );
+ connect( this, TQT_SIGNAL(pluginSave(KConfig*)), pluginObject, TQT_SLOT(save(KConfig*)) );
+ connect( this, TQT_SIGNAL(pluginDefaults()), pluginObject, TQT_SLOT(defaults()) );
pluginConfigWidget->show();
return;
}
@@ -431,8 +431,8 @@ void KWinDecorationModule::readConfig( KConfig* conf )
oldLibraryName = currentLibraryName;
currentLibraryName = conf->readEntry("PluginLib",
- ((QPixmap::defaultDepth() > 8) ? "kwin_plastik" : "kwin_quartz"));
- QString decoName = decorationName( currentLibraryName );
+ ((TQPixmap::defaultDepth() > 8) ? "kwin_plastik" : "kwin_quartz"));
+ TQString decoName = decorationName( currentLibraryName );
// If we are using the "default" kde client, use the "default" entry.
if (decoName.isEmpty())
@@ -472,8 +472,8 @@ void KWinDecorationModule::readConfig( KConfig* conf )
// Writes the selected user configuration to the kwin config file
void KWinDecorationModule::writeConfig( KConfig* conf )
{
- QString name = decorationList->currentText();
- QString libName = decorationLibName( name );
+ TQString name = decorationList->currentText();
+ TQString libName = decorationLibName( name );
KConfig kwinConfig("kwinrc");
kwinConfig.setGroup("Style");
@@ -558,7 +558,7 @@ void KWinDecorationModule::defaults()
void KWinDecorationModule::checkSupportedBorderSizes()
{
- QValueList< BorderSize > sizes;
+ TQValueList< BorderSize > sizes;
if( plugins->factory() != NULL )
sizes = plugins->factory()->borderSizes();
if( sizes.count() < 2 ) {
@@ -566,7 +566,7 @@ void KWinDecorationModule::checkSupportedBorderSizes()
cBorder->hide();
} else {
cBorder->clear();
- for (QValueList<BorderSize>::const_iterator it = sizes.begin(); it != sizes.end(); ++it) {
+ for (TQValueList<BorderSize>::const_iterator it = sizes.begin(); it != sizes.end(); ++it) {
BorderSize size = *it;
cBorder->insertItem(i18n(border_names[size]), borderSizeToIndex(size,sizes) );
}
@@ -578,7 +578,7 @@ void KWinDecorationModule::checkSupportedBorderSizes()
}
}
-QString KWinDecorationModule::styleToConfigLib( QString& styleLib )
+TQString KWinDecorationModule::styleToConfigLib( TQString& styleLib )
{
if( styleLib.startsWith( "kwin3_" ))
return "kwin_" + styleLib.mid( 6 ) + "_config";
@@ -586,7 +586,7 @@ QString KWinDecorationModule::styleToConfigLib( QString& styleLib )
return styleLib + "_config";
}
-QString KWinDecorationModule::quickHelp() const
+TQString KWinDecorationModule::quickHelp() const
{
return i18n( "<h1>Window Manager Decoration</h1>"
"<p>This module allows you to choose the window border decorations, "
@@ -602,7 +602,7 @@ QString KWinDecorationModule::quickHelp() const
void KWinDecorationModule::resetKWin()
{
bool ok = kapp->dcopClient()->send("kwin*", "KWinInterface",
- "reconfigure()", QByteArray());
+ "reconfigure()", TQByteArray());
if (!ok)
kdDebug() << "kcmkwindecoration: Could not reconfigure kwin" << endl;
}
diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.h b/kwin/kcmkwin/kwindecoration/kwindecoration.h
index eea091ebc..126f20fa9 100644
--- a/kwin/kcmkwin/kwindecoration/kwindecoration.h
+++ b/kwin/kcmkwin/kwindecoration/kwindecoration.h
@@ -53,8 +53,8 @@ class KDecorationPreview;
// Stores themeName and its corresponding library Name
struct DecorationInfo
{
- QString name;
- QString libraryName;
+ TQString name;
+ TQString libraryName;
};
@@ -63,14 +63,14 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
Q_OBJECT
public:
- KWinDecorationModule(QWidget* parent, const char* name, const QStringList &);
+ KWinDecorationModule(TQWidget* parent, const char* name, const TQStringList &);
~KWinDecorationModule();
virtual void load();
virtual void save();
virtual void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
virtual void dcopUpdateClientList();
@@ -82,7 +82,7 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
protected slots:
// Allows us to turn "save" on
void slotSelectionChanged();
- void slotChangeDecoration( const QString & );
+ void slotChangeDecoration( const TQString & );
void slotBorderChanged( int );
void slotButtonsChanged();
@@ -92,41 +92,41 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
void findDecorations();
void createDecorationList();
void updateSelection();
- QString decorationLibName( const QString& name );
- QString decorationName ( QString& libName );
- static QString styleToConfigLib( QString& styleLib );
- void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
+ TQString decorationLibName( const TQString& name );
+ TQString decorationName ( TQString& libName );
+ static TQString styleToConfigLib( TQString& styleLib );
+ void resetPlugin( KConfig* conf, const TQString& currentDecoName = TQString::null );
void resetKWin();
void checkSupportedBorderSizes();
- static int borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes );
- static BorderSize indexToBorderSize( int index, QValueList< BorderSize > sizes );
+ static int borderSizeToIndex( BorderSize size, TQValueList< BorderSize > sizes );
+ static BorderSize indexToBorderSize( int index, TQValueList< BorderSize > sizes );
- QTabWidget* tabWidget;
+ TQTabWidget* tabWidget;
// Page 1
KComboBox* decorationList;
- QValueList<DecorationInfo> decorations;
+ TQValueList<DecorationInfo> decorations;
KDecorationPreview* preview;
KDecorationPlugins* plugins;
KConfig kwinConfig;
- QCheckBox* cbUseCustomButtonPositions;
- // QCheckBox* cbUseMiniWindows;
- QCheckBox* cbShowToolTips;
- QLabel* lBorder;
- QComboBox* cBorder;
+ TQCheckBox* cbUseCustomButtonPositions;
+ // TQCheckBox* cbUseMiniWindows;
+ TQCheckBox* cbShowToolTips;
+ TQLabel* lBorder;
+ TQComboBox* cBorder;
BorderSize border_size;
- QObject* pluginObject;
- QWidget* pluginConfigWidget;
- QString currentLibraryName;
- QString oldLibraryName;
- QObject* (*allocatePlugin)( KConfig* conf, QWidget* parent );
+ TQObject* pluginObject;
+ TQWidget* pluginConfigWidget;
+ TQString currentLibraryName;
+ TQString oldLibraryName;
+ TQObject* (*allocatePlugin)( KConfig* conf, TQWidget* parent );
// Page 2
ButtonPositionWidget *buttonPositionWidget;
- QVBox* buttonPage;
+ TQVBox* buttonPage;
};
diff --git a/kwin/kcmkwin/kwindecoration/preview.cpp b/kwin/kcmkwin/kwindecoration/preview.cpp
index 8c88a3604..c9a0174f4 100644
--- a/kwin/kcmkwin/kwindecoration/preview.cpp
+++ b/kwin/kcmkwin/kwindecoration/preview.cpp
@@ -23,8 +23,8 @@
#include <klocale.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qlabel.h>
-#include <qstyle.h>
+#include <tqlabel.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <X11/Xlib.h>
@@ -35,8 +35,8 @@
// FRAME the preview doesn't update to reflect the changes done in the kcm
-KDecorationPreview::KDecorationPreview( QWidget* parent, const char* name )
- : QWidget( parent, name )
+KDecorationPreview::KDecorationPreview( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
options = new KDecorationPreviewOptions;
@@ -45,7 +45,7 @@ KDecorationPreview::KDecorationPreview( QWidget* parent, const char* name )
deco[Active] = deco[Inactive] = NULL;
- no_preview = new QLabel( i18n( "No preview available.\n"
+ no_preview = new TQLabel( i18n( "No preview available.\n"
"Most probably there\n"
"was a problem loading the plugin." ), this );
@@ -99,9 +99,9 @@ void KDecorationPreview::disablePreview()
no_preview->show();
}
-void KDecorationPreview::resizeEvent( QResizeEvent* e )
+void KDecorationPreview::resizeEvent( TQResizeEvent* e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
positionPreviews();
}
@@ -109,8 +109,8 @@ void KDecorationPreview::positionPreviews()
{
int titleBarHeight, leftBorder, rightBorder, xoffset,
dummy1, dummy2, dummy3;
- QRect geometry;
- QSize size;
+ TQRect geometry;
+ TQSize size;
no_preview->resize( this->size() );
@@ -122,25 +122,25 @@ void KDecorationPreview::positionPreviews()
deco[Inactive]->borders( leftBorder, rightBorder, dummy1, dummy2 );
titleBarHeight = kMin( int( titleBarHeight * .9 ), 30 );
- xoffset = kMin( kMax( 10, QApplication::reverseLayout()
+ xoffset = kMin( kMax( 10, TQApplication::reverseLayout()
? leftBorder : rightBorder ), 30 );
// Resize the active window
- size = QSize( width() - xoffset, height() - titleBarHeight )
+ size = TQSize( width() - xoffset, height() - titleBarHeight )
.expandedTo( deco[Active]->minimumSize() );
- geometry = QRect( QPoint( 0, titleBarHeight ), size );
- deco[Active]->widget()->setGeometry( QStyle::visualRect( geometry, this ) );
+ geometry = TQRect( TQPoint( 0, titleBarHeight ), size );
+ deco[Active]->widget()->setGeometry( TQStyle::visualRect( geometry, this ) );
// Resize the inactive window
- size = QSize( width() - xoffset, height() - titleBarHeight )
+ size = TQSize( width() - xoffset, height() - titleBarHeight )
.expandedTo( deco[Inactive]->minimumSize() );
- geometry = QRect( QPoint( xoffset, 0 ), size );
- deco[Inactive]->widget()->setGeometry( QStyle::visualRect( geometry, this ) );
+ geometry = TQRect( TQPoint( xoffset, 0 ), size );
+ deco[Inactive]->widget()->setGeometry( TQStyle::visualRect( geometry, this ) );
}
-void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode, bool active )
+void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool active )
{
- QWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
+ TQWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
// FRAME duped from client.cpp
if( mode == Unsorted )
@@ -150,7 +150,7 @@ void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode, bool acti
}
else
{
- QMemArray< QRect > rects = reg.rects();
+ TQMemArray< TQRect > rects = reg.rects();
XRectangle* xrects = new XRectangle[ rects.count() ];
for( unsigned int i = 0;
i < rects.count();
@@ -169,9 +169,9 @@ void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode, bool acti
mask = reg; // keep shape of the active window for unobscuredRegion()
}
-QRect KDecorationPreview::windowGeometry( bool active ) const
+TQRect KDecorationPreview::windowGeometry( bool active ) const
{
- QWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
+ TQWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
return widget->geometry();
}
@@ -190,7 +190,7 @@ void KDecorationPreview::setTempBorderSize(KDecorationPlugins* plugin, KDecorati
}
}
-void KDecorationPreview::setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const QString &left, const QString &right)
+void KDecorationPreview::setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const TQString &left, const TQString &right)
{
options->setCustomTitleButtonsEnabled(customEnabled);
options->setCustomTitleButtons(left, right);
@@ -206,17 +206,17 @@ void KDecorationPreview::setTempButtons(KDecorationPlugins* plugin, bool customE
}
}
-QRegion KDecorationPreview::unobscuredRegion( bool active, const QRegion& r ) const
+TQRegion KDecorationPreview::unobscuredRegion( bool active, const TQRegion& r ) const
{
if( active ) // this one is not obscured
return r;
else
{
// copied from KWin core's code
- QRegion ret = r;
- QRegion r2 = mask;
+ TQRegion ret = r;
+ TQRegion r2 = mask;
if( r2.isEmpty())
- r2 = QRegion( windowGeometry( true ));
+ r2 = TQRegion( windowGeometry( true ));
r2.translate( windowGeometry( true ).x() - windowGeometry( false ).x(),
windowGeometry( true ).y() - windowGeometry( false ).y());
ret -= r2;
@@ -229,7 +229,7 @@ KDecorationPreviewBridge::KDecorationPreviewBridge( KDecorationPreview* p, bool
{
}
-QWidget* KDecorationPreviewBridge::initialParentWidget() const
+TQWidget* KDecorationPreviewBridge::initialParentWidget() const
{
return preview;
}
@@ -319,26 +319,26 @@ NET::WindowType KDecorationPreviewBridge::windowType( unsigned long ) const
return NET::Normal;
}
-QIconSet KDecorationPreviewBridge::icon() const
+TQIconSet KDecorationPreviewBridge::icon() const
{
- return QIconSet( KGlobal::iconLoader()->loadIcon( "xapp", KIcon::NoGroup, 16 ),
+ return TQIconSet( KGlobal::iconLoader()->loadIcon( "xapp", KIcon::NoGroup, 16 ),
KGlobal::iconLoader()->loadIcon( "xapp", KIcon::NoGroup, 32 ));
}
-QString KDecorationPreviewBridge::caption() const
+TQString KDecorationPreviewBridge::caption() const
{
return active ? i18n( "Active Window" ) : i18n( "Inactive Window" );
}
-void KDecorationPreviewBridge::processMousePressEvent( QMouseEvent* )
+void KDecorationPreviewBridge::processMousePressEvent( TQMouseEvent* )
{
}
-void KDecorationPreviewBridge::showWindowMenu( const QRect &)
+void KDecorationPreviewBridge::showWindowMenu( const TQRect &)
{
}
-void KDecorationPreviewBridge::showWindowMenu( QPoint )
+void KDecorationPreviewBridge::showWindowMenu( TQPoint )
{
}
@@ -346,7 +346,7 @@ void KDecorationPreviewBridge::performWindowOperation( WindowOperation )
{
}
-void KDecorationPreviewBridge::setMask( const QRegion& reg, int mode )
+void KDecorationPreviewBridge::setMask( const TQRegion& reg, int mode )
{
preview->setPreviewMask( reg, mode, active );
}
@@ -356,22 +356,22 @@ bool KDecorationPreviewBridge::isPreview() const
return true;
}
-QRect KDecorationPreviewBridge::geometry() const
+TQRect KDecorationPreviewBridge::geometry() const
{
return preview->windowGeometry( active );
}
-QRect KDecorationPreviewBridge::iconGeometry() const
+TQRect KDecorationPreviewBridge::iconGeometry() const
{
- return QRect();
+ return TQRect();
}
-QRegion KDecorationPreviewBridge::unobscuredRegion( const QRegion& r ) const
+TQRegion KDecorationPreviewBridge::unobscuredRegion( const TQRegion& r ) const
{
return preview->unobscuredRegion( active, r );
}
-QWidget* KDecorationPreviewBridge::workspaceWidget() const
+TQWidget* KDecorationPreviewBridge::workspaceWidget() const
{
return preview;
}
@@ -439,8 +439,8 @@ KDecorationPreviewOptions::KDecorationPreviewOptions()
customBorderSize = BordersCount; // invalid
customButtonsChanged = false; // invalid
customButtons = true;
- customTitleButtonsLeft = QString::null; // invalid
- customTitleButtonsRight = QString::null; // invalid
+ customTitleButtonsLeft = TQString::null; // invalid
+ customTitleButtonsRight = TQString::null; // invalid
d = new KDecorationOptionsPrivate;
d->defaultKWinSettings();
@@ -491,7 +491,7 @@ void KDecorationPreviewOptions::setCustomTitleButtonsEnabled(bool enabled)
updateSettings();
}
-void KDecorationPreviewOptions::setCustomTitleButtons(const QString &left, const QString &right)
+void KDecorationPreviewOptions::setCustomTitleButtons(const TQString &left, const TQString &right)
{
customTitleButtonsLeft = left;
customTitleButtonsRight = right;
diff --git a/kwin/kcmkwin/kwindecoration/preview.h b/kwin/kcmkwin/kwindecoration/preview.h
index 1c1943486..a7f50d682 100644
--- a/kwin/kcmkwin/kwindecoration/preview.h
+++ b/kwin/kcmkwin/kwindecoration/preview.h
@@ -20,7 +20,7 @@
#ifndef KWINDECORATION_PREVIEW_H
#define KWINDECORATION_PREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdecoration_p.h>
#include <kdecoration_plugins_p.h>
@@ -39,25 +39,25 @@ class KDecorationPreview
// and an inactive window.
enum Windows { Inactive = 0, Active, NumWindows };
- KDecorationPreview( QWidget* parent = NULL, const char* name = NULL );
+ KDecorationPreview( TQWidget* parent = NULL, const char* name = NULL );
virtual ~KDecorationPreview();
bool recreateDecoration( KDecorationPlugins* plugin );
void enablePreview();
void disablePreview();
- void setPreviewMask( const QRegion&, int, bool );
- QRegion unobscuredRegion( bool, const QRegion& ) const;
- QRect windowGeometry( bool ) const;
+ void setPreviewMask( const TQRegion&, int, bool );
+ TQRegion unobscuredRegion( bool, const TQRegion& ) const;
+ TQRect windowGeometry( bool ) const;
void setTempBorderSize(KDecorationPlugins* plugin, KDecorationDefines::BorderSize size);
- void setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const QString &left, const QString &right);
+ void setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const TQString &left, const TQString &right);
protected:
- virtual void resizeEvent( QResizeEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
private:
void positionPreviews();
KDecorationPreviewOptions* options;
KDecorationPreviewBridge* bridge[NumWindows];
KDecoration* deco[NumWindows];
- QLabel* no_preview;
- QRegion mask;
+ TQLabel* no_preview;
+ TQRegion mask;
};
class KDecorationPreviewBridge
@@ -81,18 +81,18 @@ class KDecorationPreviewBridge
virtual bool isMovable() const;
virtual bool isResizable() const;
virtual NET::WindowType windowType( unsigned long supported_types ) const;
- virtual QIconSet icon() const;
- virtual QString caption() const;
- virtual void processMousePressEvent( QMouseEvent* );
- virtual void showWindowMenu( const QRect &);
- virtual void showWindowMenu( QPoint );
+ virtual TQIconSet icon() const;
+ virtual TQString caption() const;
+ virtual void processMousePressEvent( TQMouseEvent* );
+ virtual void showWindowMenu( const TQRect &);
+ virtual void showWindowMenu( TQPoint );
virtual void performWindowOperation( WindowOperation );
- virtual void setMask( const QRegion&, int );
+ virtual void setMask( const TQRegion&, int );
virtual bool isPreview() const;
- virtual QRect geometry() const;
- virtual QRect iconGeometry() const;
- virtual QRegion unobscuredRegion( const QRegion& r ) const;
- virtual QWidget* workspaceWidget() const;
+ virtual TQRect geometry() const;
+ virtual TQRect iconGeometry() const;
+ virtual TQRegion unobscuredRegion( const TQRegion& r ) const;
+ virtual TQWidget* workspaceWidget() const;
virtual WId windowId() const;
virtual void closeWindow();
virtual void maximize( MaximizeMode mode );
@@ -105,7 +105,7 @@ class KDecorationPreviewBridge
virtual void setKeepAbove( bool );
virtual void setKeepBelow( bool );
virtual int currentDesktop() const;
- virtual QWidget* initialParentWidget() const;
+ virtual TQWidget* initialParentWidget() const;
virtual Qt::WFlags initialWFlags() const;
virtual void helperShowHide( bool show );
virtual void grabXServer( bool grab );
@@ -124,14 +124,14 @@ class KDecorationPreviewOptions
void setCustomBorderSize(BorderSize size);
void setCustomTitleButtonsEnabled(bool enabled);
- void setCustomTitleButtons(const QString &left, const QString &right);
+ void setCustomTitleButtons(const TQString &left, const TQString &right);
private:
BorderSize customBorderSize;
bool customButtonsChanged;
bool customButtons;
- QString customTitleButtonsLeft;
- QString customTitleButtonsRight;
+ TQString customTitleButtonsLeft;
+ TQString customTitleButtonsRight;
};
class KDecorationPreviewPlugins
diff --git a/kwin/kcmkwin/kwinoptions/main.cpp b/kwin/kcmkwin/kwinoptions/main.cpp
index fbc70e4c8..ac19a5d30 100644
--- a/kwin/kcmkwin/kwinoptions/main.cpp
+++ b/kwin/kcmkwin/kwinoptions/main.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <dcopclient.h>
@@ -36,7 +36,7 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kwinfocus(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_kwinfocus(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
@@ -44,14 +44,14 @@ extern "C"
return new KFocusConfig(true, c, parent, name);
}
- KDE_EXPORT KCModule *create_kwinactions(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_kwinactions(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
return new KActionsOptions( parent, name);
}
- KDE_EXPORT KCModule *create_kwinmoving(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_kwinmoving(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
@@ -59,7 +59,7 @@ extern "C"
return new KMovingConfig(true, c, parent, name);
}
- KDE_EXPORT KCModule *create_kwinadvanced(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_kwinadvanced(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
@@ -67,7 +67,7 @@ extern "C"
return new KAdvancedConfig(true, c, parent, name);
}
- KDE_EXPORT KCModule *create_kwintranslucency(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_kwintranslucency(TQWidget *parent, const char *name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
@@ -75,7 +75,7 @@ extern "C"
return new KTranslucencyConfig(true, c, parent, name);
}
- KDE_EXPORT KCModule *create_kwinoptions ( QWidget *parent, const char* name)
+ KDE_EXPORT KCModule *create_kwinoptions ( TQWidget *parent, const char* name)
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue("kcmkwm");
@@ -83,44 +83,44 @@ extern "C"
}
}
-KWinOptions::KWinOptions(QWidget *parent, const char *name)
+KWinOptions::KWinOptions(TQWidget *parent, const char *name)
: KCModule(parent, name)
{
mConfig = new KConfig("kwinrc", false, true);
- QVBoxLayout *layout = new QVBoxLayout(this);
- tab = new QTabWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+ tab = new TQTabWidget(this);
layout->addWidget(tab);
mFocus = new KFocusConfig(false, mConfig, this, "KWin Focus Config");
mFocus->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mFocus, i18n("&Focus"));
- connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mFocus, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "KWin TitleBar Actions");
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
- connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mWindowActions = new KWindowActionsConfig(false, mConfig, this, "KWin Window Actions");
mWindowActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
- connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mMoving = new KMovingConfig(false, mConfig, this, "KWin Moving");
mMoving->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mMoving, i18n("&Moving"));
- connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mMoving, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mAdvanced = new KAdvancedConfig(false, mConfig, this, "KWin Advanced");
mAdvanced->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mAdvanced, i18n("Ad&vanced"));
- connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mAdvanced, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mTranslucency = new KTranslucencyConfig(false, mConfig, this, "KWin Translucency");
mTranslucency->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTranslucency, i18n("&Translucency"));
- connect(mTranslucency, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mTranslucency, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
KAboutData *about =
new KAboutData(I18N_NOOP("kcmkwinoptions"), I18N_NOOP("Window Behavior Configuration Module"),
@@ -185,7 +185,7 @@ void KWinOptions::defaults()
mTranslucency->defaults();
}
-QString KWinOptions::quickHelp() const
+TQString KWinOptions::quickHelp() const
{
return i18n("<h1>Window Behavior</h1> Here you can customize the way windows behave when being"
" moved, resized or clicked on. You can also specify a focus policy as well as a placement"
@@ -201,24 +201,24 @@ void KWinOptions::moduleChanged(bool state)
}
-KActionsOptions::KActionsOptions(QWidget *parent, const char *name)
+KActionsOptions::KActionsOptions(TQWidget *parent, const char *name)
: KCModule(parent, name)
{
mConfig = new KConfig("kwinrc", false, true);
- QVBoxLayout *layout = new QVBoxLayout(this);
- tab = new QTabWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+ tab = new TQTabWidget(this);
layout->addWidget(tab);
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "KWin TitleBar Actions");
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
- connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
mWindowActions = new KWindowActionsConfig(false, mConfig, this, "KWin Window Actions");
mWindowActions->layout()->setMargin( KDialog::marginHint() );
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
- connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
}
KActionsOptions::~KActionsOptions()
diff --git a/kwin/kcmkwin/kwinoptions/main.h b/kwin/kcmkwin/kwinoptions/main.h
index e8591c13f..2465c6766 100644
--- a/kwin/kcmkwin/kwinoptions/main.h
+++ b/kwin/kcmkwin/kwinoptions/main.h
@@ -25,7 +25,7 @@
#ifndef __MAIN_H__
#define __MAIN_H__
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kcmodule.h>
class KConfig;
@@ -41,13 +41,13 @@ class KWinOptions : public KCModule
public:
- KWinOptions(QWidget *parent, const char *name);
+ KWinOptions(TQWidget *parent, const char *name);
virtual ~KWinOptions();
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected slots:
@@ -57,7 +57,7 @@ protected slots:
private:
- QTabWidget *tab;
+ TQTabWidget *tab;
KFocusConfig *mFocus;
KTitleBarActionsConfig *mTitleBarActions;
@@ -75,7 +75,7 @@ class KActionsOptions : public KCModule
public:
- KActionsOptions(QWidget *parent, const char *name);
+ KActionsOptions(TQWidget *parent, const char *name);
virtual ~KActionsOptions();
void load();
@@ -89,7 +89,7 @@ protected slots:
private:
- QTabWidget *tab;
+ TQTabWidget *tab;
KTitleBarActionsConfig *mTitleBarActions;
KWindowActionsConfig *mWindowActions;
diff --git a/kwin/kcmkwin/kwinoptions/mouse.cpp b/kwin/kcmkwin/kwinoptions/mouse.cpp
index f220bbfa9..6adba1f89 100644
--- a/kwin/kcmkwin/kwinoptions/mouse.cpp
+++ b/kwin/kcmkwin/kwinoptions/mouse.cpp
@@ -17,16 +17,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qsizepolicy.h>
-#include <qbitmap.h>
-#include <qhgroupbox.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqsizepolicy.h>
+#include <tqbitmap.h>
+#include <tqhgroupbox.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -60,7 +60,7 @@ char const * const tbl_Max[] = {
"Maximize (horizontal only)",
"" };
-QPixmap maxButtonPixmaps[3];
+TQPixmap maxButtonPixmaps[3];
void createMaxButtonPixmaps()
{
@@ -109,14 +109,14 @@ void createMaxButtonPixmaps()
"..............."},
};
- QString baseColor(". c " + KGlobalSettings::baseColor().name());
- QString textColor("# c " + KGlobalSettings::textColor().name());
+ TQString baseColor(". c " + KGlobalSettings::baseColor().name());
+ TQString textColor("# c " + KGlobalSettings::textColor().name());
for (int t = 0; t < 3; ++t)
{
maxButtonXpms[t][0] = "15 13 2 1";
maxButtonXpms[t][1] = baseColor.ascii();
maxButtonXpms[t][2] = textColor.ascii();
- maxButtonPixmaps[t] = QPixmap(maxButtonXpms[t]);
+ maxButtonPixmaps[t] = TQPixmap(maxButtonXpms[t]);
maxButtonPixmaps[t].setMask(maxButtonPixmaps[t].createHeuristicMask());
}
}
@@ -132,29 +132,29 @@ void KTitleBarActionsConfig::paletteChanged()
}
-KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_config, TQWidget * parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
- QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3;
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QGrid *grid;
- QGroupBox *box;
- QLabel *label;
- QString strMouseButton1, strMouseButton3, strMouseWheel;
- QString txtButton1, txtButton3, txtButton4;
- QStringList items;
+ TQString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3;
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQGrid *grid;
+ TQGroupBox *box;
+ TQLabel *label;
+ TQString strMouseButton1, strMouseButton3, strMouseWheel;
+ TQString txtButton1, txtButton3, txtButton4;
+ TQStringList items;
bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded);
/** Titlebar doubleclick ************/
- QHBoxLayout *hlayout = new QHBoxLayout(layout);
+ TQHBoxLayout *hlayout = new TQHBoxLayout(layout);
- label = new QLabel(i18n("&Titlebar double-click:"), this);
+ label = new TQLabel(i18n("&Titlebar double-click:"), this);
hlayout->addWidget(label);
- QWhatsThis::add( label, i18n("Here you can customize mouse click behavior when double clicking on the"
+ TQWhatsThis::add( label, i18n("Here you can customize mouse click behavior when double clicking on the"
" titlebar of a window.") );
- QComboBox* combo = new QComboBox(this);
+ TQComboBox* combo = new TQComboBox(this);
combo->insertItem(i18n("Maximize"));
combo->insertItem(i18n("Maximize (vertical only)"));
combo->insertItem(i18n("Maximize (horizontal only)"));
@@ -163,24 +163,24 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
combo->insertItem(i18n("Lower"));
combo->insertItem(i18n("On All Desktops"));
combo->insertItem(i18n("Nothing"));
- combo->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ combo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
hlayout->addWidget(combo);
coTiDbl = combo;
- QWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar."));
+ TQWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar."));
label->setBuddy(combo);
/** Mouse Wheel Events **************/
- QHBoxLayout *hlayoutW = new QHBoxLayout(layout);
+ TQHBoxLayout *hlayoutW = new TQHBoxLayout(layout);
strMouseWheel = i18n("Titlebar wheel event:");
- label = new QLabel(strMouseWheel, this);
+ label = new TQLabel(strMouseWheel, this);
hlayoutW->addWidget(label);
txtButton4 = i18n("Handle mouse wheel events");
- QWhatsThis::add( label, txtButton4);
+ TQWhatsThis::add( label, txtButton4);
// Titlebar and frame mouse Wheel
- QComboBox* comboW = new QComboBox(this);
+ TQComboBox* comboW = new TQComboBox(this);
comboW->insertItem(i18n("Raise/Lower"));
comboW->insertItem(i18n("Shade/Unshade"));
comboW->insertItem(i18n("Maximize/Restore"));
@@ -188,26 +188,26 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
comboW->insertItem(i18n("Move to Previous/Next Desktop"));
comboW->insertItem(i18n("Change Opacity"));
comboW->insertItem(i18n("Nothing"));
- comboW->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
- connect(comboW, SIGNAL(activated(int)), SLOT(changed()));
+ comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
+ connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
hlayoutW->addWidget(comboW);
coTiAct4 = comboW;
- QWhatsThis::add(comboW, txtButton4);
+ TQWhatsThis::add(comboW, txtButton4);
label->setBuddy(comboW);
/** Titlebar and frame **************/
- box = new QVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame");
+ box = new TQVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame");
box->layout()->setMargin(KDialog::marginHint());
box->layout()->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on the"
+ TQWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on the"
" titlebar or the frame of a window.") );
- grid = new QGrid(4, Qt::Vertical, box);
+ grid = new TQGrid(4, Qt::Vertical, box);
- new QLabel(grid); // dummy
+ new TQLabel(grid); // dummy
strMouseButton1 = i18n("Left button:");
txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
@@ -223,30 +223,30 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
qSwap(txtButton1, txtButton3);
}
- label = new QLabel(strMouseButton1, grid);
- QWhatsThis::add( label, txtButton1);
+ label = new TQLabel(strMouseButton1, grid);
+ TQWhatsThis::add( label, txtButton1);
- label = new QLabel(i18n("Middle button:"), grid);
- QWhatsThis::add( label, i18n("In this row you can customize middle click behavior when clicking into"
+ label = new TQLabel(i18n("Middle button:"), grid);
+ TQWhatsThis::add( label, i18n("In this row you can customize middle click behavior when clicking into"
" the titlebar or the frame.") );
- label = new QLabel(strMouseButton3, grid);
- QWhatsThis::add( label, txtButton3);
+ label = new TQLabel(strMouseButton3, grid);
+ TQWhatsThis::add( label, txtButton3);
- label = new QLabel(i18n("Active"), grid);
+ label = new TQLabel(i18n("Active"), grid);
label->setAlignment(AlignCenter);
- QWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
+ TQWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
" or the frame of an active window.") );
// Titlebar and frame, active, mouse button 1
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertItem(i18n("Raise"));
combo->insertItem(i18n("Lower"));
combo->insertItem(i18n("Operations Menu"));
combo->insertItem(i18n("Toggle Raise & Lower"));
combo->insertItem(i18n("Nothing"));
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiAct1 = combo;
txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an "
@@ -258,7 +258,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
// Be nice to left handed users
if ( leftHandedMouse ) qSwap(txtButton1, txtButton3);
- QWhatsThis::add(combo, txtButton1);
+ TQWhatsThis::add(combo, txtButton1);
// Titlebar and frame, active, mouse button 2
@@ -269,18 +269,18 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
<< i18n("Nothing")
<< i18n("Shade");
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiAct2 = combo;
- QWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window."));
+ TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window."));
// Titlebar and frame, active, mouse button 3
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiAct3 = combo;
- QWhatsThis::add(combo, txtButton3 );
+ TQWhatsThis::add(combo, txtButton3 );
txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an "
"<em>inactive</em> window.");
@@ -291,9 +291,9 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
// Be nice to left handed users
if ( leftHandedMouse ) qSwap(txtButton1, txtButton3);
- label = new QLabel(i18n("Inactive"), grid);
+ label = new TQLabel(i18n("Inactive"), grid);
label->setAlignment(AlignCenter);
- QWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
+ TQWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
" or the frame of an inactive window.") );
items.clear();
@@ -306,39 +306,39 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
<< i18n("Lower")
<< i18n("Nothing");
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiInAct1 = combo;
- QWhatsThis::add(combo, txtButton1);
+ TQWhatsThis::add(combo, txtButton1);
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiInAct2 = combo;
- QWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window."));
+ TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window."));
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coTiInAct3 = combo;
- QWhatsThis::add(combo, txtButton3);
+ TQWhatsThis::add(combo, txtButton3);
/** Maximize Button ******************/
- box = new QHGroupBox(i18n("Maximize Button"), this, "Maximize Button");
+ box = new TQHGroupBox(i18n("Maximize Button"), this, "Maximize Button");
box->layout()->setMargin(KDialog::marginHint());
box->layout()->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QWhatsThis::add( box,
+ TQWhatsThis::add( box,
i18n("Here you can customize behavior when clicking on the maximize button.") );
- QString strMouseButton[] = {
+ TQString strMouseButton[] = {
i18n("Left button:"),
i18n("Middle button:"),
i18n("Right button:")};
- QString txtButton[] = {
+ TQString txtButton[] = {
i18n("Behavior on <em>left</em> click onto the maximize button." ),
i18n("Behavior on <em>middle</em> click onto the maximize button." ),
i18n("Behavior on <em>right</em> click onto the maximize button." )};
@@ -352,21 +352,21 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
createMaxButtonPixmaps();
for (int b = 0; b < 3; ++b)
{
- if (b != 0) new QWidget(box); // Spacer
+ if (b != 0) new TQWidget(box); // Spacer
- QLabel * label = new QLabel(strMouseButton[b], box);
- QWhatsThis::add( label, txtButton[b] );
- label ->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ));
+ TQLabel * label = new TQLabel(strMouseButton[b], box);
+ TQWhatsThis::add( label, txtButton[b] );
+ label ->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ));
coMax[b] = new ToolTipComboBox(box, tbl_Max);
for (int t = 0; t < 3; ++t) coMax[b]->insertItem(maxButtonPixmaps[t]);
- connect(coMax[b], SIGNAL(activated(int)), SLOT(changed()));
- connect(coMax[b], SIGNAL(activated(int)), coMax[b], SLOT(changed()));
- QWhatsThis::add( coMax[b], txtButton[b] );
- coMax[b]->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ));
+ connect(coMax[b], TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(coMax[b], TQT_SIGNAL(activated(int)), coMax[b], TQT_SLOT(changed()));
+ TQWhatsThis::add( coMax[b], txtButton[b] );
+ coMax[b]->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ));
}
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(paletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(paletteChanged()));
layout->addStretch();
@@ -483,7 +483,7 @@ static int tbl_txt_lookup( const char* const arr[], const char* txt )
return 0;
}
-void KTitleBarActionsConfig::setComboText( QComboBox* combo, const char*txt )
+void KTitleBarActionsConfig::setComboText( TQComboBox* combo, const char*txt )
{
if( combo == coTiDbl )
combo->setCurrentItem( tbl_txt_lookup( tbl_TiDbl, txt ));
@@ -584,29 +584,29 @@ void KTitleBarActionsConfig::defaults()
}
-KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config, TQWidget * parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
- QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3, strAllW;
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QGrid *grid;
- QGroupBox *box;
- QLabel *label;
- QString strMouseButton1, strMouseButton3;
- QString txtButton1, txtButton3;
- QStringList items;
+ TQString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3, strAllW;
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQGrid *grid;
+ TQGroupBox *box;
+ TQLabel *label;
+ TQString strMouseButton1, strMouseButton3;
+ TQString txtButton1, txtButton3;
+ TQStringList items;
bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded);
/** Inactive inner window ******************/
- box = new QVGroupBox(i18n("Inactive Inner Window"), this, "Inactive Inner Window");
+ box = new TQVGroupBox(i18n("Inactive Inner Window"), this, "Inactive Inner Window");
box->layout()->setMargin(KDialog::marginHint());
box->layout()->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on an inactive"
+ TQWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on an inactive"
" inner window ('inner' means: not titlebar, not frame).") );
- grid = new QGrid(3, Qt::Vertical, box);
+ grid = new TQGrid(3, Qt::Vertical, box);
strMouseButton1 = i18n("Left button:");
txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
@@ -631,16 +631,16 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
// Be nice to lefties
if ( leftHandedMouse ) qSwap(strWin1, strWin3);
- label = new QLabel(strMouseButton1, grid);
- QWhatsThis::add( label, strWin1 );
+ label = new TQLabel(strMouseButton1, grid);
+ TQWhatsThis::add( label, strWin1 );
- label = new QLabel(i18n("Middle button:"), grid);
+ label = new TQLabel(i18n("Middle button:"), grid);
strWin2 = i18n("In this row you can customize middle click behavior when clicking into"
" an inactive inner window ('inner' means: not titlebar, not frame).");
- QWhatsThis::add( label, strWin2 );
+ TQWhatsThis::add( label, strWin2 );
- label = new QLabel(strMouseButton3, grid);
- QWhatsThis::add( label, strWin3 );
+ label = new TQLabel(strMouseButton3, grid);
+ TQWhatsThis::add( label, strWin3 );
items.clear();
items << i18n("Activate, Raise & Pass Click")
@@ -648,42 +648,42 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
<< i18n("Activate")
<< i18n("Activate & Raise");
- QComboBox* combo = new QComboBox(grid);
+ TQComboBox* combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coWin1 = combo;
- QWhatsThis::add( combo, strWin1 );
+ TQWhatsThis::add( combo, strWin1 );
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coWin2 = combo;
- QWhatsThis::add( combo, strWin2 );
+ TQWhatsThis::add( combo, strWin2 );
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coWin3 = combo;
- QWhatsThis::add( combo, strWin3 );
+ TQWhatsThis::add( combo, strWin3 );
/** Inner window, titlebar and frame **************/
- box = new QVGroupBox(i18n("Inner Window, Titlebar && Frame"), this, "Inner Window, Titlebar and Frame");
+ box = new TQVGroupBox(i18n("Inner Window, Titlebar && Frame"), this, "Inner Window, Titlebar and Frame");
box->layout()->setMargin(KDialog::marginHint());
box->layout()->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QWhatsThis::add( box, i18n("Here you can customize KDE's behavior when clicking somewhere into"
+ TQWhatsThis::add( box, i18n("Here you can customize KDE's behavior when clicking somewhere into"
" a window while pressing a modifier key."));
- grid = new QGrid(5, Qt::Vertical, box);
+ grid = new TQGrid(5, Qt::Vertical, box);
// Labels
- label = new QLabel(i18n("Modifier key:"), grid);
+ label = new TQLabel(i18n("Modifier key:"), grid);
strAllKey = i18n("Here you select whether holding the Meta key or Alt key "
"will allow you to perform the following actions.");
- QWhatsThis::add( label, strAllKey );
+ TQWhatsThis::add( label, strAllKey );
strMouseButton1 = i18n("Modifier key + left button:");
@@ -700,29 +700,29 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
qSwap(strAll1, strAll3);
}
- label = new QLabel(strMouseButton1, grid);
- QWhatsThis::add( label, strAll1);
+ label = new TQLabel(strMouseButton1, grid);
+ TQWhatsThis::add( label, strAll1);
- label = new QLabel(i18n("Modifier key + middle button:"), grid);
+ label = new TQLabel(i18n("Modifier key + middle button:"), grid);
strAll2 = i18n("Here you can customize KDE's behavior when middle clicking into a window"
" while pressing the modifier key.");
- QWhatsThis::add( label, strAll2 );
+ TQWhatsThis::add( label, strAll2 );
- label = new QLabel(strMouseButton3, grid);
- QWhatsThis::add( label, strAll3);
+ label = new TQLabel(strMouseButton3, grid);
+ TQWhatsThis::add( label, strAll3);
- label = new QLabel(i18n("Modifier key + mouse wheel:"), grid);
+ label = new TQLabel(i18n("Modifier key + mouse wheel:"), grid);
strAllW = i18n("Here you can customize KDE's behavior when scrolling with the mouse wheel"
" in a window while pressing the modifier key.");
- QWhatsThis::add( label, strAllW);
+ TQWhatsThis::add( label, strAllW);
// Combo's
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertItem(i18n("Meta"));
combo->insertItem(i18n("Alt"));
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAllKey = combo;
- QWhatsThis::add( combo, strAllKey );
+ TQWhatsThis::add( combo, strAllKey );
items.clear();
items << i18n("Move")
@@ -734,25 +734,25 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
<< i18n("Minimize")
<< i18n("Nothing");
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAll1 = combo;
- QWhatsThis::add( combo, strAll1 );
+ TQWhatsThis::add( combo, strAll1 );
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAll2 = combo;
- QWhatsThis::add( combo, strAll2 );
+ TQWhatsThis::add( combo, strAll2 );
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertStringList(items);
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAll3 = combo;
- QWhatsThis::add( combo, strAll3 );
+ TQWhatsThis::add( combo, strAll3 );
- combo = new QComboBox(grid);
+ combo = new TQComboBox(grid);
combo->insertItem(i18n("Raise/Lower"));
combo->insertItem(i18n("Shade/Unshade"));
combo->insertItem(i18n("Maximize/Restore"));
@@ -760,9 +760,9 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
combo->insertItem(i18n("Move to Previous/Next Desktop"));
combo->insertItem(i18n("Change Opacity"));
combo->insertItem(i18n("Nothing"));
- connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAllW = combo;
- QWhatsThis::add( combo, strAllW );
+ TQWhatsThis::add( combo, strAllW );
layout->addStretch();
@@ -775,7 +775,7 @@ KWindowActionsConfig::~KWindowActionsConfig()
delete config;
}
-void KWindowActionsConfig::setComboText( QComboBox* combo, const char*txt )
+void KWindowActionsConfig::setComboText( TQComboBox* combo, const char*txt )
{
if( combo == coWin1 || combo == coWin2 || combo == coWin3 )
combo->setCurrentItem( tbl_txt_lookup( tbl_Win, txt ));
diff --git a/kwin/kcmkwin/kwinoptions/mouse.h b/kwin/kcmkwin/kwinoptions/mouse.h
index 24b2d4030..b28437511 100644
--- a/kwin/kcmkwin/kwinoptions/mouse.h
+++ b/kwin/kcmkwin/kwinoptions/mouse.h
@@ -24,10 +24,10 @@
class KConfig;
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kcmodule.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
class ToolTipComboBox: public QComboBox
@@ -35,12 +35,12 @@ class ToolTipComboBox: public QComboBox
Q_OBJECT
public:
- ToolTipComboBox(QWidget * owner, char const * const * toolTips_)
- : QComboBox(owner)
+ ToolTipComboBox(TQWidget * owner, char const * const * toolTips_)
+ : TQComboBox(owner)
, toolTips(toolTips_) {}
public slots:
- void changed() {QToolTip::add( this, i18n(toolTips[currentItem()]) );}
+ void changed() {TQToolTip::add( this, i18n(toolTips[currentItem()]) );}
protected:
char const * const * toolTips;
@@ -54,7 +54,7 @@ class KTitleBarActionsConfig : public KCModule
public:
- KTitleBarActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ KTitleBarActionsConfig( bool _standAlone, KConfig *_config, TQWidget *parent=0, const char* name=0 );
~KTitleBarActionsConfig( );
void load();
@@ -65,15 +65,15 @@ public slots:
void changed() { emit KCModule::changed(true); }
private:
- QComboBox* coTiDbl;
+ TQComboBox* coTiDbl;
- QComboBox* coTiAct1;
- QComboBox* coTiAct2;
- QComboBox* coTiAct3;
- QComboBox* coTiAct4;
- QComboBox* coTiInAct1;
- QComboBox* coTiInAct2;
- QComboBox* coTiInAct3;
+ TQComboBox* coTiAct1;
+ TQComboBox* coTiAct2;
+ TQComboBox* coTiAct3;
+ TQComboBox* coTiAct4;
+ TQComboBox* coTiInAct1;
+ TQComboBox* coTiInAct2;
+ TQComboBox* coTiInAct3;
ToolTipComboBox * coMax[3];
@@ -86,7 +86,7 @@ private:
const char* functionTiInAc(int);
const char* functionMax(int);
- void setComboText(QComboBox* combo, const char* text);
+ void setComboText(TQComboBox* combo, const char* text);
const char* fixup( const char* s );
private slots:
@@ -100,7 +100,7 @@ class KWindowActionsConfig : public KCModule
public:
- KWindowActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ KWindowActionsConfig( bool _standAlone, KConfig *_config, TQWidget *parent=0, const char* name=0 );
~KWindowActionsConfig( );
void load();
@@ -111,15 +111,15 @@ public slots:
void changed() { emit KCModule::changed(true); }
private:
- QComboBox* coWin1;
- QComboBox* coWin2;
- QComboBox* coWin3;
+ TQComboBox* coWin1;
+ TQComboBox* coWin2;
+ TQComboBox* coWin3;
- QComboBox* coAllKey;
- QComboBox* coAll1;
- QComboBox* coAll2;
- QComboBox* coAll3;
- QComboBox* coAllW;
+ TQComboBox* coAllKey;
+ TQComboBox* coAll1;
+ TQComboBox* coAll2;
+ TQComboBox* coAll3;
+ TQComboBox* coAllW;
KConfig *config;
bool standAlone;
@@ -129,7 +129,7 @@ private:
const char* functionAll(int);
const char* functionAllW(int);
- void setComboText(QComboBox* combo, const char* text);
+ void setComboText(TQComboBox* combo, const char* text);
const char* fixup( const char* s );
};
diff --git a/kwin/kcmkwin/kwinoptions/windows.cpp b/kwin/kcmkwin/kwinoptions/windows.cpp
index aa779125b..1a9e88f15 100644
--- a/kwin/kcmkwin/kwinoptions/windows.cpp
+++ b/kwin/kcmkwin/kwinoptions/windows.cpp
@@ -23,15 +23,15 @@
#include <config.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qwhatsthis.h>
-#include <qvbuttongroup.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqslider.h>
+#include <tqwhatsthis.h>
+#include <tqvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <kmessagebox.h>
#include <kactivelabel.h>
@@ -44,7 +44,7 @@
#include <dcopclient.h>
#include <kglobal.h>
#include <kprocess.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -101,19 +101,19 @@ KFocusConfig::~KFocusConfig ()
}
// removed the LCD display over the slider - this is not good GUI design :) RNolden 051701
-KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, TQWidget * parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
- QString wtstr;
- QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+ TQString wtstr;
+ TQBoxLayout *lay = new TQVBoxLayout (this, 0, KDialog::spacingHint());
- //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ //iTLabel = new TQLabel(i18n(" Allowed overlap:\n"
// "(% of desktop space)"),
// plcBox);
//iTLabel->setAlignment(AlignTop|AlignHCenter);
//pLay->addWidget(iTLabel,1,1);
- //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //interactiveTrigger = new TQSpinBox(0, 500, 1, plcBox);
//pLay->addWidget(interactiveTrigger,1,2);
//pLay->addRowSpacing(2,KDialog::spacingHint());
@@ -121,16 +121,16 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
//lay->addWidget(plcBox);
// focus policy
- fcsBox = new QButtonGroup(i18n("Focus"),this);
+ fcsBox = new TQButtonGroup(i18n("Focus"),this);
fcsBox->setColumnLayout( 0, Qt::Horizontal );
- QBoxLayout *fLay = new QVBoxLayout(fcsBox->layout(),
+ TQBoxLayout *fLay = new TQVBoxLayout(fcsBox->layout(),
KDialog::spacingHint());
- QBoxLayout *cLay = new QHBoxLayout(fLay);
- QLabel *fLabel = new QLabel(i18n("&Policy:"), fcsBox);
+ TQBoxLayout *cLay = new TQHBoxLayout(fLay);
+ TQLabel *fLabel = new TQLabel(i18n("&Policy:"), fcsBox);
cLay->addWidget(fLabel, 0);
- focusCombo = new QComboBox(false, fcsBox);
+ focusCombo = new TQComboBox(false, fcsBox);
focusCombo->insertItem(i18n("Click to Focus"), CLICK_TO_FOCUS);
focusCombo->insertItem(i18n("Focus Follows Mouse"), FOCUS_FOLLOWS_MOUSE);
focusCombo->insertItem(i18n("Focus Under Mouse"), FOCUS_UNDER_MOUSE);
@@ -158,15 +158,15 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
" features such as the Alt+Tab walk through windows dialog in the KDE mode"
" from working properly."
);
- QWhatsThis::add( focusCombo, wtstr);
- QWhatsThis::add(fLabel, wtstr);
+ TQWhatsThis::add( focusCombo, wtstr);
+ TQWhatsThis::add(fLabel, wtstr);
- connect(focusCombo, SIGNAL(activated(int)), this, SLOT(setAutoRaiseEnabled()) );
+ connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAutoRaiseEnabled()) );
// autoraise delay
- autoRaiseOn = new QCheckBox(i18n("Auto &raise"), fcsBox);
+ autoRaiseOn = new TQCheckBox(i18n("Auto &raise"), fcsBox);
fLay->addWidget(autoRaiseOn);
- connect(autoRaiseOn,SIGNAL(toggled(bool)), this, SLOT(autoRaiseOnTog(bool)));
+ connect(autoRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(autoRaiseOnTog(bool)));
autoRaise = new KIntNumInput(500, fcsBox);
autoRaise->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
@@ -175,11 +175,11 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
autoRaise->setSuffix(i18n(" msec"));
fLay->addWidget(autoRaise);
- connect(focusCombo, SIGNAL(activated(int)), this, SLOT(setDelayFocusEnabled()) );
+ connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDelayFocusEnabled()) );
- delayFocusOn = new QCheckBox(i18n("Delay focus"), fcsBox);
+ delayFocusOn = new TQCheckBox(i18n("Delay focus"), fcsBox);
fLay->addWidget(delayFocusOn);
- connect(delayFocusOn,SIGNAL(toggled(bool)), this, SLOT(delayFocusOnTog(bool)));
+ connect(delayFocusOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(delayFocusOnTog(bool)));
delayFocus = new KIntNumInput(500, fcsBox);
delayFocus->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
@@ -188,45 +188,45 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
delayFocus->setSuffix(i18n(" msec"));
fLay->addWidget(delayFocus);
- clickRaiseOn = new QCheckBox(i18n("C&lick raise active window"), fcsBox);
- connect(clickRaiseOn,SIGNAL(toggled(bool)), this, SLOT(clickRaiseOnTog(bool)));
+ clickRaiseOn = new TQCheckBox(i18n("C&lick raise active window"), fcsBox);
+ connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool)));
fLay->addWidget(clickRaiseOn);
// fLay->addColSpacing(0,QMAX(autoRaiseOn->sizeHint().width(),
// clickRaiseOn->sizeHint().width()) + 15);
- QWhatsThis::add( autoRaiseOn, i18n("When this option is enabled, a window in the background will automatically"
+ TQWhatsThis::add( autoRaiseOn, i18n("When this option is enabled, a window in the background will automatically"
" come to the front when the mouse pointer has been over it for some time.") );
wtstr = i18n("This is the delay after which the window that the mouse pointer is over will automatically"
" come to the front.");
- QWhatsThis::add( autoRaise, wtstr );
+ TQWhatsThis::add( autoRaise, wtstr );
- QWhatsThis::add( clickRaiseOn, i18n("When this option is enabled, the active window will be brought to the"
+ TQWhatsThis::add( clickRaiseOn, i18n("When this option is enabled, the active window will be brought to the"
" front when you click somewhere into the window contents. To change"
" it for inactive windows, you need to change the settings"
" in the Actions tab.") );
- QWhatsThis::add( delayFocusOn, i18n("When this option is enabled, there will be a delay after which the"
+ TQWhatsThis::add( delayFocusOn, i18n("When this option is enabled, there will be a delay after which the"
" window the mouse pointer is over will become active (receive focus).") );
- QWhatsThis::add( delayFocus, i18n("This is the delay after which the window the mouse pointer is over"
+ TQWhatsThis::add( delayFocus, i18n("This is the delay after which the window the mouse pointer is over"
" will automatically receive focus.") );
- separateScreenFocus = new QCheckBox( i18n( "S&eparate screen focus" ), fcsBox );
+ separateScreenFocus = new TQCheckBox( i18n( "S&eparate screen focus" ), fcsBox );
fLay->addWidget( separateScreenFocus );
wtstr = i18n( "When this option is enabled, focus operations are limited only to the active Xinerama screen" );
- QWhatsThis::add( separateScreenFocus, wtstr );
+ TQWhatsThis::add( separateScreenFocus, wtstr );
- activeMouseScreen = new QCheckBox( i18n( "Active &mouse screen" ), fcsBox );
+ activeMouseScreen = new TQCheckBox( i18n( "Active &mouse screen" ), fcsBox );
fLay->addWidget( activeMouseScreen );
wtstr = i18n( "When this option is enabled, active Xinerama screen (where for example new windows appear)"
" is the screen with the mouse pointer. When disabled, the active Xinerama screen is the screen"
" with the focused window. This option is by default disabled for Click to focus and"
" enabled for other focus policies." );
- QWhatsThis::add( activeMouseScreen, wtstr );
- connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateActiveMouseScreen()));
+ TQWhatsThis::add( activeMouseScreen, wtstr );
+ connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateActiveMouseScreen()));
- if (!QApplication::desktop()->isVirtualDesktop() ||
- QApplication::desktop()->numScreens() == 1) // No Ximerama
+ if (!TQApplication::desktop()->isVirtualDesktop() ||
+ TQApplication::desktop()->numScreens() == 1) // No Ximerama
{
separateScreenFocus->hide();
activeMouseScreen->hide();
@@ -234,11 +234,11 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
lay->addWidget(fcsBox);
- kbdBox = new QButtonGroup(i18n("Navigation"), this);
+ kbdBox = new TQButtonGroup(i18n("Navigation"), this);
kbdBox->setColumnLayout( 0, Qt::Horizontal );
- QVBoxLayout *kLay = new QVBoxLayout(kbdBox->layout(), KDialog::spacingHint());
+ TQVBoxLayout *kLay = new TQVBoxLayout(kbdBox->layout(), KDialog::spacingHint());
- altTabPopup = new QCheckBox( i18n("Show window list while switching windows"), kbdBox );
+ altTabPopup = new TQCheckBox( i18n("Show window list while switching windows"), kbdBox );
kLay->addWidget( altTabPopup );
wtstr = i18n("Hold down the Alt key and press the Tab key repeatedly to walk"
@@ -250,45 +250,45 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent
"Otherwise, the focus is passed to a new window each time Tab"
" is pressed, with no popup widget. In addition, the previously"
" activated window will be sent to the back in this mode.");
- QWhatsThis::add( altTabPopup, wtstr );
- connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateAltTabMode()));
+ TQWhatsThis::add( altTabPopup, wtstr );
+ connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateAltTabMode()));
- traverseAll = new QCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
+ traverseAll = new TQCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
kLay->addWidget( traverseAll );
wtstr = i18n( "Leave this option disabled if you want to limit walking through"
" windows to the current desktop." );
- QWhatsThis::add( traverseAll, wtstr );
+ TQWhatsThis::add( traverseAll, wtstr );
- rollOverDesktops = new QCheckBox( i18n("Desktop navi&gation wraps around"), kbdBox );
+ rollOverDesktops = new TQCheckBox( i18n("Desktop navi&gation wraps around"), kbdBox );
kLay->addWidget(rollOverDesktops);
wtstr = i18n( "Enable this option if you want keyboard or active desktop border navigation beyond"
" the edge of a desktop to take you to the opposite edge of the new desktop." );
- QWhatsThis::add( rollOverDesktops, wtstr );
+ TQWhatsThis::add( rollOverDesktops, wtstr );
- showPopupinfo = new QCheckBox( i18n("Popup desktop name on desktop &switch"), kbdBox );
+ showPopupinfo = new TQCheckBox( i18n("Popup desktop name on desktop &switch"), kbdBox );
kLay->addWidget(showPopupinfo);
wtstr = i18n( "Enable this option if you wish to see the current desktop"
" name popup whenever the current desktop is changed." );
- QWhatsThis::add( showPopupinfo, wtstr );
+ TQWhatsThis::add( showPopupinfo, wtstr );
lay->addWidget(kbdBox);
lay->addStretch();
// Any changes goes to slotChanged()
- connect(focusCombo, SIGNAL(activated(int)), SLOT(changed()));
- connect(fcsBox, SIGNAL(clicked(int)), SLOT(changed()));
- connect(autoRaise, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(delayFocus, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(separateScreenFocus, SIGNAL(clicked()), SLOT(changed()));
- connect(activeMouseScreen, SIGNAL(clicked()), SLOT(changed()));
- connect(altTabPopup, SIGNAL(clicked()), SLOT(changed()));
- connect(traverseAll, SIGNAL(clicked()), SLOT(changed()));
- connect(rollOverDesktops, SIGNAL(clicked()), SLOT(changed()));
- connect(showPopupinfo, SIGNAL(clicked()), SLOT(changed()));
+ connect(focusCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(fcsBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()));
+ connect(autoRaise, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(delayFocus, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(separateScreenFocus, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(activeMouseScreen, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(altTabPopup, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(traverseAll, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(rollOverDesktops, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect(showPopupinfo, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
load();
}
@@ -425,7 +425,7 @@ void KFocusConfig::setShowPopupinfo(bool a) {
void KFocusConfig::load( void )
{
- QString key;
+ TQString key;
config->setGroup( "Windows" );
@@ -564,34 +564,34 @@ KAdvancedConfig::~KAdvancedConfig ()
delete config;
}
-KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, TQWidget *parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
- QString wtstr;
- QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+ TQString wtstr;
+ TQBoxLayout *lay = new TQVBoxLayout (this, 0, KDialog::spacingHint());
- //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ //iTLabel = new TQLabel(i18n(" Allowed overlap:\n"
// "(% of desktop space)"),
// plcBox);
//iTLabel->setAlignment(AlignTop|AlignHCenter);
//pLay->addWidget(iTLabel,1,1);
- //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //interactiveTrigger = new TQSpinBox(0, 500, 1, plcBox);
//pLay->addWidget(interactiveTrigger,1,2);
//pLay->addRowSpacing(2,KDialog::spacingHint());
//lay->addWidget(plcBox);
- shBox = new QVButtonGroup(i18n("Shading"), this);
+ shBox = new TQVButtonGroup(i18n("Shading"), this);
- animateShade = new QCheckBox(i18n("Anima&te"), shBox);
- QWhatsThis::add(animateShade, i18n("Animate the action of reducing the window to its titlebar (shading)"
+ animateShade = new TQCheckBox(i18n("Anima&te"), shBox);
+ TQWhatsThis::add(animateShade, i18n("Animate the action of reducing the window to its titlebar (shading)"
" as well as the expansion of a shaded window") );
- shadeHoverOn = new QCheckBox(i18n("&Enable hover"), shBox);
+ shadeHoverOn = new TQCheckBox(i18n("&Enable hover"), shBox);
- connect(shadeHoverOn, SIGNAL(toggled(bool)), this, SLOT(shadeHoverChanged(bool)));
+ connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shadeHoverChanged(bool)));
shadeHover = new KIntNumInput(500, shBox);
shadeHover->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
@@ -599,49 +599,49 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *p
shadeHover->setSteps(100, 100);
shadeHover->setSuffix(i18n(" msec"));
- QWhatsThis::add(shadeHoverOn, i18n("If Shade Hover is enabled, a shaded window will un-shade automatically "
+ TQWhatsThis::add(shadeHoverOn, i18n("If Shade Hover is enabled, a shaded window will un-shade automatically "
"when the mouse pointer has been over the title bar for some time."));
wtstr = i18n("Sets the time in milliseconds before the window unshades "
"when the mouse pointer goes over the shaded window.");
- QWhatsThis::add(shadeHover, wtstr);
+ TQWhatsThis::add(shadeHover, wtstr);
lay->addWidget(shBox);
// Any changes goes to slotChanged()
- connect(animateShade, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(shadeHoverOn, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(shadeHover, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(animateShade, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(shadeHover, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- electricBox = new QVButtonGroup(i18n("Active Desktop Borders"), this);
+ electricBox = new TQVButtonGroup(i18n("Active Desktop Borders"), this);
electricBox->setMargin(15);
- QWhatsThis::add( electricBox, i18n("If this option is enabled, moving the mouse to a screen border"
+ TQWhatsThis::add( electricBox, i18n("If this option is enabled, moving the mouse to a screen border"
" will change your desktop. This is e.g. useful if you want to drag windows from one desktop"
" to the other.") );
- active_disable = new QRadioButton(i18n("D&isabled"), electricBox);
- active_move = new QRadioButton(i18n("Only &when moving windows"), electricBox);
- active_always = new QRadioButton(i18n("A&lways enabled"), electricBox);
+ active_disable = new TQRadioButton(i18n("D&isabled"), electricBox);
+ active_move = new TQRadioButton(i18n("Only &when moving windows"), electricBox);
+ active_always = new TQRadioButton(i18n("A&lways enabled"), electricBox);
delays = new KIntNumInput(10, electricBox);
delays->setRange(0, MAX_EDGE_RES, 50, true);
delays->setSuffix(i18n(" msec"));
delays->setLabel(i18n("Desktop &switch delay:"));
- QWhatsThis::add( delays, i18n("Here you can set a delay for switching desktops using the active"
+ TQWhatsThis::add( delays, i18n("Here you can set a delay for switching desktops using the active"
" borders feature. Desktops will be switched after the mouse has been pushed against a screen border"
" for the specified number of milliseconds.") );
- connect( electricBox, SIGNAL(clicked(int)), this, SLOT(setEBorders()));
+ connect( electricBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setEBorders()));
// Any changes goes to slotChanged()
- connect(electricBox, SIGNAL(clicked(int)), SLOT(changed()));
- connect(delays, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(electricBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()));
+ connect(delays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
lay->addWidget(electricBox);
- QHBoxLayout* focusStealingLayout = new QHBoxLayout( lay,KDialog::spacingHint());
- QLabel* focusStealingLabel = new QLabel( i18n( "Focus stealing prevention level:" ), this );
- focusStealing = new QComboBox( this );
+ TQHBoxLayout* focusStealingLayout = new TQHBoxLayout( lay,KDialog::spacingHint());
+ TQLabel* focusStealingLabel = new TQLabel( i18n( "Focus stealing prevention level:" ), this );
+ focusStealing = new TQComboBox( this );
focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "None" ));
focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Low" ));
focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Normal" ));
@@ -669,16 +669,16 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *p
"<p>Windows that are prevented from stealing focus are marked as demanding attention, "
"which by default means their taskbar entry will be highlighted. This can be changed "
"in the Notifications control module.</p>" );
- QWhatsThis::add( focusStealing, wtstr );
- QWhatsThis::add( focusStealingLabel, wtstr );
- connect(focusStealing, SIGNAL(activated(int)), SLOT(changed()));
+ TQWhatsThis::add( focusStealing, wtstr );
+ TQWhatsThis::add( focusStealingLabel, wtstr );
+ connect(focusStealing, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- hideUtilityWindowsForInactive = new QCheckBox( i18n( "Hide utility windows for inactive applications" ), this );
- QWhatsThis::add( hideUtilityWindowsForInactive,
+ hideUtilityWindowsForInactive = new TQCheckBox( i18n( "Hide utility windows for inactive applications" ), this );
+ TQWhatsThis::add( hideUtilityWindowsForInactive,
i18n( "When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be"
" hidden and will be shown only when the application becomes active. Note that applications"
" have to mark the windows with the proper window type for this feature to work." ));
- connect(hideUtilityWindowsForInactive, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(hideUtilityWindowsForInactive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
lay->addWidget( hideUtilityWindowsForInactive );
lay->addStretch();
@@ -822,85 +822,85 @@ KMovingConfig::~KMovingConfig ()
delete config;
}
-KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, TQWidget *parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
- QString wtstr;
- QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+ TQString wtstr;
+ TQBoxLayout *lay = new TQVBoxLayout (this, 0, KDialog::spacingHint());
- windowsBox = new QButtonGroup(i18n("Windows"), this);
+ windowsBox = new TQButtonGroup(i18n("Windows"), this);
windowsBox->setColumnLayout( 0, Qt::Horizontal );
- QBoxLayout *wLay = new QVBoxLayout (windowsBox->layout(), KDialog::spacingHint());
+ TQBoxLayout *wLay = new TQVBoxLayout (windowsBox->layout(), KDialog::spacingHint());
- QBoxLayout *bLay = new QVBoxLayout;
+ TQBoxLayout *bLay = new QVBoxLayout;
wLay->addLayout(bLay);
- opaque = new QCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
+ opaque = new TQCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
bLay->addWidget(opaque);
- QWhatsThis::add( opaque, i18n("Enable this option if you want a window's content to be fully shown"
+ TQWhatsThis::add( opaque, i18n("Enable this option if you want a window's content to be fully shown"
" while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying"
" on slow machines without graphic acceleration.") );
- resizeOpaqueOn = new QCheckBox(i18n("Display content in &resizing windows"), windowsBox);
+ resizeOpaqueOn = new TQCheckBox(i18n("Display content in &resizing windows"), windowsBox);
bLay->addWidget(resizeOpaqueOn);
- QWhatsThis::add( resizeOpaqueOn, i18n("Enable this option if you want a window's content to be shown"
+ TQWhatsThis::add( resizeOpaqueOn, i18n("Enable this option if you want a window's content to be shown"
" while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying"
" on slow machines.") );
- geometryTipOn = new QCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox);
+ geometryTipOn = new TQCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox);
bLay->addWidget(geometryTipOn);
- QWhatsThis::add(geometryTipOn, i18n("Enable this option if you want a window's geometry to be displayed"
+ TQWhatsThis::add(geometryTipOn, i18n("Enable this option if you want a window's geometry to be displayed"
" while it is being moved or resized. The window position relative"
" to the top-left corner of the screen is displayed together with"
" its size."));
- QGridLayout *rLay = new QGridLayout(2,3);
+ TQGridLayout *rLay = new TQGridLayout(2,3);
bLay->addLayout(rLay);
rLay->setColStretch(0,0);
rLay->setColStretch(1,1);
- minimizeAnimOn = new QCheckBox(i18n("Animate minimi&ze and restore"),
+ minimizeAnimOn = new TQCheckBox(i18n("Animate minimi&ze and restore"),
windowsBox);
- QWhatsThis::add( minimizeAnimOn, i18n("Enable this option if you want an animation shown when"
+ TQWhatsThis::add( minimizeAnimOn, i18n("Enable this option if you want an animation shown when"
" windows are minimized or restored." ) );
rLay->addWidget(minimizeAnimOn,0,0);
- minimizeAnimSlider = new QSlider(0,10,10,0,QSlider::Horizontal, windowsBox);
+ minimizeAnimSlider = new TQSlider(0,10,10,0,TQSlider::Horizontal, windowsBox);
minimizeAnimSlider->setSteps(1, 1);
- // QSlider::Below clashes with a X11/X.h #define
+ // TQSlider::Below clashes with a X11/X.h #define
#undef Below
- minimizeAnimSlider->setTickmarks(QSlider::Below);
+ minimizeAnimSlider->setTickmarks(TQSlider::Below);
rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2);
- connect(minimizeAnimOn, SIGNAL(toggled(bool)), this, SLOT(setMinimizeAnim(bool)));
- connect(minimizeAnimSlider, SIGNAL(valueChanged(int)), this, SLOT(setMinimizeAnimSpeed(int)));
+ connect(minimizeAnimOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setMinimizeAnim(bool)));
+ connect(minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMinimizeAnimSpeed(int)));
- minimizeAnimSlowLabel= new QLabel(i18n("Slow"),windowsBox);
+ minimizeAnimSlowLabel= new TQLabel(i18n("Slow"),windowsBox);
minimizeAnimSlowLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft);
rLay->addWidget(minimizeAnimSlowLabel,1,1);
- minimizeAnimFastLabel= new QLabel(i18n("Fast"),windowsBox);
+ minimizeAnimFastLabel= new TQLabel(i18n("Fast"),windowsBox);
minimizeAnimFastLabel->setAlignment(Qt::AlignTop|Qt::AlignRight);
rLay->addWidget(minimizeAnimFastLabel,1,2);
wtstr = i18n("Here you can set the speed of the animation shown when windows are"
" minimized and restored. ");
- QWhatsThis::add( minimizeAnimSlider, wtstr );
- QWhatsThis::add( minimizeAnimSlowLabel, wtstr );
- QWhatsThis::add( minimizeAnimFastLabel, wtstr );
+ TQWhatsThis::add( minimizeAnimSlider, wtstr );
+ TQWhatsThis::add( minimizeAnimSlowLabel, wtstr );
+ TQWhatsThis::add( minimizeAnimFastLabel, wtstr );
- moveResizeMaximized = new QCheckBox( i18n("Allow moving and resizing o&f maximized windows"), windowsBox);
+ moveResizeMaximized = new TQCheckBox( i18n("Allow moving and resizing o&f maximized windows"), windowsBox);
bLay->addWidget(moveResizeMaximized);
- QWhatsThis::add(moveResizeMaximized, i18n("When enabled, this feature activates the border of maximized windows"
+ TQWhatsThis::add(moveResizeMaximized, i18n("When enabled, this feature activates the border of maximized windows"
" and allows you to move or resize them,"
" just like for normal windows"));
- QBoxLayout *vLay = new QHBoxLayout(bLay);
+ TQBoxLayout *vLay = new TQHBoxLayout(bLay);
- QLabel *plcLabel = new QLabel(i18n("&Placement:"),windowsBox);
+ TQLabel *plcLabel = new TQLabel(i18n("&Placement:"),windowsBox);
- placementCombo = new QComboBox(false, windowsBox);
+ placementCombo = new TQComboBox(false, windowsBox);
placementCombo->insertItem(i18n("Smart"), SMART_PLACEMENT);
placementCombo->insertItem(i18n("Maximizing"), MAXIMIZING_PLACEMENT);
placementCombo->insertItem(i18n("Cascade"), CASCADE_PLACEMENT);
@@ -926,8 +926,8 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
" <li><em>Zero-Cornered</em> will place the window in the top-left corner</li>"
"</ul>") ;
- QWhatsThis::add( plcLabel, wtstr);
- QWhatsThis::add( placementCombo, wtstr);
+ TQWhatsThis::add( plcLabel, wtstr);
+ TQWhatsThis::add( placementCombo, wtstr);
plcLabel->setBuddy(placementCombo);
vLay->addWidget(plcLabel, 0);
@@ -937,13 +937,13 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
lay->addWidget(windowsBox);
- //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ //iTLabel = new TQLabel(i18n(" Allowed overlap:\n"
// "(% of desktop space)"),
// plcBox);
//iTLabel->setAlignment(AlignTop|AlignHCenter);
//pLay->addWidget(iTLabel,1,1);
- //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //interactiveTrigger = new TQSpinBox(0, 500, 1, plcBox);
//pLay->addWidget(interactiveTrigger,1,2);
//pLay->addRowSpacing(2,KDialog::spacingHint());
@@ -952,7 +952,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
//CT 15mar98 - add EdgeResistance, BorderAttractor, WindowsAttractor config
- MagicBox = new QVButtonGroup(i18n("Snap Zones"), this);
+ MagicBox = new TQVButtonGroup(i18n("Snap Zones"), this);
MagicBox->setMargin(15);
BrdrSnap = new KIntNumInput(10, MagicBox);
@@ -960,7 +960,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
BrdrSnap->setRange( 0, MAX_BRDR_SNAP);
BrdrSnap->setLabel(i18n("&Border snap zone:"));
BrdrSnap->setSteps(1,10);
- QWhatsThis::add( BrdrSnap, i18n("Here you can set the snap zone for screen borders, i.e."
+ TQWhatsThis::add( BrdrSnap, i18n("Here you can set the snap zone for screen borders, i.e."
" the 'strength' of the magnetic field which will make windows snap to the border when"
" moved near it.") );
@@ -969,12 +969,12 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
WndwSnap->setRange( 0, MAX_WNDW_SNAP);
WndwSnap->setLabel(i18n("&Window snap zone:"));
BrdrSnap->setSteps(1,10);
- QWhatsThis::add( WndwSnap, i18n("Here you can set the snap zone for windows, i.e."
+ TQWhatsThis::add( WndwSnap, i18n("Here you can set the snap zone for windows, i.e."
" the 'strength' of the magnetic field which will make windows snap to each other when"
" they're moved near another window.") );
- OverlapSnap=new QCheckBox(i18n("Snap windows onl&y when overlapping"),MagicBox);
- QWhatsThis::add( OverlapSnap, i18n("Here you can set that windows will be only"
+ OverlapSnap=new TQCheckBox(i18n("Snap windows onl&y when overlapping"),MagicBox);
+ TQWhatsThis::add( OverlapSnap, i18n("Here you can set that windows will be only"
" snapped if you try to overlap them, i.e. they will not be snapped if the windows"
" comes only near another window or border.") );
@@ -984,18 +984,18 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren
load();
// Any changes goes to slotChanged()
- connect( opaque, SIGNAL(clicked()), SLOT(changed()));
- connect( resizeOpaqueOn, SIGNAL(clicked()), SLOT(changed()));
- connect( geometryTipOn, SIGNAL(clicked()), SLOT(changed()));
- connect( minimizeAnimOn, SIGNAL(clicked() ), SLOT(changed()));
- connect( minimizeAnimSlider, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect( moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed()));
- connect( placementCombo, SIGNAL(activated(int)), SLOT(changed()));
- connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(slotBrdrSnapChanged(int)));
- connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(slotWndwSnapChanged(int)));
- connect( OverlapSnap, SIGNAL(clicked()), SLOT(changed()));
+ connect( opaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect( resizeOpaqueOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect( geometryTipOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect( minimizeAnimOn, TQT_SIGNAL(clicked() ), TQT_SLOT(changed()));
+ connect( minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect( moveResizeMaximized, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect( placementCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotBrdrSnapChanged(int)));
+ connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWndwSnapChanged(int)));
+ connect( OverlapSnap, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
// To get suffix to BrdrSnap and WndwSnap inputs with default values.
slotBrdrSnapChanged(BrdrSnap->value());
@@ -1080,7 +1080,7 @@ void KMovingConfig::slotWndwSnapChanged(int value) {
void KMovingConfig::load( void )
{
- QString key;
+ TQString key;
config->setGroup( "Windows" );
@@ -1192,7 +1192,7 @@ void KMovingConfig::save( void )
// else if (v == MANUAL_PLACEMENT)
// config->writeEntry(KWIN_PLACEMENT, "Manual");
// else if (v == INTERACTIVE_PLACEMENT) {
-// QString tmpstr = QString("Interactive,%1").arg(interactiveTrigger->value());
+// TQString tmpstr = TQString("Interactive,%1").arg(interactiveTrigger->value());
// config->writeEntry(KWIN_PLACEMENT, tmpstr);
// }
else
@@ -1266,12 +1266,12 @@ KTranslucencyConfig::~KTranslucencyConfig ()
kompmgr->detach();
}
-KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, TQWidget *parent, const char *)
: KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
kompmgr = 0L;
resetKompmgr_ = FALSE;
- QVBoxLayout *lay = new QVBoxLayout (this);
+ TQVBoxLayout *lay = new TQVBoxLayout (this);
kompmgrAvailable_ = kompmgrAvailable();
if (!kompmgrAvailable_){
KActiveLabel *label = new KActiveLabel(i18n("<qt><b>It seems that alpha channel support is not available.</b><br><br>"
@@ -1289,41 +1289,41 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
}
else
{
- QTabWidget *tabW = new QTabWidget(this);
- QWidget *tGroup = new QWidget(tabW);
- QVBoxLayout *vLay = new QVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
+ TQTabWidget *tabW = new TQTabWidget(this);
+ TQWidget *tGroup = new TQWidget(tabW);
+ TQVBoxLayout *vLay = new TQVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
vLay->addSpacing(11); // to get the proper gb top offset
- onlyDecoTranslucent = new QCheckBox(i18n("Apply translucency only to decoration"),tGroup);
+ onlyDecoTranslucent = new TQCheckBox(i18n("Apply translucency only to decoration"),tGroup);
vLay->addWidget(onlyDecoTranslucent);
vLay->addSpacing(11);
- QGridLayout *gLay = new QGridLayout(vLay,4,2,KDialog::spacingHint());
+ TQGridLayout *gLay = new TQGridLayout(vLay,4,2,KDialog::spacingHint());
gLay->setColStretch(1,1);
- activeWindowTransparency = new QCheckBox(i18n("Active windows:"),tGroup);
+ activeWindowTransparency = new TQCheckBox(i18n("Active windows:"),tGroup);
gLay->addWidget(activeWindowTransparency,0,0);
activeWindowOpacity = new KIntNumInput(100, tGroup);
activeWindowOpacity->setRange(0,100);
activeWindowOpacity->setSuffix("%");
gLay->addWidget(activeWindowOpacity,0,1);
- inactiveWindowTransparency = new QCheckBox(i18n("Inactive windows:"),tGroup);
+ inactiveWindowTransparency = new TQCheckBox(i18n("Inactive windows:"),tGroup);
gLay->addWidget(inactiveWindowTransparency,1,0);
inactiveWindowOpacity = new KIntNumInput(100, tGroup);
inactiveWindowOpacity->setRange(0,100);
inactiveWindowOpacity->setSuffix("%");
gLay->addWidget(inactiveWindowOpacity,1,1);
- movingWindowTransparency = new QCheckBox(i18n("Moving windows:"),tGroup);
+ movingWindowTransparency = new TQCheckBox(i18n("Moving windows:"),tGroup);
gLay->addWidget(movingWindowTransparency,2,0);
movingWindowOpacity = new KIntNumInput(100, tGroup);
movingWindowOpacity->setRange(0,100);
movingWindowOpacity->setSuffix("%");
gLay->addWidget(movingWindowOpacity,2,1);
- dockWindowTransparency = new QCheckBox(i18n("Dock windows:"),tGroup);
+ dockWindowTransparency = new TQCheckBox(i18n("Dock windows:"),tGroup);
gLay->addWidget(dockWindowTransparency,3,0);
dockWindowOpacity = new KIntNumInput(100, tGroup);
dockWindowOpacity->setRange(0,100);
@@ -1332,80 +1332,80 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
vLay->addSpacing(11);
- keepAboveAsActive = new QCheckBox(i18n("Treat 'keep above' windows as active ones"),tGroup);
+ keepAboveAsActive = new TQCheckBox(i18n("Treat 'keep above' windows as active ones"),tGroup);
vLay->addWidget(keepAboveAsActive);
- disableARGB = new QCheckBox(i18n("Disable ARGB windows (ignores window alpha maps, fixes gtk1 apps)"),tGroup);
+ disableARGB = new TQCheckBox(i18n("Disable ARGB windows (ignores window alpha maps, fixes gtk1 apps)"),tGroup);
vLay->addWidget(disableARGB);
vLay->addStretch();
tabW->addTab(tGroup, i18n("Opacity"));
- QWidget *sGroup = new QWidget(tabW);
+ TQWidget *sGroup = new TQWidget(tabW);
// sGroup->setCheckable(TRUE);
- QVBoxLayout *vLay2 = new QVBoxLayout (sGroup,11,6);
+ TQVBoxLayout *vLay2 = new TQVBoxLayout (sGroup,11,6);
vLay2->addSpacing(11); // to get the proper gb top offset
- useShadows = new QCheckBox(i18n("Use shadows"),sGroup);
+ useShadows = new TQCheckBox(i18n("Use shadows"),sGroup);
vLay2->addWidget(useShadows);
vLay2->addSpacing(11);
- QGridLayout *gLay2 = new QGridLayout(vLay2,6,2);
+ TQGridLayout *gLay2 = new TQGridLayout(vLay2,6,2);
gLay2->setColStretch(1,1);
- QLabel *label1 = new QLabel(i18n("Active window size:"),sGroup);
+ TQLabel *label1 = new TQLabel(i18n("Active window size:"),sGroup);
gLay2->addWidget(label1,0,0);
activeWindowShadowSize = new KIntNumInput(12,sGroup);
activeWindowShadowSize->setRange(0,32);
// activeWindowShadowSize->setSuffix("px");
gLay2->addWidget(activeWindowShadowSize,0,1);
- QLabel *label2 = new QLabel(i18n("Inactive window size:"),sGroup);
+ TQLabel *label2 = new TQLabel(i18n("Inactive window size:"),sGroup);
gLay2->addWidget(label2,1,0);
inactiveWindowShadowSize = new KIntNumInput(6,sGroup);
inactiveWindowShadowSize->setRange(0,32);
// inactiveWindowShadowSize->setSuffix("px");
gLay2->addWidget(inactiveWindowShadowSize,1,1);
- QLabel *label3 = new QLabel(i18n("Dock window size:"),sGroup);
+ TQLabel *label3 = new TQLabel(i18n("Dock window size:"),sGroup);
gLay2->addWidget(label3,2,0);
dockWindowShadowSize = new KIntNumInput(6,sGroup);
dockWindowShadowSize->setRange(0,32);
// dockWindowShadowSize->setSuffix("px");
gLay2->addWidget(dockWindowShadowSize,2,1);
- QLabel *label4 = new QLabel(i18n("Vertical offset:"),sGroup);
+ TQLabel *label4 = new TQLabel(i18n("Vertical offset:"),sGroup);
gLay2->addWidget(label4,3,0);
shadowTopOffset = new KIntNumInput(80,sGroup);
shadowTopOffset->setSuffix("%");
shadowTopOffset->setRange(-200,200);
gLay2->addWidget(shadowTopOffset,3,1);
- QLabel *label5 = new QLabel(i18n("Horizontal offset:"),sGroup);
+ TQLabel *label5 = new TQLabel(i18n("Horizontal offset:"),sGroup);
gLay2->addWidget(label5,4,0);
shadowLeftOffset = new KIntNumInput(0,sGroup);
shadowLeftOffset->setSuffix("%");
shadowLeftOffset->setRange(-200,200);
gLay2->addWidget(shadowLeftOffset,4,1);
- QLabel *label6 = new QLabel(i18n("Shadow color:"),sGroup);
+ TQLabel *label6 = new TQLabel(i18n("Shadow color:"),sGroup);
gLay2->addWidget(label6,5,0);
shadowColor = new KColorButton(Qt::black,sGroup);
gLay2->addWidget(shadowColor,5,1);
gLay2->setColStretch(1,1);
vLay2->addSpacing(11);
- removeShadowsOnMove = new QCheckBox(i18n("Remove shadows on move"),sGroup);
+ removeShadowsOnMove = new TQCheckBox(i18n("Remove shadows on move"),sGroup);
vLay2->addWidget(removeShadowsOnMove);
- removeShadowsOnResize = new QCheckBox(i18n("Remove shadows on resize"),sGroup);
+ removeShadowsOnResize = new TQCheckBox(i18n("Remove shadows on resize"),sGroup);
vLay2->addWidget(removeShadowsOnResize);
vLay2->addStretch();
tabW->addTab(sGroup, i18n("Shadows"));
- QWidget *eGroup = new QWidget(this);
- QVBoxLayout *vLay3 = new QVBoxLayout (eGroup,11,6);
+ TQWidget *eGroup = new TQWidget(this);
+ TQVBoxLayout *vLay3 = new TQVBoxLayout (eGroup,11,6);
- fadeInWindows = new QCheckBox(i18n("Fade-in windows (including popups)"),eGroup);
- fadeOnOpacityChange = new QCheckBox(i18n("Fade between opacity changes"),eGroup);
+ fadeInWindows = new TQCheckBox(i18n("Fade-in windows (including popups)"),eGroup);
+ fadeOnOpacityChange = new TQCheckBox(i18n("Fade between opacity changes"),eGroup);
fadeInSpeed = new KIntNumInput(100, eGroup);
fadeInSpeed->setRange(1,100);
fadeInSpeed->setLabel(i18n("Fade-in speed:"));
@@ -1420,69 +1420,69 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QW
tabW->addTab(eGroup, i18n("Effects"));
- useTranslucency = new QCheckBox(i18n("Use translucency/shadows"),this);
+ useTranslucency = new TQCheckBox(i18n("Use translucency/shadows"),this);
lay->addWidget(useTranslucency);
lay->addWidget(tabW);
- connect(useTranslucency, SIGNAL(toggled(bool)), tabW, SLOT(setEnabled(bool)));
-
- connect(activeWindowTransparency, SIGNAL(toggled(bool)), activeWindowOpacity, SLOT(setEnabled(bool)));
- connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), inactiveWindowOpacity, SLOT(setEnabled(bool)));
- connect(movingWindowTransparency, SIGNAL(toggled(bool)), movingWindowOpacity, SLOT(setEnabled(bool)));
- connect(dockWindowTransparency, SIGNAL(toggled(bool)), dockWindowOpacity, SLOT(setEnabled(bool)));
-
- connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(onlyDecoTranslucent, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(activeWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(movingWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(dockWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(keepAboveAsActive, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(disableARGB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(useShadows, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(removeShadowsOnResize, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(removeShadowsOnMove, SIGNAL(toggled(bool)), SLOT(changed()));
-
- connect(activeWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(inactiveWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(movingWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(dockWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(dockWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(activeWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(shadowTopOffset, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(shadowLeftOffset, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(shadowColor, SIGNAL(changed(const QColor&)), SLOT(changed()));
- connect(fadeInWindows, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(fadeOnOpacityChange, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(fadeInSpeed, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(fadeOutSpeed, SIGNAL(valueChanged(int)), SLOT(changed()));
-
- connect(useShadows, SIGNAL(toggled(bool)), dockWindowShadowSize, SLOT(setEnabled(bool)));
- connect(useShadows, SIGNAL(toggled(bool)), activeWindowShadowSize, SLOT(setEnabled(bool)));
- connect(useShadows, SIGNAL(toggled(bool)), inactiveWindowShadowSize, SLOT(setEnabled(bool)));
- connect(useShadows, SIGNAL(toggled(bool)), shadowTopOffset, SLOT(setEnabled(bool)));
- connect(useShadows, SIGNAL(toggled(bool)), shadowLeftOffset, SLOT(setEnabled(bool)));
- connect(useShadows, SIGNAL(toggled(bool)), shadowColor, SLOT(setEnabled(bool)));
+ connect(useTranslucency, TQT_SIGNAL(toggled(bool)), tabW, TQT_SLOT(setEnabled(bool)));
+
+ connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), activeWindowOpacity, TQT_SLOT(setEnabled(bool)));
+ connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQT_SLOT(setEnabled(bool)));
+ connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), movingWindowOpacity, TQT_SLOT(setEnabled(bool)));
+ connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), dockWindowOpacity, TQT_SLOT(setEnabled(bool)));
+
+ connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(onlyDecoTranslucent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+
+ connect(activeWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(inactiveWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(movingWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(dockWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(dockWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(activeWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(changed()));
+ connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), dockWindowShadowSize, TQT_SLOT(setEnabled(bool)));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), activeWindowShadowSize, TQT_SLOT(setEnabled(bool)));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), inactiveWindowShadowSize, TQT_SLOT(setEnabled(bool)));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), shadowTopOffset, TQT_SLOT(setEnabled(bool)));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), shadowLeftOffset, TQT_SLOT(setEnabled(bool)));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), shadowColor, TQT_SLOT(setEnabled(bool)));
load();
tabW->setEnabled(useTranslucency->isChecked());
- connect(useTranslucency, SIGNAL(toggled(bool)), this, SLOT(showWarning(bool)));
+ connect(useTranslucency, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showWarning(bool)));
// handle kompmgr restarts if necessary
- connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
- connect(disableARGB, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
- connect(useShadows, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
- connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
- connect(shadowTopOffset, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
- connect(shadowLeftOffset, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
- connect(shadowColor, SIGNAL(changed(const QColor&)), SLOT(resetKompmgr()));
- connect(fadeInWindows, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
- connect(fadeOnOpacityChange, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
- connect(fadeInSpeed, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
- connect(fadeOutSpeed, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+ connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
+ connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
+ connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
+ connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(resetKompmgr()));
+ connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
+ connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
+ connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
}
}
@@ -1524,7 +1524,7 @@ void KTranslucencyConfig::load( void )
movingWindowOpacity->setEnabled(movingWindowTransparency->isChecked());
dockWindowOpacity->setEnabled(dockWindowTransparency->isChecked());
- KConfig conf_(QDir::homeDirPath() + "/.xcompmgrrc");
+ KConfig conf_(TQDir::homeDirPath() + "/.xcompmgrrc");
conf_.setGroup("xcompmgr");
disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
@@ -1538,14 +1538,14 @@ void KTranslucencyConfig::load( void )
activeWindowShadowSize->setValue((int)(ass*ss/100.0));
inactiveWindowShadowSize->setValue((int)(iss*ss/100.0));
- QString hex = conf_.readEntry("ShadowColor","#000000");
+ TQString hex = conf_.readEntry("ShadowColor","#000000");
uint r, g, b;
r = g = b = 256;
if (sscanf(hex.latin1(), "0x%02x%02x%02x", &r, &g, &b)!=3 || r > 255 || g > 255 || b > 255)
shadowColor->setColor(Qt::black);
else
- shadowColor->setColor(QColor(r,g,b));
+ shadowColor->setColor(TQColor(r,g,b));
fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",TRUE));
fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",FALSE));
@@ -1587,7 +1587,7 @@ void KTranslucencyConfig::save( void )
config->writeEntry("OnlyDecoTranslucent", onlyDecoTranslucent->isChecked());
config->writeEntry("ResetKompmgr",resetKompmgr_);
- KConfig *conf_ = new KConfig(QDir::homeDirPath() + "/.xcompmgrrc");
+ KConfig *conf_ = new KConfig(TQDir::homeDirPath() + "/.xcompmgrrc");
conf_->setGroup("xcompmgr");
conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":"");
@@ -1598,7 +1598,7 @@ void KTranslucencyConfig::save( void )
int r, g, b;
shadowColor->color().rgb( &r, &g, &b );
- QString hex;
+ TQString hex;
hex.sprintf("0x%02X%02X%02X", r,g,b);
conf_->writeEntry("ShadowColor",hex);
conf_->writeEntry("ShadowRadius",(activeWindowShadowSize->value() + inactiveWindowShadowSize->value()) / 2);
diff --git a/kwin/kcmkwin/kwinoptions/windows.h b/kwin/kcmkwin/kwinoptions/windows.h
index 14537b922..d236b001c 100644
--- a/kwin/kcmkwin/kwinoptions/windows.h
+++ b/kwin/kcmkwin/kwinoptions/windows.h
@@ -22,7 +22,7 @@
#ifndef __KWINDOWCONFIG_H__
#define __KWINDOWCONFIG_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kcmodule.h>
#include <config.h>
@@ -72,7 +72,7 @@ class KFocusConfig : public KCModule
{
Q_OBJECT
public:
- KFocusConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ KFocusConfig( bool _standAlone, KConfig *_config, TQWidget *parent=0, const char* name=0 );
~KFocusConfig();
void load();
@@ -109,21 +109,21 @@ private:
void setRollOverDesktops(bool);
void setShowPopupinfo(bool);
- QButtonGroup *fcsBox;
- QComboBox *focusCombo;
- QCheckBox *autoRaiseOn;
- QCheckBox *delayFocusOn;
- QCheckBox *clickRaiseOn;
+ TQButtonGroup *fcsBox;
+ TQComboBox *focusCombo;
+ TQCheckBox *autoRaiseOn;
+ TQCheckBox *delayFocusOn;
+ TQCheckBox *clickRaiseOn;
KIntNumInput *autoRaise;
KIntNumInput *delayFocus;
- QCheckBox *separateScreenFocus;
- QCheckBox *activeMouseScreen;
+ TQCheckBox *separateScreenFocus;
+ TQCheckBox *activeMouseScreen;
- QButtonGroup *kbdBox;
- QCheckBox *altTabPopup;
- QCheckBox *traverseAll;
- QCheckBox *rollOverDesktops;
- QCheckBox *showPopupinfo;
+ TQButtonGroup *kbdBox;
+ TQCheckBox *altTabPopup;
+ TQCheckBox *traverseAll;
+ TQCheckBox *rollOverDesktops;
+ TQCheckBox *showPopupinfo;
KConfig *config;
bool standAlone;
@@ -133,7 +133,7 @@ class KMovingConfig : public KCModule
{
Q_OBJECT
public:
- KMovingConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ KMovingConfig( bool _standAlone, KConfig *config, TQWidget *parent=0, const char* name=0 );
~KMovingConfig();
void load();
@@ -161,16 +161,16 @@ private:
void setPlacement(int); //CT
void setMoveResizeMaximized(bool);
- QButtonGroup *windowsBox;
- QCheckBox *opaque;
- QCheckBox *resizeOpaqueOn;
- QCheckBox *geometryTipOn;
- QCheckBox* minimizeAnimOn;
- QSlider *minimizeAnimSlider;
- QLabel *minimizeAnimSlowLabel, *minimizeAnimFastLabel;
- QCheckBox *moveResizeMaximized;
+ TQButtonGroup *windowsBox;
+ TQCheckBox *opaque;
+ TQCheckBox *resizeOpaqueOn;
+ TQCheckBox *geometryTipOn;
+ TQCheckBox* minimizeAnimOn;
+ TQSlider *minimizeAnimSlider;
+ TQLabel *minimizeAnimSlowLabel, *minimizeAnimFastLabel;
+ TQCheckBox *moveResizeMaximized;
- QComboBox *placementCombo;
+ TQComboBox *placementCombo;
KConfig *config;
bool standAlone;
@@ -180,9 +180,9 @@ private:
int getWindowSnapZone();
void setWindowSnapZone( int );
- QVButtonGroup *MagicBox;
+ TQVButtonGroup *MagicBox;
KIntNumInput *BrdrSnap, *WndwSnap;
- QCheckBox *OverlapSnap;
+ TQCheckBox *OverlapSnap;
};
@@ -190,7 +190,7 @@ class KAdvancedConfig : public KCModule
{
Q_OBJECT
public:
- KAdvancedConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ KAdvancedConfig( bool _standAlone, KConfig *config, TQWidget *parent=0, const char* name=0 );
~KAdvancedConfig();
void load();
@@ -212,9 +212,9 @@ private:
void setShadeHover(bool);
void setShadeHoverInterval(int);
- QCheckBox *animateShade;
- QButtonGroup *shBox;
- QCheckBox *shadeHoverOn;
+ TQCheckBox *animateShade;
+ TQButtonGroup *shBox;
+ TQCheckBox *shadeHoverOn;
KIntNumInput *shadeHover;
KConfig *config;
@@ -225,17 +225,17 @@ private:
void setElectricBorders( int );
void setElectricBorderDelay( int );
- QVButtonGroup *electricBox;
- QRadioButton *active_disable;
- QRadioButton *active_move;
- QRadioButton *active_always;
+ TQVButtonGroup *electricBox;
+ TQRadioButton *active_disable;
+ TQRadioButton *active_move;
+ TQRadioButton *active_always;
KIntNumInput *delays;
void setFocusStealing( int );
void setHideUtilityWindowsForInactive( bool );
- QComboBox* focusStealing;
- QCheckBox* hideUtilityWindowsForInactive;
+ TQComboBox* focusStealing;
+ TQCheckBox* hideUtilityWindowsForInactive;
};
class KProcess;
@@ -243,7 +243,7 @@ class KTranslucencyConfig : public KCModule
{
Q_OBJECT
public:
- KTranslucencyConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ KTranslucencyConfig( bool _standAlone, KConfig *config, TQWidget *parent=0, const char* name=0 );
~KTranslucencyConfig();
void load();
@@ -251,21 +251,21 @@ public:
void defaults();
private:
- QCheckBox *useTranslucency;
- QCheckBox *activeWindowTransparency;
- QCheckBox *inactiveWindowTransparency;
- QCheckBox *movingWindowTransparency;
- QCheckBox *dockWindowTransparency;
- QCheckBox *keepAboveAsActive;
- QCheckBox *disableARGB;
- QCheckBox *fadeInWindows;
- QCheckBox *fadeOnOpacityChange;
- QCheckBox *useShadows;
- QCheckBox *removeShadowsOnResize;
- QCheckBox *removeShadowsOnMove;
- QGroupBox *sGroup;
- QCheckBox *onlyDecoTranslucent;
-// QPushButton *xcompmgrButton;
+ TQCheckBox *useTranslucency;
+ TQCheckBox *activeWindowTransparency;
+ TQCheckBox *inactiveWindowTransparency;
+ TQCheckBox *movingWindowTransparency;
+ TQCheckBox *dockWindowTransparency;
+ TQCheckBox *keepAboveAsActive;
+ TQCheckBox *disableARGB;
+ TQCheckBox *fadeInWindows;
+ TQCheckBox *fadeOnOpacityChange;
+ TQCheckBox *useShadows;
+ TQCheckBox *removeShadowsOnResize;
+ TQCheckBox *removeShadowsOnMove;
+ TQGroupBox *sGroup;
+ TQCheckBox *onlyDecoTranslucent;
+// TQPushButton *xcompmgrButton;
KIntNumInput *activeWindowOpacity;
KIntNumInput *inactiveWindowOpacity;
KIntNumInput *movingWindowOpacity;
diff --git a/kwin/kcmkwin/kwinrules/detectwidget.cpp b/kwin/kcmkwin/kwinrules/detectwidget.cpp
index 1a8fa5af5..1a497c8bc 100644
--- a/kwin/kcmkwin/kwinrules/detectwidget.cpp
+++ b/kwin/kcmkwin/kwinrules/detectwidget.cpp
@@ -22,9 +22,9 @@
#include <klocale.h>
#include <kdebug.h>
#include <kwin.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@@ -34,12 +34,12 @@
namespace KWinInternal
{
-DetectWidget::DetectWidget( QWidget* parent, const char* name )
+DetectWidget::DetectWidget( TQWidget* parent, const char* name )
: DetectWidgetBase( parent, name )
{
}
-DetectDialog::DetectDialog( QWidget* parent, const char* name )
+DetectDialog::DetectDialog( TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, "", Ok | Cancel )
, grabber( NULL )
{
@@ -109,10 +109,10 @@ void DetectDialog::executeDialog()
widget->title_label->setText( title );
widget->extrarole_label->setText( extrarole );
widget->machine_label->setText( machine );
- emit detectionDone( exec() == QDialog::Accepted );
+ emit detectionDone( exec() == TQDialog::Accepted );
}
-QCString DetectDialog::selectedClass() const
+TQCString DetectDialog::selectedClass() const
{
if( widget->use_class->isChecked() || widget->use_role->isChecked())
return wmclass_class;
@@ -124,14 +124,14 @@ bool DetectDialog::selectedWholeClass() const
return widget->use_whole_class->isChecked();
}
-QCString DetectDialog::selectedRole() const
+TQCString DetectDialog::selectedRole() const
{
if( widget->use_role->isChecked())
return role;
return "";
}
-QString DetectDialog::selectedTitle() const
+TQString DetectDialog::selectedTitle() const
{
return title;
}
@@ -151,7 +151,7 @@ NET::WindowType DetectDialog::selectedType() const
return type;
}
-QCString DetectDialog::selectedMachine() const
+TQCString DetectDialog::selectedMachine() const
{
return machine;
}
@@ -161,22 +161,22 @@ void DetectDialog::selectWindow()
// use a dialog, so that all user input is blocked
// use WX11BypassWM and moving away so that it's not actually visible
// grab only mouse, so that keyboard can be used e.g. for switching windows
- grabber = new QDialog( NULL, NULL, true, WX11BypassWM );
+ grabber = new TQDialog( NULL, NULL, true, WX11BypassWM );
grabber->move( -1000, -1000 );
grabber->show();
grabber->grabMouse( crossCursor );
grabber->installEventFilter( this );
}
-bool DetectDialog::eventFilter( QObject* o, QEvent* e )
+bool DetectDialog::eventFilter( TQObject* o, TQEvent* e )
{
if( o != grabber )
return false;
- if( e->type() != QEvent::MouseButtonRelease )
+ if( e->type() != TQEvent::MouseButtonRelease )
return false;
delete grabber;
grabber = NULL;
- if( static_cast< QMouseEvent* >( e )->button() != LeftButton )
+ if( static_cast< TQMouseEvent* >( e )->button() != LeftButton )
{
emit detectionDone( false );
return true;
diff --git a/kwin/kcmkwin/kwinrules/detectwidget.h b/kwin/kcmkwin/kwinrules/detectwidget.h
index 593f4e056..9a2cca3d2 100644
--- a/kwin/kcmkwin/kwinrules/detectwidget.h
+++ b/kwin/kcmkwin/kwinrules/detectwidget.h
@@ -35,7 +35,7 @@ class DetectWidget
{
Q_OBJECT
public:
- DetectWidget( QWidget* parent = NULL, const char* name = NULL );
+ DetectWidget( TQWidget* parent = NULL, const char* name = NULL );
};
class DetectDialog
@@ -43,35 +43,35 @@ class DetectDialog
{
Q_OBJECT
public:
- DetectDialog( QWidget* parent = NULL, const char* name = NULL );
+ DetectDialog( TQWidget* parent = NULL, const char* name = NULL );
void detect( WId window );
- QCString selectedClass() const;
+ TQCString selectedClass() const;
bool selectedWholeClass() const;
- QCString selectedRole() const;
+ TQCString selectedRole() const;
bool selectedWholeApp() const;
NET::WindowType selectedType() const;
- QString selectedTitle() const;
+ TQString selectedTitle() const;
Rules::StringMatch titleMatch() const;
- QCString selectedMachine() const;
+ TQCString selectedMachine() const;
const KWin::WindowInfo& windowInfo() const;
signals:
void detectionDone( bool );
protected:
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
void selectWindow();
void readWindow( WId window );
void executeDialog();
WId findWindow();
- QCString wmclass_class;
- QCString wmclass_name;
- QCString role;
+ TQCString wmclass_class;
+ TQCString wmclass_name;
+ TQCString role;
NET::WindowType type;
- QString title;
- QCString extrarole;
- QCString machine;
+ TQString title;
+ TQCString extrarole;
+ TQCString machine;
DetectWidget* widget;
- QDialog* grabber;
+ TQDialog* grabber;
KWin::WindowInfo info;
};
diff --git a/kwin/kcmkwin/kwinrules/kcm.cpp b/kwin/kcmkwin/kwinrules/kcm.cpp
index b40cfa8b2..19b714311 100644
--- a/kwin/kcmkwin/kwinrules/kcm.cpp
+++ b/kwin/kcmkwin/kwinrules/kcm.cpp
@@ -19,7 +19,7 @@
#include "kcm.h"
#include <kglobal.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -28,7 +28,7 @@
#include "ruleslist.h"
extern "C"
- KDE_EXPORT KCModule *create_kwinrules( QWidget *parent, const char *name )
+ KDE_EXPORT KCModule *create_kwinrules( TQWidget *parent, const char *name )
{
//CT there's need for decision: kwm or kwin?
KGlobal::locale()->insertCatalogue( "kcmkwinrules" );
@@ -38,14 +38,14 @@ extern "C"
namespace KWinInternal
{
-KCMRules::KCMRules( QWidget *parent, const char *name )
+KCMRules::KCMRules( TQWidget *parent, const char *name )
: KCModule( parent, name )
, config( "kwinrulesrc" )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
widget = new KCMRulesList( this );
layout->addWidget( widget );
- connect( widget, SIGNAL( changed( bool )), SLOT( moduleChanged( bool )));
+ connect( widget, TQT_SIGNAL( changed( bool )), TQT_SLOT( moduleChanged( bool )));
KAboutData *about = new KAboutData(I18N_NOOP( "kcmkwinrules" ),
I18N_NOOP( "Window-Specific Settings Configuration Module" ),
0, 0, KAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" ));
@@ -76,7 +76,7 @@ void KCMRules::defaults()
widget->defaults();
}
-QString KCMRules::quickHelp() const
+TQString KCMRules::quickHelp() const
{
return i18n("<h1>Window-specific Settings</h1> Here you can customize window settings specifically only"
" for some windows."
diff --git a/kwin/kcmkwin/kwinrules/kcm.h b/kwin/kcmkwin/kwinrules/kcm.h
index 47fba75d2..9fb307458 100644
--- a/kwin/kcmkwin/kwinrules/kcm.h
+++ b/kwin/kcmkwin/kwinrules/kcm.h
@@ -36,11 +36,11 @@ class KCMRules
{
Q_OBJECT
public:
- KCMRules( QWidget *parent, const char *name );
+ KCMRules( TQWidget *parent, const char *name );
virtual void load();
virtual void save();
virtual void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
protected slots:
void moduleChanged( bool state );
private:
diff --git a/kwin/kcmkwin/kwinrules/main.cpp b/kwin/kcmkwin/kwinrules/main.cpp
index 9657e3649..b58c96239 100644
--- a/kwin/kcmkwin/kwinrules/main.cpp
+++ b/kwin/kcmkwin/kwinrules/main.cpp
@@ -32,7 +32,7 @@
namespace KWinInternal
{
-static void loadRules( QValueList< Rules* >& rules )
+static void loadRules( TQValueList< Rules* >& rules )
{
KConfig cfg( "kwinrulesrc", true );
cfg.setGroup( "General" );
@@ -41,52 +41,52 @@ static void loadRules( QValueList< Rules* >& rules )
i <= count;
++i )
{
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
Rules* rule = new Rules( cfg );
rules.append( rule );
}
}
-static void saveRules( const QValueList< Rules* >& rules )
+static void saveRules( const TQValueList< Rules* >& rules )
{
KConfig cfg( "kwinrulesrc" );
- QStringList groups = cfg.groupList();
- for( QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg.groupList();
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end();
++it )
cfg.deleteGroup( *it );
cfg.setGroup( "General" );
cfg.writeEntry( "count", rules.count());
int i = 1;
- for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueList< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
{
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
(*it)->write( cfg );
++i;
}
}
-static Rules* findRule( const QValueList< Rules* >& rules, Window wid, bool whole_app )
+static Rules* findRule( const TQValueList< Rules* >& rules, Window wid, bool whole_app )
{
KWin::WindowInfo info = KWin::windowInfo( wid,
NET::WMName | NET::WMWindowType,
NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine );
if( !info.valid()) // shouldn't really happen
return NULL;
- QCString wmclass_class = info.windowClassClass().lower();
- QCString wmclass_name = info.windowClassName().lower();
- QCString role = info.windowRole().lower();
+ TQCString wmclass_class = info.windowClassClass().lower();
+ TQCString wmclass_name = info.windowClassName().lower();
+ TQCString role = info.windowRole().lower();
NET::WindowType type = info.windowType( NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask );
- QString title = info.name();
-// QCString extrarole = ""; // TODO
- QCString machine = info.clientMachine().lower();
+ TQString title = info.name();
+// TQCString extrarole = ""; // TODO
+ TQCString machine = info.clientMachine().lower();
Rules* best_match = NULL;
int match_quality = 0;
- for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueList< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
{
@@ -233,7 +233,7 @@ static Rules* findRule( const QValueList< Rules* >& rules, Window wid, bool whol
static int edit( Window wid, bool whole_app )
{
- QValueList< Rules* > rules;
+ TQValueList< Rules* > rules;
loadRules( rules );
Rules* orig_rule = findRule( rules, wid, whole_app );
RulesDialog dlg;
@@ -248,7 +248,7 @@ static int edit( Window wid, bool whole_app )
}
else if( edited_rule != orig_rule )
{
- QValueList< Rules* >::Iterator pos = rules.find( orig_rule );
+ TQValueList< Rules* >::Iterator pos = rules.find( orig_rule );
if( pos != rules.end())
*pos = edited_rule;
else
diff --git a/kwin/kcmkwin/kwinrules/ruleslist.cpp b/kwin/kcmkwin/kwinrules/ruleslist.cpp
index f4704089f..e525e472f 100644
--- a/kwin/kcmkwin/kwinrules/ruleslist.cpp
+++ b/kwin/kcmkwin/kwinrules/ruleslist.cpp
@@ -29,39 +29,39 @@
namespace KWinInternal
{
-KCMRulesList::KCMRulesList( QWidget* parent, const char* name )
+KCMRulesList::KCMRulesList( TQWidget* parent, const char* name )
: KCMRulesListBase( parent, name )
{
- // connect both current/selected, so that current==selected (stupid QListBox :( )
- connect( rules_listbox, SIGNAL( currentChanged( QListBoxItem* )),
- SLOT( activeChanged( QListBoxItem*)));
- connect( rules_listbox, SIGNAL( selectionChanged( QListBoxItem* )),
- SLOT( activeChanged( QListBoxItem*)));
- connect( new_button, SIGNAL( clicked()),
- SLOT( newClicked()));
- connect( modify_button, SIGNAL( clicked()),
- SLOT( modifyClicked()));
- connect( delete_button, SIGNAL( clicked()),
- SLOT( deleteClicked()));
- connect( moveup_button, SIGNAL( clicked()),
- SLOT( moveupClicked()));
- connect( movedown_button, SIGNAL( clicked()),
- SLOT( movedownClicked()));
- connect( rules_listbox, SIGNAL( doubleClicked ( QListBoxItem * ) ),
- SLOT( modifyClicked()));
+ // connect both current/selected, so that current==selected (stupid TQListBox :( )
+ connect( rules_listbox, TQT_SIGNAL( currentChanged( TQListBoxItem* )),
+ TQT_SLOT( activeChanged( TQListBoxItem*)));
+ connect( rules_listbox, TQT_SIGNAL( selectionChanged( TQListBoxItem* )),
+ TQT_SLOT( activeChanged( TQListBoxItem*)));
+ connect( new_button, TQT_SIGNAL( clicked()),
+ TQT_SLOT( newClicked()));
+ connect( modify_button, TQT_SIGNAL( clicked()),
+ TQT_SLOT( modifyClicked()));
+ connect( delete_button, TQT_SIGNAL( clicked()),
+ TQT_SLOT( deleteClicked()));
+ connect( moveup_button, TQT_SIGNAL( clicked()),
+ TQT_SLOT( moveupClicked()));
+ connect( movedown_button, TQT_SIGNAL( clicked()),
+ TQT_SLOT( movedownClicked()));
+ connect( rules_listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ),
+ TQT_SLOT( modifyClicked()));
load();
}
KCMRulesList::~KCMRulesList()
{
- for( QValueVector< Rules* >::Iterator it = rules.begin();
+ for( TQValueVector< Rules* >::Iterator it = rules.begin();
it != rules.end();
++it )
delete *it;
rules.clear();
}
-void KCMRulesList::activeChanged( QListBoxItem* item )
+void KCMRulesList::activeChanged( TQListBoxItem* item )
{
if( item != NULL )
rules_listbox->setSelected( item, true ); // make current==selected
@@ -114,7 +114,7 @@ void KCMRulesList::moveupClicked()
assert( pos != -1 );
if( pos > 0 )
{
- QString txt = rules_listbox->text( pos );
+ TQString txt = rules_listbox->text( pos );
rules_listbox->removeItem( pos );
rules_listbox->insertItem( txt, pos - 1 );
rules_listbox->setSelected( pos - 1, true );
@@ -131,7 +131,7 @@ void KCMRulesList::movedownClicked()
assert( pos != -1 );
if( pos < int( rules_listbox->count()) - 1 )
{
- QString txt = rules_listbox->text( pos );
+ TQString txt = rules_listbox->text( pos );
rules_listbox->removeItem( pos );
rules_listbox->insertItem( txt, pos + 1 );
rules_listbox->setSelected( pos + 1, true );
@@ -145,7 +145,7 @@ void KCMRulesList::movedownClicked()
void KCMRulesList::load()
{
rules_listbox->clear();
- for( QValueVector< Rules* >::Iterator it = rules.begin();
+ for( TQValueVector< Rules* >::Iterator it = rules.begin();
it != rules.end();
++it )
delete *it;
@@ -158,7 +158,7 @@ void KCMRulesList::load()
i <= count;
++i )
{
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
Rules* rule = new Rules( cfg );
rules.append( rule );
rules_listbox->insertItem( rule->description );
@@ -172,19 +172,19 @@ void KCMRulesList::load()
void KCMRulesList::save()
{
KConfig cfg( "kwinrulesrc" );
- QStringList groups = cfg.groupList();
- for( QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg.groupList();
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end();
++it )
cfg.deleteGroup( *it );
cfg.setGroup( "General" );
cfg.writeEntry( "count", rules.count());
int i = 1;
- for( QValueVector< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueVector< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
{
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
(*it)->write( cfg );
++i;
}
diff --git a/kwin/kcmkwin/kwinrules/ruleslist.h b/kwin/kcmkwin/kwinrules/ruleslist.h
index b192d2f4e..9dacde63e 100644
--- a/kwin/kcmkwin/kwinrules/ruleslist.h
+++ b/kwin/kcmkwin/kwinrules/ruleslist.h
@@ -22,7 +22,7 @@
#include "ruleslistbase.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "../../rules.h"
@@ -36,7 +36,7 @@ class KCMRulesList
{
Q_OBJECT
public:
- KCMRulesList( QWidget* parent = NULL, const char* name = NULL );
+ KCMRulesList( TQWidget* parent = NULL, const char* name = NULL );
virtual ~KCMRulesList();
void load();
void save();
@@ -49,9 +49,9 @@ class KCMRulesList
void deleteClicked();
void moveupClicked();
void movedownClicked();
- void activeChanged( QListBoxItem* );
+ void activeChanged( TQListBoxItem* );
private:
- QValueVector< Rules* > rules;
+ TQValueVector< Rules* > rules;
};
} // namespace
diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.cpp b/kwin/kcmkwin/kwinrules/ruleswidget.cpp
index 7a8afe292..2525644d9 100644
--- a/kwin/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kwin/kcmkwin/kwinrules/ruleswidget.cpp
@@ -21,17 +21,17 @@
#include <klineedit.h>
#include <krestrictedline.h>
#include <kcombobox.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kwinmodule.h>
#include <klocale.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <assert.h>
#include <kmessagebox.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
#include "../../rules.h"
@@ -41,19 +41,19 @@ namespace KWinInternal
{
#define SETUP( var, type ) \
- connect( enable_##var, SIGNAL( toggled( bool )), rule_##var, SLOT( setEnabled( bool ))); \
- connect( enable_##var, SIGNAL( toggled( bool )), this, SLOT( updateEnable##var())); \
- connect( rule_##var, SIGNAL( activated( int )), this, SLOT( updateEnable##var())); \
- QWhatsThis::add( enable_##var, enableDesc ); \
- QWhatsThis::add( rule_##var, type##RuleDesc );
+ connect( enable_##var, TQT_SIGNAL( toggled( bool )), rule_##var, TQT_SLOT( setEnabled( bool ))); \
+ connect( enable_##var, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( updateEnable##var())); \
+ connect( rule_##var, TQT_SIGNAL( activated( int )), this, TQT_SLOT( updateEnable##var())); \
+ TQWhatsThis::add( enable_##var, enableDesc ); \
+ TQWhatsThis::add( rule_##var, type##RuleDesc );
-RulesWidget::RulesWidget( QWidget* parent, const char* name )
+RulesWidget::RulesWidget( TQWidget* parent, const char* name )
: RulesWidgetBase( parent, name )
, detect_dlg( NULL )
{
- QString enableDesc =
+ TQString enableDesc =
i18n( "Enable this checkbox to alter this window property for the specified window(s)." );
- QString setRuleDesc =
+ TQString setRuleDesc =
i18n( "Specify how the window property should be affected:<ul>"
"<li><em>Do Not Affect:</em> The window property will not be affected and therefore"
" the default handling for it will be used. Specifying this will block more generic"
@@ -68,7 +68,7 @@ RulesWidget::RulesWidget( QWidget* parent, const char* name )
"<li><em>Force temporarily:</em> The window property will be forced to the given value"
" until it is hidden (this action will be deleted after the window is hidden).</li>"
"</ul>" );
- QString forceRuleDesc =
+ TQString forceRuleDesc =
i18n( "Specify how the window property should be affected:<ul>"
"<li><em>Do Not Affect:</em> The window property will not be affected and therefore"
" the default handling for it will be used. Specifying this will block more generic"
@@ -113,7 +113,7 @@ RulesWidget::RulesWidget( QWidget* parent, const char* name )
for( i = 1;
i <= module.numberOfDesktops();
++i )
- desktop->insertItem( QString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i ));
+ desktop->insertItem( TQString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i ));
desktop->insertItem( i18n( "All Desktops" ));
}
@@ -202,45 +202,45 @@ static const Rules::ForceRule combo_to_force_rule[] =
( Rules::ForceRule )Rules::ForceTemporarily
};
-static QString positionToStr( const QPoint& p )
+static TQString positionToStr( const TQPoint& p )
{
if( p == invalidPoint )
- return QString::null;
- return QString::number( p.x()) + "," + QString::number( p.y());
+ return TQString::null;
+ return TQString::number( p.x()) + "," + TQString::number( p.y());
}
-static QPoint strToPosition( const QString& str )
+static TQPoint strToPosition( const TQString& str )
{ // two numbers, with + or -, separated by any of , x X :
- QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
+ TQRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
if( !reg.exactMatch( str ))
return invalidPoint;
- return QPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
+ return TQPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
}
-static QString sizeToStr( const QSize& s )
+static TQString sizeToStr( const TQSize& s )
{
if( !s.isValid())
- return QString::null;
- return QString::number( s.width()) + "," + QString::number( s.height());
+ return TQString::null;
+ return TQString::number( s.width()) + "," + TQString::number( s.height());
}
-static QSize strToSize( const QString& str )
+static TQSize strToSize( const TQString& str )
{ // two numbers, with + or -, separated by any of , x X :
- QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
+ TQRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
if( !reg.exactMatch( str ))
- return QSize();
- return QSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
+ return TQSize();
+ return TQSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
}
//used for opacity settings
-static QString intToStr( const int& s )
+static TQString intToStr( const int& s )
{
if( s < 1 || s > 100 )
- return QString::null;
- return QString::number(s);
+ return TQString::null;
+ return TQString::number(s);
}
-static int strToInt( const QString& str )
+static int strToInt( const TQString& str )
{
int tmp = str.toInt();
if( tmp < 1 || tmp > 100 )
@@ -550,7 +550,7 @@ void RulesWidget::detectClicked()
{
assert( detect_dlg == NULL );
detect_dlg = new DetectDialog;
- connect( detect_dlg, SIGNAL( detectionDone( bool )), this, SLOT( detected( bool )));
+ connect( detect_dlg, TQT_SIGNAL( detectionDone( bool )), this, TQT_SLOT( detected( bool )));
detect_dlg->detect( 0 );
}
@@ -682,11 +682,11 @@ void RulesWidget::shortcutEditClicked()
{
EditShortcutDialog dlg( topLevelWidget());
dlg.setShortcut( shortcut->text());
- if( dlg.exec() == QDialog::Accepted )
+ if( dlg.exec() == TQDialog::Accepted )
shortcut->setText( dlg.shortcut());
}
-RulesDialog::RulesDialog( QWidget* parent, const char* name )
+RulesDialog::RulesDialog( TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Edit Window-Specific Settings" ), Ok | Cancel )
{
widget = new RulesWidget( this );
@@ -702,14 +702,14 @@ Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints )
if( window != 0 )
widget->prepareWindowSpecific( window );
if( show_hints )
- QTimer::singleShot( 0, this, SLOT( displayHints()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( displayHints()));
exec();
return rules;
}
void RulesDialog::displayHints()
{
- QString str = "<qt><p>";
+ TQString str = "<qt><p>";
str += i18n( "This configuration dialog allows altering settings only for the selected window"
" or application. Find the setting you want to affect, enable the setting using the checkbox,"
" select in what way the setting should be affected and to which value." );
@@ -717,7 +717,7 @@ void RulesDialog::displayHints()
str += "</p><p>" + i18n( "Consult the documentation for more details." );
#endif
str += "</p></qt>";
- KMessageBox::information( this, str, QString::null, "displayhints" );
+ KMessageBox::information( this, str, TQString::null, "displayhints" );
}
void RulesDialog::accept()
@@ -728,7 +728,7 @@ void RulesDialog::accept()
KDialogBase::accept();
}
-EditShortcut::EditShortcut( QWidget* parent, const char* name )
+EditShortcut::EditShortcut( TQWidget* parent, const char* name )
: EditShortcutBase( parent, name )
{
}
@@ -736,7 +736,7 @@ EditShortcut::EditShortcut( QWidget* parent, const char* name )
void EditShortcut::editShortcut()
{
ShortcutDialog dlg( KShortcut( shortcut->text()), topLevelWidget());
- if( dlg.exec() == QDialog::Accepted )
+ if( dlg.exec() == TQDialog::Accepted )
shortcut->setText( dlg.shortcut().toString());
}
@@ -745,24 +745,24 @@ void EditShortcut::clearShortcut()
shortcut->setText( "" );
}
-EditShortcutDialog::EditShortcutDialog( QWidget* parent, const char* name )
+EditShortcutDialog::EditShortcutDialog( TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Edit Shortcut" ), Ok | Cancel )
{
widget = new EditShortcut( this );
setMainWidget( widget );
}
-void EditShortcutDialog::setShortcut( const QString& cut )
+void EditShortcutDialog::setShortcut( const TQString& cut )
{
widget->shortcut->setText( cut );
}
-QString EditShortcutDialog::shortcut() const
+TQString EditShortcutDialog::shortcut() const
{
return widget->shortcut->text();
}
-ShortcutDialog::ShortcutDialog( const KShortcut& cut, QWidget* parent, const char* name )
+ShortcutDialog::ShortcutDialog( const KShortcut& cut, TQWidget* parent, const char* name )
: KShortcutDialog( cut, false /*TODO???*/, parent, name )
{
}
diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.h b/kwin/kcmkwin/kwinrules/ruleswidget.h
index 94af87ef4..b47ad88ab 100644
--- a/kwin/kcmkwin/kwinrules/ruleswidget.h
+++ b/kwin/kcmkwin/kwinrules/ruleswidget.h
@@ -38,7 +38,7 @@ class RulesWidget
{
Q_OBJECT
public:
- RulesWidget( QWidget* parent = NULL, const char* name = NULL );
+ RulesWidget( TQWidget* parent = NULL, const char* name = NULL );
void setRules( Rules* r );
Rules* rules() const;
bool finalCheck();
@@ -99,7 +99,7 @@ class RulesDialog
{
Q_OBJECT
public:
- RulesDialog( QWidget* parent = NULL, const char* name = NULL );
+ RulesDialog( TQWidget* parent = NULL, const char* name = NULL );
Rules* edit( Rules* r, WId window, bool show_hints );
protected:
virtual void accept();
@@ -115,7 +115,7 @@ class EditShortcut
{
Q_OBJECT
public:
- EditShortcut( QWidget* parent = NULL, const char* name = NULL );
+ EditShortcut( TQWidget* parent = NULL, const char* name = NULL );
protected:
void editShortcut();
void clearShortcut();
@@ -126,9 +126,9 @@ class EditShortcutDialog
{
Q_OBJECT
public:
- EditShortcutDialog( QWidget* parent = NULL, const char* name = NULL );
- void setShortcut( const QString& cut );
- QString shortcut() const;
+ EditShortcutDialog( TQWidget* parent = NULL, const char* name = NULL );
+ void setShortcut( const TQString& cut );
+ TQString shortcut() const;
private:
EditShortcut* widget;
};
@@ -139,7 +139,7 @@ class ShortcutDialog
{
Q_OBJECT
public:
- ShortcutDialog( const KShortcut& cut, QWidget* parent = NULL, const char* name = NULL );
+ ShortcutDialog( const KShortcut& cut, TQWidget* parent = NULL, const char* name = NULL );
virtual void accept();
};
diff --git a/kwin/killer/killer.cpp b/kwin/killer/killer.cpp
index eed473cf5..ae31fc3e0 100644
--- a/kwin/killer/killer.cpp
+++ b/kwin/killer/killer.cpp
@@ -51,11 +51,11 @@ int main( int argc, char* argv[] )
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QCString hostname = args->getOption( "hostname" );
+ TQCString hostname = args->getOption( "hostname" );
bool pid_ok = false;
pid_t pid = args->getOption( "pid" ).toULong( &pid_ok );
- QString caption = QString::fromUtf8( args->getOption( "windowname" ));
- QString appname = QString::fromLatin1( args->getOption( "applicationname" ));
+ TQString caption = TQString::fromUtf8( args->getOption( "windowname" ));
+ TQString appname = TQString::fromLatin1( args->getOption( "applicationname" ));
bool id_ok = false;
Window id = args->getOption( "wid" ).toULong( &id_ok );
bool time_ok = false;
@@ -67,13 +67,13 @@ int main( int argc, char* argv[] )
KCmdLineArgs::usage( i18n( "This helper utility is not supposed to be called directly." ));
return 1;
}
- QString question = i18n(
+ TQString question = i18n(
"<qt>Window with title \"<b>%2</b>\" is not responding. "
"This window belongs to application <b>%1</b> (PID=%3, hostname=%4).<p>"
"Do you wish to terminate this application? (All unsaved data in this application will be lost.)</qt>" )
.arg( appname ).arg( caption ).arg( pid ).arg( hostname );
app.updateUserTimestamp( timestamp );
- if( KMessageBox::warningYesNoWId( id, question, QString::null, i18n("Terminate"), i18n("Keep Running") ) == KMessageBox::Yes )
+ if( KMessageBox::warningYesNoWId( id, question, TQString::null, i18n("Terminate"), i18n("Keep Running") ) == KMessageBox::Yes )
{
if( hostname != "localhost" )
{
diff --git a/kwin/killwindow.cpp b/kwin/killwindow.cpp
index 6d0152349..7dc6504f9 100644
--- a/kwin/killwindow.cpp
+++ b/kwin/killwindow.cpp
@@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms.
//#define QT_CLEAN_NAMESPACE
//#endif
#include "killwindow.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <X11/keysymdef.h>
@@ -75,7 +75,7 @@ void KillWindow::start()
mx /= 10;
my /= 10;
}
- QCursor::setPos(QCursor::pos()+QPoint(mx, my));
+ TQCursor::setPos(TQCursor::pos()+TQPoint(mx, my));
}
if (ev.type == ButtonRelease)
diff --git a/kwin/kwinbindings.cpp b/kwin/kwinbindings.cpp
index 9dee0a071..45a927f48 100644
--- a/kwin/kwinbindings.cpp
+++ b/kwin/kwinbindings.cpp
@@ -1,13 +1,13 @@
#ifndef NOSLOTS
# define DEF2( name, descr, key3, key4, fnSlot ) \
- keys->insert( name, i18n(descr), QString::null, key3, key4, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(descr), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
#else
# define DEF2( name, descr, key3, key4, fnSlot ) \
- keys->insert( name, i18n(descr), QString::null, key3, key4 )
+ keys->insert( name, i18n(descr), TQString::null, key3, key4 )
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4 )
+ keys->insert( name, i18n(name), TQString::null, key3, key4 )
#endif
#define WIN KKey::QtWIN
diff --git a/kwin/layers.cpp b/kwin/layers.cpp
index 28085cf27..40a7583a4 100644
--- a/kwin/layers.cpp
+++ b/kwin/layers.cpp
@@ -515,7 +515,7 @@ ClientList Workspace::constrainedStackingOrder()
kdDebug() << "stacking1:" << endl;
#endif
// build the order from layers
- QMap< Group*, Layer > minimum_layer;
+ TQMap< Group*, Layer > minimum_layer;
for( ClientList::ConstIterator it = unconstrained_stacking_order.begin();
it != unconstrained_stacking_order.end();
++it )
diff --git a/kwin/lib/kcommondecoration.cpp b/kwin/lib/kcommondecoration.cpp
index 58a95b599..32a297683 100644
--- a/kwin/lib/kcommondecoration.cpp
+++ b/kwin/lib/kcommondecoration.cpp
@@ -22,12 +22,12 @@
DEALINGS IN THE SOFTWARE.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
#include <kdebug.h>
@@ -118,8 +118,8 @@ void KCommonDecoration::init()
resetLayout();
- 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) ) );
updateCaption();
}
@@ -132,9 +132,9 @@ void KCommonDecoration::reset( unsigned long changed )
}
}
-QRegion KCommonDecoration::cornerShape(WindowCorner)
+TQRegion KCommonDecoration::cornerShape(WindowCorner)
{
- return QRegion();
+ return TQRegion();
}
void KCommonDecoration::updateCaption()
@@ -157,7 +157,7 @@ void KCommonDecoration::borders( int& left, int& right, int& top, int& bottom )
void KCommonDecoration::updateLayout() const
{
- QRect r = widget()->rect();
+ TQRect r = widget()->rect();
int r_x, r_y, r_x2, r_y2;
r.coords(&r_x, &r_y, &r_x2, &r_y2);
@@ -182,7 +182,7 @@ void KCommonDecoration::updateLayout() const
// resize buttons...
for (int n=0; n<NumButtons; n++) {
if (m_button[n]) {
- QSize newSize = QSize(layoutMetric(LM_ButtonWidth, true, m_button[n]),
+ TQSize newSize = TQSize(layoutMetric(LM_ButtonWidth, true, m_button[n]),
layoutMetric(LM_ButtonHeight, true, m_button[n]) );
if (newSize != m_button[n]->size() )
m_button[n]->setSize(newSize);
@@ -262,7 +262,7 @@ void KCommonDecoration::resetLayout()
// shown instead of the window contents in decoration previews
if(isPreview() ) {
- m_previewWidget = new QLabel(i18n("%1 is the name of window decoration style", "<center><b>%1 preview</b></center>").arg(visibleName() ), widget());
+ m_previewWidget = new TQLabel(i18n("%1 is the name of window decoration style", "<center><b>%1 preview</b></center>").arg(visibleName() ), widget());
m_previewWidget->show();
}
@@ -316,7 +316,7 @@ int KCommonDecoration::buttonContainerWidth(const ButtonContainer &btnContainer,
return w;
}
-void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& s, bool isLeft)
+void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString& s, bool isLeft)
{
if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) {
@@ -328,8 +328,8 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
if (!btn) break;
btn->setTipText(i18n("Menu") );
btn->setRealizeButtons(LeftButton|RightButton);
- connect(btn, SIGNAL(pressed()), SLOT(menuButtonPressed()));
- connect(btn, SIGNAL(released()), this, SLOT(menuButtonReleased()));
+ connect(btn, TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed()));
+ connect(btn, TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
m_button[MenuButton] = btn;
}
@@ -342,7 +342,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn->setTipText(oad?i18n("Not on all desktops"):i18n("On all desktops") );
btn->setToggleButton(true);
btn->setOn( oad );
- connect(btn, SIGNAL(clicked()), SLOT(toggleOnAllDesktops()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(toggleOnAllDesktops()));
m_button[OnAllDesktopsButton] = btn;
}
@@ -352,7 +352,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn = createButton(HelpButton);
if (!btn) break;
btn->setTipText(i18n("Help") );
- connect(btn, SIGNAL(clicked()), SLOT(showContextHelp()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp()));
m_button[HelpButton] = btn;
}
@@ -362,7 +362,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn = createButton(MinButton);
if (!btn) break;
btn->setTipText(i18n("Minimize") );
- connect(btn, SIGNAL(clicked()), SLOT(minimize()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(minimize()));
m_button[MinButton] = btn;
}
@@ -376,7 +376,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn->setTipText(max?i18n("Restore"):i18n("Maximize") );
btn->setToggleButton(true);
btn->setOn( max );
- connect(btn, SIGNAL(clicked()), SLOT(slotMaximize()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMaximize()));
m_button[MaxButton] = btn;
}
@@ -386,7 +386,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn = createButton(CloseButton);
if (!btn) break;
btn->setTipText(i18n("Close") );
- connect(btn, SIGNAL(clicked()), SLOT(closeWindow()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(closeWindow()));
m_button[CloseButton] = btn;
}
@@ -399,7 +399,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn->setTipText(above?i18n("Do not keep above others"):i18n("Keep above others") );
btn->setToggleButton(true);
btn->setOn( above );
- connect(btn, SIGNAL(clicked()), SLOT(slotKeepAbove()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepAbove()));
m_button[AboveButton] = btn;
}
@@ -412,7 +412,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn->setTipText(below?i18n("Do not keep below others"):i18n("Keep below others") );
btn->setToggleButton(true);
btn->setOn( below );
- connect(btn, SIGNAL(clicked()), SLOT(slotKeepBelow()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBelow()));
m_button[BelowButton] = btn;
}
@@ -425,7 +425,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
btn->setTipText(shaded?i18n("Unshade"):i18n("Shade") );
btn->setToggleButton(true);
btn->setOn( shaded );
- connect(btn, SIGNAL(clicked()), SLOT(slotShade()));
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShade()));
m_button[ShadeButton] = btn;
}
@@ -437,7 +437,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString&
if (btn) {
btn->setLeft(isLeft);
- btn->setSize(QSize(layoutMetric(LM_ButtonWidth, true, btn),layoutMetric(LM_ButtonHeight, true, btn)) );
+ btn->setSize(TQSize(layoutMetric(LM_ButtonWidth, true, btn),layoutMetric(LM_ButtonHeight, true, btn)) );
btn->show();
btnContainer.append(btn);
}
@@ -492,17 +492,17 @@ void KCommonDecoration::show()
widget()->show();
}
-void KCommonDecoration::resize( const QSize& s )
+void KCommonDecoration::resize( const TQSize& s )
{
widget()->resize( s );
}
-QSize KCommonDecoration::minimumSize() const
+TQSize KCommonDecoration::minimumSize() const
{
const int minWidth = QMAX(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft))
+QMAX(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight))
+layoutMetric(LM_TitleBorderLeft)+layoutMetric(LM_TitleBorderRight);
- return QSize(minWidth,
+ return TQSize(minWidth,
layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)
+layoutMetric(LM_TitleEdgeBottom)
+layoutMetric(LM_BorderBottom) );
@@ -623,19 +623,19 @@ void KCommonDecoration::slotKeepBelow()
void KCommonDecoration::menuButtonPressed()
{
- static QTime* t = NULL;
+ static TQTime* t = NULL;
static KCommonDecoration* 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 || !decorationBehaviour(DB_MenuClose) ) {
- QRect menuRect = m_button[MenuButton]->rect();
- QPoint menutop = m_button[MenuButton]->mapToGlobal(menuRect.topLeft());
- QPoint menubottom = m_button[MenuButton]->mapToGlobal(menuRect.bottomRight())+QPoint(0,2);
+ TQRect menuRect = m_button[MenuButton]->rect();
+ TQPoint menutop = m_button[MenuButton]->mapToGlobal(menuRect.topLeft());
+ TQPoint menubottom = m_button[MenuButton]->mapToGlobal(menuRect.bottomRight())+TQPoint(0,2);
KDecorationFactory* f = factory();
- showWindowMenu(QRect(menutop, menubottom));
+ showWindowMenu(TQRect(menutop, menubottom));
if( !f->exists( this )) // 'this' was deleted
return;
m_button[MenuButton]->setDown(false);
@@ -650,7 +650,7 @@ void KCommonDecoration::menuButtonReleased()
closeWindow();
}
-void KCommonDecoration::resizeEvent(QResizeEvent */*e*/)
+void KCommonDecoration::resizeEvent(TQResizeEvent */*e*/)
{
if (decorationBehaviour(DB_ButtonHide) )
calcHiddenButtons();
@@ -663,9 +663,9 @@ void KCommonDecoration::resizeEvent(QResizeEvent */*e*/)
// widget()->update();
}
-void KCommonDecoration::moveWidget(int x, int y, QWidget *widget) const
+void KCommonDecoration::moveWidget(int x, int y, TQWidget *widget) const
{
- QPoint p = widget->pos();
+ TQPoint p = widget->pos();
int oldX = p.y();
int oldY = p.x();
@@ -673,9 +673,9 @@ void KCommonDecoration::moveWidget(int x, int y, QWidget *widget) const
widget->move(x,y);
}
-void KCommonDecoration::resizeWidget(int w, int h, QWidget *widget) const
+void KCommonDecoration::resizeWidget(int w, int h, TQWidget *widget) const
{
- QSize s = widget->size();
+ TQSize s = widget->size();
int oldW = s.width();
int oldH = s.height();
@@ -683,7 +683,7 @@ void KCommonDecoration::resizeWidget(int w, int h, QWidget *widget) const
widget->resize(w,h);
}
-void KCommonDecoration::mouseDoubleClickEvent(QMouseEvent *e)
+void KCommonDecoration::mouseDoubleClickEvent(TQMouseEvent *e)
{
if( e->button() != LeftButton )
return;
@@ -695,19 +695,19 @@ void KCommonDecoration::mouseDoubleClickEvent(QMouseEvent *e)
titlebarDblClickOperation();
}
-void KCommonDecoration::wheelEvent(QWheelEvent *e)
+void KCommonDecoration::wheelEvent(TQWheelEvent *e)
{
int tb = layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)+layoutMetric(LM_TitleEdgeBottom);
if (isSetShade() || e->pos().y() <= tb )
titlebarMouseWheelOperation( e->delta());
}
-KCommonDecoration::Position KCommonDecoration::mousePosition(const QPoint &point) const
+KCommonDecoration::Position KCommonDecoration::mousePosition(const TQPoint &point) const
{
const int corner = 18+3*layoutMetric(LM_BorderBottom, false)/2;
Position pos = PositionCenter;
- QRect r = widget()->rect();
+ TQRect r = widget()->rect();
int r_x, r_y, r_x2, r_y2;
r.coords(&r_x, &r_y, &r_x2, &r_y2);
int p_x = point.x();
@@ -778,12 +778,12 @@ void KCommonDecoration::updateWindowShape()
bool tl=true,tr=true,bl=true,br=true; // is there a transparent rounded corner in top-left? etc
- QDesktopWidget *desktop=KApplication::desktop();
+ TQDesktopWidget *desktop=KApplication::desktop();
// no transparent rounded corners if this window corner lines up with a screen corner
for(int screen=0; screen < desktop->numScreens(); ++screen)
{
- QRect fullscreen(desktop->screenGeometry(screen));
- QRect window = geometry();
+ TQRect fullscreen(desktop->screenGeometry(screen));
+ TQRect window = geometry();
if(window.topLeft() == fullscreen.topLeft() ) tl = false;
if(window.topRight() == fullscreen.topRight() ) tr = false;
@@ -791,7 +791,7 @@ void KCommonDecoration::updateWindowShape()
if(window.bottomRight()== fullscreen.bottomRight() ) br = false;
}
- QRegion mask(0, 0, w, h);
+ TQRegion mask(0, 0, w, h);
// Remove top-left corner.
if(tl)
@@ -817,26 +817,26 @@ void KCommonDecoration::updateWindowShape()
setMask( mask );
}
-bool KCommonDecoration::eventFilter( QObject* o, QEvent* e )
+bool KCommonDecoration::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:
return false;
@@ -853,7 +853,7 @@ bool KCommonDecoration::isToolWindow() const
return ((type==NET::Toolbar)||(type==NET::Utility)||(type==NET::Menu));
}
-QRect KCommonDecoration::titleRect() const
+TQRect KCommonDecoration::titleRect() const
{
int r_x, r_y, r_x2, r_y2;
widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
@@ -865,14 +865,14 @@ QRect KCommonDecoration::titleRect() const
const int titleBorderRight = layoutMetric(LM_TitleBorderRight);
const int ttlHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1;
- return QRect(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft, r_y+titleEdgeTop,
+ return TQRect(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft, r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-titleBorderRight-(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
}
KCommonDecorationButton::KCommonDecorationButton(ButtonType type, KCommonDecoration *parent, const char *name)
- : QButton(parent->widget(), name),
+ : TQButton(parent->widget(), name),
m_decoration(parent),
m_type(type),
m_realizeButtons(LeftButton),
@@ -911,7 +911,7 @@ void KCommonDecorationButton::setRealizeButtons(int btns)
m_realizeButtons = btns;
}
-void KCommonDecorationButton::setSize(const QSize &s)
+void KCommonDecorationButton::setSize(const TQSize &s)
{
if (!m_size.isValid() || s != size() ) {
m_size = s;
@@ -921,46 +921,46 @@ void KCommonDecorationButton::setSize(const QSize &s)
}
}
-QSize KCommonDecorationButton::sizeHint() const
+TQSize KCommonDecorationButton::sizeHint() const
{
return m_size;
}
-void KCommonDecorationButton::setTipText(const QString &tip) {
- QToolTip::remove(this );
- QToolTip::add(this, tip );
+void KCommonDecorationButton::setTipText(const TQString &tip) {
+ TQToolTip::remove(this );
+ TQToolTip::add(this, tip );
}
void KCommonDecorationButton::setToggleButton(bool toggle)
{
- QButton::setToggleButton(toggle);
+ TQButton::setToggleButton(toggle);
reset(ToggleChange);
}
void KCommonDecorationButton::setOn(bool on)
{
if (on != isOn() ) {
- QButton::setOn(on);
+ TQButton::setOn(on);
reset(StateChange);
}
}
-void KCommonDecorationButton::mousePressEvent(QMouseEvent* e)
+void KCommonDecorationButton::mousePressEvent(TQMouseEvent* e)
{
m_lastMouse = e->button();
// pass on event after changing button to LeftButton
- 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 KCommonDecorationButton::mouseReleaseEvent(QMouseEvent* e)
+void KCommonDecorationButton::mouseReleaseEvent(TQMouseEvent* e)
{
m_lastMouse = e->button();
// pass on event after changing button to LeftButton
- 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);
}
diff --git a/kwin/lib/kcommondecoration.h b/kwin/lib/kcommondecoration.h
index 9495cf148..f515a7da7 100644
--- a/kwin/lib/kcommondecoration.h
+++ b/kwin/lib/kcommondecoration.h
@@ -25,8 +25,8 @@
#ifndef KCOMMONDECORATION_H
#define KCOMMONDECORATION_H
-#include <qbutton.h>
-#include <qvaluevector.h>
+#include <tqbutton.h>
+#include <tqvaluevector.h>
#include "kdecoration.h"
@@ -134,19 +134,19 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
/**
* The name of the decoration used in the decoration preview.
*/
- virtual QString visibleName() const = 0;
+ virtual TQString visibleName() const = 0;
/**
* The default title button order on the left.
* @see KDecoration::titleButtonsLeft()
* @see KDecoration::titleButtonsRight()
*/
- virtual QString defaultButtonsLeft() const = 0;
+ virtual TQString defaultButtonsLeft() const = 0;
/**
* The default title button order on the left.
* @see KDecoration::titleButtonsLeft()
* @see KDecoration::titleButtonsRight()
*/
- virtual QString defaultButtonsRight() const = 0;
+ virtual TQString defaultButtonsRight() const = 0;
/**
* This controls whether some specific behaviour should be enabled or not.
@@ -172,7 +172,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
/**
* @return the mask for the specific window corner.
*/
- virtual QRegion cornerShape(WindowCorner corner);
+ virtual TQRegion cornerShape(WindowCorner corner);
/**
* This updates the window mask using the information provided by
@@ -186,7 +186,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
/**
* Draw the window decoration.
*/
- virtual void paintEvent(QPaintEvent *e) = 0;
+ virtual void paintEvent(TQPaintEvent *e) = 0;
/**
* This is used to update the painting of the title bar after the caption has been changed.
@@ -219,7 +219,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
* Convenience method.
* @returns the title rect.
*/
- QRect titleRect() const;
+ TQRect titleRect() const;
public:
/**
@@ -232,8 +232,8 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
virtual void reset( unsigned long changed );
virtual void borders( int& left, int& right, int& top, int& bottom ) const;
virtual void show();
- virtual void resize(const QSize& s);
- virtual QSize minimumSize() const;
+ virtual void resize(const TQSize& s);
+ virtual TQSize minimumSize() const;
virtual void maximizeChange();
virtual void desktopChange();
virtual void shadeChange();
@@ -250,29 +250,29 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
void menuButtonPressed();
void menuButtonReleased();
public:
- virtual Position mousePosition(const QPoint &point) const;
+ virtual Position mousePosition(const TQPoint &point) const;
- virtual bool eventFilter( QObject* o, QEvent* e );
- virtual void resizeEvent(QResizeEvent *e);
- virtual void mouseDoubleClickEvent(QMouseEvent *e);
- virtual void wheelEvent(QWheelEvent *e);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
+ virtual void resizeEvent(TQResizeEvent *e);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *e);
+ virtual void wheelEvent(TQWheelEvent *e);
private:
void resetLayout();
- void moveWidget(int x, int y, QWidget *widget) const;
- void resizeWidget(int w, int h, QWidget *widget) const;
+ void moveWidget(int x, int y, TQWidget *widget) const;
+ void resizeWidget(int w, int h, TQWidget *widget) const;
- typedef QValueVector <KCommonDecorationButton*> ButtonContainer; ///< If the entry is 0, it's a spacer.
+ typedef TQValueVector <KCommonDecorationButton*> ButtonContainer; ///< If the entry is 0, it's a spacer.
int buttonContainerWidth(const ButtonContainer &btnContainer, bool countHidden = false) const;
- void addButtons(ButtonContainer &btnContainer, const QString& buttons, bool isLeft);
+ void addButtons(ButtonContainer &btnContainer, const TQString& buttons, bool isLeft);
KCommonDecorationButton *m_button[NumButtons];
ButtonContainer m_buttonsLeft;
ButtonContainer m_buttonsRight;
- QWidget *m_previewWidget;
+ TQWidget *m_previewWidget;
// button hiding for small windows
void calcHiddenButtons();
@@ -333,30 +333,30 @@ class KWIN_EXPORT KCommonDecorationButton : public QButton
/**
* Set the button size.
*/
- void setSize(const QSize &s);
+ void setSize(const TQSize &s);
/**
* Set/update the button's tool tip
*/
- void setTipText(const QString &tip);
+ void setTipText(const TQString &tip);
/**
* The mouse button that has been clicked last time.
*/
ButtonState lastMousePress() const { return m_lastMouse; }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
protected:
void setToggleButton(bool toggle);
void setOn(bool on);
void setLeft(bool left);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
private:
KCommonDecoration *m_decoration;
ButtonType m_type;
int m_realizeButtons;
- QSize m_size;
+ TQSize m_size;
ButtonState m_lastMouse;
bool m_isLeft;
diff --git a/kwin/lib/kdecoration.cpp b/kwin/lib/kdecoration.cpp
index c7b3d6929..97c8965e9 100644
--- a/kwin/lib/kdecoration.cpp
+++ b/kwin/lib/kdecoration.cpp
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#include "kdecoration.h"
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kglobal.h>
#include <assert.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
@@ -60,10 +60,10 @@ const KDecorationOptions* KDecoration::options()
void KDecoration::createMainWidget( WFlags flags )
{
// FRAME check flags?
- setMainWidget( new QWidget( initialParentWidget(), "decoration widget", initialWFlags() | flags ));
+ setMainWidget( new TQWidget( initialParentWidget(), "decoration widget", initialWFlags() | flags ));
}
-void KDecoration::setMainWidget( QWidget* w )
+void KDecoration::setMainWidget( TQWidget* w )
{
assert( w_ == NULL );
w_ = w;
@@ -71,7 +71,7 @@ void KDecoration::setMainWidget( QWidget* w )
widget()->resize( geometry().size());
}
-QWidget* KDecoration::initialParentWidget() const
+TQWidget* KDecoration::initialParentWidget() const
{
return bridge_->initialParentWidget();
}
@@ -161,27 +161,27 @@ NET::WindowType KDecoration::windowType( unsigned long supported_types ) const
return bridge_->windowType( supported_types );
}
-QIconSet KDecoration::icon() const
+TQIconSet KDecoration::icon() const
{
return bridge_->icon();
}
-QString KDecoration::caption() const
+TQString KDecoration::caption() const
{
return bridge_->caption();
}
-void KDecoration::processMousePressEvent( QMouseEvent* e )
+void KDecoration::processMousePressEvent( TQMouseEvent* e )
{
return bridge_->processMousePressEvent( e );
}
-void KDecoration::showWindowMenu( const QRect &pos )
+void KDecoration::showWindowMenu( const TQRect &pos )
{
bridge_->showWindowMenu( pos );
}
-void KDecoration::showWindowMenu( QPoint pos )
+void KDecoration::showWindowMenu( TQPoint pos )
{
bridge_->showWindowMenu( pos );
}
@@ -191,14 +191,14 @@ void KDecoration::performWindowOperation( WindowOperation op )
bridge_->performWindowOperation( op );
}
-void KDecoration::setMask( const QRegion& reg, int mode )
+void KDecoration::setMask( const TQRegion& reg, int mode )
{
bridge_->setMask( reg, mode );
}
void KDecoration::clearMask()
{
- bridge_->setMask( QRegion(), 0 );
+ bridge_->setMask( TQRegion(), 0 );
}
bool KDecoration::isPreview() const
@@ -206,22 +206,22 @@ bool KDecoration::isPreview() const
return bridge_->isPreview();
}
-QRect KDecoration::geometry() const
+TQRect KDecoration::geometry() const
{
return bridge_->geometry();
}
-QRect KDecoration::iconGeometry() const
+TQRect KDecoration::iconGeometry() const
{
return bridge_->iconGeometry();
}
-QRegion KDecoration::unobscuredRegion( const QRegion& r ) const
+TQRegion KDecoration::unobscuredRegion( const TQRegion& r ) const
{
return bridge_->unobscuredRegion( r );
}
-QWidget* KDecoration::workspaceWidget() const
+TQWidget* KDecoration::workspaceWidget() const
{
return bridge_->workspaceWidget();
}
@@ -294,7 +294,7 @@ void KDecoration::setKeepBelow( bool set )
bridge_->setKeepBelow( set );
}
-bool KDecoration::drawbound( const QRect&, bool )
+bool KDecoration::drawbound( const TQRect&, bool )
{
return false;
}
@@ -328,7 +328,7 @@ void KDecoration::ungrabXServer()
bridge_->grabXServer( false );
}
-KDecoration::Position KDecoration::mousePosition( const QPoint& p ) const
+KDecoration::Position KDecoration::mousePosition( const TQPoint& p ) const
{
const int range = 16;
int bleft, bright, btop, bbottom;
@@ -375,12 +375,12 @@ KDecorationOptions::~KDecorationOptions()
KDecoration::options_ = NULL;
}
-const QColor& KDecorationOptions::color(ColorType type, bool active) const
+const TQColor& KDecorationOptions::color(ColorType type, bool active) const
{
return(d->colors[type + (active ? 0 : NUM_COLORS)]);
}
-const QFont& KDecorationOptions::font(bool active, bool small) const
+const TQFont& KDecorationOptions::font(bool active, bool small) const
{
if ( small )
return(active ? d->activeFontSmall : d->inactiveFontSmall);
@@ -388,14 +388,14 @@ const QFont& KDecorationOptions::font(bool active, bool small) const
return(active ? d->activeFont : d->inactiveFont);
}
-const QColorGroup& KDecorationOptions::colorGroup(ColorType type, bool active) const
+const TQColorGroup& KDecorationOptions::colorGroup(ColorType type, bool active) const
{
int idx = type + (active ? 0 : NUM_COLORS);
if(d->cg[idx])
return(*d->cg[idx]);
- d->cg[idx] = new QColorGroup(Qt::black, d->colors[idx], d->colors[idx].light(150),
+ d->cg[idx] = new TQColorGroup(Qt::black, d->colors[idx], d->colors[idx].light(150),
d->colors[idx].dark(), d->colors[idx].dark(120),
- Qt::black, QApplication::palette().active().
+ Qt::black, TQApplication::palette().active().
base());
return(*d->cg[idx]);
}
@@ -405,12 +405,12 @@ bool KDecorationOptions::customButtonPositions() const
return d->custom_button_positions;
}
-QString KDecorationOptions::titleButtonsLeft() const
+TQString KDecorationOptions::titleButtonsLeft() const
{
return d->title_buttons_left;
}
-QString KDecorationOptions::titleButtonsRight() const
+TQString KDecorationOptions::titleButtonsRight() const
{
return d->title_buttons_right;
}
diff --git a/kwin/lib/kdecoration.h b/kwin/lib/kdecoration.h
index 2fd1fc451..b4f62d6f8 100644
--- a/kwin/lib/kdecoration.h
+++ b/kwin/lib/kdecoration.h
@@ -25,10 +25,10 @@ DEALINGS IN THE SOFTWARE.
#ifndef KDECORATION_H
#define KDECORATION_H
-#include <qcolor.h>
-#include <qfont.h>
-#include <qobject.h>
-#include <qiconset.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqobject.h>
+#include <tqiconset.h>
#include <netwm_def.h>
#include <kdeversion.h>
@@ -196,7 +196,7 @@ public:
* @param type The requested color type.
* @param active Whether the color should be for active or inactive windows.
*/
- const QColor& color(ColorType type, bool active=true) const;
+ const TQColor& color(ColorType type, bool active=true) const;
/**
* Returns a colorgroup using the given decoration color as the background.
* The changed flags for this setting is SettingColors.
@@ -204,7 +204,7 @@ public:
* @param type The requested color type.
* @param active Whether to return the color for active or inactive windows.
*/
- const QColorGroup& colorGroup(ColorType type, bool active=true) const;
+ const TQColorGroup& colorGroup(ColorType type, bool active=true) const;
/**
* Returns the active or inactive decoration font.
* The changed flags for this setting is SettingFont.
@@ -212,7 +212,7 @@ public:
* @param active Whether to return the color for active or inactive windows.
* @param small If @a true, returns a font that's suitable for tool windows.
*/
- const QFont& font(bool active=true, bool small = false) const;
+ const TQFont& font(bool active=true, bool small = false) const;
/**
* Returns @a true if the style should use custom button positions
* The changed flags for this setting is SettingButtons.
@@ -242,7 +242,7 @@ public:
* Unknown buttons in the returned string must be ignored.
* The changed flags for this setting is SettingButtons.
*/
- QString titleButtonsLeft() const;
+ TQString titleButtonsLeft() const;
/**
* If customButtonPositions() returns true, titleButtonsRight
* returns which buttons should be on the right side of the titlebar from left
@@ -254,7 +254,7 @@ public:
* Unknown buttons in the returned string must be ignored.
* The changed flags for this setting is SettingButtons.
*/
- QString titleButtonsRight() const;
+ TQString titleButtonsRight() const;
/**
* @returns true if the style should use tooltips for window buttons
@@ -308,7 +308,7 @@ protected:
* @since 3.2
*/
class KWIN_EXPORT KDecoration
- : public QObject, public KDecorationDefines
+ : public TQObject, public KDecorationDefines
{
Q_OBJECT
public:
@@ -436,11 +436,11 @@ class KWIN_EXPORT KDecoration
/**
* Returns an icon set with the decorated window's icon.
*/
- QIconSet icon() const;
+ TQIconSet icon() const;
/**
* Returns the decorated window's caption that should be shown in the titlebar.
*/
- QString caption() const;
+ TQString caption() const;
/**
* This function invokes the window operations menu.
* \param pos specifies the place on the screen where the menu should
@@ -467,12 +467,12 @@ class KWIN_EXPORT KDecoration
* button[MenuButton]->setDown(false);
* \endcode
*/
- void showWindowMenu( const QRect &pos );
+ void showWindowMenu( const TQRect &pos );
/**
* Overloaded version of the above.
*/
- void showWindowMenu( QPoint pos );
+ void showWindowMenu( TQPoint pos );
/**
* This function performs the given window operation. This function may destroy
* the current decoration object, just like showWindowMenu().
@@ -486,7 +486,7 @@ class KWIN_EXPORT KDecoration
* @param mode The X11 values Unsorted, YSorted, YXSorted and YXBanded that specify
* the sorting of the rectangles, default value is Unsorted.
*/
- void setMask( const QRegion& reg, int mode = 0 );
+ void setMask( const TQRegion& reg, int mode = 0 );
/**
* This convenience function resets the shape mask.
*/
@@ -500,13 +500,13 @@ class KWIN_EXPORT KDecoration
/**
* Returns the geometry of the decoration.
*/
- QRect geometry() const;
+ TQRect geometry() const;
/**
* Returns the icon geometry for the window, i.e. the geometry of the taskbar
* entry. This is used mainly for window minimize animations. Note that
* the geometry may be null.
*/
- QRect iconGeometry() const;
+ TQRect iconGeometry() const;
/**
* Returns the intersection of the given region with the region left
* unobscured by the windows stacked above the current one. You can use
@@ -515,12 +515,12 @@ class KWIN_EXPORT KDecoration
* space of the decoration.
* @param r The region you want to check for holes
*/
- QRegion unobscuredRegion( const QRegion& r ) const;
+ TQRegion unobscuredRegion( const TQRegion& r ) const;
/**
* Returns the main workspace widget. The main purpose of this function is to
* allow painting the minimize animation or the transparent move bound on it.
*/
- QWidget* workspaceWidget() const;
+ TQWidget* workspaceWidget() const;
/**
* Returns the handle of the window that is being decorated. It is possible
* the returned value will be 0.
@@ -548,7 +548,7 @@ class KWIN_EXPORT KDecoration
* that are not handled by the decoration itself should be passed to it
* in order to make work operations like window resizing by dragging borders etc.
*/
- void processMousePressEvent( QMouseEvent* e );
+ void processMousePressEvent( TQMouseEvent* e );
// requests to decoration
@@ -564,7 +564,7 @@ class KWIN_EXPORT KDecoration
* Positions at the edge will result in window resizing with mouse button
* pressed, center position will result in moving.
*/
- virtual Position mousePosition( const QPoint& p ) const = 0;
+ virtual Position mousePosition( const TQPoint& p ) const = 0;
/**
* This function should return the distance from each window side to the inner
@@ -587,13 +587,13 @@ class KWIN_EXPORT KDecoration
*
* @param s Specifies the new size of the decoration window.
*/
- virtual void resize( const QSize& s ) = 0;
+ virtual void resize( const TQSize& s ) = 0;
/**
* This function should return the minimum required size for the decoration.
* Note that the returned size shouldn't be too large, because it will be
* used to keep the decorated window at least as large.
*/
- virtual QSize minimumSize() const = 0;
+ virtual TQSize minimumSize() const = 0;
/**
* This function is called whenever the window either becomes or stops being active.
* Use isActive() to find out the current state.
@@ -651,7 +651,7 @@ class KWIN_EXPORT KDecoration
*
* @see workspaceWidget() and geometry().
*/
- virtual bool drawbound( const QRect& geom, bool clear );
+ virtual bool drawbound( const TQRect& geom, bool clear );
/**
* This function may be reimplemented to provide custom minimize/restore animations
* The reimplementation is allowed to perform X server grabs if necessary
@@ -684,7 +684,7 @@ class KWIN_EXPORT KDecoration
* with parent specified by initialParentWidget() and flags
* specified by initialWFlags().
*/
- void setMainWidget( QWidget* );
+ void setMainWidget( TQWidget* );
/**
* Convenience functions that creates and sets a main widget as necessary.
* In such case, it's usually needed to install an event filter
@@ -698,7 +698,7 @@ class KWIN_EXPORT KDecoration
/**
* The parent widget that should be used for the main widget.
*/
- QWidget* initialParentWidget() const;
+ TQWidget* initialParentWidget() const;
/**
* The flags that should be used when creating the main widget.
* It is possible to add more flags when creating the main widget, but only flags
@@ -716,11 +716,11 @@ class KWIN_EXPORT KDecoration
/**
* Returns the main widget for the decoration.
*/
- QWidget* widget();
+ TQWidget* widget();
/**
* Returns the main widget for the decoration.
*/
- const QWidget* widget() const;
+ const TQWidget* widget() const;
/**
* Returns the factory that created this decoration.
*/
@@ -829,7 +829,7 @@ class KWIN_EXPORT KDecoration
void emitKeepBelowChanged( bool below ) { emit keepBelowChanged( below ); }
private:
KDecorationBridge* bridge_;
- QWidget* w_;
+ TQWidget* w_;
KDecorationFactory* factory_;
friend class KDecorationOptions; // for options_
static KDecorationOptions* options_;
@@ -854,12 +854,12 @@ KDecorationDefines::MaximizeMode operator|( KDecorationDefines::MaximizeMode m1,
return KDecorationDefines::MaximizeMode( int(m1) | int(m2) );
}
-inline QWidget* KDecoration::widget()
+inline TQWidget* KDecoration::widget()
{
return w_;
}
-inline const QWidget* KDecoration::widget() const
+inline const TQWidget* KDecoration::widget() const
{
return w_;
}
diff --git a/kwin/lib/kdecoration_p.cpp b/kwin/lib/kdecoration_p.cpp
index 0117e4ec4..1e063d099 100644
--- a/kwin/lib/kdecoration_p.cpp
+++ b/kwin/lib/kdecoration_p.cpp
@@ -26,8 +26,8 @@ DEALINGS IN THE SOFTWARE.
#include <kconfig.h>
#include <kglobalsettings.h>
-#include <qpalette.h>
-#include <qapplication.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
#include <assert.h>
KDecorationOptionsPrivate::KDecorationOptionsPrivate()
@@ -66,17 +66,17 @@ void KDecorationOptionsPrivate::defaultKWinSettings()
unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
{
unsigned long changed = 0;
- QString old_group = config->group();
+ TQString old_group = config->group();
config->setGroup( "WM" );
// SettingColors
- QColor old_colors[NUM_COLORS*2];
+ TQColor old_colors[NUM_COLORS*2];
for( int i = 0;
i < NUM_COLORS*2;
++i )
old_colors[ i ] = colors[ i ];
- QPalette pal = QApplication::palette();
+ TQPalette pal = TQApplication::palette();
// normal colors
colors[ColorFrame] = pal.active().background();
colors[ColorFrame] = config->readColorEntry("frame", &colors[ColorFrame]);
@@ -84,7 +84,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
colors[ColorHandle] = config->readColorEntry("handle", &colors[ColorHandle]);
// full button configuration (background, blend, and foreground
- if(QPixmap::defaultDepth() > 8)
+ if(TQPixmap::defaultDepth() > 8)
colors[ColorButtonBg] = colors[ColorFrame].light(130);
else
colors[ColorButtonBg] = colors[ColorFrame];
@@ -93,7 +93,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
colors[ColorTitleBar] = pal.active().highlight();
colors[ColorTitleBar] = config->readColorEntry("activeBackground",
&colors[ColorTitleBar]);
- if(QPixmap::defaultDepth() > 8)
+ if(TQPixmap::defaultDepth() > 8)
colors[ColorTitleBlend] = colors[ ColorTitleBar ].dark(110);
else
colors[ColorTitleBlend] = colors[ ColorTitleBar ];
@@ -110,7 +110,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
colors[ColorTitleBar+NUM_COLORS] = config->
readColorEntry("inactiveBackground", &colors[ColorTitleBar+NUM_COLORS]);
- if(QPixmap::defaultDepth() > 8)
+ if(TQPixmap::defaultDepth() > 8)
colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ].dark(110);
else
colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ];
@@ -118,7 +118,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
config->readColorEntry("inactiveBlend", &colors[ColorTitleBlend+NUM_COLORS]);
// full button configuration
- if(QPixmap::defaultDepth() > 8)
+ if(TQPixmap::defaultDepth() > 8)
colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS].light(130);
else
colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS];
@@ -140,12 +140,12 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
changed |= SettingColors;
// SettingFont
- QFont old_activeFont = activeFont;
- QFont old_inactiveFont = inactiveFont;
- QFont old_activeFontSmall = activeFontSmall;
- QFont old_inactiveFontSmall = inactiveFontSmall;
+ TQFont old_activeFont = activeFont;
+ TQFont old_inactiveFont = inactiveFont;
+ TQFont old_activeFontSmall = activeFontSmall;
+ TQFont old_inactiveFontSmall = inactiveFontSmall;
- QFont activeFontGuess = KGlobalSettings::windowTitleFont();
+ TQFont activeFontGuess = KGlobalSettings::windowTitleFont();
activeFont = config->readFontEntry("activeFont", &activeFontGuess);
inactiveFont = config->readFontEntry("inactiveFont", &activeFont);
@@ -163,8 +163,8 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
config->setGroup( "Style" );
// SettingsButtons
- QString old_title_buttons_left = title_buttons_left;
- QString old_title_buttons_right = title_buttons_right;
+ TQString old_title_buttons_left = title_buttons_left;
+ TQString old_title_buttons_right = title_buttons_right;
bool old_custom_button_positions = custom_button_positions;
custom_button_positions = config->readBoolEntry("CustomButtonPositions", false);
if (custom_button_positions)
@@ -224,9 +224,9 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
}
KDecorationDefines::BorderSize KDecorationOptionsPrivate::findPreferredBorderSize( BorderSize size,
- QValueList< BorderSize > sizes ) const
+ TQValueList< BorderSize > sizes ) const
{
- for( QValueList< BorderSize >::ConstIterator it = sizes.begin();
+ for( TQValueList< BorderSize >::ConstIterator it = sizes.begin();
it != sizes.end();
++it )
if( size <= *it ) // size is either a supported size, or *it is the closest larger supported
diff --git a/kwin/lib/kdecoration_p.h b/kwin/lib/kdecoration_p.h
index 8d0e5e15a..58f386c9b 100644
--- a/kwin/lib/kdecoration_p.h
+++ b/kwin/lib/kdecoration_p.h
@@ -30,8 +30,8 @@ DEALINGS IN THE SOFTWARE.
//
#include "kdecoration.h"
-#include <qwidget.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqvaluelist.h>
class KConfig;
@@ -42,13 +42,13 @@ class KWIN_EXPORT KDecorationOptionsPrivate : public KDecorationDefines
virtual ~KDecorationOptionsPrivate();
void defaultKWinSettings(); // shared implementation
unsigned long updateKWinSettings( KConfig* ); // shared implementation
- BorderSize findPreferredBorderSize( BorderSize size, QValueList< BorderSize > ) const; // shared implementation
+ BorderSize findPreferredBorderSize( BorderSize size, TQValueList< BorderSize > ) const; // shared implementation
- QColor colors[NUM_COLORS*2];
- QColorGroup *cg[NUM_COLORS*2];
- QFont activeFont, inactiveFont, activeFontSmall, inactiveFontSmall;
- QString title_buttons_left;
- QString title_buttons_right;
+ TQColor colors[NUM_COLORS*2];
+ TQColorGroup *cg[NUM_COLORS*2];
+ TQFont activeFont, inactiveFont, activeFontSmall, inactiveFontSmall;
+ TQString title_buttons_left;
+ TQString title_buttons_right;
bool custom_button_positions;
bool show_tooltips;
BorderSize border_size, cached_border_size;
@@ -77,18 +77,18 @@ class KDecorationBridge : public KDecorationDefines
virtual bool isMovable() const = 0;
virtual bool isResizable() const = 0;
virtual NET::WindowType windowType( unsigned long supported_types ) const = 0;
- virtual QIconSet icon() const = 0;
- virtual QString caption() const = 0;
- virtual void processMousePressEvent( QMouseEvent* ) = 0;
- virtual void showWindowMenu( const QRect &) = 0;
- virtual void showWindowMenu( QPoint ) = 0;
+ virtual TQIconSet icon() const = 0;
+ virtual TQString caption() const = 0;
+ virtual void processMousePressEvent( TQMouseEvent* ) = 0;
+ virtual void showWindowMenu( const TQRect &) = 0;
+ virtual void showWindowMenu( TQPoint ) = 0;
virtual void performWindowOperation( WindowOperation ) = 0;
- virtual void setMask( const QRegion&, int ) = 0;
+ virtual void setMask( const TQRegion&, int ) = 0;
virtual bool isPreview() const = 0;
- virtual QRect geometry() const = 0;
- virtual QRect iconGeometry() const = 0;
- virtual QRegion unobscuredRegion( const QRegion& r ) const = 0;
- virtual QWidget* workspaceWidget() const = 0;
+ virtual TQRect geometry() const = 0;
+ virtual TQRect iconGeometry() const = 0;
+ virtual TQRegion unobscuredRegion( const TQRegion& r ) const = 0;
+ virtual TQWidget* workspaceWidget() const = 0;
virtual WId windowId() const = 0;
virtual void closeWindow() = 0;
virtual void maximize( MaximizeMode mode ) = 0;
@@ -102,7 +102,7 @@ class KDecorationBridge : public KDecorationDefines
virtual void setKeepBelow( bool ) = 0;
// not part of public API
virtual int currentDesktop() const = 0;
- virtual QWidget* initialParentWidget() const = 0;
+ virtual TQWidget* initialParentWidget() const = 0;
virtual Qt::WFlags initialWFlags() const = 0;
virtual void helperShowHide( bool ) = 0;
virtual void grabXServer( bool grab ) = 0;
diff --git a/kwin/lib/kdecoration_plugins_p.cpp b/kwin/lib/kdecoration_plugins_p.cpp
index 85d496105..0490e4755 100644
--- a/kwin/lib/kdecoration_plugins_p.cpp
+++ b/kwin/lib/kdecoration_plugins_p.cpp
@@ -31,8 +31,8 @@ DEALINGS IN THE SOFTWARE.
#include <klibloader.h>
#include <assert.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "kdecorationfactory.h"
@@ -65,7 +65,7 @@ KDecorationPlugins::~KDecorationPlugins()
bool KDecorationPlugins::reset( unsigned long changed )
{
- QString oldPlugin = pluginStr;
+ TQString oldPlugin = pluginStr;
config->reparseConfiguration();
bool ret = false;
if(( !loadPlugin( "" ) && library ) // "" = read the one in cfg file
@@ -91,7 +91,7 @@ KDecoration* KDecorationPlugins::createDecoration( KDecorationBridge* bridge )
}
// returns true if plugin was loaded successfully
-bool KDecorationPlugins::loadPlugin( QString nameStr )
+bool KDecorationPlugins::loadPlugin( TQString nameStr )
{
if( nameStr.isEmpty())
{
@@ -105,13 +105,13 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
KLibrary *oldLibrary = library;
KDecorationFactory* oldFactory = fact;
- QString path = KLibLoader::findLibrary(QFile::encodeName(nameStr));
+ TQString path = KLibLoader::findLibrary(TQFile::encodeName(nameStr));
// If the plugin was not found, try to find the default
if (path.isEmpty())
{
nameStr = defaultPlugin;
- path = KLibLoader::findLibrary(QFile::encodeName(nameStr));
+ path = KLibLoader::findLibrary(TQFile::encodeName(nameStr));
}
// If no library was found, exit kwin with an error message
@@ -126,7 +126,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
return true;
// Try loading the requested plugin
- library = KLibLoader::self()->library(QFile::encodeName(path));
+ library = KLibLoader::self()->library(TQFile::encodeName(path));
// If that fails, fall back to the default plugin
if (!library)
@@ -135,9 +135,9 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
nameStr = defaultPlugin;
if ( pluginStr == nameStr )
return true;
- path = KLibLoader::findLibrary(QFile::encodeName(nameStr));
+ path = KLibLoader::findLibrary(TQFile::encodeName(nameStr));
if (!path.isEmpty())
- library = KLibLoader::self()->library(QFile::encodeName(path));
+ library = KLibLoader::self()->library(TQFile::encodeName(path));
}
if (!library)
@@ -166,7 +166,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
pluginStr = nameStr;
// For clients in kdeartwork
- QString catalogue = nameStr;
+ TQString catalogue = nameStr;
catalogue.replace( "kwin3_", "kwin_" );
KGlobal::locale()->insertCatalogue( catalogue );
// For KCommonDecoration based clients
@@ -194,6 +194,6 @@ void KDecorationPlugins::destroyPreviousPlugin()
}
}
-void KDecorationPlugins::error( const QString& )
+void KDecorationPlugins::error( const TQString& )
{
}
diff --git a/kwin/lib/kdecoration_plugins_p.h b/kwin/lib/kdecoration_plugins_p.h
index b82f7f914..81dbb6b68 100644
--- a/kwin/lib/kdecoration_plugins_p.h
+++ b/kwin/lib/kdecoration_plugins_p.h
@@ -30,9 +30,9 @@ DEALINGS IN THE SOFTWARE.
// This header file is internal. I mean it.
//
-#include <qcstring.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include "kdecoration.h"
@@ -48,22 +48,22 @@ class KWIN_EXPORT KDecorationPlugins
public:
KDecorationPlugins( KConfig* cfg );
virtual ~KDecorationPlugins();
- bool loadPlugin( QString name );
+ bool loadPlugin( TQString name );
void destroyPreviousPlugin();
KDecorationFactory* factory();
KDecoration* createDecoration( KDecorationBridge* );
- QString currentPlugin() { return pluginStr; }
+ TQString currentPlugin() { return pluginStr; }
bool reset( unsigned long changed ); // returns true if decorations need to be recreated
protected:
- virtual void error( const QString& error_msg );
- QCString defaultPlugin; // FRAME normalne protected?
+ virtual void error( const TQString& error_msg );
+ TQCString defaultPlugin; // FRAME normalne protected?
private:
KDecorationFactory* (*create_ptr)();
KLibrary *library;
KDecorationFactory* fact;
KLibrary *old_library;
KDecorationFactory* old_fact;
- QString pluginStr;
+ TQString pluginStr;
KConfig* config;
};
diff --git a/kwin/lib/kdecorationfactory.cpp b/kwin/lib/kdecorationfactory.cpp
index 74508501b..7ad1aefbe 100644
--- a/kwin/lib/kdecorationfactory.cpp
+++ b/kwin/lib/kdecorationfactory.cpp
@@ -51,9 +51,9 @@ void KDecorationFactory::checkRequirements( KDecorationProvides* )
{
}
-QValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const
+TQValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const
{
- return QValueList< BorderSize >() << BorderNormal;
+ return TQValueList< BorderSize >() << BorderNormal;
}
bool KDecorationFactory::exists( const KDecoration* deco ) const
@@ -73,7 +73,7 @@ void KDecorationFactory::removeDecoration( KDecoration* deco )
void KDecorationFactory::resetDecorations( unsigned long changed )
{
- for( QValueList< KDecoration* >::ConstIterator it = _decorations.begin();
+ for( TQValueList< KDecoration* >::ConstIterator it = _decorations.begin();
it != _decorations.end();
++it )
(*it)->reset( changed );
diff --git a/kwin/lib/kdecorationfactory.h b/kwin/lib/kdecorationfactory.h
index 08e733c8b..7396ad987 100644
--- a/kwin/lib/kdecorationfactory.h
+++ b/kwin/lib/kdecorationfactory.h
@@ -68,7 +68,7 @@ class KWIN_EXPORT KDecorationFactory
* sizes, ordered from the smallest to the largest one. By default, only
* BorderNormal is returned.
*/
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
virtual bool supports( Ability ability );
@@ -108,7 +108,7 @@ class KWIN_EXPORT KDecorationFactory
*/
NET::WindowType windowType( unsigned long supported_types, KDecorationBridge* bridge ) const;
private:
- QValueList< KDecoration* > _decorations;
+ TQValueList< KDecoration* > _decorations;
KDecorationFactoryPrivate* d;
};
diff --git a/kwin/main.cpp b/kwin/main.cpp
index 82410d6a4..edceeb6bf 100644
--- a/kwin/main.cpp
+++ b/kwin/main.cpp
@@ -101,7 +101,7 @@ Application::Application( )
fputs(i18n("kwin: unable to claim manager selection, another wm running? (try using --replace)\n").local8Bit(), stderr);
::exit(1);
}
- connect( &owner, SIGNAL( lostOwnership()), SLOT( lostSelection()));
+ connect( &owner, TQT_SIGNAL( lostOwnership()), TQT_SLOT( lostSelection()));
// if there was already kwin running, it saved its configuration after loosing the selection -> reread
config()->reparseConfiguration();
@@ -124,11 +124,11 @@ Application::Application( )
syncX(); // trigger possible errors, there's still a chance to abort
DCOPRef ref( "kded", "kded" );
- ref.send( "unloadModule", QCString( "kdetrayproxy" ));
+ ref.send( "unloadModule", TQCString( "kdetrayproxy" ));
initting = FALSE; // startup done, we are up and running now.
- dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("wm started"));
+ dcopClient()->send( "ksplash", "", "upAndRunning(TQString)", TQString("wm started"));
XEvent e;
e.xclient.type = ClientMessage;
e.xclient.message_type = XInternAtom( qt_xdisplay(), "_KDE_SPLASH_PROGRESS", False );
@@ -146,7 +146,7 @@ Application::~Application()
{
XSetInputFocus( qt_xdisplay(), PointerRoot, RevertToPointerRoot, qt_x_time );
DCOPRef ref( "kded", "kded" );
- if( !ref.send( "loadModule", QCString( "kdetrayproxy" )))
+ if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
}
delete options;
@@ -158,7 +158,7 @@ void Application::lostSelection()
// remove windowmanager privileges
XSelectInput(qt_xdisplay(), qt_xrootwin(), PropertyChangeMask );
DCOPRef ref( "kded", "kded" );
- if( !ref.send( "loadModule", QCString( "kdetrayproxy" )))
+ if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
quit();
}
@@ -172,7 +172,7 @@ bool Application::x11EventFilter( XEvent *e )
static void sighandler(int)
{
- QApplication::exit();
+ TQApplication::exit();
}
@@ -206,7 +206,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
// we only do the multihead fork if we are not restored by the session
// manager, since the session manager will register multiple kwins,
// one for each screen...
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (multiHead.lower() == "true")
{
@@ -221,14 +221,14 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
int number_of_screens = ScreenCount( dpy );
KWinInternal::screen_number = DefaultScreen( dpy );
int pos; // temporarily needed to reconstruct DISPLAY var if multi-head
- QCString display_name = XDisplayString( dpy );
+ TQCString display_name = XDisplayString( dpy );
XCloseDisplay( dpy );
dpy = 0;
if ((pos = display_name.findRev('.')) != -1 )
display_name.remove(pos,10); // 10 is enough to be sure we removed ".s"
- QCString envir;
+ TQCString envir;
if (number_of_screens != 1)
{
for (int i = 0; i < number_of_screens; i++ )
@@ -285,7 +285,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] )
fcntl(ConnectionNumber(qt_xdisplay()), F_SETFD, 1);
- QCString appname;
+ TQCString appname;
if (KWinInternal::screen_number == 0)
appname = "kwin";
else
diff --git a/kwin/manage.cpp b/kwin/manage.cpp
index 24398dcae..e56a877b4 100644
--- a/kwin/manage.cpp
+++ b/kwin/manage.cpp
@@ -87,8 +87,8 @@ bool Client::manage( Window w, bool isMapped )
{
// Qt3.2 and older had this all lowercase, Qt3.3 capitalized resource class
// force lowercase, so that workarounds listing resource classes still work
- resource_name = QCString( classHint.res_name ).lower();
- resource_class = QCString( classHint.res_class ).lower();
+ resource_name = TQCString( classHint.res_name ).lower();
+ resource_class = TQCString( classHint.res_class ).lower();
XFree( classHint.res_name );
XFree( classHint.res_class );
}
@@ -136,7 +136,7 @@ bool Client::manage( Window w, bool isMapped )
setUserNoBorder( true );
}
- setShortcut( rules()->checkShortcut( session ? session->shortcut : QString::null, true ));
+ setShortcut( rules()->checkShortcut( session ? session->shortcut : TQString::null, true ));
init_minimize = rules()->checkMinimize( init_minimize, !isMapped );
if( rules()->checkNoBorder( false, !isMapped ))
@@ -191,13 +191,13 @@ bool Client::manage( Window w, bool isMapped )
workspace()->updateOnAllDesktopsOfTransients( this ); // SELI
// onAllDesktopsChange(); decoration doesn't exist here yet
- QRect geom( attr.x, attr.y, attr.width, attr.height );
+ TQRect geom( attr.x, attr.y, attr.width, attr.height );
bool placementDone = FALSE;
if ( session )
geom = session->geometry;
- QRect area;
+ TQRect area;
bool partial_keep_in_area = isMapped || session;
if( isMapped || session )
area = workspace()->clientArea( FullArea, geom.center(), desktop());
@@ -209,7 +209,7 @@ bool Client::manage( Window w, bool isMapped )
area = workspace()->clientArea( PlacementArea, workspace()->screenGeometry( screen ).center(), desktop());
}
else
- area = workspace()->clientArea( PlacementArea, QCursor::pos(), desktop());
+ area = workspace()->clientArea( PlacementArea, TQCursor::pos(), desktop());
if( int type = checkFullScreenHack( geom ))
{
@@ -266,7 +266,7 @@ bool Client::manage( Window w, bool isMapped )
usePosition = true;
if( !rules()->checkIgnoreGeometry( !usePosition ))
{
- bool ignorePPosition = ( options->ignorePositionClasses.contains(QString::fromLatin1(resourceClass())));
+ bool ignorePPosition = ( options->ignorePositionClasses.contains(TQString::fromLatin1(resourceClass())));
if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) ||
(xSizeHint.flags & USPosition) )
@@ -284,10 +284,10 @@ bool Client::manage( Window w, bool isMapped )
if (xSizeHint.flags & PMaxSize)
geom.setSize( geom.size().boundedTo(
- rules()->checkMaxSize( QSize(xSizeHint.max_width, xSizeHint.max_height ) ) ) );
+ rules()->checkMaxSize( TQSize(xSizeHint.max_width, xSizeHint.max_height ) ) ) );
if (xSizeHint.flags & PMinSize)
geom.setSize( geom.size().expandedTo(
- rules()->checkMinSize( QSize(xSizeHint.min_width, xSizeHint.min_height ) ) ) );
+ rules()->checkMinSize( TQSize(xSizeHint.min_width, xSizeHint.min_height ) ) ) );
if( isMovable())
{
@@ -302,7 +302,7 @@ bool Client::manage( Window w, bool isMapped )
// TODO is CentralGravity right here, when resizing is done after gravitating?
plainResize( rules()->checkSize( sizeForClientSize( geom.size()), !isMapped ));
- QPoint forced_pos = rules()->checkPosition( invalidPoint, !isMapped );
+ TQPoint forced_pos = rules()->checkPosition( invalidPoint, !isMapped );
if( forced_pos != invalidPoint )
{
move( forced_pos );
@@ -396,19 +396,19 @@ bool Client::manage( Window w, bool isMapped )
if ( width() >= area.width() && height() >= area.height() )
{
maximize( Client::MaximizeFull );
- geom_restore = QRect(); // use placement when unmaximizing
+ geom_restore = TQRect(); // use placement when unmaximizing
}
else if ( width() >= area.width() )
{
maximize( Client::MaximizeHorizontal );
- geom_restore = QRect(); // use placement when unmaximizing
+ geom_restore = TQRect(); // use placement when unmaximizing
geom_restore.setY( y()); // but only for horizontal direction
geom_restore.setHeight( height());
}
else if ( height() >= area.height() )
{
maximize( Client::MaximizeVertical );
- geom_restore = QRect(); // use placement when unmaximizing
+ geom_restore = TQRect(); // use placement when unmaximizing
geom_restore.setX( x()); // but only for vertical direction
geom_restore.setWidth( width());
}
diff --git a/kwin/notifications.cpp b/kwin/notifications.cpp
index a2d72d697..288cbd029 100644
--- a/kwin/notifications.cpp
+++ b/kwin/notifications.cpp
@@ -17,9 +17,9 @@ License. See the file "COPYING" for the exact licensing terms.
namespace KWinInternal
{
-QString Notify::eventToName( Event e )
+TQString Notify::eventToName( Event e )
{
- QString event;
+ TQString event;
switch ( e )
{
case Activate:
@@ -85,7 +85,7 @@ QString Notify::eventToName( Event e )
default:
if ((e > DesktopChange) && (e <= DesktopChange+20))
{
- event = QString("desktop%1").arg(e-DesktopChange);
+ event = TQString("desktop%1").arg(e-DesktopChange);
}
break;
}
@@ -93,14 +93,14 @@ QString Notify::eventToName( Event e )
}
static bool forgetIt = FALSE;
-QValueList< Notify::EventData > Notify::pending_events;
+TQValueList< Notify::EventData > Notify::pending_events;
-bool Notify::raise( Event e, const QString& message, Client* c )
+bool Notify::raise( Event e, const TQString& message, Client* c )
{
if ( forgetIt )
return false; // no connection was possible, don't try each time
- QString event = eventToName( e );
+ TQString event = eventToName( e );
if ( !event )
return false;
@@ -135,7 +135,7 @@ void Notify::sendPendingEvents()
bool Notify::makeDemandAttention( Event e )
{
- QString event = eventToName( e );
+ TQString event = eventToName( e );
if( !event )
return false;
int rep = KNotifyClient::getPresentation( event );
diff --git a/kwin/notifications.h b/kwin/notifications.h
index dd7c79323..8d50cb1fe 100644
--- a/kwin/notifications.h
+++ b/kwin/notifications.h
@@ -13,8 +13,8 @@ License. See the file "COPYING" for the exact licensing terms.
#define KWIN_NOTIFICATIONS_H
#include <stdlib.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KWinInternal
{
@@ -50,18 +50,18 @@ class Notify
DesktopChange = 100
};
- static bool raise( Event, const QString& message = QString::null, Client* c = NULL );
+ static bool raise( Event, const TQString& message = TQString::null, Client* c = NULL );
static bool makeDemandAttention( Event );
static void sendPendingEvents();
private:
- static QString eventToName( Event );
+ static TQString eventToName( Event );
struct EventData
{
- QString event;
- QString message;
+ TQString event;
+ TQString message;
long window;
};
- static QValueList< EventData > pending_events;
+ static TQValueList< EventData > pending_events;
};
} // namespace
diff --git a/kwin/options.cpp b/kwin/options.cpp
index f74051bbb..5f0190347 100644
--- a/kwin/options.cpp
+++ b/kwin/options.cpp
@@ -13,13 +13,13 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KCMRULES
-#include <qpalette.h>
-#include <qpixmap.h>
+#include <tqpalette.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "client.h"
@@ -56,7 +56,7 @@ unsigned long Options::updateSettings()
show_geometry_tip = config->readBoolEntry("GeometryTip", false);
tabboxOutline = config->readBoolEntry("TabboxOutline", true);
- QString val;
+ TQString val;
val = config->readEntry ("FocusPolicy", "ClickToFocus");
focusPolicy = ClickToFocus; // what a default :-)
@@ -137,11 +137,11 @@ unsigned long Options::updateSettings()
ignoreFocusStealingClasses = config->readListEntry("IgnoreFocusStealingClasses");
// Qt3.2 and older had resource class all lowercase, but Qt3.3 has it capitalized
// therefore Client::resourceClass() forces lowercase, force here lowercase as well
- for( QStringList::Iterator it = ignorePositionClasses.begin();
+ for( TQStringList::Iterator it = ignorePositionClasses.begin();
it != ignorePositionClasses.end();
++it )
(*it) = (*it).lower();
- for( QStringList::Iterator it = ignoreFocusStealingClasses.begin();
+ for( TQStringList::Iterator it = ignoreFocusStealingClasses.begin();
it != ignoreFocusStealingClasses.end();
++it )
(*it) = (*it).lower();
@@ -209,7 +209,7 @@ unsigned long Options::updateSettings()
if( desktop_topmenu )
topmenus = true;
- QToolTip::setGloballyEnabled( d->show_tooltips );
+ TQToolTip::setGloballyEnabled( d->show_tooltips );
return changed;
}
@@ -219,7 +219,7 @@ unsigned long Options::updateSettings()
// if the window is moved out of the workspace (e.g. if the user moves a window
// by the titlebar, and moves it too high beneath Kicker at the top edge, they
// may not be able to move it back, unless they know about Alt+LMB)
-Options::WindowOperation Options::windowOperation(const QString &name, bool restricted )
+Options::WindowOperation Options::windowOperation(const TQString &name, bool restricted )
{
if (name == "Move")
return restricted ? MoveOp : UnrestrictedMoveOp;
@@ -246,9 +246,9 @@ Options::WindowOperation Options::windowOperation(const QString &name, bool rest
return NoOp;
}
-Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted )
+Options::MouseCommand Options::mouseCommand(const TQString &name, bool restricted )
{
- QString lowerName = name.lower();
+ TQString lowerName = name.lower();
if (lowerName == "raise") return MouseRaise;
if (lowerName == "lower") return MouseLower;
if (lowerName == "operations menu") return MouseOperationsMenu;
@@ -268,9 +268,9 @@ Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted
return MouseNothing;
}
-Options::MouseWheelCommand Options::mouseWheelCommand(const QString &name)
+Options::MouseWheelCommand Options::mouseWheelCommand(const TQString &name)
{
- QString lowerName = name.lower();
+ TQString lowerName = name.lower();
if (lowerName == "raise/lower") return MouseWheelRaiseLower;
if (lowerName == "shade/unshade") return MouseWheelShadeUnshade;
if (lowerName == "maximize/restore") return MouseWheelMaximizeRestore;
@@ -297,7 +297,7 @@ int Options::electricBorderDelay()
bool Options::checkIgnoreFocusStealing( const Client* c )
{
- return ignoreFocusStealingClasses.contains(QString::fromLatin1(c->resourceClass()));
+ return ignoreFocusStealingClasses.contains(TQString::fromLatin1(c->resourceClass()));
}
Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta )
@@ -322,7 +322,7 @@ Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int d
}
#endif
-Options::MoveResizeMode Options::stringToMoveResizeMode( const QString& s )
+Options::MoveResizeMode Options::stringToMoveResizeMode( const TQString& s )
{
return s == "Opaque" ? Opaque : Transparent;
}
diff --git a/kwin/options.h b/kwin/options.h
index 034c9759b..82dc6cdc1 100644
--- a/kwin/options.h
+++ b/kwin/options.h
@@ -12,10 +12,10 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_OPTIONS_H
#define KWIN_OPTIONS_H
-#include <qobject.h>
-#include <qfont.h>
-#include <qpalette.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqfont.h>
+#include <tqpalette.h>
+#include <tqstringlist.h>
#include <kdecoration_p.h>
#include "placement.h"
@@ -150,7 +150,7 @@ class Options : public KDecorationOptions
MoveResizeMode resizeMode;
MoveResizeMode moveMode;
- static MoveResizeMode stringToMoveResizeMode( const QString& s );
+ static MoveResizeMode stringToMoveResizeMode( const TQString& s );
static const char* moveResizeModeToString( MoveResizeMode mode );
Placement::Policy placement;
@@ -204,7 +204,7 @@ class Options : public KDecorationOptions
/**
* List of window classes to ignore PPosition size hint
*/
- QStringList ignorePositionClasses;
+ TQStringList ignorePositionClasses;
bool checkIgnoreFocusStealing( const Client* c );
@@ -258,9 +258,9 @@ class Options : public KDecorationOptions
uint keyCmdAllModKey() { return CmdAllModKey; }
- static WindowOperation windowOperation(const QString &name, bool restricted );
- static MouseCommand mouseCommand(const QString &name, bool restricted );
- static MouseWheelCommand mouseWheelCommand(const QString &name);
+ static WindowOperation windowOperation(const TQString &name, bool restricted );
+ static MouseCommand mouseCommand(const TQString &name, bool restricted );
+ static MouseWheelCommand mouseWheelCommand(const TQString &name);
/**
* @returns true if the Geometry Tip should be shown during a window move/resize.
@@ -337,7 +337,7 @@ class Options : public KDecorationOptions
bool topmenus;
bool desktop_topmenu;
// List of window classes for which not to use focus stealing prevention
- QStringList ignoreFocusStealingClasses;
+ TQStringList ignoreFocusStealingClasses;
MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta );
};
diff --git a/kwin/placement.cpp b/kwin/placement.cpp
index e9ae1b95e..a9862ce27 100644
--- a/kwin/placement.cpp
+++ b/kwin/placement.cpp
@@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "placement.h"
-#include <qrect.h>
+#include <tqrect.h>
#include <assert.h>
#ifndef KCMRULES
@@ -37,7 +37,7 @@ Placement::Placement(Workspace* w)
/*!
Places the client \a c according to the workspace's layout policy
*/
-void Placement::place(Client* c, QRect& area )
+void Placement::place(Client* c, TQRect& area )
{
Policy policy = c->rules()->checkPlacement( Default );
if( policy != Default )
@@ -56,7 +56,7 @@ void Placement::place(Client* c, QRect& area )
place(c, area, options->placement);
}
-void Placement::place(Client* c, QRect& area, Policy policy, Policy nextPlacement )
+void Placement::place(Client* c, TQRect& area, Policy policy, Policy nextPlacement )
{
if( policy == Unknown )
policy = Default;
@@ -85,14 +85,14 @@ void Placement::place(Client* c, QRect& area, Policy policy, Policy nextPlacemen
/*!
Place the client \a c according to a simply "random" placement algorithm.
*/
-void Placement::placeAtRandom(Client* c, const QRect& area, Policy /*next*/ )
+void Placement::placeAtRandom(Client* c, const TQRect& area, Policy /*next*/ )
{
const int step = 24;
static int px = step;
static int py = 2 * step;
int tx,ty;
- const QRect maxRect = checkArea( c, area );
+ const TQRect maxRect = checkArea( c, area );
if (px < maxRect.x())
px = maxRect.x();
@@ -128,7 +128,7 @@ void Placement::placeAtRandom(Client* c, const QRect& area, Policy /*next*/ )
/*!
Place the client \a c according to a really smart placement algorithm :-)
*/
-void Placement::placeSmart(Client* c, const QRect& area, Policy /*next*/ )
+void Placement::placeSmart(Client* c, const TQRect& area, Policy /*next*/ )
{
/*
* SmartPlacement by Cristian Tibirna ([email protected])
@@ -150,7 +150,7 @@ void Placement::placeSmart(Client* c, const QRect& area, Policy /*next*/ )
int basket; //temp holder
// get the maximum allowed windows space
- const QRect maxRect = checkArea( c, area );
+ const TQRect maxRect = checkArea( c, area );
int x = maxRect.left(), y = maxRect.top();
x_optimal = x; y_optimal = y;
@@ -304,7 +304,7 @@ void Placement::reinitCascading( int desktop )
for( int i = 0; i < m_WorkspacePtr->numberOfDesktops(); i++)
{
DesktopCascadingInfo inf;
- inf.pos = QPoint(-1,-1);
+ inf.pos = TQPoint(-1,-1);
inf.col = 0;
inf.row = 0;
cci.append(inf);
@@ -312,7 +312,7 @@ void Placement::reinitCascading( int desktop )
}
else
{
- cci[desktop - 1].pos = QPoint(-1, -1);
+ cci[desktop - 1].pos = TQPoint(-1, -1);
cci[desktop - 1].col = cci[desktop - 1].row = 0;
}
}
@@ -320,7 +320,7 @@ void Placement::reinitCascading( int desktop )
/*!
Place windows in a cascading order, remembering positions for each desktop
*/
-void Placement::placeCascaded (Client* c, QRect& area, Policy nextPlacement)
+void Placement::placeCascaded (Client* c, TQRect& area, Policy nextPlacement)
{
/* cascadePlacement by Cristian Tibirna ([email protected]) (30Jan98)
*/
@@ -334,7 +334,7 @@ void Placement::placeCascaded (Client* c, QRect& area, Policy nextPlacement)
const int dn = c->desktop() == 0 || c->isOnAllDesktops() ? (m_WorkspacePtr->currentDesktop() - 1) : (c->desktop() - 1);
// get the maximum allowed windows space and desk's origin
- QRect maxRect = checkArea( c, area );
+ TQRect maxRect = checkArea( c, area );
// initialize often used vars: width and height of c; we gain speed
const int ch = c->height();
@@ -350,7 +350,7 @@ void Placement::placeCascaded (Client* c, QRect& area, Policy nextPlacement)
//initialize if needed
if (cci[dn].pos.x() < 0 || cci[dn].pos.x() < X || cci[dn].pos.y() < Y )
{
- cci[dn].pos = QPoint(X, Y);
+ cci[dn].pos = TQPoint(X, Y);
cci[dn].col = cci[dn].row = 0;
}
@@ -399,41 +399,41 @@ void Placement::placeCascaded (Client* c, QRect& area, Policy nextPlacement)
}
// place the window
- c->move(QPoint(xp, yp));
+ c->move(TQPoint(xp, yp));
// new position
- cci[dn].pos = QPoint(xp + delta_x, yp + delta_y);
+ cci[dn].pos = TQPoint(xp + delta_x, yp + delta_y);
}
/*!
Place windows centered, on top of all others
*/
-void Placement::placeCentered (Client* c, const QRect& area, Policy /*next*/ )
+void Placement::placeCentered (Client* c, const TQRect& area, Policy /*next*/ )
{
// get the maximum allowed windows space and desk's origin
- const QRect maxRect = checkArea( c, area );
+ const TQRect maxRect = checkArea( c, area );
const int xp = maxRect.left() + (maxRect.width() - c->width()) / 2;
const int yp = maxRect.top() + (maxRect.height() - c->height()) / 2;
// place the window
- c->move(QPoint(xp, yp));
+ c->move(TQPoint(xp, yp));
}
/*!
Place windows in the (0,0) corner, on top of all others
*/
-void Placement::placeZeroCornered(Client* c, const QRect& area, Policy /*next*/ )
+void Placement::placeZeroCornered(Client* c, const TQRect& area, Policy /*next*/ )
{
// get the maximum allowed windows space and desk's origin
- const QRect maxRect = checkArea( c, area );
+ const TQRect maxRect = checkArea( c, area );
// place the window
- c->move(QPoint(maxRect.left(), maxRect.top()));
+ c->move(TQPoint(maxRect.left(), maxRect.top()));
}
-void Placement::placeUtility(Client* c, QRect& area, Policy /*next*/ )
+void Placement::placeUtility(Client* c, TQRect& area, Policy /*next*/ )
{
// TODO kwin should try to place utility windows next to their mainwindow,
// preferably at the right edge, and going down if there are more of them
@@ -444,21 +444,21 @@ void Placement::placeUtility(Client* c, QRect& area, Policy /*next*/ )
}
-void Placement::placeDialog(Client* c, QRect& area, Policy nextPlacement )
+void Placement::placeDialog(Client* c, TQRect& area, Policy nextPlacement )
{
placeOnMainWindow( c, area, nextPlacement );
}
-void Placement::placeUnderMouse(Client* c, QRect& area, Policy /*next*/ )
+void Placement::placeUnderMouse(Client* c, TQRect& area, Policy /*next*/ )
{
area = checkArea( c, area );
- QRect geom = c->geometry();
- geom.moveCenter( QCursor::pos());
+ TQRect geom = c->geometry();
+ geom.moveCenter( TQCursor::pos());
c->move( geom.topLeft());
c->keepInArea( area ); // make sure it's kept inside workarea
}
-void Placement::placeOnMainWindow(Client* c, QRect& area, Policy nextPlacement )
+void Placement::placeOnMainWindow(Client* c, TQRect& area, Policy nextPlacement )
{
if( nextPlacement == Unknown )
nextPlacement = Centered;
@@ -507,15 +507,15 @@ void Placement::placeOnMainWindow(Client* c, QRect& area, Policy nextPlacement )
place( c, area, Centered );
return;
}
- QRect geom = c->geometry();
+ TQRect geom = c->geometry();
geom.moveCenter( place_on->geometry().center());
c->move( geom.topLeft());
// get area again, because the mainwindow may be on different xinerama screen
- area = checkArea( c, QRect());
+ area = checkArea( c, TQRect());
c->keepInArea( area ); // make sure it's kept inside workarea
}
-void Placement::placeMaximizing(Client* c, QRect& area, Policy nextPlacement )
+void Placement::placeMaximizing(Client* c, TQRect& area, Policy nextPlacement )
{
if( nextPlacement == Unknown )
nextPlacement = Smart;
@@ -535,7 +535,7 @@ void Placement::placeMaximizing(Client* c, QRect& area, Policy nextPlacement )
}
}
-QRect Placement::checkArea( const Client* c, const QRect& area )
+TQRect Placement::checkArea( const Client* c, const TQRect& area )
{
if( area.isNull())
return m_WorkspacePtr->clientArea( PlacementArea, c->geometry().center(), c->desktop());
@@ -545,7 +545,7 @@ QRect Placement::checkArea( const Client* c, const QRect& area )
#endif
-Placement::Policy Placement::policyFromString( const QString& policy, bool no_special )
+Placement::Policy Placement::policyFromString( const TQString& policy, bool no_special )
{
if( policy == "NoPlacement" )
return NoPlacement;
@@ -627,16 +627,16 @@ void Client::growHorizontal()
{
if( !isResizable() || isShade())
return;
- QRect geom = geometry();
+ TQRect geom = geometry();
geom.setRight( workspace()->packPositionRight( this, geom.right(), true ));
- QSize adjsize = adjustedSize( geom.size(), SizemodeFixedW );
+ TQSize adjsize = adjustedSize( geom.size(), SizemodeFixedW );
if( geometry().size() == adjsize && geom.size() != adjsize && xSizeHint.width_inc > 1 ) // take care of size increments
{
int newright = workspace()->packPositionRight( this, geom.right() + xSizeHint.width_inc - 1, true );
// check that it hasn't grown outside of the area, due to size increments
// TODO this may be wrong?
if( workspace()->clientArea( MovementArea,
- QPoint(( x() + newright ) / 2, geometry().center().y()), desktop()).right() >= newright )
+ TQPoint(( x() + newright ) / 2, geometry().center().y()), desktop()).right() >= newright )
geom.setRight( newright );
}
geom.setSize( adjustedSize( geom.size(), SizemodeFixedW ));
@@ -653,7 +653,7 @@ void Client::shrinkHorizontal()
{
if( !isResizable() || isShade())
return;
- QRect geom = geometry();
+ TQRect geom = geometry();
geom.setRight( workspace()->packPositionLeft( this, geom.right(), false ));
if( geom.width() <= 1 )
return;
@@ -672,15 +672,15 @@ void Client::growVertical()
{
if( !isResizable() || isShade())
return;
- QRect geom = geometry();
+ TQRect geom = geometry();
geom.setBottom( workspace()->packPositionDown( this, geom.bottom(), true ));
- QSize adjsize = adjustedSize( geom.size(), SizemodeFixedH );
+ TQSize adjsize = adjustedSize( geom.size(), SizemodeFixedH );
if( geometry().size() == adjsize && geom.size() != adjsize && xSizeHint.height_inc > 1 ) // take care of size increments
{
int newbottom = workspace()->packPositionDown( this, geom.bottom() + xSizeHint.height_inc - 1, true );
// check that it hasn't grown outside of the area, due to size increments
if( workspace()->clientArea( MovementArea,
- QPoint( geometry().center().x(), ( y() + newbottom ) / 2 ), desktop()).bottom() >= newbottom )
+ TQPoint( geometry().center().x(), ( y() + newbottom ) / 2 ), desktop()).bottom() >= newbottom )
geom.setBottom( newbottom );
}
geom.setSize( adjustedSize( geom.size(), SizemodeFixedH ));
@@ -698,7 +698,7 @@ void Client::shrinkVertical()
{
if( !isResizable() || isShade())
return;
- QRect geom = geometry();
+ TQRect geom = geometry();
geom.setBottom( workspace()->packPositionUp( this, geom.bottom(), false ));
if( geom.height() <= 1 )
return;
@@ -712,7 +712,7 @@ int Workspace::packPositionLeft( const Client* cl, int oldx, bool left_edge ) co
int newx = clientArea( MovementArea, cl ).left();
if( oldx <= newx ) // try another Xinerama screen
newx = clientArea( MovementArea,
- QPoint( cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left();
+ TQPoint( cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left();
if( oldx <= newx )
return oldx;
for( ClientList::ConstIterator it = clients.begin();
@@ -735,7 +735,7 @@ int Workspace::packPositionRight( const Client* cl, int oldx, bool right_edge )
int newx = clientArea( MovementArea, cl ).right();
if( oldx >= newx ) // try another Xinerama screen
newx = clientArea( MovementArea,
- QPoint( cl->geometry().right() + 1, cl->geometry().center().y()), cl->desktop()).right();
+ TQPoint( cl->geometry().right() + 1, cl->geometry().center().y()), cl->desktop()).right();
if( oldx >= newx )
return oldx;
for( ClientList::ConstIterator it = clients.begin();
@@ -758,7 +758,7 @@ int Workspace::packPositionUp( const Client* cl, int oldy, bool top_edge ) const
int newy = clientArea( MovementArea, cl ).top();
if( oldy <= newy ) // try another Xinerama screen
newy = clientArea( MovementArea,
- QPoint( cl->geometry().center().x(), cl->geometry().top() - 1 ), cl->desktop()).top();
+ TQPoint( cl->geometry().center().x(), cl->geometry().top() - 1 ), cl->desktop()).top();
if( oldy <= newy )
return oldy;
for( ClientList::ConstIterator it = clients.begin();
@@ -781,7 +781,7 @@ int Workspace::packPositionDown( const Client* cl, int oldy, bool bottom_edge )
int newy = clientArea( MovementArea, cl ).bottom();
if( oldy >= newy ) // try another Xinerama screen
newy = clientArea( MovementArea,
- QPoint( cl->geometry().center().x(), cl->geometry().bottom() + 1 ), cl->desktop()).bottom();
+ TQPoint( cl->geometry().center().x(), cl->geometry().bottom() + 1 ), cl->desktop()).bottom();
if( oldy >= newy )
return oldy;
for( ClientList::ConstIterator it = clients.begin();
@@ -802,12 +802,12 @@ int Workspace::packPositionDown( const Client* cl, int oldy, bool bottom_edge )
/*!
Asks the internal positioning object to place a client
*/
-void Workspace::place(Client* c, QRect& area)
+void Workspace::place(Client* c, TQRect& area)
{
initPositioning->place( c, area );
}
-void Workspace::placeSmart(Client* c, const QRect& area)
+void Workspace::placeSmart(Client* c, const TQRect& area)
{
initPositioning->placeSmart( c, area );
}
diff --git a/kwin/placement.h b/kwin/placement.h
index 49b436d49..65db2df34 100644
--- a/kwin/placement.h
+++ b/kwin/placement.h
@@ -13,8 +13,8 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_PLACEMENT_H
#define KWIN_PLACEMENT_H
-#include <qpoint.h>
-#include <qvaluelist.h>
+#include <tqpoint.h>
+#include <tqvaluelist.h>
namespace KWinInternal
{
@@ -49,40 +49,40 @@ class Placement
Maximizing
};
- void place(Client* c, QRect& area );
+ void place(Client* c, TQRect& area );
- void placeAtRandom (Client* c, const QRect& area, Policy next = Unknown );
- void placeCascaded (Client* c, QRect& area, Policy next = Unknown );
- void placeSmart (Client* c, const QRect& area, Policy next = Unknown );
- void placeMaximizing (Client* c, QRect& area, Policy next = Unknown );
- void placeCentered (Client* c, const QRect& area, Policy next = Unknown );
- void placeZeroCornered(Client* c, const QRect& area, Policy next = Unknown );
- void placeDialog (Client* c, QRect& area, Policy next = Unknown );
- void placeUtility (Client* c, QRect& area, Policy next = Unknown );
+ void placeAtRandom (Client* c, const TQRect& area, Policy next = Unknown );
+ void placeCascaded (Client* c, TQRect& area, Policy next = Unknown );
+ void placeSmart (Client* c, const TQRect& area, Policy next = Unknown );
+ void placeMaximizing (Client* c, TQRect& area, Policy next = Unknown );
+ void placeCentered (Client* c, const TQRect& area, Policy next = Unknown );
+ void placeZeroCornered(Client* c, const TQRect& area, Policy next = Unknown );
+ void placeDialog (Client* c, TQRect& area, Policy next = Unknown );
+ void placeUtility (Client* c, TQRect& area, Policy next = Unknown );
void reinitCascading( int desktop );
- static Policy policyFromString( const QString& policy, bool no_special );
+ static Policy policyFromString( const TQString& policy, bool no_special );
static const char* policyToString( Policy policy );
private:
- void place(Client* c, QRect& area, Policy policy, Policy nextPlacement = Unknown );
- void placeUnderMouse(Client* c, QRect& area, Policy next = Unknown );
- void placeOnMainWindow(Client* c, QRect& area, Policy next = Unknown );
- QRect checkArea( const Client*c, const QRect& area );
+ void place(Client* c, TQRect& area, Policy policy, Policy nextPlacement = Unknown );
+ void placeUnderMouse(Client* c, TQRect& area, Policy next = Unknown );
+ void placeOnMainWindow(Client* c, TQRect& area, Policy next = Unknown );
+ TQRect checkArea( const Client*c, const TQRect& area );
Placement();
//CT needed for cascading+
struct DesktopCascadingInfo
{
- QPoint pos;
+ TQPoint pos;
int col;
int row;
};
- QValueList<DesktopCascadingInfo> cci;
+ TQValueList<DesktopCascadingInfo> cci;
Workspace* m_WorkspacePtr;
};
diff --git a/kwin/plugins.cpp b/kwin/plugins.cpp
index c7a4fcc15..75e7b3498 100644
--- a/kwin/plugins.cpp
+++ b/kwin/plugins.cpp
@@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kglobal.h>
#include <klocale.h>
#include <stdlib.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
namespace KWinInternal
{
@@ -22,12 +22,12 @@ namespace KWinInternal
PluginMgr::PluginMgr()
: KDecorationPlugins( KGlobal::config())
{
- defaultPlugin = (QPixmap::defaultDepth() > 8) ?
+ defaultPlugin = (TQPixmap::defaultDepth() > 8) ?
"kwin3_plastik" : "kwin3_quartz";
loadPlugin( "" ); // load the plugin specified in cfg file
}
-void PluginMgr::error( const QString &error_msg )
+void PluginMgr::error( const TQString &error_msg )
{
qWarning( "%s", (i18n("KWin: ") + error_msg +
i18n("\nKWin will now exit...")).local8Bit().data() );
diff --git a/kwin/plugins.h b/kwin/plugins.h
index 7e779098c..b10e29122 100644
--- a/kwin/plugins.h
+++ b/kwin/plugins.h
@@ -24,7 +24,7 @@ class PluginMgr
PluginMgr();
virtual bool provides( Requirement );
protected:
- virtual void error( const QString& error_msg );
+ virtual void error( const TQString& error_msg );
};
} // namespace
diff --git a/kwin/popupinfo.cpp b/kwin/popupinfo.cpp
index 906489e67..f0e80640a 100644
--- a/kwin/popupinfo.cpp
+++ b/kwin/popupinfo.cpp
@@ -14,17 +14,17 @@ License. See the file "COPYING" for the exact licensing terms.
#include "popupinfo.h"
#include "workspace.h"
#include "client.h"
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <fixx11h.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qdesktopwidget.h>
+#include <tqapplication.h>
+#include <tqdesktopwidget.h>
#include <kstringhandler.h>
#include <kglobalsettings.h>
@@ -34,15 +34,15 @@ namespace KWinInternal
{
PopupInfo::PopupInfo( Workspace* ws, const char *name )
- : QWidget( 0, name ), workspace( ws )
+ : TQWidget( 0, name ), workspace( ws )
{
m_infoString = "";
m_shown = false;
reset();
reconfigure();
- connect(&m_delayedHideTimer, SIGNAL(timeout()), this, SLOT(hide()));
+ connect(&m_delayedHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hide()));
- QFont f = font();
+ TQFont f = font();
f.setBold( TRUE );
f.setPointSize( 14 );
setFont( f );
@@ -59,7 +59,7 @@ PopupInfo::~PopupInfo()
*/
void PopupInfo::reset()
{
- QRect r = workspace->screenGeometry( workspace->activeScreen());
+ TQRect r = workspace->screenGeometry( workspace->activeScreen());
int w = fontMetrics().width( m_infoString ) + 30;
@@ -72,11 +72,11 @@ void PopupInfo::reset()
/*!
Paints the popup info
*/
-void PopupInfo::paintEvent( QPaintEvent* )
+void PopupInfo::paintEvent( TQPaintEvent* )
{
- QPainter p( this );
- style().drawPrimitive( QStyle::PE_Panel, &p, QRect( 0, 0, width(), height() ),
- colorGroup(), QStyle::Style_Default );
+ TQPainter p( this );
+ style().drawPrimitive( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ),
+ colorGroup(), TQStyle::Style_Default );
paintContents();
}
@@ -87,10 +87,10 @@ void PopupInfo::paintEvent( QPaintEvent* )
*/
void PopupInfo::paintContents()
{
- QPainter p( this );
- QRect r( 6, 6, width()-12, height()-12 );
+ TQPainter p( this );
+ TQRect r( 6, 6, width()-12, height()-12 );
- p.fillRect( r, colorGroup().brush( QColorGroup::Background ) );
+ p.fillRect( r, colorGroup().brush( TQColorGroup::Background ) );
/*
p.setPen(Qt::white);
@@ -106,8 +106,8 @@ void PopupInfo::paintContents()
void PopupInfo::hide()
{
m_delayedHideTimer.stop();
- QWidget::hide();
- QApplication::syncX();
+ TQWidget::hide();
+ TQApplication::syncX();
XEvent otherEvent;
while (XCheckTypedEvent (qt_xdisplay(), EnterNotify, &otherEvent ) )
;
@@ -122,7 +122,7 @@ void PopupInfo::reconfigure()
m_delayTime = c->readNumEntry("PopupHideDelay", 350 );
}
-void PopupInfo::showInfo(QString infoString)
+void PopupInfo::showInfo(TQString infoString)
{
if (m_show)
{
diff --git a/kwin/popupinfo.h b/kwin/popupinfo.h
index 0b31846ed..734a44cbe 100644
--- a/kwin/popupinfo.h
+++ b/kwin/popupinfo.h
@@ -11,9 +11,9 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_POPUPINFO_H
#define KWIN_POPUPINFO_H
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
namespace KWinInternal
{
@@ -29,20 +29,20 @@ class PopupInfo : public QWidget
void reset();
void hide();
- void showInfo(QString infoString);
+ void showInfo(TQString infoString);
void reconfigure();
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
void paintContents();
private:
- QTimer m_delayedHideTimer;
+ TQTimer m_delayedHideTimer;
int m_delayTime;
bool m_show;
bool m_shown;
- QString m_infoString;
+ TQString m_infoString;
Workspace* workspace;
};
diff --git a/kwin/rules.cpp b/kwin/rules.cpp
index 1aab4466a..cfcf4bc43 100644
--- a/kwin/rules.cpp
+++ b/kwin/rules.cpp
@@ -12,10 +12,10 @@ License. See the file "COPYING" for the exact licensing terms.
#include <fixx11h.h>
#include <kconfig.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <ktempfile.h>
#include <ksimpleconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
#ifndef KCMRULES
#include "client.h"
@@ -64,14 +64,14 @@ Rules::Rules()
{
}
-Rules::Rules( const QString& str, bool temporary )
+Rules::Rules( const TQString& str, bool temporary )
: temporary_state( temporary ? 2 : 0 )
{
KTempFile file;
- QFile* f = file.file();
+ TQFile* f = file.file();
if( f != NULL )
{
- QCString s = str.utf8();
+ TQCString s = str.utf8();
f->writeBlock( s.data(), s.length());
}
file.close();
@@ -134,10 +134,10 @@ void Rules::readFromCfg( KConfig& cfg )
sizerule = UnusedSetRule;
READ_FORCE_RULE( minsize, Size, );
if( !minsize.isValid())
- minsize = QSize( 1, 1 );
+ minsize = TQSize( 1, 1 );
READ_FORCE_RULE( maxsize, Size, );
if( maxsize.isEmpty())
- maxsize = QSize( 32767, 32767 );
+ maxsize = TQSize( 32767, 32767 );
READ_FORCE_RULE( opacityactive, Num, );
if( opacityactive < 0 || opacityactive > 100 )
opacityactive = 100;
@@ -293,7 +293,7 @@ bool Rules::isEmpty() const
&& disableglobalshortcutsrule == UnusedForceRule );
}
-Rules::SetRule Rules::readSetRule( KConfig& cfg, const QString& key )
+Rules::SetRule Rules::readSetRule( KConfig& cfg, const TQString& key )
{
int v = cfg.readNumEntry( key );
if( v >= DontAffect && v <= ForceTemporarily )
@@ -301,7 +301,7 @@ Rules::SetRule Rules::readSetRule( KConfig& cfg, const QString& key )
return UnusedSetRule;
}
-Rules::ForceRule Rules::readForceRule( KConfig& cfg, const QString& key )
+Rules::ForceRule Rules::readForceRule( KConfig& cfg, const TQString& key )
{
int v = cfg.readNumEntry( key );
if( v == DontAffect || v == Force || v == ForceTemporarily )
@@ -309,7 +309,7 @@ Rules::ForceRule Rules::readForceRule( KConfig& cfg, const QString& key )
return UnusedForceRule;
}
-NET::WindowType Rules::readType( KConfig& cfg, const QString& key )
+NET::WindowType Rules::readType( KConfig& cfg, const TQString& key )
{
int v = cfg.readNumEntry( key );
if( v >= NET::Normal && v <= NET::Splash )
@@ -329,13 +329,13 @@ bool Rules::matchType( NET::WindowType match_type ) const
return true;
}
-bool Rules::matchWMClass( const QCString& match_class, const QCString& match_name ) const
+bool Rules::matchWMClass( const TQCString& match_class, const TQCString& match_name ) const
{
if( wmclassmatch != UnimportantMatch )
{ // TODO optimize?
- QCString cwmclass = wmclasscomplete
+ TQCString cwmclass = wmclasscomplete
? match_name + ' ' + match_class : match_class;
- if( wmclassmatch == RegExpMatch && QRegExp( wmclass ).search( cwmclass ) == -1 )
+ if( wmclassmatch == RegExpMatch && TQRegExp( wmclass ).search( cwmclass ) == -1 )
return false;
if( wmclassmatch == ExactMatch && wmclass != cwmclass )
return false;
@@ -345,11 +345,11 @@ bool Rules::matchWMClass( const QCString& match_class, const QCString& match_nam
return true;
}
-bool Rules::matchRole( const QCString& match_role ) const
+bool Rules::matchRole( const TQCString& match_role ) const
{
if( windowrolematch != UnimportantMatch )
{
- if( windowrolematch == RegExpMatch && QRegExp( windowrole ).search( match_role ) == -1 )
+ if( windowrolematch == RegExpMatch && TQRegExp( windowrole ).search( match_role ) == -1 )
return false;
if( windowrolematch == ExactMatch && windowrole != match_role )
return false;
@@ -359,11 +359,11 @@ bool Rules::matchRole( const QCString& match_role ) const
return true;
}
-bool Rules::matchTitle( const QString& match_title ) const
+bool Rules::matchTitle( const TQString& match_title ) const
{
if( titlematch != UnimportantMatch )
{
- if( titlematch == RegExpMatch && QRegExp( title ).search( match_title ) == -1 )
+ if( titlematch == RegExpMatch && TQRegExp( title ).search( match_title ) == -1 )
return false;
if( titlematch == ExactMatch && title != match_title )
return false;
@@ -373,7 +373,7 @@ bool Rules::matchTitle( const QString& match_title ) const
return true;
}
-bool Rules::matchClientMachine( const QCString& match_machine ) const
+bool Rules::matchClientMachine( const TQCString& match_machine ) const
{
if( clientmachinematch != UnimportantMatch )
{
@@ -382,7 +382,7 @@ bool Rules::matchClientMachine( const QCString& match_machine ) const
&& matchClientMachine( "localhost" ))
return true;
if( clientmachinematch == RegExpMatch
- && QRegExp( clientmachine ).search( match_machine ) == -1 )
+ && TQRegExp( clientmachine ).search( match_machine ) == -1 )
return false;
if( clientmachinematch == ExactMatch
&& clientmachine != match_machine )
@@ -419,7 +419,7 @@ bool Rules::update( Client* c )
{
if( !c->isFullScreen())
{
- QPoint new_pos = position;
+ TQPoint new_pos = position;
// don't use the position in the direction which is maximized
if(( c->maximizeMode() & MaximizeHorizontal ) == 0 )
new_pos.setX( c->pos().x());
@@ -433,7 +433,7 @@ bool Rules::update( Client* c )
{
if( !c->isFullScreen())
{
- QSize new_size = size;
+ TQSize new_size = size;
// don't use the position in the direction which is maximized
if(( c->maximizeMode() & MaximizeHorizontal ) == 0 )
new_size.setWidth( c->size().width());
@@ -529,10 +529,10 @@ bool Rules::apply##name( type& arg ) const \
APPLY_FORCE_RULE( placement, Placement, Placement::Policy )
-bool Rules::applyGeometry( QRect& rect, bool init ) const
+bool Rules::applyGeometry( TQRect& rect, bool init ) const
{
- QPoint p = rect.topLeft();
- QSize s = rect.size();
+ TQPoint p = rect.topLeft();
+ TQSize s = rect.size();
bool ret = false; // no short-circuiting
if( applyPosition( p, init ))
{
@@ -547,22 +547,22 @@ bool Rules::applyGeometry( QRect& rect, bool init ) const
return ret;
}
-bool Rules::applyPosition( QPoint& pos, bool init ) const
+bool Rules::applyPosition( TQPoint& pos, bool init ) const
{
if( this->position != invalidPoint && checkSetRule( positionrule, init ))
pos = this->position;
return checkSetStop( positionrule );
}
-bool Rules::applySize( QSize& s, bool init ) const
+bool Rules::applySize( TQSize& s, bool init ) const
{
if( this->size.isValid() && checkSetRule( sizerule, init ))
s = this->size;
return checkSetStop( sizerule );
}
-APPLY_FORCE_RULE( minsize, MinSize, QSize )
-APPLY_FORCE_RULE( maxsize, MaxSize, QSize )
+APPLY_FORCE_RULE( minsize, MinSize, TQSize )
+APPLY_FORCE_RULE( maxsize, MaxSize, TQSize )
APPLY_FORCE_RULE( opacityactive, OpacityActive, int )
APPLY_FORCE_RULE( opacityinactive, OpacityInactive, int )
APPLY_FORCE_RULE( ignoreposition, IgnorePosition, bool )
@@ -615,7 +615,7 @@ APPLY_FORCE_RULE( acceptfocus, AcceptFocus, bool )
APPLY_FORCE_RULE( moveresizemode, MoveResizeMode, Options::MoveResizeMode )
APPLY_FORCE_RULE( closeable, Closeable, bool )
APPLY_FORCE_RULE( strictgeometry, StrictGeometry, bool )
-APPLY_RULE( shortcut, Shortcut, QString )
+APPLY_RULE( shortcut, Shortcut, TQString )
APPLY_FORCE_RULE( disableglobalshortcuts, DisableGlobalShortcuts, bool )
@@ -695,8 +695,8 @@ kdbgstream& operator<<( kdbgstream& stream, const Rules* r )
#ifndef KCMRULES
void WindowRules::discardTemporary()
{
- QValueVector< Rules* >::Iterator it2 = rules.begin();
- for( QValueVector< Rules* >::Iterator it = rules.begin();
+ TQValueVector< Rules* >::Iterator it2 = rules.begin();
+ for( TQValueVector< Rules* >::Iterator it = rules.begin();
it != rules.end();
)
{
@@ -713,7 +713,7 @@ void WindowRules::discardTemporary()
void WindowRules::update( Client* c )
{
bool updated = false;
- for( QValueVector< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueVector< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
if( (*it)->update( c )) // no short-circuiting here
@@ -728,7 +728,7 @@ type WindowRules::check##rule( type arg, bool init ) const \
if( rules.count() == 0 ) \
return arg; \
type ret = arg; \
- for( QValueVector< Rules* >::ConstIterator it = rules.begin(); \
+ for( TQValueVector< Rules* >::ConstIterator it = rules.begin(); \
it != rules.end(); \
++it ) \
{ \
@@ -744,7 +744,7 @@ type WindowRules::check##rule( type arg ) const \
if( rules.count() == 0 ) \
return arg; \
type ret = arg; \
- for( QValueVector< Rules* >::ConstIterator it = rules.begin(); \
+ for( TQValueVector< Rules* >::ConstIterator it = rules.begin(); \
it != rules.end(); \
++it ) \
{ \
@@ -756,15 +756,15 @@ type WindowRules::check##rule( type arg ) const \
CHECK_FORCE_RULE( Placement, Placement::Policy )
-QRect WindowRules::checkGeometry( QRect rect, bool init ) const
+TQRect WindowRules::checkGeometry( TQRect rect, bool init ) const
{
- return QRect( checkPosition( rect.topLeft(), init ), checkSize( rect.size(), init ));
+ return TQRect( checkPosition( rect.topLeft(), init ), checkSize( rect.size(), init ));
}
-CHECK_RULE( Position, QPoint )
-CHECK_RULE( Size, QSize )
-CHECK_FORCE_RULE( MinSize, QSize )
-CHECK_FORCE_RULE( MaxSize, QSize )
+CHECK_RULE( Position, TQPoint )
+CHECK_RULE( Size, TQSize )
+CHECK_FORCE_RULE( MinSize, TQSize )
+CHECK_FORCE_RULE( MaxSize, TQSize )
CHECK_FORCE_RULE( OpacityActive, int )
CHECK_FORCE_RULE( OpacityInactive, int )
CHECK_FORCE_RULE( IgnorePosition, bool )
@@ -799,7 +799,7 @@ CHECK_FORCE_RULE( AcceptFocus, bool )
CHECK_FORCE_RULE( MoveResizeMode, Options::MoveResizeMode )
CHECK_FORCE_RULE( Closeable, bool )
CHECK_FORCE_RULE( StrictGeometry, bool )
-CHECK_RULE( Shortcut, QString )
+CHECK_RULE( Shortcut, TQString )
CHECK_FORCE_RULE( DisableGlobalShortcuts, bool )
#undef CHECK_RULE
@@ -823,8 +823,8 @@ void Client::applyWindowRules()
// apply force rules
// Placement - does need explicit update, just like some others below
// Geometry : setGeometry() doesn't check rules
- QRect orig_geom = QRect( pos(), sizeForClientSize( clientSize())); // handle shading
- QRect geom = client_rules.checkGeometry( orig_geom );
+ TQRect orig_geom = TQRect( pos(), sizeForClientSize( clientSize())); // handle shading
+ TQRect geom = client_rules.checkGeometry( orig_geom );
if( geom != orig_geom )
setGeometry( geom );
// MinSize, MaxSize handled by Geometry
@@ -851,7 +851,7 @@ void Client::applyWindowRules()
workspace()->activateNextClient( this );
// MoveResizeMode
// Closeable
- QSize s = adjustedSize();
+ TQSize s = adjustedSize();
if( s != size())
resizeWithChecks( s );
// StrictGeometry
@@ -917,8 +917,8 @@ void Client::checkAndSetInitialRuledOpacity()
WindowRules Workspace::findWindowRules( const Client* c, bool ignore_temporary )
{
- QValueVector< Rules* > ret;
- for( QValueList< Rules* >::Iterator it = rules.begin();
+ TQValueVector< Rules* > ret;
+ for( TQValueList< Rules* >::Iterator it = rules.begin();
it != rules.end();
)
{
@@ -946,8 +946,8 @@ WindowRules Workspace::findWindowRules( const Client* c, bool ignore_temporary )
void Workspace::editWindowRules( Client* c, bool whole_app )
{
writeWindowRules();
- QStringList args;
- args << "--wid" << QString::number( c->window());
+ TQStringList args;
+ args << "--wid" << TQString::number( c->window());
if( whole_app )
args << "--whole-app";
KApplication::kdeinitExec( "kwin_rules_dialog", args );
@@ -967,7 +967,7 @@ void Workspace::loadWindowRules()
i <= count;
++i )
{
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
Rules* rule = new Rules( cfg );
rules.append( rule );
}
@@ -977,30 +977,30 @@ void Workspace::writeWindowRules()
{
rulesUpdatedTimer.stop();
KConfig cfg( "kwinrulesrc" );
- QStringList groups = cfg.groupList();
- for( QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg.groupList();
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end();
++it )
cfg.deleteGroup( *it );
cfg.setGroup( "General" );
cfg.writeEntry( "count", rules.count());
int i = 1;
- for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueList< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
{
if( (*it)->isTemporary())
continue;
- cfg.setGroup( QString::number( i ));
+ cfg.setGroup( TQString::number( i ));
(*it)->write( cfg );
++i;
}
}
-void Workspace::gotTemporaryRulesMessage( const QString& message )
+void Workspace::gotTemporaryRulesMessage( const TQString& message )
{
bool was_temporary = false;
- for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ for( TQValueList< Rules* >::ConstIterator it = rules.begin();
it != rules.end();
++it )
if( (*it)->isTemporary())
@@ -1008,13 +1008,13 @@ void Workspace::gotTemporaryRulesMessage( const QString& message )
Rules* rule = new Rules( message, true );
rules.prepend( rule ); // highest priority first
if( !was_temporary )
- QTimer::singleShot( 60000, this, SLOT( cleanupTemporaryRules()));
+ TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules()));
}
void Workspace::cleanupTemporaryRules()
{
bool has_temporary = false;
- for( QValueList< Rules* >::Iterator it = rules.begin();
+ for( TQValueList< Rules* >::Iterator it = rules.begin();
it != rules.end();
)
{
@@ -1028,13 +1028,13 @@ void Workspace::cleanupTemporaryRules()
}
}
if( has_temporary )
- QTimer::singleShot( 60000, this, SLOT( cleanupTemporaryRules()));
+ TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules()));
}
void Workspace::discardUsedWindowRules( Client* c, bool withdrawn )
{
bool updated = false;
- for( QValueList< Rules* >::Iterator it = rules.begin();
+ for( TQValueList< Rules* >::Iterator it = rules.begin();
it != rules.end();
)
{
diff --git a/kwin/rules.h b/kwin/rules.h
index 65a8b9963..584e6a952 100644
--- a/kwin/rules.h
+++ b/kwin/rules.h
@@ -11,10 +11,10 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_RULES_H
#define KWIN_RULES_H
-#include <qstring.h>
+#include <tqstring.h>
#include <netwm_def.h>
-#include <qrect.h>
-#include <qvaluevector.h>
+#include <tqrect.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include "placement.h"
@@ -36,19 +36,19 @@ class WindowRules
: public KDecorationDefines
{
public:
- WindowRules( const QValueVector< Rules* >& rules );
+ WindowRules( const TQValueVector< Rules* >& rules );
WindowRules();
void update( Client* );
void discardTemporary();
bool contains( const Rules* rule ) const;
void remove( Rules* rule );
Placement::Policy checkPlacement( Placement::Policy placement ) const;
- QRect checkGeometry( QRect rect, bool init = false ) const;
- // use 'invalidPoint' with checkPosition, unlike QSize() and QRect(), QPoint() is a valid point
- QPoint checkPosition( QPoint pos, bool init = false ) const;
- QSize checkSize( QSize s, bool init = false ) const;
- QSize checkMinSize( QSize s ) const;
- QSize checkMaxSize( QSize s ) const;
+ TQRect checkGeometry( TQRect rect, bool init = false ) const;
+ // use 'invalidPoint' with checkPosition, unlike TQSize() and TQRect(), TQPoint() is a valid point
+ TQPoint checkPosition( TQPoint pos, bool init = false ) const;
+ TQSize checkSize( TQSize s, bool init = false ) const;
+ TQSize checkMinSize( TQSize s ) const;
+ TQSize checkMaxSize( TQSize s ) const;
int checkOpacityActive(int s) const;
int checkOpacityInactive(int s) const;
bool checkIgnoreGeometry( bool ignore ) const;
@@ -68,13 +68,13 @@ class WindowRules
Options::MoveResizeMode checkMoveResizeMode( Options::MoveResizeMode mode ) const;
bool checkCloseable( bool closeable ) const;
bool checkStrictGeometry( bool strict ) const;
- QString checkShortcut( QString s, bool init = false ) const;
+ TQString checkShortcut( TQString s, bool init = false ) const;
bool checkDisableGlobalShortcuts( bool disable ) const;
bool checkIgnorePosition( bool ignore ) const; // obsolete
private:
MaximizeMode checkMaximizeVert( MaximizeMode mode, bool init ) const;
MaximizeMode checkMaximizeHoriz( MaximizeMode mode, bool init ) const;
- QValueVector< Rules* > rules;
+ TQValueVector< Rules* > rules;
};
#endif
@@ -84,7 +84,7 @@ class Rules
public:
Rules();
Rules( KConfig& );
- Rules( const QString&, bool temporary );
+ Rules( const TQString&, bool temporary );
void write( KConfig& ) const;
bool isEmpty() const;
#ifndef KCMRULES
@@ -94,12 +94,12 @@ class Rules
bool isTemporary() const;
bool discardTemporary( bool force ); // removes if temporary and forced or too old
bool applyPlacement( Placement::Policy& placement ) const;
- bool applyGeometry( QRect& rect, bool init ) const;
- // use 'invalidPoint' with applyPosition, unlike QSize() and QRect(), QPoint() is a valid point
- bool applyPosition( QPoint& pos, bool init ) const;
- bool applySize( QSize& s, bool init ) const;
- bool applyMinSize( QSize& s ) const;
- bool applyMaxSize( QSize& s ) const;
+ bool applyGeometry( TQRect& rect, bool init ) const;
+ // use 'invalidPoint' with applyPosition, unlike TQSize() and TQRect(), TQPoint() is a valid point
+ bool applyPosition( TQPoint& pos, bool init ) const;
+ bool applySize( TQSize& s, bool init ) const;
+ bool applyMinSize( TQSize& s ) const;
+ bool applyMaxSize( TQSize& s ) const;
bool applyOpacityActive(int& s) const;
bool applyOpacityInactive(int& s) const;
bool applyIgnoreGeometry( bool& ignore ) const;
@@ -120,16 +120,16 @@ class Rules
bool applyMoveResizeMode( Options::MoveResizeMode& mode ) const;
bool applyCloseable( bool& closeable ) const;
bool applyStrictGeometry( bool& strict ) const;
- bool applyShortcut( QString& shortcut, bool init ) const;
+ bool applyShortcut( TQString& shortcut, bool init ) const;
bool applyDisableGlobalShortcuts( bool& disable ) const;
bool applyIgnorePosition( bool& ignore ) const; // obsolete
private:
#endif
bool matchType( NET::WindowType match_type ) const;
- bool matchWMClass( const QCString& match_class, const QCString& match_name ) const;
- bool matchRole( const QCString& match_role ) const;
- bool matchTitle( const QString& match_title ) const;
- bool matchClientMachine( const QCString& match_machine ) const;
+ bool matchWMClass( const TQCString& match_class, const TQCString& match_name ) const;
+ bool matchRole( const TQCString& match_role ) const;
+ bool matchTitle( const TQString& match_title ) const;
+ bool matchClientMachine( const TQCString& match_machine ) const;
// All these values are saved to the cfg file, and are also used in kstart!
enum
{
@@ -161,9 +161,9 @@ class Rules
LastStringMatch = RegExpMatch
};
void readFromCfg( KConfig& cfg );
- static SetRule readSetRule( KConfig&, const QString& key );
- static ForceRule readForceRule( KConfig&, const QString& key );
- static NET::WindowType readType( KConfig&, const QString& key );
+ static SetRule readSetRule( KConfig&, const TQString& key );
+ static ForceRule readForceRule( KConfig&, const TQString& key );
+ static NET::WindowType readType( KConfig&, const TQString& key );
#ifndef KCMRULES
static bool checkSetRule( SetRule rule, bool init );
static bool checkForceRule( ForceRule rule );
@@ -171,28 +171,28 @@ class Rules
static bool checkForceStop( ForceRule rule );
#endif
int temporary_state; // e.g. for kstart
- QString description;
- QCString wmclass;
+ TQString description;
+ TQCString wmclass;
StringMatch wmclassmatch;
bool wmclasscomplete;
- QCString windowrole;
+ TQCString windowrole;
StringMatch windowrolematch;
- QString title; // TODO "caption" ?
+ TQString title; // TODO "caption" ?
StringMatch titlematch;
- QCString extrarole;
+ TQCString extrarole;
StringMatch extrarolematch;
- QCString clientmachine;
+ TQCString clientmachine;
StringMatch clientmachinematch;
unsigned long types; // types for matching
Placement::Policy placement;
ForceRule placementrule;
- QPoint position;
+ TQPoint position;
SetRule positionrule;
- QSize size;
+ TQSize size;
SetRule sizerule;
- QSize minsize;
+ TQSize minsize;
ForceRule minsizerule;
- QSize maxsize;
+ TQSize maxsize;
ForceRule maxsizerule;
int opacityactive;
ForceRule opacityactiverule;
@@ -234,7 +234,7 @@ class Rules
ForceRule closeablerule;
bool strictgeometry;
ForceRule strictgeometryrule;
- QString shortcut;
+ TQString shortcut;
SetRule shortcutrule;
bool disableglobalshortcuts;
ForceRule disableglobalshortcutsrule;
@@ -273,7 +273,7 @@ bool Rules::checkForceStop( ForceRule rule )
}
inline
-WindowRules::WindowRules( const QValueVector< Rules* >& r )
+WindowRules::WindowRules( const TQValueVector< Rules* >& r )
: rules( r )
{
}
@@ -292,7 +292,7 @@ bool WindowRules::contains( const Rules* rule ) const
inline
void WindowRules::remove( Rules* rule )
{
- QValueVector< Rules* >::Iterator pos = qFind( rules.begin(), rules.end(), rule );
+ TQValueVector< Rules* >::Iterator pos = qFind( rules.begin(), rules.end(), rule );
if( pos != rules.end())
rules.erase( pos );
}
diff --git a/kwin/sm.cpp b/kwin/sm.cpp
index 37b9526c7..d13c6b18b 100644
--- a/kwin/sm.cpp
+++ b/kwin/sm.cpp
@@ -11,8 +11,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include "sm.h"
-#include <qsocketnotifier.h>
-#include <qsessionmanager.h>
+#include <tqsocketnotifier.h>
+#include <tqsessionmanager.h>
#include <kdebug.h>
#include <unistd.h>
#include <stdlib.h>
@@ -75,8 +75,8 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase )
for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it)
{
Client* c = (*it);
- QCString sessionId = c->sessionId();
- QCString wmCommand = c->wmCommand();
+ TQCString sessionId = c->sessionId();
+ TQCString wmCommand = c->wmCommand();
if ( sessionId.isEmpty() )
// remember also applications that are not XSMP capable
// and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF
@@ -85,35 +85,35 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase )
count++;
if( c->isActive())
active_client = count;
- QString n = QString::number(count);
+ TQString n = TQString::number(count);
if( phase == SMSavePhase2 || phase == SMSavePhase2Full )
{
- config->writeEntry( QString("sessionId")+n, sessionId.data() );
- config->writeEntry( QString("windowRole")+n, c->windowRole().data() );
- config->writeEntry( QString("wmCommand")+n, wmCommand.data() );
- config->writeEntry( QString("wmClientMachine")+n, c->wmClientMachine( true ).data() );
- config->writeEntry( QString("resourceName")+n, c->resourceName().data() );
- config->writeEntry( QString("resourceClass")+n, c->resourceClass().data() );
- config->writeEntry( QString("geometry")+n, QRect( c->calculateGravitation(TRUE), c->clientSize() ) ); // FRAME
- config->writeEntry( QString("restore")+n, c->geometryRestore() );
- config->writeEntry( QString("fsrestore")+n, c->geometryFSRestore() );
- config->writeEntry( QString("maximize")+n, (int) c->maximizeMode() );
- config->writeEntry( QString("fullscreen")+n, (int) c->fullScreenMode() );
- config->writeEntry( QString("desktop")+n, c->desktop() );
+ config->writeEntry( TQString("sessionId")+n, sessionId.data() );
+ config->writeEntry( TQString("windowRole")+n, c->windowRole().data() );
+ config->writeEntry( TQString("wmCommand")+n, wmCommand.data() );
+ config->writeEntry( TQString("wmClientMachine")+n, c->wmClientMachine( true ).data() );
+ config->writeEntry( TQString("resourceName")+n, c->resourceName().data() );
+ config->writeEntry( TQString("resourceClass")+n, c->resourceClass().data() );
+ config->writeEntry( TQString("geometry")+n, TQRect( c->calculateGravitation(TRUE), c->clientSize() ) ); // FRAME
+ config->writeEntry( TQString("restore")+n, c->geometryRestore() );
+ config->writeEntry( TQString("fsrestore")+n, c->geometryFSRestore() );
+ config->writeEntry( TQString("maximize")+n, (int) c->maximizeMode() );
+ config->writeEntry( TQString("fullscreen")+n, (int) c->fullScreenMode() );
+ config->writeEntry( TQString("desktop")+n, c->desktop() );
// the config entry is called "iconified" for back. comp. reasons
// (kconf_update script for updating session files would be too complicated)
- config->writeEntry( QString("iconified")+n, c->isMinimized() );
+ config->writeEntry( TQString("iconified")+n, c->isMinimized() );
// the config entry is called "sticky" for back. comp. reasons
- config->writeEntry( QString("sticky")+n, c->isOnAllDesktops() );
- config->writeEntry( QString("shaded")+n, c->isShade() );
+ config->writeEntry( TQString("sticky")+n, c->isOnAllDesktops() );
+ config->writeEntry( TQString("shaded")+n, c->isShade() );
// the config entry is called "staysOnTop" for back. comp. reasons
- config->writeEntry( QString("staysOnTop")+n, c->keepAbove() );
- config->writeEntry( QString("keepBelow")+n, c->keepBelow() );
- config->writeEntry( QString("skipTaskbar")+n, c->skipTaskbar( true ) );
- config->writeEntry( QString("skipPager")+n, c->skipPager() );
- config->writeEntry( QString("userNoBorder")+n, c->isUserNoBorder() );
- config->writeEntry( QString("windowType")+n, windowTypeToTxt( c->windowType()));
- config->writeEntry( QString("shortcut")+n, c->shortcut().toStringInternal());
+ config->writeEntry( TQString("staysOnTop")+n, c->keepAbove() );
+ config->writeEntry( TQString("keepBelow")+n, c->keepBelow() );
+ config->writeEntry( TQString("skipTaskbar")+n, c->skipTaskbar( true ) );
+ config->writeEntry( TQString("skipPager")+n, c->skipPager() );
+ config->writeEntry( TQString("userNoBorder")+n, c->isUserNoBorder() );
+ config->writeEntry( TQString("windowType")+n, windowTypeToTxt( c->windowType()));
+ config->writeEntry( TQString("shortcut")+n, c->shortcut().toStringInternal());
}
}
// TODO store also stacking order
@@ -154,31 +154,31 @@ void Workspace::loadSessionInfo()
int active_client = config->readNumEntry( "active" );
for ( int i = 1; i <= count; i++ )
{
- QString n = QString::number(i);
+ TQString n = TQString::number(i);
SessionInfo* info = new SessionInfo;
session.append( info );
- info->sessionId = config->readEntry( QString("sessionId")+n ).latin1();
- info->windowRole = config->readEntry( QString("windowRole")+n ).latin1();
- info->wmCommand = config->readEntry( QString("wmCommand")+n ).latin1();
- info->wmClientMachine = config->readEntry( QString("wmClientMachine")+n ).latin1();
- info->resourceName = config->readEntry( QString("resourceName")+n ).latin1();
- info->resourceClass = config->readEntry( QString("resourceClass")+n ).lower().latin1();
- info->geometry = config->readRectEntry( QString("geometry")+n );
- info->restore = config->readRectEntry( QString("restore")+n );
- info->fsrestore = config->readRectEntry( QString("fsrestore")+n );
- info->maximized = config->readNumEntry( QString("maximize")+n, 0 );
- info->fullscreen = config->readNumEntry( QString("fullscreen")+n, 0 );
- info->desktop = config->readNumEntry( QString("desktop")+n, 0 );
- info->minimized = config->readBoolEntry( QString("iconified")+n, FALSE );
- info->onAllDesktops = config->readBoolEntry( QString("sticky")+n, FALSE );
- info->shaded = config->readBoolEntry( QString("shaded")+n, FALSE );
- info->keepAbove = config->readBoolEntry( QString("staysOnTop")+n, FALSE );
- info->keepBelow = config->readBoolEntry( QString("keepBelow")+n, FALSE );
- info->skipTaskbar = config->readBoolEntry( QString("skipTaskbar")+n, FALSE );
- info->skipPager = config->readBoolEntry( QString("skipPager")+n, FALSE );
- info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE );
- info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1());
- info->shortcut = config->readEntry( QString("shortcut")+n );
+ info->sessionId = config->readEntry( TQString("sessionId")+n ).latin1();
+ info->windowRole = config->readEntry( TQString("windowRole")+n ).latin1();
+ info->wmCommand = config->readEntry( TQString("wmCommand")+n ).latin1();
+ info->wmClientMachine = config->readEntry( TQString("wmClientMachine")+n ).latin1();
+ info->resourceName = config->readEntry( TQString("resourceName")+n ).latin1();
+ info->resourceClass = config->readEntry( TQString("resourceClass")+n ).lower().latin1();
+ info->geometry = config->readRectEntry( TQString("geometry")+n );
+ info->restore = config->readRectEntry( TQString("restore")+n );
+ info->fsrestore = config->readRectEntry( TQString("fsrestore")+n );
+ info->maximized = config->readNumEntry( TQString("maximize")+n, 0 );
+ info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 );
+ info->desktop = config->readNumEntry( TQString("desktop")+n, 0 );
+ info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE );
+ info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE );
+ info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE );
+ info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE );
+ info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE );
+ info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE );
+ info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE );
+ info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE );
+ info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1());
+ info->shortcut = config->readEntry( TQString("shortcut")+n );
info->active = ( active_client == i );
}
}
@@ -195,12 +195,12 @@ void Workspace::loadSessionInfo()
SessionInfo* Workspace::takeSessionInfo( Client* c )
{
SessionInfo *realInfo = 0;
- QCString sessionId = c->sessionId();
- QCString windowRole = c->windowRole();
- QCString wmCommand = c->wmCommand();
- QCString wmClientMachine = c->wmClientMachine( true );
- QCString resourceName = c->resourceName();
- QCString resourceClass = c->resourceClass();
+ TQCString sessionId = c->sessionId();
+ TQCString windowRole = c->windowRole();
+ TQCString wmCommand = c->wmCommand();
+ TQCString wmClientMachine = c->wmClientMachine( true );
+ TQCString resourceName = c->resourceName();
+ TQCString resourceClass = c->resourceClass();
// First search ``session''
if (! sessionId.isEmpty() )
@@ -253,7 +253,7 @@ bool Workspace::sessionInfoWindowTypeMatch( Client* c, SessionInfo* info )
// of <appname>-mainwindow#<number>
// when comparing them for fake session info, it's probably better to check
// them without the trailing number
-bool Workspace::windowRoleMatch( const QCString& role1, const QCString& role2 )
+bool Workspace::windowRoleMatch( const TQCString& role1, const TQCString& role2 )
{
if( role1.isEmpty() && role2.isEmpty())
return true;
@@ -413,9 +413,9 @@ SessionSaveDoneHelper::SessionSaveDoneHelper()
props[ 4 ].vals = &propvalue[ 4 ];
SmProp* p[ 5 ] = { &props[ 0 ], &props[ 1 ], &props[ 2 ], &props[ 3 ], &props[ 4 ] };
SmcSetProperties( conn, 5, p );
- notifier = new QSocketNotifier( IceConnectionNumber( SmcGetIceConnection( conn )),
- QSocketNotifier::Read, this );
- connect( notifier, SIGNAL( activated( int )), SLOT( processData()));
+ notifier = new TQSocketNotifier( IceConnectionNumber( SmcGetIceConnection( conn )),
+ TQSocketNotifier::Read, this );
+ connect( notifier, TQT_SIGNAL( activated( int )), TQT_SLOT( processData()));
}
SessionSaveDoneHelper::~SessionSaveDoneHelper()
diff --git a/kwin/sm.h b/kwin/sm.h
index 0a23b7bad..eebbffd56 100644
--- a/kwin/sm.h
+++ b/kwin/sm.h
@@ -23,16 +23,16 @@ namespace KWinInternal
struct SessionInfo
{
- QCString sessionId;
- QCString windowRole;
- QCString wmCommand;
- QCString wmClientMachine;
- QCString resourceName;
- QCString resourceClass;
+ TQCString sessionId;
+ TQCString windowRole;
+ TQCString wmCommand;
+ TQCString wmClientMachine;
+ TQCString resourceName;
+ TQCString resourceClass;
- QRect geometry;
- QRect restore;
- QRect fsrestore;
+ TQRect geometry;
+ TQRect restore;
+ TQRect fsrestore;
int maximized;
int fullscreen;
int desktop;
@@ -45,7 +45,7 @@ struct SessionInfo
bool skipPager;
bool userNoBorder;
NET::WindowType windowType;
- QString shortcut;
+ TQString shortcut;
bool active; // means 'was active in the saved session'
};
@@ -70,7 +70,7 @@ class SessionSaveDoneHelper
private slots:
void processData();
private:
- QSocketNotifier* notifier;
+ TQSocketNotifier* notifier;
SmcConn conn;
};
diff --git a/kwin/tabbox.cpp b/kwin/tabbox.cpp
index 29bef47b8..a79c10233 100644
--- a/kwin/tabbox.cpp
+++ b/kwin/tabbox.cpp
@@ -13,16 +13,16 @@ License. See the file "COPYING" for the exact licensing terms.
#include "tabbox.h"
#include "workspace.h"
#include "client.h"
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <fixx11h.h>
#include <kconfig.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qdesktopwidget.h>
+#include <tqapplication.h>
+#include <tqdesktopwidget.h>
#include <kstringhandler.h>
#include <stdarg.h>
#include <kdebug.h>
@@ -40,12 +40,12 @@ extern Time qt_x_time;
namespace KWinInternal
{
-extern QPixmap* kwin_get_menu_pix_hack();
+extern TQPixmap* kwin_get_menu_pix_hack();
TabBox::TabBox( Workspace *ws, const char *name )
- : QFrame( 0, name, Qt::WNoAutoErase ), current_client( NULL ), wspace(ws)
+ : TQFrame( 0, name, Qt::WNoAutoErase ), current_client( NULL ), wspace(ws)
{
- setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
+ setFrameStyle(TQFrame::StyledPanel | TQFrame::Plain);
setLineWidth(2);
setMargin(2);
@@ -55,7 +55,7 @@ TabBox::TabBox( Workspace *ws, const char *name )
m = DesktopMode; // init variables
reconfigure();
reset();
- connect(&delayedShowTimer, SIGNAL(timeout()), this, SLOT(show()));
+ connect(&delayedShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(show()));
XSetWindowAttributes attr;
attr.override_redirect = 1;
@@ -165,7 +165,7 @@ void TabBox::reset()
{
int w, h, cw = 0, wmax = 0;
- QRect r = workspace()->screenGeometry( workspace()->activeScreen());
+ TQRect r = workspace()->screenGeometry( workspace()->activeScreen());
// calculate height of 1 line
// fontheight + 1 pixel above + 1 pixel below, or 32x32 icon + 2 pixel above + below
@@ -189,11 +189,11 @@ void TabBox::reset()
// calculate height for the popup
if ( clients.count() == 0 ) // height for the "not tasks" text
{
- QFont f = font();
+ TQFont f = font();
f.setBold( TRUE );
f.setPointSize( 14 );
- h = QFontMetrics(f).height()*4;
+ h = TQFontMetrics(f).height()*4;
}
else
{
@@ -343,7 +343,7 @@ int TabBox::currentDesktop()
/*!
Reimplemented to raise the tab box as well
*/
-void TabBox::showEvent( QShowEvent* )
+void TabBox::showEvent( TQShowEvent* )
{
updateOutline();
XRaiseWindow( qt_xdisplay(), outline_left );
@@ -357,7 +357,7 @@ void TabBox::showEvent( QShowEvent* )
/*!
hide the icon box if necessary
*/
-void TabBox::hideEvent( QHideEvent* )
+void TabBox::hideEvent( TQHideEvent* )
{
XUnmapWindow( qt_xdisplay(), outline_left );
XUnmapWindow( qt_xdisplay(), outline_right );
@@ -368,16 +368,16 @@ void TabBox::hideEvent( QHideEvent* )
/*!
Paints the tab box
*/
-void TabBox::drawContents( QPainter * )
+void TabBox::drawContents( TQPainter * )
{
- QRect r(contentsRect());
- QPixmap pix(r.size()); // do double buffering to avoid flickers
+ TQRect r(contentsRect());
+ TQPixmap pix(r.size()); // do double buffering to avoid flickers
pix.fill(this, 0, 0);
- QPainter p;
+ TQPainter p;
p.begin(&pix, this);
- QPixmap* menu_pix = kwin_get_menu_pix_hack();
+ TQPixmap* menu_pix = kwin_get_menu_pix_hack();
int iconWidth = showMiniIcon ? 16 : 32;
int x = 0;
@@ -387,7 +387,7 @@ void TabBox::drawContents( QPainter * )
{
if ( !currentClient() )
{
- QFont f = font();
+ TQFont f = font();
f.setBold( TRUE );
f.setPointSize( 14 );
@@ -405,7 +405,7 @@ void TabBox::drawContents( QPainter * )
p.fillRect(x, y, r.width(), lineHeight, colorGroup().highlight());
// draw icon
- QPixmap icon;
+ TQPixmap icon;
if ( showMiniIcon )
{
if ( !(*it)->miniIcon().isNull() )
@@ -425,13 +425,13 @@ void TabBox::drawContents( QPainter * )
}
// generate text to display
- QString s;
+ TQString s;
if ( !(*it)->isOnDesktop(workspace()->currentDesktop()) )
s = workspace()->desktopName((*it)->desktop()) + ": ";
if ( (*it)->isMinimized() )
- s += QString("(") + (*it)->caption() + ")";
+ s += TQString("(") + (*it)->caption() + ")";
else
s += (*it)->caption();
@@ -442,8 +442,8 @@ void TabBox::drawContents( QPainter * )
p.setPen(colorGroup().highlightedText());
else if( (*it)->isMinimized())
{
- QColor c1 = colorGroup().text();
- QColor c2 = colorGroup().background();
+ TQColor c1 = colorGroup().text();
+ TQColor c2 = colorGroup().background();
// from kicker's TaskContainer::blendColors()
int r1, g1, b1;
int r2, g2, b2;
@@ -455,7 +455,7 @@ void TabBox::drawContents( QPainter * )
g1 += (int) ( .5 * ( g2 - g1 ) );
b1 += (int) ( .5 * ( b2 - b1 ) );
- p.setPen(QColor( r1, g1, b1 ));
+ p.setPen(TQColor( r1, g1, b1 ));
}
else
p.setPen(colorGroup().text());
@@ -474,10 +474,10 @@ void TabBox::drawContents( QPainter * )
int iconHeight = iconWidth;
// get widest desktop name/number
- QFont f(font());
+ TQFont f(font());
f.setBold(true);
f.setPixelSize(iconHeight - 4); // pixel, not point because I need to know the pixels
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
int wmax = 0;
for ( int i = 1; i <= workspace()->numberOfDesktops(); i++ )
@@ -485,7 +485,7 @@ void TabBox::drawContents( QPainter * )
wmax = QMAX(wmax, fontMetrics().width(workspace()->desktopName(i)));
// calculate max width of desktop-number text
- QString num = QString::number(i);
+ TQString num = TQString::number(i);
iconWidth = QMAX(iconWidth - 4, fm.boundingRect(num).width()) + 4;
}
@@ -507,7 +507,7 @@ void TabBox::drawContents( QPainter * )
// draw desktop-number
p.setFont(f);
- QString num = QString::number(iDesktop);
+ TQString num = TQString::number(iDesktop);
p.drawText(x+5, y+2, iconWidth, iconHeight, Qt::AlignCenter, num);
p.restore();
@@ -571,8 +571,8 @@ void TabBox::updateOutline()
XMoveResizeWindow( qt_xdisplay(), outline_top, c->x(), c->y(), c->width(), 5 );
XMoveResizeWindow( qt_xdisplay(), outline_bottom, c->x(), c->y() + c->height() - 5, c->width(), 5 );
{
- QPixmap pix( 5, c->height() - 10 );
- QPainter p( &pix );
+ TQPixmap pix( 5, c->height() - 10 );
+ TQPainter p( &pix );
p.setPen( white );
p.drawLine( 0, 0, 0, pix.height() - 1 );
p.drawLine( 4, 0, 4, pix.height() - 1 );
@@ -586,8 +586,8 @@ void TabBox::updateOutline()
XSetWindowBackgroundPixmap( qt_xdisplay(), outline_right, pix.handle());
}
{
- QPixmap pix( c->width(), 5 );
- QPainter p( &pix );
+ TQPixmap pix( c->width(), 5 );
+ TQPainter p( &pix );
p.setPen( white );
p.drawLine( 0, 0, pix.width() - 1 - 0, 0 );
p.drawLine( 4, 4, pix.width() - 1 - 4, 4 );
@@ -608,8 +608,8 @@ void TabBox::updateOutline()
XSetWindowBackgroundPixmap( qt_xdisplay(), outline_top, pix.handle());
}
{
- QPixmap pix( c->width(), 5 );
- QPainter p( &pix );
+ TQPixmap pix( c->width(), 5 );
+ TQPainter p( &pix );
p.setPen( white );
p.drawLine( 4, 0, pix.width() - 1 - 4, 0 );
p.drawLine( 0, 4, pix.width() - 1 - 0, 4 );
@@ -642,8 +642,8 @@ void TabBox::updateOutline()
void TabBox::hide()
{
delayedShowTimer.stop();
- QWidget::hide();
- QApplication::syncX();
+ TQWidget::hide();
+ TQApplication::syncX();
XEvent otherEvent;
while (XCheckTypedEvent (qt_xdisplay(), EnterNotify, &otherEvent ) )
;
@@ -697,7 +697,7 @@ void TabBox::handleMouseEvent( XEvent* e )
XAllowEvents( qt_xdisplay(), AsyncPointer, qt_x_time );
if( e->type != ButtonPress )
return;
- QPoint pos( e->xbutton.x_root, e->xbutton.y_root );
+ TQPoint pos( e->xbutton.x_root, e->xbutton.y_root );
if( !geometry().contains( pos ))
{
workspace()->closeTabBox(); // click outside closes tab
@@ -768,9 +768,9 @@ bool areKeySymXsDepressed( bool bAll, const uint keySyms[], int nKeySyms )
int i = keyCodeX / 8;
char mask = 1 << (keyCodeX - (i * 8));
- kdDebug(125) << iKeySym << ": keySymX=0x" << QString::number( keySymX, 16 )
- << " i=" << i << " mask=0x" << QString::number( mask, 16 )
- << " keymap[i]=0x" << QString::number( keymap[i], 16 ) << endl;
+ kdDebug(125) << iKeySym << ": keySymX=0x" << TQString::number( keySymX, 16 )
+ << " i=" << i << " mask=0x" << TQString::number( mask, 16 )
+ << " keymap[i]=0x" << TQString::number( keymap[i], 16 ) << endl;
// Abort if bad index value,
if( i < 0 || i >= 32 )
diff --git a/kwin/tabbox.h b/kwin/tabbox.h
index b2d8e4bc0..e2c11d106 100644
--- a/kwin/tabbox.h
+++ b/kwin/tabbox.h
@@ -12,9 +12,9 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_TABBOX_H
#define KWIN_TABBOX_H
-#include <qframe.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqframe.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
#include "utils.h"
class QLabel;
@@ -56,9 +56,9 @@ class TabBox : public QFrame
void reconfigure();
protected:
- void showEvent( QShowEvent* );
- void hideEvent( QHideEvent* );
- void drawContents( QPainter * );
+ void showEvent( TQShowEvent* );
+ void hideEvent( TQHideEvent* );
+ void drawContents( TQPainter * );
private:
void createClientList(ClientList &list, int desktop /*-1 = all*/, Client *start, bool chain);
@@ -72,8 +72,8 @@ class TabBox : public QFrame
int desk;
int lineHeight;
bool showMiniIcon;
- QTimer delayedShowTimer;
- QString no_tasks;
+ TQTimer delayedShowTimer;
+ TQString no_tasks;
bool options_traverse_all;
Window outline_left, outline_right, outline_top, outline_bottom;
};
diff --git a/kwin/tools/decobenchmark/main.cpp b/kwin/tools/decobenchmark/main.cpp
index 847fef69c..d0d165005 100644
--- a/kwin/tools/decobenchmark/main.cpp
+++ b/kwin/tools/decobenchmark/main.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -45,7 +45,7 @@ static KCmdLineOptions options[] =
{ 0, 0, 0 }
};
-DecoBenchApplication::DecoBenchApplication(const QString &library, Tests tests, int count) :
+DecoBenchApplication::DecoBenchApplication(const TQString &library, Tests tests, int count) :
m_tests(tests),
m_count(count)
{
@@ -99,7 +99,7 @@ void DecoBenchApplication::executeTest()
int main(int argc, char** argv)
{
- QString style = "keramik";
+ TQString style = "keramik";
// KApplication app(argc, argv);
KAboutData about("decobenchmark", "DecoBenchmark", "0.1", "kwin decoration performance tester...", KAboutData::License_LGPL, "(C) 2005 Sandro Giessl");
KCmdLineArgs::init(argc, argv, &about);
@@ -110,9 +110,9 @@ int main(int argc, char** argv)
if (args->count() != 3)
KCmdLineArgs::usage("Wrong number of arguments!");
- QString library = QString(args->arg(0) );
- QString t = QString(args->arg(1) );
- int count = QString(args->arg(2) ).toInt();
+ TQString library = TQString(args->arg(0) );
+ TQString t = TQString(args->arg(1) );
+ int count = TQString(args->arg(2) ).toInt();
Tests test;
if (t == "all")
@@ -130,7 +130,7 @@ int main(int argc, char** argv)
DecoBenchApplication app(library, test, count);
- QTimer::singleShot(0, &app, SLOT(executeTest()));
+ TQTimer::singleShot(0, &app, TQT_SLOT(executeTest()));
app.exec();
}
#include "main.moc"
diff --git a/kwin/tools/decobenchmark/main.h b/kwin/tools/decobenchmark/main.h
index 4073238a1..65c0c78ae 100644
--- a/kwin/tools/decobenchmark/main.h
+++ b/kwin/tools/decobenchmark/main.h
@@ -33,7 +33,7 @@ class DecoBenchApplication : public KApplication
{
Q_OBJECT
public:
- DecoBenchApplication(const QString &library, Tests tests, int count);
+ DecoBenchApplication(const TQString &library, Tests tests, int count);
~DecoBenchApplication();
public slots:
diff --git a/kwin/tools/decobenchmark/preview.cpp b/kwin/tools/decobenchmark/preview.cpp
index 35301c513..3cbcdcb5f 100644
--- a/kwin/tools/decobenchmark/preview.cpp
+++ b/kwin/tools/decobenchmark/preview.cpp
@@ -25,8 +25,8 @@
#include <klocale.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qlabel.h>
-#include <qstyle.h>
+#include <tqlabel.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <X11/Xlib.h>
@@ -37,8 +37,8 @@
// FRAME the preview doesn't update to reflect the changes done in the kcm
-KDecorationPreview::KDecorationPreview( KDecorationPlugins* plugin, QWidget* parent, const char* name )
- : QWidget( parent, name ),
+KDecorationPreview::KDecorationPreview( KDecorationPlugins* plugin, TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
m_plugin(plugin)
{
options = new KDecorationPreviewOptions;
@@ -74,7 +74,7 @@ void KDecorationPreview::performRepaintTest(int n)
void KDecorationPreview::performCaptionTest(int n)
{
kdDebug() << "start " << n << " caption changes..." << endl;
- QString caption = "Deco Benchmark %1";
+ TQString caption = "Deco Benchmark %1";
positionPreviews(0);
for (int i = 0; i < n; ++i) {
bridge->setCaption(caption.arg(i) );
@@ -127,15 +127,15 @@ void KDecorationPreview::positionPreviews(int shrink)
if ( !deco )
return;
- QSize size = QSize(width()-2*10-shrink, height()-2*10-shrink)/*.expandedTo(deco->minimumSize()*/;
+ TQSize size = TQSize(width()-2*10-shrink, height()-2*10-shrink)/*.expandedTo(deco->minimumSize()*/;
- QRect geometry(QPoint(10, 10), size);
+ TQRect geometry(TQPoint(10, 10), size);
deco->widget()->setGeometry(geometry);
}
-void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode )
+void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode )
{
- QWidget *widget = deco->widget();
+ TQWidget *widget = deco->widget();
// FRAME duped from client.cpp
if( mode == Unsorted )
@@ -145,7 +145,7 @@ void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode )
}
else
{
- QMemArray< QRect > rects = reg.rects();
+ TQMemArray< TQRect > rects = reg.rects();
XRectangle* xrects = new XRectangle[ rects.count() ];
for( unsigned int i = 0;
i < rects.count();
@@ -162,28 +162,28 @@ void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode )
}
}
-QRect KDecorationPreview::windowGeometry( bool active ) const
+TQRect KDecorationPreview::windowGeometry( bool active ) const
{
- QWidget *widget = deco->widget();
+ TQWidget *widget = deco->widget();
return widget->geometry();
}
-QRegion KDecorationPreview::unobscuredRegion( bool active, const QRegion& r ) const
+TQRegion KDecorationPreview::unobscuredRegion( bool active, const TQRegion& r ) const
{
return r;
}
-KDecorationPreviewBridge::KDecorationPreviewBridge( KDecorationPreview* p, bool a, const QString &c )
+KDecorationPreviewBridge::KDecorationPreviewBridge( KDecorationPreview* p, bool a, const TQString &c )
: preview( p ), active( a ), m_caption( c )
{
}
-void KDecorationPreviewBridge::setCaption(const QString &c)
+void KDecorationPreviewBridge::setCaption(const TQString &c)
{
m_caption = c;
}
-QWidget* KDecorationPreviewBridge::initialParentWidget() const
+TQWidget* KDecorationPreviewBridge::initialParentWidget() const
{
return preview;
}
@@ -273,25 +273,25 @@ NET::WindowType KDecorationPreviewBridge::windowType( unsigned long ) const
return NET::Normal;
}
-QIconSet KDecorationPreviewBridge::icon() const
+TQIconSet KDecorationPreviewBridge::icon() const
{
return SmallIconSet( "xapp" );
}
-QString KDecorationPreviewBridge::caption() const
+TQString KDecorationPreviewBridge::caption() const
{
return m_caption;
}
-void KDecorationPreviewBridge::processMousePressEvent( QMouseEvent* )
+void KDecorationPreviewBridge::processMousePressEvent( TQMouseEvent* )
{
}
-void KDecorationPreviewBridge::showWindowMenu( const QRect &)
+void KDecorationPreviewBridge::showWindowMenu( const TQRect &)
{
}
-void KDecorationPreviewBridge::showWindowMenu( QPoint )
+void KDecorationPreviewBridge::showWindowMenu( TQPoint )
{
}
@@ -299,7 +299,7 @@ void KDecorationPreviewBridge::performWindowOperation( WindowOperation )
{
}
-void KDecorationPreviewBridge::setMask( const QRegion& reg, int mode )
+void KDecorationPreviewBridge::setMask( const TQRegion& reg, int mode )
{
preview->setPreviewMask( reg, mode );
}
@@ -309,22 +309,22 @@ bool KDecorationPreviewBridge::isPreview() const
return false;
}
-QRect KDecorationPreviewBridge::geometry() const
+TQRect KDecorationPreviewBridge::geometry() const
{
return preview->windowGeometry( active );
}
-QRect KDecorationPreviewBridge::iconGeometry() const
+TQRect KDecorationPreviewBridge::iconGeometry() const
{
- return QRect();
+ return TQRect();
}
-QRegion KDecorationPreviewBridge::unobscuredRegion( const QRegion& r ) const
+TQRegion KDecorationPreviewBridge::unobscuredRegion( const TQRegion& r ) const
{
return preview->unobscuredRegion( active, r );
}
-QWidget* KDecorationPreviewBridge::workspaceWidget() const
+TQWidget* KDecorationPreviewBridge::workspaceWidget() const
{
return preview;
}
diff --git a/kwin/tools/decobenchmark/preview.h b/kwin/tools/decobenchmark/preview.h
index 4c82ac0a1..c503695e1 100644
--- a/kwin/tools/decobenchmark/preview.h
+++ b/kwin/tools/decobenchmark/preview.h
@@ -20,7 +20,7 @@
#ifndef KWINDECORATION_PREVIEW_H
#define KWINDECORATION_PREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdecoration_p.h>
#include <kdecoration_plugins_p.h>
@@ -33,7 +33,7 @@ class KDecorationPreview
: public QWidget
{
public:
- KDecorationPreview( KDecorationPlugins* plugin, QWidget* parent = NULL, const char* name = NULL );
+ KDecorationPreview( KDecorationPlugins* plugin, TQWidget* parent = NULL, const char* name = NULL );
virtual ~KDecorationPreview();
void performRepaintTest(int n);
@@ -42,9 +42,9 @@ class KDecorationPreview
void performRecreationTest(int n);
bool recreateDecoration();
- void setPreviewMask( const QRegion&, int );
- QRegion unobscuredRegion( bool, const QRegion& ) const;
- QRect windowGeometry( bool ) const;
+ void setPreviewMask( const TQRegion&, int );
+ TQRegion unobscuredRegion( bool, const TQRegion& ) const;
+ TQRect windowGeometry( bool ) const;
private:
void positionPreviews(int shrink = 0);
KDecorationPreviewOptions* options;
@@ -57,9 +57,9 @@ class KDecorationPreviewBridge
: public KDecorationBridge
{
public:
- KDecorationPreviewBridge( KDecorationPreview* preview, bool active, const QString &caption );
+ KDecorationPreviewBridge( KDecorationPreview* preview, bool active, const TQString &caption );
- void setCaption(const QString &caption);
+ void setCaption(const TQString &caption);
virtual bool isActive() const;
virtual bool isCloseable() const;
@@ -77,18 +77,18 @@ class KDecorationPreviewBridge
virtual bool isMovable() const;
virtual bool isResizable() const;
virtual NET::WindowType windowType( unsigned long supported_types ) const;
- virtual QIconSet icon() const;
- virtual QString caption() const;
- virtual void processMousePressEvent( QMouseEvent* );
- virtual void showWindowMenu( const QRect &);
- virtual void showWindowMenu( QPoint );
+ virtual TQIconSet icon() const;
+ virtual TQString caption() const;
+ virtual void processMousePressEvent( TQMouseEvent* );
+ virtual void showWindowMenu( const TQRect &);
+ virtual void showWindowMenu( TQPoint );
virtual void performWindowOperation( WindowOperation );
- virtual void setMask( const QRegion&, int );
+ virtual void setMask( const TQRegion&, int );
virtual bool isPreview() const;
- virtual QRect geometry() const;
- virtual QRect iconGeometry() const;
- virtual QRegion unobscuredRegion( const QRegion& r ) const;
- virtual QWidget* workspaceWidget() const;
+ virtual TQRect geometry() const;
+ virtual TQRect iconGeometry() const;
+ virtual TQRegion unobscuredRegion( const TQRegion& r ) const;
+ virtual TQWidget* workspaceWidget() const;
virtual WId windowId() const;
virtual void closeWindow();
virtual void maximize( MaximizeMode mode );
@@ -100,14 +100,14 @@ class KDecorationPreviewBridge
virtual void setKeepAbove( bool );
virtual void setKeepBelow( bool );
virtual int currentDesktop() const;
- virtual QWidget* initialParentWidget() const;
+ virtual TQWidget* initialParentWidget() const;
virtual Qt::WFlags initialWFlags() const;
virtual void helperShowHide( bool show );
virtual void grabXServer( bool grab );
private:
KDecorationPreview* preview;
bool active;
- QString m_caption;
+ TQString m_caption;
};
class KDecorationPreviewOptions
diff --git a/kwin/useractions.cpp b/kwin/useractions.cpp
index 4a431b339..2c3ea8d4d 100644
--- a/kwin/useractions.cpp
+++ b/kwin/useractions.cpp
@@ -21,18 +21,18 @@ License. See the file "COPYING" for the exact licensing terms.
#include "workspace.h"
#include <fixx11h.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kconfig.h>
#include <kglobalaccel.h>
#include <kapplication.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "killwindow.h"
#include "tabbox.h"
@@ -44,20 +44,20 @@ namespace KWinInternal
// Workspace
//****************************************
-QPopupMenu* Workspace::clientPopup()
+TQPopupMenu* Workspace::clientPopup()
{
if ( !popup )
{
popup = new QPopupMenu;
popup->setCheckable( TRUE );
popup->setFont(KGlobalSettings::menuFont());
- connect( popup, SIGNAL( aboutToShow() ), this, SLOT( clientPopupAboutToShow() ) );
- connect( popup, SIGNAL( activated(int) ), this, SLOT( clientPopupActivated(int) ) );
+ connect( popup, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( clientPopupAboutToShow() ) );
+ connect( popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) );
- advanced_popup = new QPopupMenu( popup );
+ advanced_popup = new TQPopupMenu( popup );
advanced_popup->setCheckable( TRUE );
advanced_popup->setFont(KGlobalSettings::menuFont());
- connect( advanced_popup, SIGNAL( activated(int) ), this, SLOT( clientPopupActivated(int) ) );
+ connect( advanced_popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) );
advanced_popup->insertItem( SmallIconSet( "up" ),
i18n("Keep &Above Others")+'\t'+keys->shortcut("Window Above Other Windows").seq(0).toString(), Options::KeepAboveOp );
advanced_popup->insertItem( SmallIconSet( "down" ),
@@ -74,17 +74,17 @@ QPopupMenu* Workspace::clientPopup()
desk_popup_index = popup->count();
if (options->useTranslucency){
- QPopupMenu *trans_popup = new QPopupMenu( popup );
- QVBox *transBox = new QVBox(trans_popup);
- transButton = new QPushButton(transBox, "transButton");
- QToolTip::add(transButton, i18n("Reset opacity to default value"));
- transSlider = new QSlider(0, 100, 1, 100, Qt::Vertical, transBox, "transSlider");
- QToolTip::add(transSlider, i18n("Slide this to set the window's opacity"));
- connect(transButton, SIGNAL(clicked()), SLOT(resetClientOpacity()));
- connect(transButton, SIGNAL(clicked()), trans_popup, SLOT(hide()));
- connect(transSlider, SIGNAL(valueChanged(int)), SLOT(setTransButtonText(int)));
- connect(transSlider, SIGNAL(valueChanged(int)), this, SLOT(setPopupClientOpacity(int)));
-// connect(transSlider, SIGNAL(sliderReleased()), trans_popup, SLOT(hide()));
+ TQPopupMenu *trans_popup = new TQPopupMenu( popup );
+ TQVBox *transBox = new TQVBox(trans_popup);
+ transButton = new TQPushButton(transBox, "transButton");
+ TQToolTip::add(transButton, i18n("Reset opacity to default value"));
+ transSlider = new TQSlider(0, 100, 1, 100, Qt::Vertical, transBox, "transSlider");
+ TQToolTip::add(transSlider, i18n("Slide this to set the window's opacity"));
+ connect(transButton, TQT_SIGNAL(clicked()), TQT_SLOT(resetClientOpacity()));
+ connect(transButton, TQT_SIGNAL(clicked()), trans_popup, TQT_SLOT(hide()));
+ connect(transSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setTransButtonText(int)));
+ connect(transSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setPopupClientOpacity(int)));
+// connect(transSlider, TQT_SIGNAL(sliderReleased()), trans_popup, TQT_SLOT(hide()));
trans_popup->insertItem(transBox);
popup->insertItem(i18n("&Opacity"), trans_popup );
}
@@ -100,7 +100,7 @@ QPopupMenu* Workspace::clientPopup()
if (!KGlobal::config()->isImmutable() &&
!kapp->authorizeControlModules(Workspace::configModules(true)).isEmpty())
{
- popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior..."), this, SLOT( configureWM() ));
+ popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior..."), this, TQT_SLOT( configureWM() ));
popup->insertSeparator();
}
@@ -125,9 +125,9 @@ void Workspace::setTransButtonText(int value)
else if (value >= 100 )
transButton->setText("100 %");
else if(value < 10)
- transButton->setText("00"+QString::number(value)+" %");
+ transButton->setText("00"+TQString::number(value)+" %");
else if(value < 100)
- transButton->setText("0"+QString::number(value)+" %");
+ transButton->setText("0"+TQString::number(value)+" %");
}
void Workspace::resetClientOpacity()
@@ -187,13 +187,13 @@ void Workspace::initDesktopPopup()
if (desk_popup)
return;
- desk_popup = new QPopupMenu( popup );
+ desk_popup = new TQPopupMenu( popup );
desk_popup->setCheckable( TRUE );
desk_popup->setFont(KGlobalSettings::menuFont());
- connect( desk_popup, SIGNAL( activated(int) ),
- this, SLOT( slotSendToDesktop(int) ) );
- connect( desk_popup, SIGNAL( aboutToShow() ),
- this, SLOT( desktopPopupAboutToShow() ) );
+ connect( desk_popup, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotSendToDesktop(int) ) );
+ connect( desk_popup, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( desktopPopupAboutToShow() ) );
popup->insertItem(i18n("To &Desktop"), desk_popup, -1, desk_popup_index );
}
@@ -216,7 +216,7 @@ void Workspace::desktopPopupAboutToShow()
const int BASE = 10;
for ( int i = 1; i <= numberOfDesktops(); i++ )
{
- QString basic_name("%1 %2");
+ TQString basic_name("%1 %2");
if (i<BASE)
{
basic_name.prepend('&');
@@ -286,10 +286,10 @@ void Workspace::setupWindowShortcut( Client* c )
client_keys->suspend( true );
client_keys_dialog = new ShortcutDialog( c->shortcut());
client_keys_client = c;
- connect( client_keys_dialog, SIGNAL( dialogDone( bool )), SLOT( setupWindowShortcutDone( bool )));
- QRect r = clientArea( ScreenArea, c );
- QSize size = client_keys_dialog->sizeHint();
- QPoint pos = c->pos() + c->clientPos();
+ connect( client_keys_dialog, TQT_SIGNAL( dialogDone( bool )), TQT_SLOT( setupWindowShortcutDone( bool )));
+ TQRect r = clientArea( ScreenArea, c );
+ TQSize size = client_keys_dialog->sizeHint();
+ TQPoint pos = c->pos() + c->clientPos();
if( pos.x() + size.width() >= r.right())
pos.setX( r.right() - size.width());
if( pos.y() + size.height() >= r.bottom())
@@ -317,13 +317,13 @@ void Workspace::setupWindowShortcutDone( bool ok )
void Workspace::clientShortcutUpdated( Client* c )
{
- QString key = QString::number( c->window());
+ TQString key = TQString::number( c->window());
client_keys->remove( key );
if( !c->shortcut().isNull())
{
client_keys->insert( key, key );
client_keys->setShortcut( key, c->shortcut());
- client_keys->setSlot( key, c, SLOT( shortcutActivated()));
+ client_keys->setSlot( key, c, TQT_SLOT( shortcutActivated()));
client_keys->setActionEnabled( key, true );
}
client_keys->updateConnections();
@@ -333,7 +333,7 @@ void Workspace::clientPopupActivated( int id )
{
WindowOperation op = static_cast< WindowOperation >( id );
Client* c = active_popup_client ? active_popup_client : active_client;
- QString type;
+ TQString type;
switch( op )
{
case FullScreenOp:
@@ -359,22 +359,22 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
return;
if (op == Options::MoveOp || op == Options::UnrestrictedMoveOp )
- QCursor::setPos( c->geometry().center() );
+ TQCursor::setPos( c->geometry().center() );
if (op == Options::ResizeOp || op == Options::UnrestrictedResizeOp )
- QCursor::setPos( c->geometry().bottomRight());
+ TQCursor::setPos( c->geometry().bottomRight());
switch ( op )
{
case Options::MoveOp:
- c->performMouseCommand( Options::MouseMove, QCursor::pos() );
+ c->performMouseCommand( Options::MouseMove, TQCursor::pos() );
break;
case Options::UnrestrictedMoveOp:
- c->performMouseCommand( Options::MouseUnrestrictedMove, QCursor::pos() );
+ c->performMouseCommand( Options::MouseUnrestrictedMove, TQCursor::pos() );
break;
case Options::ResizeOp:
- c->performMouseCommand( Options::MouseResize, QCursor::pos() );
+ c->performMouseCommand( Options::MouseResize, TQCursor::pos() );
break;
case Options::UnrestrictedResizeOp:
- c->performMouseCommand( Options::MouseUnrestrictedResize, QCursor::pos() );
+ c->performMouseCommand( Options::MouseUnrestrictedResize, TQCursor::pos() );
break;
case Options::CloseOp:
c->closeWindow();
@@ -396,7 +396,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
c->minimize();
break;
case Options::ShadeOp:
- c->performMouseCommand( Options::MouseShade, QCursor::pos());
+ c->performMouseCommand( Options::MouseShade, TQCursor::pos());
break;
case Options::OnAllDesktopsOp:
c->setOnAllDesktops( !c->isOnAllDesktops() );
@@ -426,7 +426,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
break;
}
case Options::OperationsOp:
- c->performMouseCommand( Options::MouseShade, QCursor::pos());
+ c->performMouseCommand( Options::MouseShade, TQCursor::pos());
break;
case Options::WindowRulesOp:
editWindowRules( c, false );
@@ -448,7 +448,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
/*!
Performs a mouse command on this client (see options.h)
*/
-bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPos, bool handled )
+bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalPos, bool handled )
{
bool replay = FALSE;
switch (command)
@@ -521,7 +521,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
finishMoveResize( false );
mode = PositionCenter;
buttonDown = TRUE;
- moveOffset = QPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
+ moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
invertedMoveOffset = rect().bottomRight() - moveOffset;
unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove
|| command == Options::MouseUnrestrictedMove );
@@ -541,7 +541,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo
if( moveResizeMode )
finishMoveResize( false );
buttonDown = TRUE;
- moveOffset = QPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
+ moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global
int x = moveOffset.x(), y = moveOffset.y();
bool left = x < width() / 3;
bool right = x >= 2 * width() / 3;
@@ -1009,11 +1009,11 @@ void Workspace::slotWindowOperations()
{
if ( !active_client )
return;
- QPoint pos = active_client->pos() + active_client->clientPos();
+ TQPoint pos = active_client->pos() + active_client->clientPos();
showWindowMenu( pos.x(), pos.y(), active_client );
}
-void Workspace::showWindowMenu( const QRect &pos, Client* cl )
+void Workspace::showWindowMenu( const TQRect &pos, Client* cl )
{
if (!kapp->authorizeKAction("kwin_rmb"))
return;
@@ -1027,21 +1027,21 @@ void Workspace::showWindowMenu( const QRect &pos, Client* cl )
return;
active_popup_client = cl;
- QPopupMenu* p = clientPopup();
+ TQPopupMenu* p = clientPopup();
active_popup = p;
int x = pos.left();
int y = pos.bottom();
if (y == pos.top())
- p->exec( QPoint( x, y ) );
+ p->exec( TQPoint( x, y ) );
else
{
- QRect area = clientArea(ScreenArea, QPoint(x, y), currentDesktop());
+ TQRect area = clientArea(ScreenArea, TQPoint(x, y), currentDesktop());
clientPopupAboutToShow(); // needed for sizeHint() to be correct :-/
int popupHeight = p->sizeHint().height();
if (y + popupHeight < area.height())
- p->exec( QPoint( x, y ) );
+ p->exec( TQPoint( x, y ) );
else
- p->exec( QPoint( x, pos.top() - popupHeight ) );
+ p->exec( TQPoint( x, pos.top() - popupHeight ) );
}
// active popup may be already changed (e.g. the window shortcut dialog)
if( active_popup == p )
@@ -1077,9 +1077,9 @@ void Workspace::slotWindowResize()
performWindowOperation( c, Options::UnrestrictedResizeOp );
}
-void Client::setShortcut( const QString& _cut )
+void Client::setShortcut( const TQString& _cut )
{
- QString cut = rules()->checkShortcut( _cut );
+ TQString cut = rules()->checkShortcut( _cut );
if( cut.isEmpty())
return setShortcutInternal( KShortcut());
// Format:
@@ -1093,17 +1093,17 @@ void Client::setShortcut( const QString& _cut )
setShortcutInternal( KShortcut());
return;
}
- QValueList< KShortcut > keys;
- QStringList groups = QStringList::split( ' ', cut );
- for( QStringList::ConstIterator it = groups.begin();
+ TQValueList< KShortcut > keys;
+ TQStringList groups = TQStringList::split( ' ', cut );
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end();
++it )
{
- QRegExp reg( "(.*\\+)\\((.*)\\)" );
+ TQRegExp reg( "(.*\\+)\\((.*)\\)" );
if( reg.search( *it ) > -1 )
{
- QString base = reg.cap( 1 );
- QString list = reg.cap( 2 );
+ TQString base = reg.cap( 1 );
+ TQString list = reg.cap( 2 );
for( unsigned int i = 0;
i < list.length();
++i )
@@ -1114,14 +1114,14 @@ void Client::setShortcut( const QString& _cut )
}
}
}
- for( QValueList< KShortcut >::ConstIterator it = keys.begin();
+ for( TQValueList< KShortcut >::ConstIterator it = keys.begin();
it != keys.end();
++it )
{
if( _shortcut == *it ) // current one is in the list
return;
}
- for( QValueList< KShortcut >::ConstIterator it = keys.begin();
+ for( TQValueList< KShortcut >::ConstIterator it = keys.begin();
it != keys.end();
++it )
{
diff --git a/kwin/utils.cpp b/kwin/utils.cpp
index 7c4fd00eb..7a3e3541d 100644
--- a/kwin/utils.cpp
+++ b/kwin/utils.cpp
@@ -183,14 +183,14 @@ bool KWinSelectionOwner::genericReply( Atom target_P, Atom property_P, Window re
Atom KWinSelectionOwner::xa_version = None;
-QCString getStringProperty(WId w, Atom prop, char separator)
+TQCString getStringProperty(WId w, Atom prop, char separator)
{
Atom type;
int format, status;
unsigned long nitems = 0;
unsigned long extra = 0;
unsigned char *data = 0;
- QCString result = "";
+ TQCString result = "";
KXErrorHandler handler; // ignore errors
status = XGetWindowProperty( qt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
@@ -256,7 +256,7 @@ static Bool update_x_time_predicate( Display*, XEvent* event, XPointer )
*/
void updateXTime()
{
- static QWidget* w = 0;
+ static TQWidget* w = 0;
if ( !w )
w = new QWidget;
long data = 1;
@@ -302,7 +302,7 @@ bool grabbedXServer()
#endif
-bool isLocalMachine( const QCString& host )
+bool isLocalMachine( const TQCString& host )
{
#ifdef HOST_NAME_MAX
char hostnamebuf[HOST_NAME_MAX];
diff --git a/kwin/utils.h b/kwin/utils.h
index eb762c0c3..b1b2b2e2c 100644
--- a/kwin/utils.h
+++ b/kwin/utils.h
@@ -12,8 +12,8 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_UTILS_H
#define KWIN_UTILS_H
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <kmanagerselection.h>
#include <netwm_def.h>
#include <kshortcutdialog.h>
@@ -36,17 +36,17 @@ const long ClientWinMask = KeyPressMask | KeyReleaseMask |
StructureNotifyMask |
SubstructureRedirectMask;
-const QPoint invalidPoint( INT_MIN, INT_MIN );
+const TQPoint invalidPoint( INT_MIN, INT_MIN );
class Client;
class Group;
class Options;
-typedef QValueList< Client* > ClientList;
-typedef QValueList< const Client* > ConstClientList;
+typedef TQValueList< Client* > ClientList;
+typedef TQValueList< const Client* > ConstClientList;
-typedef QValueList< Group* > GroupList;
-typedef QValueList< const Group* > ConstGroupList;
+typedef TQValueList< Group* > GroupList;
+typedef TQValueList< const Group* > ConstGroupList;
extern Options* options;
@@ -189,7 +189,7 @@ class TemporaryAssign
T orig;
};
-QCString getStringProperty(WId w, Atom prop, char separator=0);
+TQCString getStringProperty(WId w, Atom prop, char separator=0);
void updateXTime();
void grabXServer();
void ungrabXServer();
@@ -247,7 +247,7 @@ Time timestampDiff( Time time1, Time time2 ) // returns time2 - time1
return NET::timestampDiff( time1, time2 );
}
-bool isLocalMachine( const QCString& host );
+bool isLocalMachine( const TQCString& host );
void checkNonExistentClients();
diff --git a/kwin/workspace.cpp b/kwin/workspace.cpp
index e04f0590d..7b87818f0 100644
--- a/kwin/workspace.cpp
+++ b/kwin/workspace.cpp
@@ -18,12 +18,12 @@ License. See the file "COPYING" for the exact licensing terms.
#include <fixx11h.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qclipboard.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqclipboard.h>
#include <kmenubar.h>
#include <kprocess.h>
#include <kglobalaccel.h>
@@ -68,7 +68,7 @@ bool allowKompmgrRestart = TRUE;
// code.
Workspace::Workspace( bool restore )
: DCOPObject ("KWinInterface"),
- QObject (0, "workspace"),
+ TQObject (0, "workspace"),
current_desktop (0),
number_of_desktops(0),
active_screen (0),
@@ -133,9 +133,9 @@ Workspace::Workspace( bool restore )
installed_colormap = default_colormap;
session.setAutoDelete( TRUE );
- connect( &temporaryRulesMessages, SIGNAL( gotMessage( const QString& )),
- this, SLOT( gotTemporaryRulesMessage( const QString& )));
- connect( &rulesUpdatedTimer, SIGNAL( timeout()), this, SLOT( writeWindowRules()));
+ connect( &temporaryRulesMessages, TQT_SIGNAL( gotMessage( const TQString& )),
+ this, TQT_SLOT( gotTemporaryRulesMessage( const TQString& )));
+ connect( &rulesUpdatedTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( writeWindowRules()));
updateXTime(); // needed for proper initialization of user_time in Client ctor
@@ -149,10 +149,10 @@ Workspace::Workspace( bool restore )
loadWindowRules();
- (void) QApplication::desktop(); // trigger creation of desktop widget
+ (void) TQApplication::desktop(); // trigger creation of desktop widget
desktop_widget =
- new QWidget(
+ new TQWidget(
0,
"desktop_widget",
Qt::WType_Desktop | Qt::WPaintUnclipped
@@ -197,14 +197,14 @@ Workspace::Workspace( bool restore )
init();
#if (QT_VERSION-0 >= 0x030200) // XRANDR support
- connect( kapp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized()));
+ connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized()));
#endif
// start kompmgr - i wanted to put this into main.cpp, but that would prevent dcop support, as long as Application was no dcop_object
if (options->useTranslucency)
{
kompmgr = new KProcess;
- connect(kompmgr, SIGNAL(receivedStderr(KProcess*, char*, int)), SLOT(handleKompmgrOutput(KProcess*, char*, int)));
+ connect(kompmgr, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(KProcess*, char*, int)));
*kompmgr << "kompmgr";
startKompmgr();
}
@@ -330,15 +330,15 @@ void Workspace::init()
// now we know how many desktops we'll, thus, we initialise the positioning object
initPositioning = new Placement(this);
- connect(&reconfigureTimer, SIGNAL(timeout()), this,
- SLOT(slotReconfigure()));
- connect( &updateToolWindowsTimer, SIGNAL( timeout()), this, SLOT( slotUpdateToolWindows()));
+ connect(&reconfigureTimer, TQT_SIGNAL(timeout()), this,
+ TQT_SLOT(slotReconfigure()));
+ connect( &updateToolWindowsTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( slotUpdateToolWindows()));
- connect(kapp, SIGNAL(appearanceChanged()), this,
- SLOT(slotReconfigure()));
- connect(kapp, SIGNAL(settingsChanged(int)), this,
- SLOT(slotSettingsChanged(int)));
- connect(kapp, SIGNAL( kipcMessage( int, int )), this, SLOT( kipcMessage( int, int )));
+ connect(kapp, TQT_SIGNAL(appearanceChanged()), this,
+ TQT_SLOT(slotReconfigure()));
+ connect(kapp, TQT_SIGNAL(settingsChanged(int)), this,
+ TQT_SLOT(slotSettingsChanged(int)));
+ connect(kapp, TQT_SIGNAL( kipcMessage( int, int )), this, TQT_SLOT( kipcMessage( int, int )));
active_client = NULL;
rootInfo->setActiveWindow( None );
@@ -379,7 +379,7 @@ void Workspace::init()
Client* c = createClient( wins[i], true );
if ( c != NULL && root != qt_xrootwin() )
{ // TODO what is this?
- // TODO may use QWidget:.create
+ // TODO may use TQWidget:.create
XReparentWindow( qt_xdisplay(), c->frameId(), root, 0, 0 );
c->move(0,0);
}
@@ -397,7 +397,7 @@ void Workspace::init()
NETPoint* viewports = new NETPoint[ number_of_desktops ];
rootInfo->setDesktopViewport( number_of_desktops, *viewports );
delete[] viewports;
- QRect geom = QApplication::desktop()->geometry();
+ TQRect geom = TQApplication::desktop()->geometry();
NETSize desktop_geometry;
desktop_geometry.width = geom.width();
desktop_geometry.height = geom.height();
@@ -558,7 +558,7 @@ void Workspace::removeClient( Client* c, allowed_t )
if( client_keys_client == c )
setupWindowShortcutDone( false );
if( !c->shortcut().isNull())
- c->setShortcut( QString::null ); // remove from client_keys
+ c->setShortcut( TQString::null ); // remove from client_keys
if( c->isDialog())
Notify::raise( Notify::TransDelete );
@@ -935,9 +935,9 @@ void Workspace::slotReconfigure()
if( mgr->reset( changed ))
{ // decorations need to be recreated
#if 0 // This actually seems to make things worse now
- QWidget curtain;
+ TQWidget curtain;
curtain.setBackgroundMode( NoBackground );
- curtain.setGeometry( QApplication::desktop()->geometry() );
+ curtain.setGeometry( TQApplication::desktop()->geometry() );
curtain.show();
#endif
for( ClientList::ConstIterator it = clients.begin();
@@ -989,14 +989,14 @@ void Workspace::slotReconfigure()
bool tmp = options->useTranslucency;
stopKompmgr();
if (tmp)
- QTimer::singleShot( 200, this, SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart
+ TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart
}
}
void Workspace::loadDesktopSettings()
{
KConfig* c = KGlobal::config();
- QCString groupname;
+ TQCString groupname;
if (screen_number == 0)
groupname = "Desktops";
else
@@ -1015,7 +1015,7 @@ void Workspace::loadDesktopSettings()
focus_chain.resize( n + 1 );
for(int i = 1; i <= n; i++)
{
- QString s = c->readEntry(QString("Name_%1").arg(i),
+ TQString s = c->readEntry(TQString("Name_%1").arg(i),
i18n("Desktop %1").arg(i));
rootInfo->setDesktopName( i, s.utf8().data() );
desktop_focus_chain[i-1] = i;
@@ -1025,7 +1025,7 @@ void Workspace::loadDesktopSettings()
void Workspace::saveDesktopSettings()
{
KConfig* c = KGlobal::config();
- QCString groupname;
+ TQCString groupname;
if (screen_number == 0)
groupname = "Desktops";
else
@@ -1035,8 +1035,8 @@ void Workspace::saveDesktopSettings()
c->writeEntry("Number", number_of_desktops );
for(int i = 1; i <= number_of_desktops; i++)
{
- QString s = desktopName( i );
- QString defaultvalue = i18n("Desktop %1").arg(i);
+ TQString s = desktopName( i );
+ TQString defaultvalue = i18n("Desktop %1").arg(i);
if ( s.isEmpty() )
{
s = defaultvalue;
@@ -1045,20 +1045,20 @@ void Workspace::saveDesktopSettings()
if (s != defaultvalue)
{
- c->writeEntry( QString("Name_%1").arg(i), s );
+ c->writeEntry( TQString("Name_%1").arg(i), s );
}
else
{
- QString currentvalue = c->readEntry(QString("Name_%1").arg(i));
+ TQString currentvalue = c->readEntry(TQString("Name_%1").arg(i));
if (currentvalue != defaultvalue)
- c->writeEntry( QString("Name_%1").arg(i), "" );
+ c->writeEntry( TQString("Name_%1").arg(i), "" );
}
}
}
-QStringList Workspace::configModules(bool controlCenter)
+TQStringList Workspace::configModules(bool controlCenter)
{
- QStringList args;
+ TQStringList args;
args << "kde-kwindecoration.desktop";
if (controlCenter)
args << "kde-kwinoptions.desktop";
@@ -1075,7 +1075,7 @@ void Workspace::configureWM()
/*!
avoids managing a window with title \a title
*/
-void Workspace::doNotManage( QString title )
+void Workspace::doNotManage( TQString title )
{
doNotManageList.append( title );
}
@@ -1083,11 +1083,11 @@ void Workspace::doNotManage( QString title )
/*!
Hack for java applets
*/
-bool Workspace::isNotManaged( const QString& title )
+bool Workspace::isNotManaged( const TQString& title )
{
- for ( QStringList::Iterator it = doNotManageList.begin(); it != doNotManageList.end(); ++it )
+ for ( TQStringList::Iterator it = doNotManageList.begin(); it != doNotManageList.end(); ++it )
{
- QRegExp r( (*it) );
+ TQRegExp r( (*it) );
if (r.search(title) != -1)
{
doNotManageList.remove( it );
@@ -1102,11 +1102,11 @@ bool Workspace::isNotManaged( const QString& title )
*/
void Workspace::refresh()
{
- QWidget w;
- w.setGeometry( QApplication::desktop()->geometry() );
+ TQWidget w;
+ w.setGeometry( TQApplication::desktop()->geometry() );
w.show();
w.hide();
- QApplication::flushX();
+ TQApplication::flushX();
}
/*!
@@ -1122,18 +1122,18 @@ class ObscuringWindows
~ObscuringWindows();
void create( Client* c );
private:
- QValueList<Window> obscuring_windows;
- static QValueList<Window>* cached;
+ TQValueList<Window> obscuring_windows;
+ static TQValueList<Window>* cached;
static unsigned int max_cache_size;
};
-QValueList<Window>* ObscuringWindows::cached = 0;
+TQValueList<Window>* ObscuringWindows::cached = 0;
unsigned int ObscuringWindows::max_cache_size = 0;
void ObscuringWindows::create( Client* c )
{
if( cached == 0 )
- cached = new QValueList<Window>;
+ cached = new TQValueList<Window>;
Window obs_win;
XWindowChanges chngs;
int mask = CWSibling | CWStackMode;
@@ -1165,7 +1165,7 @@ void ObscuringWindows::create( Client* c )
ObscuringWindows::~ObscuringWindows()
{
max_cache_size = QMAX( max_cache_size, obscuring_windows.count() + 4 ) - 1;
- for( QValueList<Window>::ConstIterator it = obscuring_windows.begin();
+ for( TQValueList<Window>::ConstIterator it = obscuring_windows.begin();
it != obscuring_windows.end();
++it )
{
@@ -1280,15 +1280,15 @@ bool Workspace::setCurrentDesktop( int new_desktop )
// Update focus chain:
// If input: chain = { 1, 2, 3, 4 } and current_desktop = 3,
// Output: chain = { 3, 1, 2, 4 }.
-// kdDebug(1212) << QString("Switching to desktop #%1, at focus_chain[currentDesktop()] index %2\n")
+// kdDebug(1212) << TQString("Switching to desktop #%1, at focus_chain[currentDesktop()] index %2\n")
// .arg(currentDesktop()).arg(desktop_focus_chain.find( currentDesktop() ));
for( int i = desktop_focus_chain.find( currentDesktop() ); i > 0; i-- )
desktop_focus_chain[i] = desktop_focus_chain[i-1];
desktop_focus_chain[0] = currentDesktop();
-// QString s = "desktop_focus_chain[] = { ";
+// TQString s = "desktop_focus_chain[] = { ";
// for( uint i = 0; i < desktop_focus_chain.size(); i++ )
-// s += QString::number(desktop_focus_chain[i]) + ", ";
+// s += TQString::number(desktop_focus_chain[i]) + ", ";
// kdDebug(1212) << s << "}\n";
if( old_desktop != 0 ) // not for the very first time
@@ -1542,7 +1542,7 @@ int Workspace::activeScreen() const
return qApp->desktop()->screenNumber( activeClient()->geometry().center());
return active_screen;
}
- return qApp->desktop()->screenNumber( QCursor::pos());
+ return qApp->desktop()->screenNumber( TQCursor::pos());
}
// check whether a client moved completely out of what's considered the active screen,
@@ -1559,21 +1559,21 @@ void Workspace::checkActiveScreen( const Client* c )
// called e.g. when a user clicks on a window, set active screen to be the screen
// where the click occured
-void Workspace::setActiveScreenMouse( QPoint mousepos )
+void Workspace::setActiveScreenMouse( TQPoint mousepos )
{
if( !options->xineramaEnabled )
return;
active_screen = qApp->desktop()->screenNumber( mousepos );
}
-QRect Workspace::screenGeometry( int screen ) const
+TQRect Workspace::screenGeometry( int screen ) const
{
if (( !options->xineramaEnabled ) || (kapp->desktop()->numScreens() < 2))
return qApp->desktop()->geometry();
return qApp->desktop()->screenGeometry( screen );
}
-int Workspace::screenNumber( QPoint pos ) const
+int Workspace::screenNumber( TQPoint pos ) const
{
if( !options->xineramaEnabled )
return 0;
@@ -1585,8 +1585,8 @@ void Workspace::sendClientToScreen( Client* c, int screen )
if( c->screen() == screen ) // don't use isOnScreen(), that's true even when only partially
return;
GeometryUpdatesPostponer blocker( c );
- QRect old_sarea = clientArea( MaximizeArea, c );
- QRect sarea = clientArea( MaximizeArea, screen, c->desktop());
+ TQRect old_sarea = clientArea( MaximizeArea, c );
+ TQRect sarea = clientArea( MaximizeArea, screen, c->desktop());
c->setGeometry( sarea.x() - old_sarea.x() + c->x(), sarea.y() - old_sarea.y() + c->y(),
c->size().width(), c->size().height());
c->checkWorkspacePosition();
@@ -1756,7 +1756,7 @@ void Workspace::slotGrabWindow()
{
if ( active_client )
{
- QPixmap snapshot = QPixmap::grabWindow( active_client->frameId() );
+ TQPixmap snapshot = TQPixmap::grabWindow( active_client->frameId() );
//No XShape - no work.
if( Shape::available())
@@ -1771,23 +1771,23 @@ void Workspace::slotGrabWindow()
// to limit our work region
if (rects)
{
- //Create a QRegion from the rectangles describing the bounding mask.
- QRegion contents;
+ //Create a TQRegion from the rectangles describing the bounding mask.
+ TQRegion contents;
for (int pos = 0; pos < count; pos++)
- contents += QRegion(rects[pos].x, rects[pos].y,
+ contents += TQRegion(rects[pos].x, rects[pos].y,
rects[pos].width, rects[pos].height);
XFree(rects);
//Create the bounding box.
- QRegion bbox(0, 0, snapshot.width(), snapshot.height());
+ TQRegion bbox(0, 0, snapshot.width(), snapshot.height());
//Get the masked away area.
- QRegion maskedAway = bbox - contents;
- QMemArray<QRect> maskedAwayRects = maskedAway.rects();
+ TQRegion maskedAway = bbox - contents;
+ TQMemArray<TQRect> maskedAwayRects = maskedAway.rects();
//Construct a bitmap mask from the rectangles
- QBitmap mask( snapshot.width(), snapshot.height());
- QPainter p(&mask);
+ TQBitmap mask( snapshot.width(), snapshot.height());
+ TQPainter p(&mask);
p.fillRect(0, 0, mask.width(), mask.height(), Qt::color1);
for (uint pos = 0; pos < maskedAwayRects.count(); pos++)
p.fillRect(maskedAwayRects[pos], Qt::color0);
@@ -1796,7 +1796,7 @@ void Workspace::slotGrabWindow()
}
}
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setPixmap( snapshot );
}
else
@@ -1808,8 +1808,8 @@ void Workspace::slotGrabWindow()
*/
void Workspace::slotGrabDesktop()
{
- QPixmap p = QPixmap::grabWindow( qt_xrootwin() );
- QClipboard *cb = QApplication::clipboard();
+ TQPixmap p = TQPixmap::grabWindow( qt_xrootwin() );
+ QClipboard *cb = TQApplication::clipboard();
cb->setPixmap( p );
}
@@ -1869,12 +1869,12 @@ WId Workspace::getMouseEmulationWindow()
/*!
Sends a faked mouse event to the specified window. Returns the new button state.
*/
-unsigned int Workspace::sendFakedMouseEvent( QPoint pos, WId w, MouseEmulation type, int button, unsigned int state )
+unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation type, int button, unsigned int state )
{
if ( !w )
return state;
- QWidget* widget = QWidget::find( w );
- if ( (!widget || widget->inherits("QToolButton") ) && !findClient( WindowMatchPredicate( w )) )
+ TQWidget* widget = TQWidget::find( w );
+ if ( (!widget || widget->inherits("TQToolButton") ) && !findClient( WindowMatchPredicate( w )) )
{
int x, y;
Window xw;
@@ -1960,7 +1960,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
bool is_alt = km & Mod1Mask;
bool is_shift = km & ShiftMask;
int delta = is_control?1:is_alt?32:8;
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
switch ( kc )
{
@@ -2035,7 +2035,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
return FALSE;
}
- QCursor::setPos( pos );
+ TQCursor::setPos( pos );
if ( mouse_emulation_state )
mouse_emulation_state = sendFakedMouseEvent( pos, mouse_emulation_window, EmuMove, 0, mouse_emulation_state );
return TRUE;
@@ -2047,7 +2047,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
sometimes required by clients to draw on it, for example outlines on
moving or resizing.
*/
-QWidget* Workspace::desktopWidget()
+TQWidget* Workspace::desktopWidget()
{
return desktop_widget;
}
@@ -2063,8 +2063,8 @@ void Workspace::requestDelayFocus( Client* c )
{
delayfocus_client = c;
delete delayFocusTimer;
- delayFocusTimer = new QTimer( this );
- connect( delayFocusTimer, SIGNAL( timeout() ), this, SLOT( delayFocus() ) );
+ delayFocusTimer = new TQTimer( this );
+ connect( delayFocusTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( delayFocus() ) );
delayFocusTimer->start( options->delayFocusInterval, TRUE );
}
@@ -2088,7 +2088,7 @@ void Workspace::checkElectricBorders( bool force )
electric_current_border = 0;
- QRect r = QApplication::desktop()->geometry();
+ TQRect r = TQApplication::desktop()->geometry();
electricTop = r.top();
electricBottom = r.bottom();
electricLeft = r.left();
@@ -2107,7 +2107,7 @@ void Workspace::createBorderWindows()
electric_have_borders = true;
- QRect r = QApplication::desktop()->geometry();
+ TQRect r = TQApplication::desktop()->geometry();
XSetWindowAttributes attributes;
unsigned long valuemask;
attributes.override_redirect = True;
@@ -2196,7 +2196,7 @@ void Workspace::destroyBorderWindows()
electric_right_border = None;
}
-void Workspace::clientMoved(const QPoint &pos, Time now)
+void Workspace::clientMoved(const TQPoint &pos, Time now)
{
if (options->electricBorders() == Options::ElectricDisabled)
return;
@@ -2231,7 +2231,7 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
{
electric_current_border = 0;
- QRect r = QApplication::desktop()->geometry();
+ TQRect r = TQApplication::desktop()->geometry();
int offset;
int desk_before = currentDesktop();
@@ -2242,7 +2242,7 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
if (currentDesktop() != desk_before)
{
offset = r.width() / 5;
- QCursor::setPos(r.width() - offset, pos.y());
+ TQCursor::setPos(r.width() - offset, pos.y());
}
break;
@@ -2251,7 +2251,7 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
if (currentDesktop() != desk_before)
{
offset = r.width() / 5;
- QCursor::setPos(offset, pos.y());
+ TQCursor::setPos(offset, pos.y());
}
break;
@@ -2260,7 +2260,7 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
if (currentDesktop() != desk_before)
{
offset = r.height() / 5;
- QCursor::setPos(pos.x(), r.height() - offset);
+ TQCursor::setPos(pos.x(), r.height() - offset);
}
break;
@@ -2269,7 +2269,7 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
if (currentDesktop() != desk_before)
{
offset = r.height() / 5;
- QCursor::setPos(pos.x(), offset);
+ TQCursor::setPos(pos.x(), offset);
}
break;
}
@@ -2289,10 +2289,10 @@ void Workspace::clientMoved(const QPoint &pos, Time now)
// reset the pointer to find out wether the user is really pushing
switch( border)
{
- case 1: QCursor::setPos(pos.x()+mouse_warp, pos.y()); break;
- case 2: QCursor::setPos(pos.x()-mouse_warp, pos.y()); break;
- case 3: QCursor::setPos(pos.x(), pos.y()+mouse_warp); break;
- case 4: QCursor::setPos(pos.x(), pos.y()-mouse_warp); break;
+ case 1: TQCursor::setPos(pos.x()+mouse_warp, pos.y()); break;
+ case 2: TQCursor::setPos(pos.x()-mouse_warp, pos.y()); break;
+ case 3: TQCursor::setPos(pos.x(), pos.y()+mouse_warp); break;
+ case 4: TQCursor::setPos(pos.x(), pos.y()-mouse_warp); break;
}
}
@@ -2310,7 +2310,7 @@ bool Workspace::electricBorder(XEvent *e)
e->xcrossing.window == electric_right_border)
// the user entered an electric border
{
- clientMoved( QPoint( e->xcrossing.x_root, e->xcrossing.y_root ), e->xcrossing.time );
+ clientMoved( TQPoint( e->xcrossing.x_root, e->xcrossing.y_root ), e->xcrossing.time );
return true;
}
}
@@ -2323,7 +2323,7 @@ bool Workspace::electricBorder(XEvent *e)
|| e->xclient.window == electric_right_border ))
{
updateXTime();
- clientMoved( QPoint( e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), qt_x_time );
+ clientMoved( TQPoint( e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), qt_x_time );
return true;
}
}
@@ -2379,12 +2379,12 @@ void Workspace::lostTopMenuSelection()
{
// kdDebug() << "lost TopMenu selection" << endl;
// make sure this signal is always set when not owning the selection
- disconnect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner()));
- connect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner()));
+ disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
+ connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
if( !managing_topmenus )
return;
- connect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner()));
- disconnect( topmenu_selection, SIGNAL( lostOwnership()), this, SLOT( lostTopMenuSelection()));
+ connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
+ disconnect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection()));
managing_topmenus = false;
delete topmenu_space;
topmenu_space = NULL;
@@ -2413,8 +2413,8 @@ void Workspace::setupTopMenuHandling()
{
if( managing_topmenus )
return;
- connect( topmenu_selection, SIGNAL( lostOwnership()), this, SLOT( lostTopMenuSelection()));
- disconnect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner()));
+ connect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection()));
+ disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner()));
managing_topmenus = true;
topmenu_space = new QWidget;
Window stack[ 2 ];
@@ -2443,9 +2443,9 @@ KDecoration* Workspace::createDecoration( KDecorationBridge* bridge )
return mgr->createDecoration( bridge );
}
-QString Workspace::desktopName( int desk ) const
+TQString Workspace::desktopName( int desk ) const
{
- return QString::fromUtf8( rootInfo->desktopName( desk ) );
+ return TQString::fromUtf8( rootInfo->desktopName( desk ) );
}
bool Workspace::checkStartupNotification( Window w, KStartupInfoId& id, KStartupInfoData& data )
@@ -2462,13 +2462,13 @@ void Workspace::focusToNull()
XSetInputFocus(qt_xdisplay(), null_focus_window, RevertToPointerRoot, qt_x_time );
}
-void Workspace::helperDialog( const QString& message, const Client* c )
+void Workspace::helperDialog( const TQString& message, const Client* c )
{
- QStringList args;
- QString type;
+ TQStringList args;
+ TQString type;
if( message == "noborderaltf3" )
{
- QString shortcut = QString( "%1 (%2)" ).arg( keys->label( "Window Operations Menu" ))
+ TQString shortcut = TQString( "%1 (%2)" ).arg( keys->label( "Window Operations Menu" ))
.arg( keys->shortcut( "Window Operations Menu" ).seq( 0 ).toString());
args << "--msgbox" <<
i18n( "You have selected to show a window without its border.\n"
@@ -2480,7 +2480,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
}
else if( message == "fullscreenaltf3" )
{
- QString shortcut = QString( "%1 (%2)" ).arg( keys->label( "Window Operations Menu" ))
+ TQString shortcut = TQString( "%1 (%2)" ).arg( keys->label( "Window Operations Menu" ))
.arg( keys->shortcut( "Window Operations Menu" ).seq( 0 ).toString());
args << "--msgbox" <<
i18n( "You have selected to show a window in fullscreen mode.\n"
@@ -2504,7 +2504,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
proc << "--dontagain" << "kwin_dialogsrc:" + type;
}
if( c != NULL )
- proc << "--embed" << QString::number( c->window());
+ proc << "--embed" << TQString::number( c->window());
proc.start( KProcess::DontCare );
}
@@ -2530,14 +2530,14 @@ void Workspace::startKompmgr()
char selection_name[ 100 ];
sprintf( selection_name, "_NET_WM_CM_S%d", DefaultScreen( qt_xdisplay()));
kompmgr_selection = new KSelectionOwner( selection_name );
- connect( kompmgr_selection, SIGNAL( lostOwnership()), SLOT( stopKompmgr()));
+ connect( kompmgr_selection, TQT_SIGNAL( lostOwnership()), TQT_SLOT( stopKompmgr()));
kompmgr_selection->claim( true );
- connect(kompmgr, SIGNAL(processExited(KProcess*)), SLOT(restartKompmgr()));
+ connect(kompmgr, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(restartKompmgr()));
options->useTranslucency = TRUE;
allowKompmgrRestart = FALSE;
- QTimer::singleShot( 60000, this, SLOT(unblockKompmgrRestart()) );
- QByteArray ba;
- QDataStream arg(ba, IO_WriteOnly);
+ TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) );
+ TQByteArray ba;
+ TQDataStream arg(ba, IO_WriteOnly);
arg << "";
kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba);
}
@@ -2550,12 +2550,12 @@ void Workspace::stopKompmgr()
return;
delete kompmgr_selection;
kompmgr_selection = NULL;
- kompmgr->disconnect(this, SLOT(restartKompmgr()));
+ kompmgr->disconnect(this, TQT_SLOT(restartKompmgr()));
options->useTranslucency = FALSE;
if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider
kompmgr->kill();
- QByteArray ba;
- QDataStream arg(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream arg(ba, IO_WriteOnly);
arg << "";
kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba);
}
@@ -2571,7 +2571,7 @@ void Workspace::unblockKompmgrRestart()
}
void Workspace::restartKompmgr()
-// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); QTimer::singleShot(200, workspace, SLOT(startKompmgr()));
+// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); TQTimer::singleShot(200, workspace, TQT_SLOT(startKompmgr()));
{
if (!allowKompmgrRestart) // uh-ohh
{
@@ -2609,14 +2609,14 @@ void Workspace::restartKompmgr()
else
{
allowKompmgrRestart = FALSE;
- QTimer::singleShot( 60000, this, SLOT(unblockKompmgrRestart()) );
+ TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) );
}
}
void Workspace::handleKompmgrOutput( KProcess* , char *buffer, int buflen)
{
- QString message;
- QString output = QString::fromLocal8Bit( buffer, buflen );
+ TQString message;
+ TQString output = TQString::fromLocal8Bit( buffer, buflen );
if (output.contains("Started",false))
; // don't do anything, just pass to the connection release
else if (output.contains("Can't open display",false))
@@ -2635,7 +2635,7 @@ void Workspace::handleKompmgrOutput( KProcess* , char *buffer, int buflen)
else return; //skip others
// kompmgr startup failed or succeeded, release connection
kompmgr->closeStderr();
- disconnect(kompmgr, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(handleKompmgrOutput(KProcess*, char*, int)));
+ disconnect(kompmgr, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(handleKompmgrOutput(KProcess*, char*, int)));
if( !message.isEmpty())
{
KProcess proc;
diff --git a/kwin/workspace.h b/kwin/workspace.h
index efb31de8a..64622d435 100644
--- a/kwin/workspace.h
+++ b/kwin/workspace.h
@@ -12,10 +12,10 @@ License. See the file "COPYING" for the exact licensing terms.
#ifndef KWIN_WORKSPACE_H
#define KWIN_WORKSPACE_H
-#include <qtimer.h>
-#include <qvaluevector.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
#include <kshortcut.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <netwm.h>
#include <kxmessages.h>
@@ -68,9 +68,9 @@ class SystemTrayWindow
WId winFor;
};
-typedef QValueList<SystemTrayWindow> SystemTrayWindowList;
+typedef TQValueList<SystemTrayWindow> SystemTrayWindowList;
-class Workspace : public QObject, public KWinInterface, public KDecorationDefines
+class Workspace : public TQObject, public KWinInterface, public KDecorationDefines
{
Q_OBJECT
public:
@@ -89,9 +89,9 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
template< typename T1, typename T2 > void forEachClient( T1 procedure, T2 predicate );
template< typename T > void forEachClient( T procedure );
- QRect clientArea( clientAreaOption, const QPoint& p, int desktop ) const;
- QRect clientArea( clientAreaOption, const Client* c ) const;
- QRect clientArea( clientAreaOption, int screen, int desktop ) const;
+ TQRect clientArea( clientAreaOption, const TQPoint& p, int desktop ) const;
+ TQRect clientArea( clientAreaOption, const Client* c ) const;
+ TQRect clientArea( clientAreaOption, int screen, int desktop ) const;
/**
* @internal
@@ -134,11 +134,11 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
*/
void setClientIsMoving( Client *c );
- void place( Client *c, QRect& area );
- void placeSmart( Client* c, const QRect& area );
+ void place( Client *c, TQRect& area );
+ void placeSmart( Client* c, const TQRect& area );
- QPoint adjustClientPosition( Client* c, QPoint pos );
- QRect adjustClientSize( Client* c, QRect moveResizeGeom, int mode );
+ TQPoint adjustClientPosition( Client* c, TQPoint pos );
+ TQRect adjustClientSize( Client* c, TQRect moveResizeGeom, int mode );
void raiseClient( Client* c );
void lowerClient( Client* c );
void raiseClientRequest( Client* c, NET::RequestSource src, Time timestamp );
@@ -151,7 +151,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
void clientHidden( Client* );
void clientAttentionChanged( Client* c, bool set );
- void clientMoved(const QPoint &pos, Time time);
+ void clientMoved(const TQPoint &pos, Time time);
/**
* Returns the current virtual desktop of this workspace
@@ -166,11 +166,11 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
int activeScreen() const;
int numScreens() const;
void checkActiveScreen( const Client* c );
- void setActiveScreenMouse( QPoint mousepos );
- QRect screenGeometry( int screen ) const;
- int screenNumber( QPoint pos ) const;
+ void setActiveScreenMouse( TQPoint mousepos );
+ TQRect screenGeometry( int screen ) const;
+ int screenNumber( TQPoint pos ) const;
- QWidget* desktopWidget();
+ TQWidget* desktopWidget();
// for TabBox
Client* nextFocusChainClient(Client*) const;
@@ -204,12 +204,12 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
* Shows the menu operations menu for the client and makes it active if
* it's not already.
*/
- void showWindowMenu( const QRect &pos, Client* cl );
+ void showWindowMenu( const TQRect &pos, Client* cl );
/**
* Backwards compatibility.
*/
void showWindowMenu( int x, int y, Client* cl );
- void showWindowMenu( QPoint pos, Client* cl );
+ void showWindowMenu( TQPoint pos, Client* cl );
void updateMinimizedOfTransients( Client* );
void updateOnAllDesktopsOfTransients( Client* );
@@ -229,21 +229,21 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
// dcop interface
void cascadeDesktop();
void unclutterDesktop();
- void doNotManage(QString);
+ void doNotManage(TQString);
bool setCurrentDesktop( int new_desktop );
void nextDesktop();
void previousDesktop();
void circulateDesktopApplications();
void setCurrentScreen( int new_screen );
- QString desktopName( int desk ) const;
+ TQString desktopName( int desk ) const;
virtual void setDesktopLayout(int , int , int );
void updateDesktopLayout();
void setShowingDesktop( bool showing );
void resetShowingDesktop( bool keep_hidden );
bool showingDesktop() const;
- bool isNotManaged( const QString& title ); // ### setter or getter ?
+ bool isNotManaged( const TQString& title ); // ### setter or getter ?
void sendPingToWindow( Window w, Time timestamp ); // called from Client::pingWindow()
void sendTakeActivity( Client* c, Time timestamp, long flags ); // called from Client::takeActivity()
@@ -289,12 +289,12 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
int packPositionUp( const Client* cl, int oldy, bool top_edge ) const;
int packPositionDown( const Client* cl, int oldy, bool bottom_edge ) const;
- static QStringList configModules(bool controlCenter);
+ static TQStringList configModules(bool controlCenter);
void cancelDelayFocus();
void requestDelayFocus( Client* );
- void updateFocusMousePosition( const QPoint& pos );
- QPoint focusMousePosition() const;
+ void updateFocusMousePosition( const TQPoint& pos );
+ TQPoint focusMousePosition() const;
void toggleTopDockShadows(bool on);
@@ -390,7 +390,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
void lostTopMenuSelection();
void lostTopMenuOwner();
void delayFocus();
- void gotTemporaryRulesMessage( const QString& );
+ void gotTemporaryRulesMessage( const TQString& );
void cleanupTemporaryRules();
void writeWindowRules();
void kipcMessage( int id, int data );
@@ -468,7 +468,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
// mouse emulation
WId getMouseEmulationWindow();
enum MouseEmulation { EmuPress, EmuRelease, EmuMove };
- unsigned int sendFakedMouseEvent( QPoint pos, WId win, MouseEmulation type, int button, unsigned int state ); // returns the new state
+ unsigned int sendFakedMouseEvent( TQPoint pos, WId win, MouseEmulation type, int button, unsigned int state ); // returns the new state
void tabBoxKeyPress( const KKeyNative& keyX );
void tabBoxKeyRelease( const XKeyEvent& ev );
@@ -482,11 +482,11 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
// ------------------
- void helperDialog( const QString& message, const Client* c );
+ void helperDialog( const TQString& message, const Client* c );
void calcDesktopLayout(int &x, int &y) const;
- QPopupMenu* clientPopup();
+ TQPopupMenu* clientPopup();
void closeActivePopup();
void updateClientArea( bool force );
@@ -495,22 +495,22 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
int current_desktop;
int number_of_desktops;
- QMemArray<int> desktop_focus_chain;
+ TQMemArray<int> desktop_focus_chain;
int active_screen;
- QWidget* active_popup;
+ TQWidget* active_popup;
Client* active_popup_client;
- QWidget* desktop_widget;
+ TQWidget* desktop_widget;
void loadSessionInfo();
void loadWindowRules();
void editWindowRules( Client* c, bool whole_app );
- QPtrList<SessionInfo> session;
- QValueList<Rules*> rules;
+ TQPtrList<SessionInfo> session;
+ TQValueList<Rules*> rules;
KXMessages temporaryRulesMessages;
- QTimer rulesUpdatedTimer;
+ TQTimer rulesUpdatedTimer;
bool rules_updates_disabled;
static const char* windowTypeToTxt( NET::WindowType type );
static NET::WindowType txtToWindowType( const char* txt );
@@ -523,16 +523,16 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
Client* pending_take_activity;
// delay(ed) window focus timer and client
- QTimer* delayFocusTimer;
+ TQTimer* delayFocusTimer;
Client* delayfocus_client;
- QPoint focusMousePos;
+ TQPoint focusMousePos;
ClientList clients;
ClientList desktops;
ClientList unconstrained_stacking_order; // topmost last
ClientList stacking_order; // topmost last
- QValueVector< ClientList > focus_chain; // currently active last
+ TQValueVector< ClientList > focus_chain; // currently active last
ClientList global_focus_chain; // this one is only for things like tabbox's MRU
ClientList should_get_focus; // last is most recent
ClientList attention_chain;
@@ -564,9 +564,9 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
TabBox* tab_box;
PopupInfo* popupinfo;
- QPopupMenu *popup;
- QPopupMenu *advanced_popup;
- QPopupMenu *desk_popup;
+ TQPopupMenu *popup;
+ TQPopupMenu *advanced_popup;
+ TQPopupMenu *desk_popup;
int desk_popup_index;
KGlobalAccel *keys;
@@ -582,19 +582,19 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
PluginMgr *mgr;
RootInfo *rootInfo;
- QWidget* supportWindow;
+ TQWidget* supportWindow;
// swallowing
- QStringList doNotManageList;
+ TQStringList doNotManageList;
// colormap handling
Colormap default_colormap;
Colormap installed_colormap;
// Timer to collect requests for 'reconfigure'
- QTimer reconfigureTimer;
+ TQTimer reconfigureTimer;
- QTimer updateToolWindowsTimer;
+ TQTimer updateToolWindowsTimer;
static Workspace *_self;
@@ -614,7 +614,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
int electricBottom;
Time electric_time_first;
Time electric_time_last;
- QPoint electric_push_point;
+ TQPoint electric_push_point;
Qt::Orientation layoutOrientation;
int layoutX;
@@ -622,15 +622,15 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
Placement *initPositioning;
- QRect* workarea; // array of workareas for virtual desktops
- QRect** screenarea; // array of workareas per xinerama screen for all virtual desktops
+ TQRect* workarea; // array of workareas for virtual desktops
+ TQRect** screenarea; // array of workareas per xinerama screen for all virtual desktops
bool managing_topmenus;
KSelectionOwner* topmenu_selection;
KSelectionWatcher* topmenu_watcher;
ClientList topmenus; // doesn't own them
mutable int topmenu_height;
- QWidget* topmenu_space;
+ TQWidget* topmenu_space;
int set_active_client_recursion;
int block_stacking_updates; // when >0, stacking updates are temporarily disabled
@@ -640,8 +640,8 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
friend class StackingUpdatesBlocker;
//kompmgr
- QSlider *transSlider;
- QPushButton *transButton;
+ TQSlider *transSlider;
+ TQPushButton *transButton;
// not used yet
/*Client* topDock;
int maximizedWindowCounter;
@@ -738,14 +738,14 @@ inline const ClientList& Workspace::stackingOrder() const
return stacking_order;
}
-inline void Workspace::showWindowMenu(QPoint pos, Client* cl)
+inline void Workspace::showWindowMenu(TQPoint pos, Client* cl)
{
- showWindowMenu(QRect(pos, pos), cl);
+ showWindowMenu(TQRect(pos, pos), cl);
}
inline void Workspace::showWindowMenu(int x, int y, Client* cl)
{
- showWindowMenu(QRect(QPoint(x, y), QPoint(x, y)), cl);
+ showWindowMenu(TQRect(TQPoint(x, y), TQPoint(x, y)), cl);
}
inline
@@ -803,13 +803,13 @@ bool Workspace::rulesUpdatesDisabled() const
}
inline
-void Workspace::updateFocusMousePosition( const QPoint& pos )
+void Workspace::updateFocusMousePosition( const TQPoint& pos )
{
focusMousePos = pos;
}
inline
-QPoint Workspace::focusMousePosition() const
+TQPoint Workspace::focusMousePosition() const
{
return focusMousePos;
}