summaryrefslogtreecommitdiffstats
path: root/kwin/tools/decobenchmark
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/tools/decobenchmark
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/tools/decobenchmark')
-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
4 files changed, 54 insertions, 54 deletions
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