diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kontact/plugins/kpilot/summarywidget.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/plugins/kpilot/summarywidget.cpp')
-rw-r--r-- | kontact/plugins/kpilot/summarywidget.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kontact/plugins/kpilot/summarywidget.cpp b/kontact/plugins/kpilot/summarywidget.cpp index 4230e6479..779a55c19 100644 --- a/kontact/plugins/kpilot/summarywidget.cpp +++ b/kontact/plugins/kpilot/summarywidget.cpp @@ -22,14 +22,14 @@ without including the source code for Qt in the source distribution. */ -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qvbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqvbox.h> #include <dcopclient.h> #include <dcopref.h> @@ -49,77 +49,77 @@ #include "summarywidget.h" -SummaryWidget::SummaryWidget( QWidget *parent, const char *name ) +SummaryWidget::SummaryWidget( TQWidget *parent, const char *name ) : Kontact::Summary( parent, name ), DCOPObject( "KPilotSummaryWidget" ), mDCOPSuccess( false ), mStartedDaemon( false ), mShouldStopDaemon( true ) { - mLayout = new QGridLayout( this, 2, 3, 3, 3 ); + mLayout = new TQGridLayout( this, 2, 3, 3, 3 ); int row=0; - QPixmap icon = KGlobal::iconLoader()->loadIcon( "kpilot", KIcon::Desktop, KIcon::SizeMedium ); - QWidget *header = createHeader( this, icon, i18n( "KPilot Configuration" ) ); + TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kpilot", KIcon::Desktop, KIcon::SizeMedium ); + TQWidget *header = createHeader( this, icon, i18n( "KPilot Configuration" ) ); mLayout->addMultiCellWidget( header, row,row, 0,3 ); // Last sync information row++; - mSyncTimeTextLabel = new QLabel( i18n( "<i>Last sync:</i>" ), this); + mSyncTimeTextLabel = new TQLabel( i18n( "<i>Last sync:</i>" ), this); mLayout->addWidget( mSyncTimeTextLabel, row, 0 ); - mSyncTimeLabel = new QLabel( i18n( "No information available" ), this ); + mSyncTimeLabel = new TQLabel( i18n( "No information available" ), this ); mLayout->addWidget( mSyncTimeLabel, row, 1 ); mShowSyncLogLabel = new KURLLabel( "", i18n( "[View Sync Log]" ), this ); mLayout->addWidget( mShowSyncLogLabel, row, 3 ); - connect( mShowSyncLogLabel, SIGNAL( leftClickedURL( const QString& ) ), - this, SLOT( showSyncLog( const QString& ) ) ); + connect( mShowSyncLogLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ), + this, TQT_SLOT( showSyncLog( const TQString& ) ) ); // User row++; - mPilotUserTextLabel = new QLabel( i18n( "<i>User:</i>" ), this); + mPilotUserTextLabel = new TQLabel( i18n( "<i>User:</i>" ), this); mLayout->addWidget( mPilotUserTextLabel, row, 0); - mPilotUserLabel = new QLabel( i18n( "Unknown" ), this ); + mPilotUserLabel = new TQLabel( i18n( "Unknown" ), this ); mLayout->addMultiCellWidget( mPilotUserLabel, row, row, 1, 3 ); // Device information row++; - mPilotDeviceTextLabel = new QLabel( i18n( "<i>Device:</i>" ), this); + mPilotDeviceTextLabel = new TQLabel( i18n( "<i>Device:</i>" ), this); mLayout->addWidget( mPilotDeviceTextLabel, row, 0 ); - mPilotDeviceLabel = new QLabel( i18n( "Unknown" ), this ); + mPilotDeviceLabel = new TQLabel( i18n( "Unknown" ), this ); mLayout->addMultiCellWidget( mPilotDeviceLabel, row, row, 1, 3 ); // Status row++; - mDaemonStatusTextLabel = new QLabel( i18n( "<i>Status:</i>" ), this); + mDaemonStatusTextLabel = new TQLabel( i18n( "<i>Status:</i>" ), this); mLayout->addWidget( mDaemonStatusTextLabel, row, 0 ); - mDaemonStatusLabel = new QLabel( i18n( "No communication with the daemon possible" ), this ); + mDaemonStatusLabel = new TQLabel( i18n( "No communication with the daemon possible" ), this ); mLayout->addMultiCellWidget( mDaemonStatusLabel, row, row, 1, 3 ); // Conduits: row++; - mConduitsTextLabel = new QLabel( i18n( "<i>Conduits:</i>" ), this ); + mConduitsTextLabel = new TQLabel( i18n( "<i>Conduits:</i>" ), this ); mConduitsTextLabel->setAlignment( AlignAuto | AlignTop | ExpandTabs ); mLayout->addWidget( mConduitsTextLabel, row, 0 ); - mConduitsLabel = new QLabel( i18n( "No information available" ), this ); + mConduitsLabel = new TQLabel( i18n( "No information available" ), this ); mConduitsLabel->setAlignment( mConduitsLabel->alignment() | Qt::WordBreak ); mLayout->addMultiCellWidget( mConduitsLabel, row, row, 1, 3 ); // widgets shown if kpilotDaemon is not running row++; - mNoConnectionLabel = new QLabel( i18n( "KPilot is currently not running." ), this ); + mNoConnectionLabel = new TQLabel( i18n( "KPilot is currently not running." ), this ); mLayout->addMultiCellWidget( mNoConnectionLabel, row, row, 1, 2 ); mNoConnectionStartLabel = new KURLLabel( "", i18n( "[Start KPilot]" ), this ); mLayout->addWidget( mNoConnectionStartLabel, row, 3 ); - connect( mNoConnectionStartLabel, SIGNAL( leftClickedURL( const QString& ) ), - this, SLOT( startKPilot() ) ); + connect( mNoConnectionStartLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ), + this, TQT_SLOT( startKPilot() ) ); if ( !kapp->dcopClient()->isApplicationRegistered( "kpilotDaemon" ) ) { startKPilot(); } - connectDCOPSignal( 0, 0, "kpilotDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", - "receiveDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", false ); - connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString & ) ), SLOT( slotAppRemoved( const QCString& ) ) ); + connectDCOPSignal( 0, 0, "kpilotDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", + "receiveDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", false ); + connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString & ) ), TQT_SLOT( slotAppRemoved( const TQCString& ) ) ); } SummaryWidget::~SummaryWidget() @@ -130,14 +130,14 @@ SummaryWidget::~SummaryWidget() } } -QStringList SummaryWidget::configModules() const +TQStringList SummaryWidget::configModules() const { - QStringList modules; + TQStringList modules; modules << "kpilot_config.desktop"; return modules; } -void SummaryWidget::receiveDaemonStatusDetails(QDateTime lastSyncTime, QString status, QStringList conduits, QString logFileName, QString userName, QString pilotDevice, bool killOnExit ) +void SummaryWidget::receiveDaemonStatusDetails(TQDateTime lastSyncTime, TQString status, TQStringList conduits, TQString logFileName, TQString userName, TQString pilotDevice, bool killOnExit ) { mDCOPSuccess = true; mLastSyncTime = lastSyncTime; @@ -192,43 +192,43 @@ void SummaryWidget::updateView() mNoConnectionStartLabel->setShown( !mDCOPSuccess ); } -void SummaryWidget::showSyncLog( const QString &filename ) +void SummaryWidget::showSyncLog( const TQString &filename ) { - KDialogBase dlg( this, 0, true, QString::null, KDialogBase::Ok, KDialogBase::Ok ); + KDialogBase dlg( this, 0, true, TQString::null, KDialogBase::Ok, KDialogBase::Ok ); dlg.setCaption( i18n( "KPilot HotSync Log" ) ); - QTextEdit *edit = new QTextEdit( dlg.makeVBoxMainWidget() ); + TQTextEdit *edit = new TQTextEdit( dlg.makeVBoxMainWidget() ); edit->setReadOnly( true ); - QFile f(filename); + TQFile f(filename); if ( !f.open( IO_ReadOnly ) ) { KMessageBox::error( this, i18n( "Unable to open Hotsync log %1." ).arg( filename ) ); return; } - QTextStream s( &f ); + TQTextStream s( &f ); while ( !s.eof() ) edit->append( s.readLine() ); - edit->moveCursor( QTextEdit::MoveHome, false ); + edit->moveCursor( TQTextEdit::MoveHome, false ); f.close(); - dlg.setInitialSize( QSize( 400, 350 ) ); + dlg.setInitialSize( TQSize( 400, 350 ) ); dlg.exec(); } void SummaryWidget::startKPilot() { - QString error; - QCString appID; - if ( !KApplication::kdeinitExec( "kpilotDaemon", QString( "--fail-silently" ) ) ) { + TQString error; + TQCString appID; + if ( !KApplication::kdeinitExec( "kpilotDaemon", TQString( "--fail-silently" ) ) ) { kdDebug(5602) << "No service available..." << endl; mStartedDaemon = true; } } -void SummaryWidget::slotAppRemoved( const QCString & appId ) +void SummaryWidget::slotAppRemoved( const TQCString & appId ) { if ( appId == "kpilotDaemon" ) { |