diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 18:16:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 18:16:06 +0000 |
commit | 02a6c8f36311eb6225066df35adf8d00f9cd942b (patch) | |
tree | ceb91c373877f7a69209e184c81b53dc6f9402d7 /src/knemod/interfaceicon.cpp | |
parent | 09e6e27fe85b2efb28072f1c81f6581fa6837d92 (diff) | |
download | knemo-02a6c8f36311eb6225066df35adf8d00f9cd942b.tar.gz knemo-02a6c8f36311eb6225066df35adf8d00f9cd942b.zip |
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
Diffstat (limited to 'src/knemod/interfaceicon.cpp')
-rw-r--r-- | src/knemod/interfaceicon.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/knemod/interfaceicon.cpp b/src/knemod/interfaceicon.cpp index f57626a..b82f406 100644 --- a/src/knemod/interfaceicon.cpp +++ b/src/knemod/interfaceicon.cpp @@ -19,7 +19,7 @@ #include <unistd.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include <kdebug.h> #include <kglobal.h> @@ -37,17 +37,17 @@ #include "interfacemonitor.h" #include "interfacetooltip.h" -const QString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected"; -const QString InterfaceIcon::ICON_CONNECTED = "network_connected"; -const QString InterfaceIcon::ICON_INCOMING = "network_incoming"; -const QString InterfaceIcon::ICON_OUTGOING = "network_outgoing"; -const QString InterfaceIcon::ICON_TRAFFIC = "network_traffic"; -const QString InterfaceIcon::SUFFIX_PPP = "_ppp"; -const QString InterfaceIcon::SUFFIX_LAN = "_lan"; -const QString InterfaceIcon::SUFFIX_WLAN = "_wlan"; +const TQString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected"; +const TQString InterfaceIcon::ICON_CONNECTED = "network_connected"; +const TQString InterfaceIcon::ICON_INCOMING = "network_incoming"; +const TQString InterfaceIcon::ICON_OUTGOING = "network_outgoing"; +const TQString InterfaceIcon::ICON_TRAFFIC = "network_traffic"; +const TQString InterfaceIcon::SUFFIX_PPP = "_ppp"; +const TQString InterfaceIcon::SUFFIX_LAN = "_lan"; +const TQString InterfaceIcon::SUFFIX_WLAN = "_wlan"; InterfaceIcon::InterfaceIcon( Interface* interface ) - : QObject(), + : TQObject(), mInterface( interface ), mTray( 0L ) { @@ -59,14 +59,14 @@ InterfaceIcon::~InterfaceIcon() delete mTray; } -void InterfaceIcon::updateStatus( int status ) +void InterfaceIcon::updatetqStatus( int status ) { if ( mTray == 0L ) return; // If the user wants something different than the default icons // append the correct suffix to the filename. - QString suffix; + TQString suffix; if ( mInterface->getSettings().iconSet == Interface::NETWORK ) { suffix = SUFFIX_LAN; @@ -114,8 +114,8 @@ void InterfaceIcon::updateToolTip() if ( mTray == 0L ) return; - QString toolTip = mInterface->getSettings().alias; - if ( toolTip == QString::null ) + TQString toolTip = mInterface->getSettings().alias; + if ( toolTip == TQString() ) toolTip = mInterface->getName(); new InterfaceToolTip( mInterface, mTray ); } @@ -137,14 +137,14 @@ void InterfaceIcon::updateMenu() if ( settings.activateStatistics ) { menu->insertItem( i18n( "Open &Statistics" ), this, - SIGNAL( statisticsSelected() ) ); + TQT_SIGNAL( statisticsSelected() ) ); } // If the user wants custom commands, add them. if ( settings.customCommands ) { menu->insertSeparator(); - QValueVector<InterfaceCommand>::iterator it; + TQValueVector<InterfaceCommand>::iterator it; for ( it = settings.commands.begin(); it != settings.commands.end(); it++ ) (*it).id = menu->insertItem( (*it).menuText ); } @@ -152,10 +152,10 @@ void InterfaceIcon::updateMenu() void InterfaceIcon::resizeIcon() { - updateTrayStatus(0); + updateTraytqStatus(0); } -void InterfaceIcon::updateTrayStatus( int previousState ) +void InterfaceIcon::updateTraytqStatus( int previousState ) { bool interfaceExists = mInterface->getData().existing; bool interfaceAvailable = mInterface->getData().available; @@ -169,8 +169,8 @@ void InterfaceIcon::updateTrayStatus( int previousState ) /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. */ - QString title; - if ( mInterface->getSettings().alias != QString::null ) + TQString title; + if ( mInterface->getSettings().alias != TQString() ) title = mInterface->getSettings().alias; else title = mInterface->getName(); @@ -191,8 +191,8 @@ void InterfaceIcon::updateTrayStatus( int previousState ) /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. */ - QString title; - if ( mInterface->getSettings().alias != QString::null ) + TQString title; + if ( mInterface->getSettings().alias != TQString() ) title = mInterface->getSettings().alias; else title = mInterface->getName(); @@ -231,20 +231,20 @@ void InterfaceIcon::updateTrayStatus( int previousState ) ( !interfaceExists && !hideWhenNotExisting && !hideWhenNotAvailable ) ) ) { mTray = new InterfaceTray( mInterface->getName() ); - QToolTip::add( mTray, mInterface->getName() ); + TQToolTip::add( mTray, mInterface->getName() ); KPopupMenu* menu = mTray->contextMenu(); - connect( menu, SIGNAL( activated( int ) ), - this, SLOT( menuActivated( int ) ) ); - connect( mTray, SIGNAL( leftClicked() ), - mInterface, SLOT( showStatusDialog() ) ); - connect( mTray, SIGNAL( graphSelected( bool ) ), - mInterface, SLOT( showSignalPlotter( bool ) ) ); - connect( mTray, SIGNAL( configSelected() ), - this, SLOT( showConfigDialog() ) ); - connect( mTray, SIGNAL( iconResized() ), - this, SLOT( resizeIcon() ) ); - - updateStatus( mInterface->getState() ); + connect( menu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( menuActivated( int ) ) ); + connect( mTray, TQT_SIGNAL( leftClicked() ), + mInterface, TQT_SLOT( showStatusDialog() ) ); + connect( mTray, TQT_SIGNAL( graphSelected( bool ) ), + mInterface, TQT_SLOT( showSignalPlotter( bool ) ) ); + connect( mTray, TQT_SIGNAL( configSelected() ), + this, TQT_SLOT( showConfigDialog() ) ); + connect( mTray, TQT_SIGNAL( iconResized() ), + this, TQT_SLOT( resizeIcon() ) ); + + updatetqStatus( mInterface->getState() ); updateToolTip(); updateMenu(); mTray->show(); @@ -257,8 +257,8 @@ void InterfaceIcon::updateTrayStatus( int previousState ) /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. */ - QString title; - if ( mInterface->getSettings().alias != QString::null ) + TQString title; + if ( mInterface->getSettings().alias != TQString() ) title = mInterface->getSettings().alias; else title = mInterface->getName(); @@ -293,7 +293,7 @@ void InterfaceIcon::showConfigDialog() void InterfaceIcon::menuActivated( int id ) { InterfaceSettings& settings = mInterface->getSettings(); - QValueVector<InterfaceCommand>::iterator it; + TQValueVector<InterfaceCommand>::iterator it; for ( it = settings.commands.begin(); it != settings.commands.end(); it++ ) { if ( (*it).id == id ) @@ -305,7 +305,7 @@ void InterfaceIcon::menuActivated( int id ) process << (*it).command; } else - process << QStringList::split( ' ', (*it).command ); + process << TQStringList::split( ' ', (*it).command ); process.start( KProcess::DontCare ); break; |