00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "configui.h"
00012
00013 #include <qvariant.h>
00014 #include <keditlistbox.h>
00015 #include <kcombobox.h>
00016 #include <qpushbutton.h>
00017 #include <qgroupbox.h>
00018 #include <qcheckbox.h>
00019 #include <qlabel.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 #include "kcombobox.h"
00024 #include "keditlistbox.h"
00025 #include "klineedit.h"
00026
00027
00028
00029
00030
00031 KSpell2ConfigUI::KSpell2ConfigUI( QWidget* parent, const char* name, WFlags fl )
00032 : QWidget( parent, name, fl )
00033 {
00034 if ( !name )
00035 setName( "KSpell2ConfigUI" );
00036 KSpell2ConfigUILayout = new QGridLayout( this, 1, 1, 11, 6, "KSpell2ConfigUILayout");
00037
00038 m_langCombo = new KComboBox( FALSE, this, "m_langCombo" );
00039
00040 KSpell2ConfigUILayout->addWidget( m_langCombo, 0, 1 );
00041
00042 groupBox1 = new QGroupBox( this, "groupBox1" );
00043 groupBox1->setColumnLayout(0, Qt::Vertical );
00044 groupBox1->layout()->setSpacing( 6 );
00045 groupBox1->layout()->setMargin( 11 );
00046 groupBox1Layout = new QGridLayout( groupBox1->layout() );
00047 groupBox1Layout->setAlignment( Qt::AlignTop );
00048
00049 m_bgSpellCB = new QCheckBox( groupBox1, "m_bgSpellCB" );
00050
00051 groupBox1Layout->addWidget( m_bgSpellCB, 0, 0 );
00052
00053 m_skipUpperCB = new QCheckBox( groupBox1, "m_skipUpperCB" );
00054
00055 groupBox1Layout->addWidget( m_skipUpperCB, 1, 0 );
00056
00057 m_skipRunTogetherCB = new QCheckBox( groupBox1, "m_skipRunTogetherCB" );
00058
00059 groupBox1Layout->addWidget( m_skipRunTogetherCB, 2, 0 );
00060
00061 KSpell2ConfigUILayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );
00062
00063 textLabel1 = new QLabel( this, "textLabel1" );
00064
00065 KSpell2ConfigUILayout->addWidget( textLabel1, 0, 0 );
00066
00067 m_ignoreListBox = new KEditListBox( this, "m_ignoreListBox" );
00068 m_ignoreListBox->setButtons( int( KEditListBox::Remove | KEditListBox::Add ) );
00069
00070 KSpell2ConfigUILayout->addMultiCellWidget( m_ignoreListBox, 2, 2, 0, 1 );
00071 languageChange();
00072 resize( QSize(577, 441).expandedTo(minimumSizeHint()) );
00073 clearWState( WState_Polished );
00074 }
00075
00076
00077
00078
00079 KSpell2ConfigUI::~KSpell2ConfigUI()
00080 {
00081
00082 }
00083
00084
00085
00086
00087
00088 void KSpell2ConfigUI::languageChange()
00089 {
00090 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." ) );
00091 groupBox1->setTitle( tr2i18n( "Options" ) );
00092 m_bgSpellCB->setText( tr2i18n( "Enable &background spellchecking" ) );
00093 QWhatsThis::add( m_bgSpellCB, tr2i18n( "If checked, the \"spell as you type\" mode is active and all misspelled words are immediately highlighted." ) );
00094 m_skipUpperCB->setText( tr2i18n( "Skip all &uppercase words" ) );
00095 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." ) );
00096 m_skipRunTogetherCB->setText( tr2i18n( "S&kip run-together words" ) );
00097 QWhatsThis::add( m_skipRunTogetherCB, tr2i18n( "If checked, concatenated words made of existing words are not spell checked. This is useful in some languages." ) );
00098 textLabel1->setText( tr2i18n( "Default language:" ) );
00099 m_ignoreListBox->setTitle( tr2i18n( "Ignore These Words" ) );
00100 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." ) );
00101 }
00102
00103 #include "configui.moc"