diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/app_templates/opieapplet | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/opieapplet')
-rw-r--r-- | languages/cpp/app_templates/opieapplet/simpleimpl.cpp | 26 | ||||
-rw-r--r-- | languages/cpp/app_templates/opieapplet/simpleimpl.h | 18 |
2 files changed, 22 insertions, 22 deletions
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 <qlabel.h> -#include <qpainter.h> -#include <qmessagebox.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqmessagebox.h> #include <qpe/applnk.h> // for AppLnk #include <qpe/resource.h> // 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("<qt>This Plugin does not yet support anything usefule aye.</qt>"), - 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; diff --git a/languages/cpp/app_templates/opieapplet/simpleimpl.h b/languages/cpp/app_templates/opieapplet/simpleimpl.h index 19475367..7cca8ee7 100644 --- a/languages/cpp/app_templates/opieapplet/simpleimpl.h +++ b/languages/cpp/app_templates/opieapplet/simpleimpl.h @@ -26,8 +26,8 @@ * luckiy there is a macro for the reference counting * We provide an Implementation of the interface. */ -#include <qwidget.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqptrlist.h> #include <qpe/taskbarappletinterface.h> @@ -35,18 +35,18 @@ /* * Because we only draw an Icon in a fixed width and height * we declare and define %{APPNAME} here and you could use QLabel - * setPixmap or use QWidget and draw yourself. + * setPixmap or use TQWidget and draw yourself. * You might also want to reimplement mouse*Event to use some simple actions */ -class %{APPNAME} : public QWidget { +class %{APPNAME} : public TQWidget { Q_OBJECT public: - %{APPNAME}(QWidget *parent); + %{APPNAME}(TQWidget *parent); ~%{APPNAME}(); private: - void mousePressEvent( QMouseEvent* ); - void paintEvent( QPaintEvent* ); - QPixmap *m_pix; + void mousePressEvent( TQMouseEvent* ); + void paintEvent( TQPaintEvent* ); + TQPixmap *m_pix; }; class %{APPNAME}Impl : public TaskbarAppletInterface { @@ -57,7 +57,7 @@ public: QRESULT queryInterface( const QUuid&, QUnknownInterface** ); - QWidget *applet( QWidget* parent ); + TQWidget *applet( TQWidget* parent ); int position()const; /* |