diff options
author | Michele Calgaro <[email protected]> | 2024-01-05 10:21:52 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-05 10:21:52 +0900 |
commit | d10984d6c1b4e09a7ad0914fdad74bc40a938d64 (patch) | |
tree | 4829ede298488e06a94a2d2f1db32fdc2b457ab4 | |
parent | 367cb43dc1c34ab5efe331a4df08588256f34b03 (diff) | |
download | wlassistant-d10984d6c1b4e09a7ad0914fdad74bc40a938d64.tar.gz wlassistant-d10984d6c1b4e09a7ad0914fdad74bc40a938d64.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r-- | src/wlassistant.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/src/wlassistant.cpp b/src/wlassistant.cpp index 61dda46..66bc020 100644 --- a/src/wlassistant.cpp +++ b/src/wlassistant.cpp @@ -61,35 +61,35 @@ WirelessAssistant::WirelessAssistant(TQWidget* parent, const char* name, bool mo frameDevice->hide(); /// Network List Widget - connect( buttonScan, TQT_SIGNAL(clicked()), - this, TQT_SLOT(netScan()) ); + connect( buttonScan, TQ_SIGNAL(clicked()), + this, TQ_SLOT(netScan()) ); - connect( buttonConnect, TQT_SIGNAL(clicked()), - this, TQT_SLOT(itemAction()) ); + connect( buttonConnect, TQ_SIGNAL(clicked()), + this, TQ_SLOT(itemAction()) ); - connect( buttonClose, TQT_SIGNAL(clicked()), - this, TQT_SLOT(close()) ); + connect( buttonClose, TQ_SIGNAL(clicked()), + this, TQ_SLOT(close()) ); - connect( devCombo, TQT_SIGNAL(activated( const TQString & )), - this, TQT_SLOT(setDev( const TQString & )) ); + connect( devCombo, TQ_SIGNAL(activated( const TQString & )), + this, TQ_SLOT(setDev( const TQString & )) ); - connect( netList, TQT_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )), - TQT_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) ); + connect( netList, TQ_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )), + TQ_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) ); /// Settings Widget - connect( buttonOptions, TQT_SIGNAL(toggled(bool)), - this, TQT_SLOT(togglePage(bool)) ); + connect( buttonOptions, TQ_SIGNAL(toggled(bool)), + this, TQ_SLOT(togglePage(bool)) ); - connect( buttonEnableAllMessages, TQT_SIGNAL(clicked()), - this, TQT_SLOT(enableAllMessages()) ); + connect( buttonEnableAllMessages, TQ_SIGNAL(clicked()), + this, TQ_SLOT(enableAllMessages()) ); /// Global KDE Options - connect( TDEApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)), - this, TQT_SLOT(updateConfiguration(int)) ); + connect( TDEApplication::kApplication(), TQ_SIGNAL(settingsChanged(int)), + this, TQ_SLOT(updateConfiguration(int)) ); setMouseBehaviour(); - TQTimer::singleShot(10, this, TQT_SLOT(init()) ); //WAIT FOR THE UI TO BE READY BEFORE FURTHER SETUP (msec) + TQTimer::singleShot(10, this, TQ_SLOT(init()) ); //WAIT FOR THE UI TO BE READY BEFORE FURTHER SETUP (msec) } WirelessAssistant::~WirelessAssistant() @@ -190,8 +190,8 @@ void WirelessAssistant::init() connectedItem = 0; timerGui = new TQTimer(); timerConnectionCheck = new TQTimer(); - connect( timerGui, TQT_SIGNAL(timeout()), TQT_SLOT(updateConnectedItem()) ); - connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectionStatus()) ); + connect( timerGui, TQ_SIGNAL(timeout()), TQ_SLOT(updateConnectedItem()) ); + connect( timerConnectionCheck, TQ_SIGNAL(timeout()), TQ_SLOT(checkConnectionStatus()) ); //////////////////////// ///// DETECT & SET PATHS ///// @@ -208,9 +208,9 @@ void WirelessAssistant::init() /////////////////////////////////////// ///// SCAN FOR AVAILABLE NETWORKS ///// if ( autoConnect ) - TQTimer::singleShot( 0, this, TQT_SLOT(netAutoConnect()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(netAutoConnect()) ); else - TQTimer::singleShot( 0, this, TQT_SLOT(netScan()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(netScan()) ); } void WirelessAssistant::checkConnectionStatus() @@ -291,7 +291,7 @@ void WirelessAssistant::netScan() timerConnectionCheck->stop(); //stop while scanning. netScan( NetParams ); if (netList->childCount() > 0) { - TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectionStatus()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(checkConnectionStatus()) ); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); } } @@ -878,21 +878,21 @@ void WirelessAssistant::enableAllMessages() void WirelessAssistant::setMouseBehaviour() { if ( TDEGlobalSettings::singleClick() ) { - disconnect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), - this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); - disconnect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT(itemAction()) ); - connect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT(itemAction()) ); + disconnect( netList, TQ_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQ_SLOT(updateConnectButton(TQListViewItem*)) ); + disconnect( netList, TQ_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT(itemAction()) ); + connect( netList, TQ_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT(itemAction()) ); buttonConnect->hide(); } else { - disconnect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT(itemAction()) ); + disconnect( netList, TQ_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT(itemAction()) ); - connect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), - this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); - connect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT(itemAction()) ); + connect( netList, TQ_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQ_SLOT(updateConnectButton(TQListViewItem*)) ); + connect( netList, TQ_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT(itemAction()) ); buttonConnect->show(); } } @@ -941,20 +941,20 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b TQTimer* timerProc = new TQTimer(); //timeout timer if ( timeout>0 && !detached ) { - connect( timerProc, TQT_SIGNAL(timeout()), p, TQT_SLOT(kill()) ); + connect( timerProc, TQ_SIGNAL(timeout()), p, TQ_SLOT(kill()) ); timerProc->start(timeout*1000); //convert sec to msec } - connect(buttonClose, TQT_SIGNAL(clicked()), - p, TQT_SLOT(kill()) ); + connect(buttonClose, TQ_SIGNAL(clicked()), + p, TQ_SLOT(kill()) ); int i = 0; while ( p->isRunning() ) { // PROCESS USER EVENTS TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); usleep(75*1000); //75msec on Linux (75000msec on Windows...) if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'. - disconnect(buttonClose, TQT_SIGNAL(clicked()), - this, TQT_SLOT(close()) ); + disconnect(buttonClose, TQ_SIGNAL(clicked()), + this, TQ_SLOT(close()) ); buttonClose->setIconSet( SmallIconSet("process-stop") ); buttonClose->setText( i18n("&Stop") ); TQToolTip::remove @@ -965,11 +965,11 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b i++; } - disconnect(buttonClose, TQT_SIGNAL(clicked()), - p, TQT_SLOT(kill()) ); + disconnect(buttonClose, TQ_SIGNAL(clicked()), + p, TQ_SLOT(kill()) ); if (i>27) {//set 'stop' back to 'close' if needed - connect(buttonClose, TQT_SIGNAL(clicked()), - this, TQT_SLOT(close()) ); + connect(buttonClose, TQ_SIGNAL(clicked()), + this, TQ_SLOT(close()) ); buttonClose->setIconSet( SmallIconSet("window-close") ); buttonClose->setText( i18n("&Quit") ); TQToolTip::remove @@ -1034,19 +1034,19 @@ void WirelessAssistant::showItemContextMenu( TQListViewItem* i, const TQPoint& p icm->insertTitle(nvi->essid()); if (isConfigured) { if (nvi->isConnected()) { - icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); - //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQT_SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQ_SLOT(netDisconnect()) ); + //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQ_SLOT(netConnect()) ); } else - icm->insertItem( SmallIcon("connect_creating"), i18n("Connect"), this, TQT_SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_creating"), i18n("Connect"), this, TQ_SLOT(netConnect()) ); icm->insertSeparator(); - icm->insertItem(i18n("Forget Settings..."), this, TQT_SLOT(removeNetParams()) ); - icm->insertItem(i18n("Edit Settings..."), this, TQT_SLOT(editNetParams()) ); + icm->insertItem(i18n("Forget Settings..."), this, TQ_SLOT(removeNetParams()) ); + icm->insertItem(i18n("Edit Settings..."), this, TQ_SLOT(editNetParams()) ); } else { if (nvi->isConnected()) { - icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); - //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQT_SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQ_SLOT(netDisconnect()) ); + //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQ_SLOT(netConnect()) ); } else - icm->insertItem( SmallIcon("connect_creating"), i18n("Configure and Connect..."), this, TQT_SLOT(netConnect()) ); + icm->insertItem( SmallIcon("connect_creating"), i18n("Configure and Connect..."), this, TQ_SLOT(netConnect()) ); } icm->exec( TQCursor::pos() ); } |