kmail

snippetsettingsbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './snippetsettingsbase.ui'
00005 **
00006 ** Created: Sat Aug 23 13:39:37 2008
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "snippetsettingsbase.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 <qlabel.h>
00021 #include <klineedit.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 #include "klineedit.h"
00026 
00027 /*
00028  *  Constructs a SnippetSettingsBase as a child of 'parent', with the
00029  *  name 'name' and widget flags set to 'f'.
00030  */
00031 SnippetSettingsBase::SnippetSettingsBase( QWidget* parent, const char* name, WFlags fl )
00032     : QWidget( parent, name, fl )
00033 {
00034     if ( !name )
00035     setName( "SnippetSettingsBase" );
00036     SnippetSettingsBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "SnippetSettingsBaseLayout"); 
00037 
00038     groupBox1 = new QGroupBox( this, "groupBox1" );
00039     groupBox1->setColumnLayout(0, Qt::Vertical );
00040     groupBox1->layout()->setSpacing( 6 );
00041     groupBox1->layout()->setMargin( 11 );
00042     groupBox1Layout = new QGridLayout( groupBox1->layout() );
00043     groupBox1Layout->setAlignment( Qt::AlignTop );
00044 
00045     cbToolTip = new QCheckBox( groupBox1, "cbToolTip" );
00046     cbToolTip->setChecked( TRUE );
00047 
00048     groupBox1Layout->addWidget( cbToolTip, 0, 0 );
00049 
00050     SnippetSettingsBaseLayout->addWidget( groupBox1, 0, 0 );
00051     spacer2 = new QSpacerItem( 20, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
00052     SnippetSettingsBaseLayout->addItem( spacer2, 3, 0 );
00053 
00054     buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
00055     buttonGroup1->setColumnLayout(0, Qt::Vertical );
00056     buttonGroup1->layout()->setSpacing( 6 );
00057     buttonGroup1->layout()->setMargin( 11 );
00058     buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
00059     buttonGroup1Layout->setAlignment( Qt::AlignTop );
00060 
00061     btnGroup = new QButtonGroup( buttonGroup1, "btnGroup" );
00062     btnGroup->setColumnLayout(0, Qt::Vertical );
00063     btnGroup->layout()->setSpacing( 6 );
00064     btnGroup->layout()->setMargin( 11 );
00065     btnGroupLayout = new QGridLayout( btnGroup->layout() );
00066     btnGroupLayout->setAlignment( Qt::AlignTop );
00067 
00068     rbSingle = new QRadioButton( btnGroup, "rbSingle" );
00069     rbSingle->setChecked( TRUE );
00070 
00071     btnGroupLayout->addWidget( rbSingle, 0, 0 );
00072 
00073     rbAll = new QRadioButton( btnGroup, "rbAll" );
00074     rbAll->setChecked( FALSE );
00075 
00076     btnGroupLayout->addWidget( rbAll, 1, 0 );
00077 
00078     buttonGroup1Layout->addWidget( btnGroup, 1, 0 );
00079 
00080     layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); 
00081 
00082     textLabel1 = new QLabel( buttonGroup1, "textLabel1" );
00083     layout1->addWidget( textLabel1 );
00084 
00085     leDelimiter = new KLineEdit( buttonGroup1, "leDelimiter" );
00086     leDelimiter->setMaximumSize( QSize( 40, 32767 ) );
00087     leDelimiter->setMaxLength( 1 );
00088     layout1->addWidget( leDelimiter );
00089     spacer3 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00090     layout1->addItem( spacer3 );
00091 
00092     buttonGroup1Layout->addLayout( layout1, 0, 0 );
00093 
00094     SnippetSettingsBaseLayout->addWidget( buttonGroup1, 1, 0 );
00095     languageChange();
00096     resize( QSize(574, 398).expandedTo(minimumSizeHint()) );
00097     clearWState( WState_Polished );
00098 }
00099 
00100 /*
00101  *  Destroys the object and frees any allocated resources
00102  */
00103 SnippetSettingsBase::~SnippetSettingsBase()
00104 {
00105     // no need to delete child widgets, Qt does it all for us
00106 }
00107 
00108 /*
00109  *  Sets the strings of the subwidgets using the current
00110  *  language.
00111  */
00112 void SnippetSettingsBase::languageChange()
00113 {
00114     setCaption( tr2i18n( "Snippet Settings" ) );
00115     groupBox1->setTitle( tr2i18n( "Tooltips" ) );
00116     cbToolTip->setText( tr2i18n( "Show snippet's text in &tooltip" ) );
00117     QToolTip::add( cbToolTip, tr2i18n( "Decides if a tooltip should be shown containing text from the bookmarked line" ) );
00118     buttonGroup1->setTitle( tr2i18n( "Variables" ) );
00119     btnGroup->setTitle( tr2i18n( "Input Method for Variables" ) );
00120     rbSingle->setText( tr2i18n( "Single dialog for each variable within a snippet" ) );
00121     rbSingle->setAccel( QKeySequence( QString::null ) );
00122     QToolTip::add( rbSingle, tr2i18n( "An input dialog will be displayed for every variable within a snippet" ) );
00123     rbAll->setText( tr2i18n( "One dialog for all variables within a snippet" ) );
00124     rbAll->setAccel( QKeySequence( QString::null ) );
00125     QToolTip::add( rbAll, tr2i18n( "A single dialog will be displayed where you can enter the values for all variables within a snippet" ) );
00126     textLabel1->setText( tr2i18n( "Delimiter:" ) );
00127 }
00128 
00129 #include "snippetsettingsbase.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys