Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head
Michele Calgaro 4 months ago
parent 367cb43dc1
commit d10984d6c1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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() );
}

Loading…
Cancel
Save