#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kspell2/ui/configui.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "configui.h"

#include <qvariant.h>
#include <keditlistbox.h>
#include <kcombobox.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kcombobox.h"
#include "keditlistbox.h"
#include "klineedit.h"

/*
 *  Constructs a KSpell2ConfigUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KSpell2ConfigUI::KSpell2ConfigUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "KSpell2ConfigUI" );
    KSpell2ConfigUILayout = new QGridLayout( this, 1, 1, 11, 6, "KSpell2ConfigUILayout"); 

    m_langCombo = new KComboBox( FALSE, this, "m_langCombo" );

    KSpell2ConfigUILayout->addWidget( m_langCombo, 0, 1 );

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, Qt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new QGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( Qt::AlignTop );

    m_bgSpellCB = new QCheckBox( groupBox1, "m_bgSpellCB" );

    groupBox1Layout->addWidget( m_bgSpellCB, 0, 0 );

    m_skipUpperCB = new QCheckBox( groupBox1, "m_skipUpperCB" );

    groupBox1Layout->addWidget( m_skipUpperCB, 1, 0 );

    m_skipRunTogetherCB = new QCheckBox( groupBox1, "m_skipRunTogetherCB" );

    groupBox1Layout->addWidget( m_skipRunTogetherCB, 2, 0 );

    KSpell2ConfigUILayout->addMultiCellWidget( groupBox1, 1, 1, 0, 1 );

    textLabel1 = new QLabel( this, "textLabel1" );

    KSpell2ConfigUILayout->addWidget( textLabel1, 0, 0 );

    m_ignoreListBox = new KEditListBox( this, "m_ignoreListBox" );
    m_ignoreListBox->setButtons( int( KEditListBox::Remove | KEditListBox::Add ) );

    KSpell2ConfigUILayout->addMultiCellWidget( m_ignoreListBox, 2, 2, 0, 1 );
    languageChange();
    resize( QSize(577, 441).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

/*
 *  Destroys the object and frees any allocated resources
 */
KSpell2ConfigUI::~KSpell2ConfigUI()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSpell2ConfigUI::languageChange()
{
    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." ) );
    groupBox1->setTitle( tr2i18n( "Options" ) );
    m_bgSpellCB->setText( tr2i18n( "Enable &background spellchecking" ) );
    QWhatsThis::add( m_bgSpellCB, tr2i18n( "If checked, the \"spell as you type\" mode is active and all misspelled words are immediately highlighted." ) );
    m_skipUpperCB->setText( tr2i18n( "Skip all &uppercase words" ) );
    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." ) );
    m_skipRunTogetherCB->setText( tr2i18n( "S&kip run-together words" ) );
    QWhatsThis::add( m_skipRunTogetherCB, tr2i18n( "If checked, concatenated words made of existing words are not spell checked. This is useful in some languages." ) );
    textLabel1->setText( tr2i18n( "Default language:" ) );
    m_ignoreListBox->setTitle( tr2i18n( "Ignore These Words" ) );
    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." ) );
}

#include "configui.moc"
