diff options
Diffstat (limited to 'kitchensync/src/groupitem.cpp')
-rw-r--r-- | kitchensync/src/groupitem.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/kitchensync/src/groupitem.cpp b/kitchensync/src/groupitem.cpp index ed240cd32..3a294f5ba 100644 --- a/kitchensync/src/groupitem.cpp +++ b/kitchensync/src/groupitem.cpp @@ -28,7 +28,7 @@ #include <kurllabel.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpixmap.h> #include <tqprogressbar.h> #include <tqvbox.h> @@ -50,7 +50,7 @@ GroupItem::GroupItem( KWidgetList *parent, SyncProcess *process ) boldFont.setBold( true ); boldFont.setPointSize( boldFont.pointSize() + 2 ); - TQGridLayout *layout = new TQGridLayout( this, 4, 4, KDialog::marginHint(), KDialog::spacingHint() ); + TQGridLayout *tqlayout = new TQGridLayout( this, 4, 4, KDialog::marginHint(), KDialog::spacingHint() ); mBox = new TQVBox( this ); mBox->setMargin( 5 ); @@ -71,38 +71,38 @@ GroupItem::GroupItem( KWidgetList *parent, SyncProcess *process ) mIcon = new TQLabel( hbox ); mIcon->setPixmap( icon ); - mIcon->setFixedSize( mIcon->sizeHint() ); - mIcon->setPaletteBackgroundColor( colorGroup().mid() ); + mIcon->setFixedSize( mIcon->tqsizeHint() ); + mIcon->setPaletteBackgroundColor( tqcolorGroup().mid() ); mGroupName = new TQLabel( hbox ); - mGroupName->setAlignment( AlignLeft | AlignVCenter ); + mGroupName->tqsetAlignment( AlignLeft | AlignVCenter ); mGroupName->setIndent( KDialog::spacingHint() ); mGroupName->setFont( boldFont ); - mGroupName->setPaletteForegroundColor( colorGroup().light() ); - mGroupName->setPaletteBackgroundColor( colorGroup().mid() ); - - mStatus = new TQLabel( hbox ); - mStatus->setAlignment( TQt::AlignRight ); - mStatus->setAlignment( AlignRight | AlignVCenter ); - mStatus->setIndent( KDialog::spacingHint() ); - mStatus->setFont( boldFont ); - mStatus->setPaletteForegroundColor( colorGroup().light() ); - mStatus->setPaletteBackgroundColor( colorGroup().mid() ); - mStatus->setText( i18n( "Ready" ) ); - - hbox->setPaletteBackgroundColor( colorGroup().mid() ); - hbox->setMaximumHeight( hbox->minimumSizeHint().height() ); - - layout->addMultiCellWidget( hbox, 0, 0, 0, 3 ); - layout->addMultiCellWidget( mBox, 1, 1, 0, 3 ); - layout->addWidget( mTime, 2, 0 ); - layout->addWidget( mSyncAction, 2, 1 ); - layout->addWidget( mConfigureAction, 2, 2 ); - layout->addWidget( mProgressBar, 2, 3 ); - layout->setColStretch( 0, 1 ); - layout->setRowStretch( 3, 1 ); - - setPaletteBackgroundColor( kapp->palette().active().base() ); + mGroupName->setPaletteForegroundColor( tqcolorGroup().light() ); + mGroupName->setPaletteBackgroundColor( tqcolorGroup().mid() ); + + mtqStatus = new TQLabel( hbox ); + mtqStatus->tqsetAlignment( TQt::AlignRight ); + mtqStatus->tqsetAlignment( AlignRight | AlignVCenter ); + mtqStatus->setIndent( KDialog::spacingHint() ); + mtqStatus->setFont( boldFont ); + mtqStatus->setPaletteForegroundColor( tqcolorGroup().light() ); + mtqStatus->setPaletteBackgroundColor( tqcolorGroup().mid() ); + mtqStatus->setText( i18n( "Ready" ) ); + + hbox->setPaletteBackgroundColor( tqcolorGroup().mid() ); + hbox->setMaximumHeight( hbox->tqminimumSizeHint().height() ); + + tqlayout->addMultiCellWidget( hbox, 0, 0, 0, 3 ); + tqlayout->addMultiCellWidget( mBox, 1, 1, 0, 3 ); + tqlayout->addWidget( mTime, 2, 0 ); + tqlayout->addWidget( mSyncAction, 2, 1 ); + tqlayout->addWidget( mConfigureAction, 2, 2 ); + tqlayout->addWidget( mProgressBar, 2, 3 ); + tqlayout->setColStretch( 0, 1 ); + tqlayout->setRowStretch( 3, 1 ); + + setPaletteBackgroundColor( kapp->tqpalette().active().base() ); connect( mCallbackHandler, TQT_SIGNAL( conflict( QSync::SyncMapping ) ), this, TQT_SLOT( conflict( QSync::SyncMapping ) ) ); @@ -139,11 +139,11 @@ void GroupItem::update() { clear(); - mGroupName->setText( i18n( "Group: %1" ).arg( mSyncProcess->group().name() ) ); + mGroupName->setText( i18n( "Group: %1" ).tqarg( mSyncProcess->group().name() ) ); TQDateTime dateTime = mSyncProcess->group().lastSynchronization(); if ( dateTime.isValid() ) - mTime->setText( i18n( "Last synchronized on: %1" ).arg( KGlobal::locale()->formatDateTime( dateTime ) ) ); + mTime->setText( i18n( "Last synchronized on: %1" ).tqarg( KGlobal::locale()->formatDateTime( dateTime ) ) ); else mTime->setText( i18n( "Not synchronized yet" ) ); @@ -189,14 +189,14 @@ void GroupItem::change( const QSync::SyncChangeUpdate &update ) switch ( update.type() ) { case QSync::SyncChangeUpdate::Received: mProcessedItems++; - mStatus->setText( i18n( "%1 entries read" ).arg( mProcessedItems ) ); + mtqStatus->setText( i18n( "%1 entries read" ).tqarg( mProcessedItems ) ); break; case QSync::SyncChangeUpdate::ReceivedInfo: - mStatus->setText( i18n( "Receive information" ) ); + mtqStatus->setText( i18n( "Receive information" ) ); break; case QSync::SyncChangeUpdate::Sent: mProcessedItems--; - mStatus->setText( i18n( "%1 entries written" ).arg( mMaxProcessedItems - mProcessedItems ) ); + mtqStatus->setText( i18n( "%1 entries written" ).tqarg( mMaxProcessedItems - mProcessedItems ) ); mProgressBar->show(); @@ -212,15 +212,15 @@ void GroupItem::change( const QSync::SyncChangeUpdate &update ) } break; case QSync::SyncChangeUpdate::WriteError: - mStatus->setText( i18n( "Error" ) ); + mtqStatus->setText( i18n( "Error" ) ); KPassivePopup::message( update.result().message(), this ); break; case QSync::SyncChangeUpdate::ReceiveError: - mStatus->setText( i18n( "Error" ) ); + mtqStatus->setText( i18n( "Error" ) ); KPassivePopup::message( update.result().message(), this ); break; default: - mStatus->setText( TQString() ); + mtqStatus->setText( TQString() ); break; } } @@ -233,24 +233,24 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update ) { switch ( update.type() ) { case QSync::SyncEngineUpdate::EndPhaseConnected: - mStatus->setText( i18n( "Connected" ) ); + mtqStatus->setText( i18n( "Connected" ) ); mProgressBar->setProgress( 0 ); mSynchronizing = true; mSyncAction->setText( "Abort Synchronization" ); break; case QSync::SyncEngineUpdate::EndPhaseRead: - mStatus->setText( i18n( "Data read" ) ); + mtqStatus->setText( i18n( "Data read" ) ); break; case QSync::SyncEngineUpdate::EndPhaseWrite: - mStatus->setText( i18n( "Data written" ) ); + mtqStatus->setText( i18n( "Data written" ) ); mProgressBar->setProgress( 100 ); mProcessedItems = mMaxProcessedItems = 0; break; case QSync::SyncEngineUpdate::EndPhaseDisconnected: - mStatus->setText( i18n( "Disconnected" ) ); + mtqStatus->setText( i18n( "Disconnected" ) ); break; case QSync::SyncEngineUpdate::Error: - mStatus->setText( i18n( "Synchronization failed" ) ); + mtqStatus->setText( i18n( "Synchronization failed" ) ); KPassivePopup::message( update.result().message(), this ); this->update(); @@ -258,8 +258,8 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update ) mSyncAction->setText( i18n( "Synchronize Now" ) ); break; case QSync::SyncEngineUpdate::SyncSuccessfull: - mStatus->setText( i18n( "Successfully synchronized" ) ); - mSyncProcess->group().setLastSynchronization( TQDateTime::currentDateTime() ); + mtqStatus->setText( i18n( "Successfully synchronized" ) ); + mSyncProcess->group().setLastSynchronization( TQDateTime::tqcurrentDateTime() ); mSyncProcess->group().save(); this->update(); @@ -267,14 +267,14 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update ) mSyncAction->setText( i18n( "Synchronize Now" ) ); break; case QSync::SyncEngineUpdate::PrevUnclean: - mStatus->setText( i18n( "Previous synchronization failed" ) ); + mtqStatus->setText( i18n( "Previous synchronization failed" ) ); break; case QSync::SyncEngineUpdate::EndConflicts: - mStatus->setText( i18n( "Conflicts solved" ) ); + mtqStatus->setText( i18n( "Conflicts solved" ) ); mMaxProcessedItems = mProcessedItems; break; default: - mStatus->setText( TQString() ); + mtqStatus->setText( TQString() ); break; } } @@ -298,19 +298,19 @@ void GroupItem::member( const QSync::SyncMemberUpdate &update ) (*it)->seStatusMessage( i18n( "Disconnected" ) ); break; case QSync::SyncMemberUpdate::ConnectError: - (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) ); + (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) ); break; case QSync::SyncMemberUpdate::GetChangesError: - (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) ); + (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) ); break; case QSync::SyncMemberUpdate::CommittedAllError: - (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) ); + (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) ); break; case QSync::SyncMemberUpdate::SyncDoneError: - (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) ); + (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) ); break; case QSync::SyncMemberUpdate::DisconnectedError: - (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) ); + (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) ); break; default: break; @@ -358,24 +358,24 @@ MemberItem::MemberItem( TQWidget *parent, SyncProcess *process, QSync::Plugin plugin = member.plugin(); - TQVBoxLayout *layout = new TQVBoxLayout( this ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); TQHBox* box = new TQHBox( this ); box->setMargin( 5 ); box->setSpacing( 6 ); - layout->addWidget( box ); + tqlayout->addWidget( box ); mIcon = new TQLabel( box ); mIcon->setPixmap( icon ); - mIcon->setAlignment( TQt::AlignTop ); - mIcon->setFixedWidth( mIcon->sizeHint().width() ); + mIcon->tqsetAlignment( TQt::AlignTop ); + mIcon->setFixedWidth( mIcon->tqsizeHint().width() ); TQVBox *nameBox = new TQVBox( box ); mMemberName = new TQLabel( nameBox ); mMemberName->setFont( boldFont ); mDescription = new TQLabel( nameBox ); - mStatus = new TQLabel( box ); + mtqStatus = new TQLabel( box ); mMemberName->setText( member.name() ); mDescription->setText( plugin.longName() ); @@ -383,7 +383,7 @@ MemberItem::MemberItem( TQWidget *parent, SyncProcess *process, void MemberItem::seStatusMessage( const TQString &msg ) { - mStatus->setText( msg ); + mtqStatus->setText( msg ); } #include "groupitem.moc" |