diff options
Diffstat (limited to 'kpilot/kpilot/kpilotProbeDialog.cc')
-rw-r--r-- | kpilot/kpilot/kpilotProbeDialog.cc | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/kpilot/kpilot/kpilotProbeDialog.cc b/kpilot/kpilot/kpilotProbeDialog.cc index f7e04268..fd7fcb3c 100644 --- a/kpilot/kpilot/kpilotProbeDialog.cc +++ b/kpilot/kpilot/kpilotProbeDialog.cc @@ -28,14 +28,14 @@ #include "options.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kmessagebox.h> #include <kglobal.h> @@ -86,23 +86,23 @@ and the module can't be unloaded. */ -ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : +ProbeDialog::ProbeDialog(TQWidget *parent, const char *n) : KDialogBase(parent, n, true, i18n("Autodetecting Your Handheld"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Cancel, true, i18n("Restart Detection")), mDetected(false), mUserName(), mDevice() { FUNCTIONSETUP; - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - fInfoText = new QLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); - fInfoText->setAlignment( QLabel::WordBreak ); + fInfoText = new TQLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); + fInfoText->setAlignment( TQLabel::WordBreak ); - fStatusGroup = new QGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); + fStatusGroup = new TQGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); fStatusGroup->setColumnLayout(0, Qt::Vertical ); - fStatusGroupLayout = new QGridLayout( fStatusGroup->layout() ); + fStatusGroupLayout = new TQGridLayout( fStatusGroup->layout() ); - fStatus = new QLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); - fStatus->setAlignment( QLabel::WordBreak ); + fStatus = new TQLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); + fStatus->setAlignment( TQLabel::WordBreak ); fStatusGroupLayout->addWidget( fStatus, 0, 0 ); fProgress = new KProgress( 100, fStatusGroup, "fProgress" ); @@ -110,27 +110,27 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : - fResultsGroup = new QGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); + fResultsGroup = new TQGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); fResultsGroup->setEnabled( FALSE ); fResultsGroup->setColumnLayout(0, Qt::Vertical ); - fResultsGroupLayout = new QGridLayout( fResultsGroup->layout() ); + fResultsGroupLayout = new TQGridLayout( fResultsGroup->layout() ); fResultsGroupLayout->setAlignment( Qt::AlignTop ); - fUserLabel = new QLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); - fUserLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); + fUserLabel = new TQLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); + fUserLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); fResultsGroupLayout->addWidget( fUserLabel, 0, 0 ); - fDeviceLabel = new QLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); + fDeviceLabel = new TQLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); fResultsGroupLayout->addWidget( fDeviceLabel, 1, 0 ); - fUser = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); + fUser = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); fResultsGroupLayout->addWidget( fUser, 0, 1 ); - fDevice = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); + fDevice = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); fResultsGroupLayout->addWidget( fDevice, 1, 1 ); - resize( QSize(459, 298).expandedTo(minimumSizeHint()) ); + resize( TQSize(459, 298).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); enableButtonOK(false); @@ -150,15 +150,15 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : <<"/dev/cuad1"<<"/dev/cuad3" <<"/dev/ucom1"<<"/dev/ucom3"; - fProcessEventsTimer = new QTimer( this ); - fTimeoutTimer = new QTimer( this ); - fProgressTimer = new QTimer( this ); - fRotateLinksTimer = new QTimer( this ); - connect( fProcessEventsTimer, SIGNAL(timeout()), this, SLOT(processEvents()) ); - connect( fTimeoutTimer, SIGNAL(timeout()), this, SLOT(timeout()) ); - connect( fProgressTimer, SIGNAL(timeout()), this, SLOT( progress()) ); - connect( fRotateLinksTimer, SIGNAL(timeout()), this, SLOT( detect()) ); - connect( this, SIGNAL(finished()), this, SLOT(disconnectDevices()) ); + fProcessEventsTimer = new TQTimer( this ); + fTimeoutTimer = new TQTimer( this ); + fProgressTimer = new TQTimer( this ); + fRotateLinksTimer = new TQTimer( this ); + connect( fProcessEventsTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processEvents()) ); + connect( fTimeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); + connect( fProgressTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( progress()) ); + connect( fRotateLinksTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( detect()) ); + connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(disconnectDevices()) ); } ProbeDialog::~ProbeDialog() @@ -180,9 +180,9 @@ void ProbeDialog::progress() int ProbeDialog::exec() { mDetected = false; - mUserName = QString(); - mDevice = QString(); - QTimer::singleShot( 0, this, SLOT( startDetection() ) ); + mUserName = TQString(); + mDevice = TQString(); + TQTimer::singleShot( 0, this, TQT_SLOT( startDetection() ) ); return KDialogBase::exec(); } @@ -193,7 +193,7 @@ void ProbeDialog::startDetection() disconnectDevices(); fProgress->setProgress(0); fStatus->setText( i18n("Starting detection...") ); - QTimer::singleShot(0, this, SLOT(processEvents()) ); + TQTimer::singleShot(0, this, TQT_SLOT(processEvents()) ); processEvents(); PilotDaemonDCOP_stub *daemonStub = new PilotDaemonDCOP_stub("kpilotDaemon", "KPilotDaemonIface"); if (daemonStub) { @@ -217,8 +217,8 @@ void ProbeDialog::startDetection() KPilotDeviceLink*link; for (int i=0; i<3; i++) { - QStringList::iterator end(mDevicesToProbe[i].end()); - for (QStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) + TQStringList::iterator end(mDevicesToProbe[i].end()); + for (TQStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) { link = new KPilotDeviceLink(); link->setDevice((*it)); @@ -226,7 +226,7 @@ void ProbeDialog::startDetection() DEBUGKPILOT<<"new kpilotDeviceLink for "<<(*it)<<endl; #endif mDeviceLinks[i].append( link ); - connect( link, SIGNAL(deviceReady(KPilotDeviceLink*)), this, SLOT(connection(KPilotDeviceLink*)) ); + connect( link, TQT_SIGNAL(deviceReady(KPilotDeviceLink*)), this, TQT_SLOT(connection(KPilotDeviceLink*)) ); processEvents(); } } @@ -293,7 +293,7 @@ void ProbeDialog::connection( KPilotDeviceLink*lnk) fResultsGroup->setEnabled( true ); enableButtonOK(true); - QTimer::singleShot(0, this, SLOT(retrieveDBList())); + TQTimer::singleShot(0, this, TQT_SLOT(retrieveDBList())); } void ProbeDialog::retrieveDBList() @@ -309,14 +309,14 @@ void ProbeDialog::retrieveDBList() set_long( &buff[1], (*i).creator ); buff[5] = ']'; buff[6] = '\0'; - QString cr( buff ); + TQString cr( buff ); mDBs << cr; - mDBs << QString( (*i).name ); + mDBs << TQString( (*i).name ); } mDBs.sort(); - QString old( QString::null ); - QStringList::Iterator itr = mDBs.begin(); + TQString old( TQString::null ); + TQStringList::Iterator itr = mDBs.begin(); while ( itr != mDBs.end() ) { if ( old == *itr ) { itr = mDBs.remove( itr ); @@ -329,7 +329,7 @@ void ProbeDialog::retrieveDBList() // End sync gracefully, but don't change settings on the handheld. mActiveLink->endSync( KPilotLink::NoUpdate ); - QTimer::singleShot(0, this, SLOT(disconnectDevices())); + TQTimer::singleShot(0, this, TQT_SLOT(disconnectDevices())); } void ProbeDialog::disconnectDevices() { |