summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/groupitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/src/groupitem.cpp')
-rw-r--r--kitchensync/src/groupitem.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/kitchensync/src/groupitem.cpp b/kitchensync/src/groupitem.cpp
index 3a294f5ba..ed240cd32 100644
--- a/kitchensync/src/groupitem.cpp
+++ b/kitchensync/src/groupitem.cpp
@@ -28,7 +28,7 @@
#include <kurllabel.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.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 *tqlayout = new TQGridLayout( this, 4, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = 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->tqsizeHint() );
- mIcon->setPaletteBackgroundColor( tqcolorGroup().mid() );
+ mIcon->setFixedSize( mIcon->sizeHint() );
+ mIcon->setPaletteBackgroundColor( colorGroup().mid() );
mGroupName = new TQLabel( hbox );
- mGroupName->tqsetAlignment( AlignLeft | AlignVCenter );
+ mGroupName->setAlignment( AlignLeft | AlignVCenter );
mGroupName->setIndent( KDialog::spacingHint() );
mGroupName->setFont( boldFont );
- 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() );
+ 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() );
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" ).tqarg( mSyncProcess->group().name() ) );
+ mGroupName->setText( i18n( "Group: %1" ).arg( mSyncProcess->group().name() ) );
TQDateTime dateTime = mSyncProcess->group().lastSynchronization();
if ( dateTime.isValid() )
- mTime->setText( i18n( "Last synchronized on: %1" ).tqarg( KGlobal::locale()->formatDateTime( dateTime ) ) );
+ mTime->setText( i18n( "Last synchronized on: %1" ).arg( 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++;
- mtqStatus->setText( i18n( "%1 entries read" ).tqarg( mProcessedItems ) );
+ mStatus->setText( i18n( "%1 entries read" ).arg( mProcessedItems ) );
break;
case QSync::SyncChangeUpdate::ReceivedInfo:
- mtqStatus->setText( i18n( "Receive information" ) );
+ mStatus->setText( i18n( "Receive information" ) );
break;
case QSync::SyncChangeUpdate::Sent:
mProcessedItems--;
- mtqStatus->setText( i18n( "%1 entries written" ).tqarg( mMaxProcessedItems - mProcessedItems ) );
+ mStatus->setText( i18n( "%1 entries written" ).arg( mMaxProcessedItems - mProcessedItems ) );
mProgressBar->show();
@@ -212,15 +212,15 @@ void GroupItem::change( const QSync::SyncChangeUpdate &update )
}
break;
case QSync::SyncChangeUpdate::WriteError:
- mtqStatus->setText( i18n( "Error" ) );
+ mStatus->setText( i18n( "Error" ) );
KPassivePopup::message( update.result().message(), this );
break;
case QSync::SyncChangeUpdate::ReceiveError:
- mtqStatus->setText( i18n( "Error" ) );
+ mStatus->setText( i18n( "Error" ) );
KPassivePopup::message( update.result().message(), this );
break;
default:
- mtqStatus->setText( TQString() );
+ mStatus->setText( TQString() );
break;
}
}
@@ -233,24 +233,24 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update )
{
switch ( update.type() ) {
case QSync::SyncEngineUpdate::EndPhaseConnected:
- mtqStatus->setText( i18n( "Connected" ) );
+ mStatus->setText( i18n( "Connected" ) );
mProgressBar->setProgress( 0 );
mSynchronizing = true;
mSyncAction->setText( "Abort Synchronization" );
break;
case QSync::SyncEngineUpdate::EndPhaseRead:
- mtqStatus->setText( i18n( "Data read" ) );
+ mStatus->setText( i18n( "Data read" ) );
break;
case QSync::SyncEngineUpdate::EndPhaseWrite:
- mtqStatus->setText( i18n( "Data written" ) );
+ mStatus->setText( i18n( "Data written" ) );
mProgressBar->setProgress( 100 );
mProcessedItems = mMaxProcessedItems = 0;
break;
case QSync::SyncEngineUpdate::EndPhaseDisconnected:
- mtqStatus->setText( i18n( "Disconnected" ) );
+ mStatus->setText( i18n( "Disconnected" ) );
break;
case QSync::SyncEngineUpdate::Error:
- mtqStatus->setText( i18n( "Synchronization failed" ) );
+ mStatus->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:
- mtqStatus->setText( i18n( "Successfully synchronized" ) );
- mSyncProcess->group().setLastSynchronization( TQDateTime::tqcurrentDateTime() );
+ mStatus->setText( i18n( "Successfully synchronized" ) );
+ mSyncProcess->group().setLastSynchronization( TQDateTime::currentDateTime() );
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:
- mtqStatus->setText( i18n( "Previous synchronization failed" ) );
+ mStatus->setText( i18n( "Previous synchronization failed" ) );
break;
case QSync::SyncEngineUpdate::EndConflicts:
- mtqStatus->setText( i18n( "Conflicts solved" ) );
+ mStatus->setText( i18n( "Conflicts solved" ) );
mMaxProcessedItems = mProcessedItems;
break;
default:
- mtqStatus->setText( TQString() );
+ mStatus->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" ).tqarg( update.result().message() ) );
+ (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
break;
case QSync::SyncMemberUpdate::GetChangesError:
- (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) );
+ (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
break;
case QSync::SyncMemberUpdate::CommittedAllError:
- (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) );
+ (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
break;
case QSync::SyncMemberUpdate::SyncDoneError:
- (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) );
+ (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
break;
case QSync::SyncMemberUpdate::DisconnectedError:
- (*it)->seStatusMessage( i18n( "Error: %1" ).tqarg( update.result().message() ) );
+ (*it)->seStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
break;
default:
break;
@@ -358,24 +358,24 @@ MemberItem::MemberItem( TQWidget *parent, SyncProcess *process,
QSync::Plugin plugin = member.plugin();
- TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
TQHBox* box = new TQHBox( this );
box->setMargin( 5 );
box->setSpacing( 6 );
- tqlayout->addWidget( box );
+ layout->addWidget( box );
mIcon = new TQLabel( box );
mIcon->setPixmap( icon );
- mIcon->tqsetAlignment( TQt::AlignTop );
- mIcon->setFixedWidth( mIcon->tqsizeHint().width() );
+ mIcon->setAlignment( TQt::AlignTop );
+ mIcon->setFixedWidth( mIcon->sizeHint().width() );
TQVBox *nameBox = new TQVBox( box );
mMemberName = new TQLabel( nameBox );
mMemberName->setFont( boldFont );
mDescription = new TQLabel( nameBox );
- mtqStatus = new TQLabel( box );
+ mStatus = 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 )
{
- mtqStatus->setText( msg );
+ mStatus->setText( msg );
}
#include "groupitem.moc"