From 02a6c8f36311eb6225066df35adf8d00f9cd942b Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 18:16:06 +0000 Subject: TQt4 port knemo This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knemo@1238869 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/knemod/interfacetray.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/knemod/interfacetray.cpp') diff --git a/src/knemod/interfacetray.cpp b/src/knemod/interfacetray.cpp index c8ab03a..6b8812f 100644 --- a/src/knemod/interfacetray.cpp +++ b/src/knemod/interfacetray.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -37,9 +37,9 @@ static const char description[] = static const char version[] = "0.4.8"; -InterfaceTray::InterfaceTray( const QString& ifname, - QWidget* parent, const char* name ) - : KSystemTray( parent, name ) +InterfaceTray::InterfaceTray( const TQString& ifname, + TQWidget* tqparent, const char* name ) + : KSystemTray( tqparent, name ) { actionCollection()->clear(); // remove the quit entry @@ -49,42 +49,42 @@ InterfaceTray::InterfaceTray( const QString& ifname, "KNemo - " + ifname ); popup->insertItem( SmallIcon( "knemo" ), i18n( "&About KNemo" ), this, - SLOT( showAboutDialog() ) ); + TQT_SLOT( showAboutDialog() ) ); popup->insertItem( i18n( "&Report Bug..." ), this, - SLOT( showReportBugDialog() ) ); + TQT_SLOT( showReportBugDialog() ) ); popup->insertSeparator(); popup->insertItem( SmallIcon( "configure" ), i18n( "&Configure KNemo..." ), this, - SIGNAL( configSelected() ) ); + TQT_SIGNAL( configSelected() ) ); popup->insertItem( SmallIcon( "ksysguard" ), i18n( "&Open Traffic Plotter" ), this, - SLOT( showGraph() ) ); + TQT_SLOT( showGraph() ) ); } InterfaceTray::~InterfaceTray() { } -void InterfaceTray::resizeEvent ( QResizeEvent * ) +void InterfaceTray::resizeEvent ( TQResizeEvent * ) { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes emit iconResized(); } -void InterfaceTray::mousePressEvent( QMouseEvent* e ) +void InterfaceTray::mousePressEvent( TQMouseEvent* e ) { - if ( !rect().contains( e->pos() ) ) + if ( !TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) return; switch( e->button() ) { - case LeftButton: + case Qt::LeftButton: emit leftClicked(); break; - case MidButton: + case Qt::MidButton: emit graphSelected( true ); break; - case RightButton: + case Qt::RightButton: KSystemTray::mousePressEvent( e ); break; default: -- cgit v1.2.1