kpilot/kpilot

kpilotConfigDialog_viewers.cc

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kpilotConfigDialog_viewers.ui'
00005 **
00006 ** Created: Fri May 21 15:27:39 2010
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "kpilotConfigDialog_viewers.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qgroupbox.h>
00016 #include <qcheckbox.h>
00017 #include <qbuttongroup.h>
00018 #include <qradiobutton.h>
00019 #include <qframe.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /*
00025  *  Constructs a ViewersConfigWidget as a child of 'parent', with the
00026  *  name 'name' and widget flags set to 'f'.
00027  */
00028 ViewersConfigWidget::ViewersConfigWidget( QWidget* parent, const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "ViewersForm" );
00033     ViewersFormLayout = new QVBoxLayout( this, 0, 6, "ViewersFormLayout"); 
00034 
00035     groupBox2 = new QGroupBox( this, "groupBox2" );
00036     groupBox2->setColumnLayout(0, Qt::Vertical );
00037     groupBox2->layout()->setSpacing( 6 );
00038     groupBox2->layout()->setMargin( 11 );
00039     groupBox2Layout = new QVBoxLayout( groupBox2->layout() );
00040     groupBox2Layout->setAlignment( Qt::AlignTop );
00041 
00042     fInternalEditors = new QCheckBox( groupBox2, "fInternalEditors" );
00043     fInternalEditors->setEnabled( FALSE );
00044     fInternalEditors->setChecked( FALSE );
00045     groupBox2Layout->addWidget( fInternalEditors );
00046 
00047     fUseSecret = new QCheckBox( groupBox2, "fUseSecret" );
00048     groupBox2Layout->addWidget( fUseSecret );
00049     ViewersFormLayout->addWidget( groupBox2 );
00050 
00051     fAddressGroup = new QButtonGroup( this, "fAddressGroup" );
00052     fAddressGroup->setColumnLayout(0, Qt::Vertical );
00053     fAddressGroup->layout()->setSpacing( 6 );
00054     fAddressGroup->layout()->setMargin( 11 );
00055     fAddressGroupLayout = new QGridLayout( fAddressGroup->layout() );
00056     fAddressGroupLayout->setAlignment( Qt::AlignTop );
00057 
00058     fNormalDisplay = new QRadioButton( fAddressGroup, "fNormalDisplay" );
00059 
00060     fAddressGroupLayout->addWidget( fNormalDisplay, 0, 0 );
00061 
00062     fCompanyDisplay = new QRadioButton( fAddressGroup, "fCompanyDisplay" );
00063 
00064     fAddressGroupLayout->addWidget( fCompanyDisplay, 1, 0 );
00065 
00066     line1 = new QFrame( fAddressGroup, "line1" );
00067     line1->setFrameShape( QFrame::HLine );
00068     line1->setFrameShadow( QFrame::Sunken );
00069     line1->setFrameShape( QFrame::HLine );
00070 
00071     fAddressGroupLayout->addWidget( line1, 2, 0 );
00072 
00073     fUseKeyField = new QCheckBox( fAddressGroup, "fUseKeyField" );
00074 
00075     fAddressGroupLayout->addWidget( fUseKeyField, 3, 0 );
00076     ViewersFormLayout->addWidget( fAddressGroup );
00077     spacer1 = new QSpacerItem( 20, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
00078     ViewersFormLayout->addItem( spacer1 );
00079     languageChange();
00080     resize( QSize(610, 325).expandedTo(minimumSizeHint()) );
00081     clearWState( WState_Polished );
00082 }
00083 
00084 /*
00085  *  Destroys the object and frees any allocated resources
00086  */
00087 ViewersConfigWidget::~ViewersConfigWidget()
00088 {
00089     // no need to delete child widgets, Qt does it all for us
00090 }
00091 
00092 /*
00093  *  Sets the strings of the subwidgets using the current
00094  *  language.
00095  */
00096 void ViewersConfigWidget::languageChange()
00097 {
00098     setCaption( tr2i18n( "KPilot Options" ) );
00099     groupBox2->setTitle( tr2i18n( "Viewers" ) );
00100     fInternalEditors->setText( tr2i18n( "Make internal viewers &editable" ) );
00101     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>" ) );
00102     fUseSecret->setText( tr2i18n( "&Show private records" ) );
00103     QWhatsThis::add( fUseSecret, tr2i18n( "<qt>Check this box to display in the internal viewers records that are marked &quot;Private&quot; in the Pilot.</qt>" ) );
00104     fAddressGroup->setTitle( tr2i18n( "Address Viewer" ) );
00105     fNormalDisplay->setText( tr2i18n( "Show as \"&Last, first\"" ) );
00106     QWhatsThis::add( fNormalDisplay, tr2i18n( "<qt>Select this option to display addresses in the internal address viewer sorted by last name, first name.</qt>" ) );
00107     fCompanyDisplay->setText( tr2i18n( "Show as \"&Company, last\"" ) );
00108     QWhatsThis::add( fCompanyDisplay, tr2i18n( "<qt>Select this option to display addresses in the internal address viewer sorted by company name, last name.</qt>" ) );
00109     fUseKeyField->setText( tr2i18n( "&Use key field" ) );
00110     QWhatsThis::add( fUseKeyField, tr2i18n( "<qt>Check this box to combine all entries with the same last name in the internal address viewer.</qt>" ) );
00111 }
00112 
00113 #include "kpilotConfigDialog_viewers.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys