configui.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './configui.ui'
00005 **
00006 ** Created: Mon Jul 16 17:55:27 2007
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 "configui.h"
00013 
00014 #include <qvariant.h>
00015 #include <keditlistbox.h>
00016 #include <kcombobox.h>
00017 #include <qpushbutton.h>
00018 #include <qgroupbox.h>
00019 #include <qcheckbox.h>
00020 #include <qlabel.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include "kcombobox.h"
00025 #include "keditlistbox.h"
00026 #include "klineedit.h"
00027 
00028 /*
00029  *  Constructs a KSpell2ConfigUI as a child of 'parent', with the
00030  *  name 'name' and widget flags set to 'f'.
00031  */
00032 KSpell2ConfigUI::KSpell2ConfigUI( QWidget* parent, const char* name, WFlags fl )
00033     : QWidget( parent, name, fl )
00034 {
00035     if ( !name )
00036     setName( "KSpell2ConfigUI" );
00037     KSpell2ConfigUILayout = new QGridLayout( this, 1, 1, 11, 6, "KSpell2ConfigUILayout"); 
00038 
00039     m_langCombo = new KComboBox( FALSE, this, "m_langCombo" );
00040 
00041     KSpell2ConfigUILayout->addWidget( m_langCombo, 0, 1 );
00042 
00043     groupBox1 = new QGroupBox( this, "groupBox1" );
00044     groupBox1->setColumnLayout(0, Qt::Vertical );
00045     groupBox1->layout()->setSpacing( 6 );
00046     groupBox1->layout()->setMargin( 11 );
00047     groupBox1Layout = new QGridLayout( groupBox1->layout() );
00048     groupBox1Layout->setAlignment( Qt::AlignTop );
00049 
00050     m_bgSpellCB = new QCheckBox( groupBox1, "m_bgSpellCB" );
00051 
00052     groupBox1Layout->addWidget( m_bgSpellCB, 0, 0 );
00053 
00054     m_skipUpperCB = new QCheckBox( groupBox1, "m_skipUpperCB" );
00055 
00056     groupBox1Layout->addWidget( m_skipUpperCB, 1, 0 );
00057 
00058     m_skipRunTogetherCB = new QCheckBox( groupBox1, "m_skipRunTogetherCB" );
00059 
00060     groupBox1Layout->addWidget( m_skipRunTogetherCB, 2, 0 );
00061 
00062     KSpell2ConfigUILayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );
00063 
00064     textLabel1 = new QLabel( this, "textLabel1" );
00065 
00066     KSpell2ConfigUILayout->addWidget( textLabel1, 0, 0 );
00067 
00068     m_ignoreListBox = new KEditListBox( this, "m_ignoreListBox" );
00069     m_ignoreListBox->setButtons( int( KEditListBox::Remove | KEditListBox::Add ) );
00070 
00071     KSpell2ConfigUILayout->addMultiCellWidget( m_ignoreListBox, 2, 2, 0, 1 );
00072     languageChange();
00073     resize( QSize(577, 441).expandedTo(minimumSizeHint()) );
00074     clearWState( WState_Polished );
00075 }
00076 
00077 /*
00078  *  Destroys the object and frees any allocated resources
00079  */
00080 KSpell2ConfigUI::~KSpell2ConfigUI()
00081 {
00082     // no need to delete child widgets, Qt does it all for us
00083 }
00084 
00085 /*
00086  *  Sets the strings of the subwidgets using the current
00087  *  language.
00088  */
00089 void KSpell2ConfigUI::languageChange()
00090 {
00091     QWhatsThis::add( m_langCombo, tr2i18n( "This is the default language that the spell checker will use. The drop down box will list all of the dictionaries of your existing languages." ) );
00092     groupBox1->setTitle( tr2i18n( "Options" ) );
00093     m_bgSpellCB->setText( tr2i18n( "Enable &background spellchecking" ) );
00094     QWhatsThis::add( m_bgSpellCB, tr2i18n( "If checked, the \"spell as you type\" mode is active and all misspelled words are immediately highlighted." ) );
00095     m_skipUpperCB->setText( tr2i18n( "Skip all &uppercase words" ) );
00096     QWhatsThis::add( m_skipUpperCB, tr2i18n( "If checked, words that consist of only uppercase letters are not spell checked. This is useful if you have a lot of acronyms, such as KDE for example." ) );
00097     m_skipRunTogetherCB->setText( tr2i18n( "S&kip run-together words" ) );
00098     QWhatsThis::add( m_skipRunTogetherCB, tr2i18n( "If checked, concatenated words made of existing words are not spell checked. This is useful in some languages." ) );
00099     textLabel1->setText( tr2i18n( "Default language:" ) );
00100     m_ignoreListBox->setTitle( tr2i18n( "Ignore These Words" ) );
00101     QWhatsThis::add( m_ignoreListBox, tr2i18n( "To add a word you want to ignore, type it in the top edit field and click Add. To remove a word, highlight it in the list and click Remove." ) );
00102 }
00103 
00104 #include "configui.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys