diff options
Diffstat (limited to 'kontact/plugins/kpilot')
-rw-r--r-- | kontact/plugins/kpilot/kpilot_plugin.cpp | 4 | ||||
-rw-r--r-- | kontact/plugins/kpilot/kpilot_plugin.h | 6 | ||||
-rw-r--r-- | kontact/plugins/kpilot/summarywidget.cpp | 88 | ||||
-rw-r--r-- | kontact/plugins/kpilot/summarywidget.h | 62 |
4 files changed, 80 insertions, 80 deletions
diff --git a/kontact/plugins/kpilot/kpilot_plugin.cpp b/kontact/plugins/kpilot/kpilot_plugin.cpp index ed6104bd4..953c5f255 100644 --- a/kontact/plugins/kpilot/kpilot_plugin.cpp +++ b/kontact/plugins/kpilot/kpilot_plugin.cpp @@ -34,7 +34,7 @@ typedef KGenericFactory< KPilotPlugin, Kontact::Core > KPilotPluginFactory; K_EXPORT_COMPONENT_FACTORY( libkontact_kpilotplugin, KPilotPluginFactory( "kontact_kpilotplugin" ) ) -KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const QStringList& ) +KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& ) : Kontact::Plugin( core, core, "kpilot" ), mAboutData( 0 ) { setInstance( KPilotPluginFactory::instance() ); @@ -43,7 +43,7 @@ KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const QString } -Kontact::Summary *KPilotPlugin::createSummaryWidget( QWidget *parentWidget ) +Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget ) { return new SummaryWidget( parentWidget ); } diff --git a/kontact/plugins/kpilot/kpilot_plugin.h b/kontact/plugins/kpilot/kpilot_plugin.h index 9b76bd644..5695d2605 100644 --- a/kontact/plugins/kpilot/kpilot_plugin.h +++ b/kontact/plugins/kpilot/kpilot_plugin.h @@ -30,13 +30,13 @@ class SummaryWidget; class KPilotPlugin : public Kontact::Plugin { public: - KPilotPlugin( Kontact::Core *core, const char *name, const QStringList& ); + KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& ); KPilotPlugin(); - virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget ); + virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget ); virtual bool showInSideBar() const { return false; } -// virtual QStringList configModules() const; +// virtual TQStringList configModules() const; const KAboutData *aboutData(); 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" ) { diff --git a/kontact/plugins/kpilot/summarywidget.h b/kontact/plugins/kpilot/summarywidget.h index 94fda7e55..ab221b4c2 100644 --- a/kontact/plugins/kpilot/summarywidget.h +++ b/kontact/plugins/kpilot/summarywidget.h @@ -30,13 +30,13 @@ #include <dcopobject.h> #include <pilotDaemonDCOP.h> -#include <qmap.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qdatetime.h> +#include <tqmap.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqdatetime.h> class QGridLayout; class QLabel; @@ -48,47 +48,47 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject K_DCOP public: - SummaryWidget( QWidget *parent, const char *name = 0 ); + SummaryWidget( TQWidget *parent, const char *name = 0 ); virtual ~SummaryWidget(); int summaryHeight() const { return 1; } - QStringList configModules() const; + TQStringList configModules() const; k_dcop: // all the information is pushed to Kontact by the daemon, to remove the chance of Kontact calling a daemon // that is blocked for some reason, and blocking itself. - void receiveDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool ); + void receiveDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool ); private slots: void updateView(); - void showSyncLog( const QString &filename ); + void showSyncLog( const TQString &filename ); void startKPilot(); - void slotAppRemoved( const QCString & ); + void slotAppRemoved( const TQCString & ); private: - QTimer mTimer; + TQTimer mTimer; - QLabel*mSyncTimeTextLabel; - QLabel*mSyncTimeLabel; + TQLabel*mSyncTimeTextLabel; + TQLabel*mSyncTimeLabel; KURLLabel*mShowSyncLogLabel; - QLabel*mPilotUserTextLabel; - QLabel*mPilotUserLabel; - QLabel*mPilotDeviceTextLabel; - QLabel*mPilotDeviceLabel; - QLabel*mDaemonStatusTextLabel; - QLabel*mDaemonStatusLabel; - QLabel*mConduitsTextLabel; - QLabel*mConduitsLabel; - QLabel*mNoConnectionLabel; + TQLabel*mPilotUserTextLabel; + TQLabel*mPilotUserLabel; + TQLabel*mPilotDeviceTextLabel; + TQLabel*mPilotDeviceLabel; + TQLabel*mDaemonStatusTextLabel; + TQLabel*mDaemonStatusLabel; + TQLabel*mConduitsTextLabel; + TQLabel*mConduitsLabel; + TQLabel*mNoConnectionLabel; KURLLabel*mNoConnectionStartLabel; - QGridLayout *mLayout; + TQGridLayout *mLayout; - QDateTime mLastSyncTime; - QString mDaemonStatus; - QStringList mConduits; - QString mSyncLog; - QString mUserName; - QString mPilotDevice; + TQDateTime mLastSyncTime; + TQString mDaemonStatus; + TQStringList mConduits; + TQString mSyncLog; + TQString mUserName; + TQString mPilotDevice; bool mDCOPSuccess; bool mStartedDaemon; // Record whether the daemon was started by kontact |