summaryrefslogtreecommitdiffstats
path: root/kwin/clients/test
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/clients/test
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/clients/test')
-rw-r--r--kwin/clients/test/test.cpp54
-rw-r--r--kwin/clients/test/test.h12
2 files changed, 33 insertions, 33 deletions
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