00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "kpilotConfigDialog_sync.h"
00012
00013 #include <qvariant.h>
00014 #include <qcheckbox.h>
00015 #include <qcombobox.h>
00016 #include <qlabel.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020
00021
00022
00023
00024
00025 SyncConfigWidget::SyncConfigWidget( QWidget* parent, const char* name, WFlags fl )
00026 : QWidget( parent, name, fl )
00027 {
00028 if ( !name )
00029 setName( "SyncConfigForm" );
00030 SyncConfigFormLayout = new QGridLayout( this, 1, 1, 0, 6, "SyncConfigFormLayout");
00031
00032 fFullSyncCheck = new QCheckBox( this, "fFullSyncCheck" );
00033 fFullSyncCheck->setChecked( TRUE );
00034
00035 SyncConfigFormLayout->addWidget( fFullSyncCheck, 1, 1 );
00036
00037 fSpecialSync = new QComboBox( FALSE, this, "fSpecialSync" );
00038
00039 SyncConfigFormLayout->addWidget( fSpecialSync, 0, 1 );
00040
00041 textLabel1_2 = new QLabel( this, "textLabel1_2" );
00042
00043 SyncConfigFormLayout->addWidget( textLabel1_2, 0, 0 );
00044 spacer3 = new QSpacerItem( 20, 170, QSizePolicy::Minimum, QSizePolicy::Expanding );
00045 SyncConfigFormLayout->addItem( spacer3, 4, 1 );
00046
00047 fConflictResolution = new QComboBox( FALSE, this, "fConflictResolution" );
00048
00049 SyncConfigFormLayout->addWidget( fConflictResolution, 3, 1 );
00050
00051 textLabel1 = new QLabel( this, "textLabel1" );
00052 textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
00053
00054 SyncConfigFormLayout->addWidget( textLabel1, 3, 0 );
00055
00056 fScreenlockSecure = new QCheckBox( this, "fScreenlockSecure" );
00057 fScreenlockSecure->setChecked( TRUE );
00058
00059 SyncConfigFormLayout->addWidget( fScreenlockSecure, 2, 1 );
00060 languageChange();
00061 resize( QSize(593, 332).expandedTo(minimumSizeHint()) );
00062 clearWState( WState_Polished );
00063
00064
00065 textLabel1_2->setBuddy( fSpecialSync );
00066 textLabel1->setBuddy( fConflictResolution );
00067 }
00068
00069
00070
00071
00072 SyncConfigWidget::~SyncConfigWidget()
00073 {
00074
00075 }
00076
00077
00078
00079
00080
00081 void SyncConfigWidget::languageChange()
00082 {
00083 setCaption( tr2i18n( "KPilot Options" ) );
00084 fFullSyncCheck->setText( tr2i18n( "Do full sync when chan&ging PCs" ) );
00085 QWhatsThis::add( fFullSyncCheck, tr2i18n( "<qt>Check this box to perform a full sync when your last sync was performed with another PC or system, to guarantee the completeness of your data.</qt>" ) );
00086 fSpecialSync->clear();
00087 fSpecialSync->insertItem( tr2i18n( "HotSync (sync all changes)" ) );
00088 fSpecialSync->insertItem( tr2i18n( "FullSync (sync also unchanged records)" ) );
00089 fSpecialSync->insertItem( tr2i18n( "Copy PC to Handheld" ) );
00090 fSpecialSync->insertItem( tr2i18n( "Copy Handheld to PC" ) );
00091 QWhatsThis::add( fSpecialSync, tr2i18n( "<qt>Select in this list the synchronization type that KPilot will use as default. Possible values are:<br>\"HotSync\", to run all selected conduits, and sync the databases with a modified flag set, updating the modified records only;<br>\"FullSync\" to run all selected conduits, and sync all databases, reading all records, and performing a full backup;<br>\"Copy PC to handheld\" to run all conduits and sync all databases, but instead of merging the information from both sources, copy the PC data to the handheld;<br>\"Copy handheld to PC\" to run all conduits and sync all databases, but instead of merging the information from both sources, copy the handheld data to the PC.</qt>" ) );
00092 textLabel1_2->setText( tr2i18n( "&Default sync:" ) );
00093 fConflictResolution->clear();
00094 fConflictResolution->insertItem( tr2i18n( "Ask User" ) );
00095 fConflictResolution->insertItem( tr2i18n( "Do Nothing" ) );
00096 fConflictResolution->insertItem( tr2i18n( "Handheld Overrides" ) );
00097 fConflictResolution->insertItem( tr2i18n( "PC Overrides" ) );
00098 fConflictResolution->insertItem( tr2i18n( "Values From Last Sync (if possible)" ) );
00099 fConflictResolution->insertItem( tr2i18n( "Use Both Entries" ) );
00100 QWhatsThis::add( fConflictResolution, tr2i18n( "<qt>Select in this list how conflicting entries (entries which were edited both on your handheld and on the PC) are resolved. Possibly values are \"Ask User\" to let you decide case by case, \"Do Nothing\" to allow the entries to be different, \"PC overrides\", \"Handheld overrides\", \"Use values from last sync\" and \"Use both entries\" to create a new entry on both the PC and handheld. Note that the conflict resolution option selected here can be overridden by conduits that have their own conflict resolution configuration.</qt>" ) );
00101 textLabel1->setText( tr2i18n( "Conflict &resolution:" ) );
00102 fScreenlockSecure->setText( tr2i18n( "Do not sync when screensaver is active" ) );
00103 QWhatsThis::add( fScreenlockSecure, tr2i18n( "<qt>Check this box to prevent KPilot from syncing your handheld while the screensaver is active: this is a security measure to prevent others from syncing <i>their</i> handhelds with your data. This option must be disabled when you use a different desktop, since KPilot is not aware of screensavers other than KDE's.</qt>" ) );
00104 }
00105
00106 #include "kpilotConfigDialog_sync.moc"