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(); frameDevice->hide();
/// Network List Widget /// Network List Widget
connect( buttonScan, TQT_SIGNAL(clicked()), connect( buttonScan, TQ_SIGNAL(clicked()),
this, TQT_SLOT(netScan()) ); this, TQ_SLOT(netScan()) );
connect( buttonConnect, TQT_SIGNAL(clicked()), connect( buttonConnect, TQ_SIGNAL(clicked()),
this, TQT_SLOT(itemAction()) ); this, TQ_SLOT(itemAction()) );
connect( buttonClose, TQT_SIGNAL(clicked()), connect( buttonClose, TQ_SIGNAL(clicked()),
this, TQT_SLOT(close()) ); this, TQ_SLOT(close()) );
connect( devCombo, TQT_SIGNAL(activated( const TQString & )), connect( devCombo, TQ_SIGNAL(activated( const TQString & )),
this, TQT_SLOT(setDev( const TQString & )) ); this, TQ_SLOT(setDev( const TQString & )) );
connect( netList, TQT_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )), connect( netList, TQ_SIGNAL(rightButtonPressed( TQListViewItem*, const TQPoint&, int )),
TQT_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) ); TQ_SLOT(showItemContextMenu( TQListViewItem*, const TQPoint&, int )) );
/// Settings Widget /// Settings Widget
connect( buttonOptions, TQT_SIGNAL(toggled(bool)), connect( buttonOptions, TQ_SIGNAL(toggled(bool)),
this, TQT_SLOT(togglePage(bool)) ); this, TQ_SLOT(togglePage(bool)) );
connect( buttonEnableAllMessages, TQT_SIGNAL(clicked()), connect( buttonEnableAllMessages, TQ_SIGNAL(clicked()),
this, TQT_SLOT(enableAllMessages()) ); this, TQ_SLOT(enableAllMessages()) );
/// Global KDE Options /// Global KDE Options
connect( TDEApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)), connect( TDEApplication::kApplication(), TQ_SIGNAL(settingsChanged(int)),
this, TQT_SLOT(updateConfiguration(int)) ); this, TQ_SLOT(updateConfiguration(int)) );
setMouseBehaviour(); 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() WirelessAssistant::~WirelessAssistant()
@ -190,8 +190,8 @@ void WirelessAssistant::init()
connectedItem = 0; connectedItem = 0;
timerGui = new TQTimer(); timerGui = new TQTimer();
timerConnectionCheck = new TQTimer(); timerConnectionCheck = new TQTimer();
connect( timerGui, TQT_SIGNAL(timeout()), TQT_SLOT(updateConnectedItem()) ); connect( timerGui, TQ_SIGNAL(timeout()), TQ_SLOT(updateConnectedItem()) );
connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectionStatus()) ); connect( timerConnectionCheck, TQ_SIGNAL(timeout()), TQ_SLOT(checkConnectionStatus()) );
//////////////////////// ////////////////////////
///// DETECT & SET PATHS ///// ///// DETECT & SET PATHS /////
@ -208,9 +208,9 @@ void WirelessAssistant::init()
/////////////////////////////////////// ///////////////////////////////////////
///// SCAN FOR AVAILABLE NETWORKS ///// ///// SCAN FOR AVAILABLE NETWORKS /////
if ( autoConnect ) if ( autoConnect )
TQTimer::singleShot( 0, this, TQT_SLOT(netAutoConnect()) ); TQTimer::singleShot( 0, this, TQ_SLOT(netAutoConnect()) );
else else
TQTimer::singleShot( 0, this, TQT_SLOT(netScan()) ); TQTimer::singleShot( 0, this, TQ_SLOT(netScan()) );
} }
void WirelessAssistant::checkConnectionStatus() void WirelessAssistant::checkConnectionStatus()
@ -291,7 +291,7 @@ void WirelessAssistant::netScan()
timerConnectionCheck->stop(); //stop while scanning. timerConnectionCheck->stop(); //stop while scanning.
netScan( NetParams ); netScan( NetParams );
if (netList->childCount() > 0) { if (netList->childCount() > 0) {
TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectionStatus()) ); TQTimer::singleShot( 0, this, TQ_SLOT(checkConnectionStatus()) );
timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL);
} }
} }
@ -878,21 +878,21 @@ void WirelessAssistant::enableAllMessages()
void WirelessAssistant::setMouseBehaviour() void WirelessAssistant::setMouseBehaviour()
{ {
if ( TDEGlobalSettings::singleClick() ) { if ( TDEGlobalSettings::singleClick() ) {
disconnect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), disconnect( netList, TQ_SIGNAL(selectionChanged(TQListViewItem*)),
this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); this, TQ_SLOT(updateConnectButton(TQListViewItem*)) );
disconnect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), disconnect( netList, TQ_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)),
this, TQT_SLOT(itemAction()) ); this, TQ_SLOT(itemAction()) );
connect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), connect( netList, TQ_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)),
this, TQT_SLOT(itemAction()) ); this, TQ_SLOT(itemAction()) );
buttonConnect->hide(); buttonConnect->hide();
} else { } else {
disconnect( netList, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)), disconnect( netList, TQ_SIGNAL(clicked(TQListViewItem*, const TQPoint &, int)),
this, TQT_SLOT(itemAction()) ); this, TQ_SLOT(itemAction()) );
connect( netList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), connect( netList, TQ_SIGNAL(selectionChanged(TQListViewItem*)),
this, TQT_SLOT(updateConnectButton(TQListViewItem*)) ); this, TQ_SLOT(updateConnectButton(TQListViewItem*)) );
connect( netList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), connect( netList, TQ_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)),
this, TQT_SLOT(itemAction()) ); this, TQ_SLOT(itemAction()) );
buttonConnect->show(); buttonConnect->show();
} }
} }
@ -941,20 +941,20 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b
TQTimer* timerProc = new TQTimer(); //timeout timer TQTimer* timerProc = new TQTimer(); //timeout timer
if ( timeout>0 && !detached ) { 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 timerProc->start(timeout*1000); //convert sec to msec
} }
connect(buttonClose, TQT_SIGNAL(clicked()), connect(buttonClose, TQ_SIGNAL(clicked()),
p, TQT_SLOT(kill()) ); p, TQ_SLOT(kill()) );
int i = 0; int i = 0;
while ( p->isRunning() ) { // PROCESS USER EVENTS while ( p->isRunning() ) { // PROCESS USER EVENTS
TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
usleep(75*1000); //75msec on Linux (75000msec on Windows...) 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'. if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'.
disconnect(buttonClose, TQT_SIGNAL(clicked()), disconnect(buttonClose, TQ_SIGNAL(clicked()),
this, TQT_SLOT(close()) ); this, TQ_SLOT(close()) );
buttonClose->setIconSet( SmallIconSet("process-stop") ); buttonClose->setIconSet( SmallIconSet("process-stop") );
buttonClose->setText( i18n("&Stop") ); buttonClose->setText( i18n("&Stop") );
TQToolTip::remove TQToolTip::remove
@ -965,11 +965,11 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b
i++; i++;
} }
disconnect(buttonClose, TQT_SIGNAL(clicked()), disconnect(buttonClose, TQ_SIGNAL(clicked()),
p, TQT_SLOT(kill()) ); p, TQ_SLOT(kill()) );
if (i>27) {//set 'stop' back to 'close' if needed if (i>27) {//set 'stop' back to 'close' if needed
connect(buttonClose, TQT_SIGNAL(clicked()), connect(buttonClose, TQ_SIGNAL(clicked()),
this, TQT_SLOT(close()) ); this, TQ_SLOT(close()) );
buttonClose->setIconSet( SmallIconSet("window-close") ); buttonClose->setIconSet( SmallIconSet("window-close") );
buttonClose->setText( i18n("&Quit") ); buttonClose->setText( i18n("&Quit") );
TQToolTip::remove TQToolTip::remove
@ -1034,19 +1034,19 @@ void WirelessAssistant::showItemContextMenu( TQListViewItem* i, const TQPoint& p
icm->insertTitle(nvi->essid()); icm->insertTitle(nvi->essid());
if (isConfigured) { if (isConfigured) {
if (nvi->isConnected()) { if (nvi->isConnected()) {
icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQ_SLOT(netDisconnect()) );
//icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQT_SLOT(netConnect()) ); //icm->insertItem( SmallIcon("reload"), i18n("Reconnect"), this, TQ_SLOT(netConnect()) );
} else } 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->insertSeparator();
icm->insertItem(i18n("Forget Settings..."), this, TQT_SLOT(removeNetParams()) ); icm->insertItem(i18n("Forget Settings..."), this, TQ_SLOT(removeNetParams()) );
icm->insertItem(i18n("Edit Settings..."), this, TQT_SLOT(editNetParams()) ); icm->insertItem(i18n("Edit Settings..."), this, TQ_SLOT(editNetParams()) );
} else { } else {
if (nvi->isConnected()) { if (nvi->isConnected()) {
icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQT_SLOT(netDisconnect()) ); icm->insertItem( SmallIcon("connect_no"), i18n("Disconnect..."), this, TQ_SLOT(netDisconnect()) );
//icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQT_SLOT(netConnect()) ); //icm->insertItem( SmallIcon("reload"), i18n("Configure and Reconnect..."), this, TQ_SLOT(netConnect()) );
} else } 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() ); icm->exec( TQCursor::pos() );
} }

Loading…
Cancel
Save