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