From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../cpp/app_templates/opieapplet/simpleimpl.cpp | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'languages/cpp/app_templates/opieapplet/simpleimpl.cpp') diff --git a/languages/cpp/app_templates/opieapplet/simpleimpl.cpp b/languages/cpp/app_templates/opieapplet/simpleimpl.cpp index 1474a0e4..3264314c 100644 --- a/languages/cpp/app_templates/opieapplet/simpleimpl.cpp +++ b/languages/cpp/app_templates/opieapplet/simpleimpl.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include // for AppLnk #include // for Resource loading @@ -8,8 +8,8 @@ #include "%{APPNAMELC}.h" -%{APPNAME}::%{APPNAME}(QWidget *parent) - : QWidget( parent, "%{APPNAME} Applet" ) { +%{APPNAME}::%{APPNAME}(TQWidget *parent) + : TQWidget( parent, "%{APPNAME} Applet" ) { /* * we will load an Image, scale it for the right usage * remember your applet might be used by different @@ -19,7 +19,7 @@ * the only class that allows scaling. */ - QImage image = Resource::loadImage("%{APPNAMELC}/%{APPNAMELC}"); + TQImage image = Resource::loadImage("%{APPNAMELC}/%{APPNAMELC}"); /* * smooth scale to AppLnk smallIconSize for applest * smallIconSize gets adjusted to the resolution @@ -32,7 +32,7 @@ * now we need to convert the Image to a Pixmap cause these * can be drawn more easily */ - m_pix = new QPixmap(); + m_pix = new TQPixmap(); m_pix->convertFromImage( image ); /* @@ -56,15 +56,15 @@ * global with mapToGlobal(). Then you might also need to * move the widgets so it is visible */ -void %{APPNAME}::mousePressEvent(QMouseEvent* ) { - QMessageBox::information(this, tr("No action taken"), +void %{APPNAME}::mousePressEvent(TQMouseEvent* ) { + TQMessageBox::information(this, tr("No action taken"), tr("This Plugin does not yet support anything usefule aye."), - QMessageBox::Ok ); + TQMessageBox::Ok ); } -void %{APPNAME}::paintEvent( QPaintEvent* ) { - QPainter p(this); +void %{APPNAME}::paintEvent( TQPaintEvent* ) { + TQPainter p(this); /* simpy draw the pixmap from the start of this widget */ p.drawPixmap(0, 0, *m_pix ); @@ -89,7 +89,7 @@ void %{APPNAME}::paintEvent( QPaintEvent* ) { /* * For the taskbar interface return a Widget */ -QWidget* %{APPNAME}Impl::applet( QWidget* parent ) { +TQWidget* %{APPNAME}Impl::applet( TQWidget* parent ) { /* * There are problems with ownership. So we add * our ownlist and clear this; -- cgit v1.2.1