00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "kpilotConfigDialog_viewers.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qcheckbox.h>
00018 #include <qbuttongroup.h>
00019 #include <qradiobutton.h>
00020 #include <qframe.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024
00025
00026
00027
00028
00029 ViewersConfigWidget::ViewersConfigWidget( QWidget* parent, const char* name, WFlags fl )
00030 : QWidget( parent, name, fl )
00031 {
00032 if ( !name )
00033 setName( "ViewersForm" );
00034 ViewersFormLayout = new QVBoxLayout( this, 0, 6, "ViewersFormLayout");
00035
00036 groupBox2 = new QGroupBox( this, "groupBox2" );
00037 groupBox2->setColumnLayout(0, Qt::Vertical );
00038 groupBox2->layout()->setSpacing( 6 );
00039 groupBox2->layout()->setMargin( 11 );
00040 groupBox2Layout = new QVBoxLayout( groupBox2->layout() );
00041 groupBox2Layout->setAlignment( Qt::AlignTop );
00042
00043 fInternalEditors = new QCheckBox( groupBox2, "fInternalEditors" );
00044 fInternalEditors->setEnabled( FALSE );
00045 fInternalEditors->setChecked( FALSE );
00046 groupBox2Layout->addWidget( fInternalEditors );
00047
00048 fUseSecret = new QCheckBox( groupBox2, "fUseSecret" );
00049 groupBox2Layout->addWidget( fUseSecret );
00050 ViewersFormLayout->addWidget( groupBox2 );
00051
00052 fAddressGroup = new QButtonGroup( this, "fAddressGroup" );
00053 fAddressGroup->setColumnLayout(0, Qt::Vertical );
00054 fAddressGroup->layout()->setSpacing( 6 );
00055 fAddressGroup->layout()->setMargin( 11 );
00056 fAddressGroupLayout = new QGridLayout( fAddressGroup->layout() );
00057 fAddressGroupLayout->setAlignment( Qt::AlignTop );
00058
00059 fNormalDisplay = new QRadioButton( fAddressGroup, "fNormalDisplay" );
00060
00061 fAddressGroupLayout->addWidget( fNormalDisplay, 0, 0 );
00062
00063 fCompanyDisplay = new QRadioButton( fAddressGroup, "fCompanyDisplay" );
00064
00065 fAddressGroupLayout->addWidget( fCompanyDisplay, 1, 0 );
00066
00067 line1 = new QFrame( fAddressGroup, "line1" );
00068 line1->setFrameShape( QFrame::HLine );
00069 line1->setFrameShadow( QFrame::Sunken );
00070 line1->setFrameShape( QFrame::HLine );
00071
00072 fAddressGroupLayout->addWidget( line1, 2, 0 );
00073
00074 fUseKeyField = new QCheckBox( fAddressGroup, "fUseKeyField" );
00075
00076 fAddressGroupLayout->addWidget( fUseKeyField, 3, 0 );
00077 ViewersFormLayout->addWidget( fAddressGroup );
00078 spacer1 = new QSpacerItem( 20, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
00079 ViewersFormLayout->addItem( spacer1 );
00080 languageChange();
00081 resize( QSize(610, 325).expandedTo(minimumSizeHint()) );
00082 clearWState( WState_Polished );
00083 }
00084
00085
00086
00087
00088 ViewersConfigWidget::~ViewersConfigWidget()
00089 {
00090
00091 }
00092
00093
00094
00095
00096
00097 void ViewersConfigWidget::languageChange()
00098 {
00099 setCaption( tr2i18n( "KPilot Options" ) );
00100 groupBox2->setTitle( tr2i18n( "Viewers" ) );
00101 fInternalEditors->setText( tr2i18n( "Make internal viewers &editable" ) );
00102 QWhatsThis::add( fInternalEditors, tr2i18n( "<qt>The internal viewers can be read only or editable. The editable mode allows you to add new records, delete or edit the existing records and sync your modifications back to the handheld. Check this box to set the internal viewers to editable mode, uncheck to set them to read only mode.</qt>" ) );
00103 fUseSecret->setText( tr2i18n( "&Show private records" ) );
00104 QWhatsThis::add( fUseSecret, tr2i18n( "<qt>Check this box to display in the internal viewers records that are marked "Private" in the Pilot.</qt>" ) );
00105 fAddressGroup->setTitle( tr2i18n( "Address Viewer" ) );
00106 fNormalDisplay->setText( tr2i18n( "Show as \"&Last, first\"" ) );
00107 QWhatsThis::add( fNormalDisplay, tr2i18n( "<qt>Select this option to display addresses in the internal address viewer sorted by last name, first name.</qt>" ) );
00108 fCompanyDisplay->setText( tr2i18n( "Show as \"&Company, last\"" ) );
00109 QWhatsThis::add( fCompanyDisplay, tr2i18n( "<qt>Select this option to display addresses in the internal address viewer sorted by company name, last name.</qt>" ) );
00110 fUseKeyField->setText( tr2i18n( "&Use key field" ) );
00111 QWhatsThis::add( fUseKeyField, tr2i18n( "<qt>Check this box to combine all entries with the same last name in the internal address viewer.</qt>" ) );
00112 }
00113
00114 #include "kpilotConfigDialog_viewers.moc"