#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'tdespell2ui.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "tdespell2ui.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqpushbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KSpell2UI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KSpell2UI::KSpell2UI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KSpell2UI" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 430, 300 ) );
    KSpell2UILayout = new TQGridLayout( this, 1, 1, 11, 6, "KSpell2UILayout"); 

    textLabel2 = new TQLabel( this, "textLabel2" );

    KSpell2UILayout->addMultiCellWidget( textLabel2, 1, 1, 0, 1 );

    m_unknownWord = new TQLabel( this, "m_unknownWord" );

    KSpell2UILayout->addWidget( m_unknownWord, 1, 2 );

    textLabel5 = new TQLabel( this, "textLabel5" );

    KSpell2UILayout->addWidget( textLabel5, 4, 0 );

    m_contextLabel = new TQLabel( this, "m_contextLabel" );
    m_contextLabel->setFrameShape( TQLabel::Box );
    m_contextLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) );

    KSpell2UILayout->addMultiCellWidget( m_contextLabel, 0, 0, 0, 5 );

    m_addBtn = new TQPushButton( this, "m_addBtn" );

    KSpell2UILayout->addMultiCellWidget( m_addBtn, 1, 1, 4, 5 );
    spacer2 = new TQSpacerItem( 74, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KSpell2UILayout->addItem( spacer2, 1, 3 );

    m_suggestions = new TQListView( this, "m_suggestions" );
    m_suggestions->addColumn( tr2i18n( "Suggested Words" ) );
    m_suggestions->setResizeMode( TQListView::AllColumns );

    KSpell2UILayout->addMultiCellWidget( m_suggestions, 3, 3, 0, 4 );

    textLabel4 = new TQLabel( this, "textLabel4" );

    KSpell2UILayout->addMultiCellWidget( textLabel4, 2, 2, 0, 1 );

    m_replacement = new TQLineEdit( this, "m_replacement" );

    KSpell2UILayout->addMultiCellWidget( m_replacement, 2, 2, 2, 4 );

    m_language = new TQComboBox( false, this, "m_language" );

    KSpell2UILayout->addMultiCellWidget( m_language, 4, 4, 1, 4 );

    layout1 = new TQVBoxLayout( 0, 0, 6, "layout1"); 

    m_suggestBtn = new TQPushButton( this, "m_suggestBtn" );
    layout1->addWidget( m_suggestBtn );

    m_replaceBtn = new TQPushButton( this, "m_replaceBtn" );
    layout1->addWidget( m_replaceBtn );

    m_replaceAllBtn = new TQPushButton( this, "m_replaceAllBtn" );
    layout1->addWidget( m_replaceAllBtn );

    m_skipBtn = new TQPushButton( this, "m_skipBtn" );
    layout1->addWidget( m_skipBtn );

    m_skipAllBtn = new TQPushButton( this, "m_skipAllBtn" );
    layout1->addWidget( m_skipAllBtn );

    m_autoCorrect = new TQPushButton( this, "m_autoCorrect" );
    layout1->addWidget( m_autoCorrect );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout1->addItem( spacer1 );

    KSpell2UILayout->addMultiCellLayout( layout1, 2, 4, 5, 5 );
    languageChange();
    resize( TQSize(481, 311).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_addBtn, m_replacement );
    setTabOrder( m_replacement, m_suggestBtn );
    setTabOrder( m_suggestBtn, m_replaceBtn );
    setTabOrder( m_replaceBtn, m_replaceAllBtn );
    setTabOrder( m_replaceAllBtn, m_skipBtn );
    setTabOrder( m_skipBtn, m_skipAllBtn );
    setTabOrder( m_skipAllBtn, m_suggestions );
    setTabOrder( m_suggestions, m_language );

    // buddies
    textLabel5->setBuddy( m_language );
    textLabel4->setBuddy( m_replacement );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSpell2UI::languageChange()
{
    textLabel2->setText( tr2i18n( "Unknown word:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "<qt><p>This word was considered to be an \"unknown word\" because it does not match any entry in the dictionary currently in use. It may also be a word in a foreign language.</p>\n"
"<p>If the word is not misspelled, you may add it to the dictionary by clicking <b>Add to Dictionary</b>. If you don't want to add the unknown word to the dictionary, but you want to leave it unchanged, click <b>Ignore</b> or <b>Ignore All</b>.</p>\n"
"<p>However, if the word is misspelled, you can try to find the correct replacement in the list below. If you cannot find a replacement there, you may type it in the text box below, and click <b>Replace</b> or <b>Replace All</b>.</p>\n"
"</qt>" ) );
    m_unknownWord->setText( tr2i18n( "<b>misspelled</b>" ) );
    TQToolTip::add( m_unknownWord, tr2i18n( "Unknown word" ) );
    TQWhatsThis::add( m_unknownWord, tr2i18n( "<qt><p>This word was considered to be an \"unknown word\" because it does not match any entry in the dictionary currently in use. It may also be a word in a foreign language.</p>\n"
"<p>If the word is not misspelled, you may add it to the dictionary by clicking <b>Add to Dictionary</b>. If you don't want to add the unknown word to the dictionary, but you want to leave it unchanged, click <b>Ignore</b> or <b>Ignore All</b>.</p>\n"
"<p>However, if the word is misspelled, you can try to find the correct replacement in the list below. If you cannot find a replacement there, you may type it in the text box below, and click <b>Replace</b> or <b>Replace All</b>.</p>\n"
"</qt>" ) );
    textLabel5->setText( tr2i18n( "&Language:" ) );
    TQWhatsThis::add( textLabel5, tr2i18n( "<qt>\n"
"<p>Select the language of the document you are proofing here.</p>\n"
"</qt>" ) );
    m_contextLabel->setText( tr2i18n( "... the <b>misspelled</b> word shown in context ..." ) );
    TQToolTip::add( m_contextLabel, tr2i18n( "Text excerpt showing the unknown word in its context." ) );
    TQWhatsThis::add( m_contextLabel, tr2i18n( "<qt>\n"
"<p>Here you can see a text excerpt showing the unknown word in its context. If this information is not sufficient to choose the best replacement for the unknown word, you can click on the document you are proofing, read a larger part of the text and then return here to continue proofing.</p>\n"
"</qt>" ) );
    m_addBtn->setText( tr2i18n( "<< Add to Dictionary" ) );
    TQWhatsThis::add( m_addBtn, tr2i18n( "<qt>\n"
"<p>The unknown word was detected and considered unknown because it is not included in the dictionary.<br>\n"
"Click here if you consider that the unknown word is not misspelled and you want to avoid wrongly detecting it again in the future. If you want to let it remain as is, but not add it to the dictionary, then click <b>Ignore</b> or <b>Ignore All</b> instead.</p>\n"
"</qt>" ) );
    m_suggestions->header()->setLabel( 0, tr2i18n( "Suggested Words" ) );
    TQToolTip::add( m_suggestions, tr2i18n( "Suggestion List" ) );
    TQWhatsThis::add( m_suggestions, tr2i18n( "<qt>\n"
"<p>If the unknown word is misspelled, you should check if the correction for it is available and if it is, click on it. If none of the words in this list is a good replacement you may type the correct word in the edit box above.</p>\n"
"<p>To correct this word click <b>Replace</b> if you want to correct only this occurrence or <b>Replace All</b> if you want to correct all occurrences.</p>\n"
"</qt>" ) );
    textLabel4->setText( tr2i18n( "Replace &with:" ) );
    TQWhatsThis::add( textLabel4, tr2i18n( "<qt>\n"
"<p>If the unknown word is misspelled, you should type the correction for your misspelled word here or select it from the list below.</p>\n"
"<p>You can then click <b>Replace</b> if you want to correct only this occurrence of the word or <b>Replace All</b> if you want to correct all occurrences.</p>\n"
"</qt>" ) );
    TQWhatsThis::add( m_replacement, tr2i18n( "<qt>\n"
"<p>If the unknown word is misspelled, you should type the correction for your misspelled word here or select it from the list below.</p>\n"
"<p>You can then click <b>Replace</b> if you want to correct only this occurrence of the word or <b>Replace All</b> if you want to correct all occurrences.</p>\n"
"</qt>" ) );
    m_language->clear();
    m_language->insertItem( tr2i18n( "English" ) );
    TQToolTip::add( m_language, tr2i18n( "Language Selection" ) );
    TQWhatsThis::add( m_language, tr2i18n( "<qt>\n"
"<p>Select the language of the document you are proofing here.</p>\n"
"</qt>" ) );
    m_suggestBtn->setText( tr2i18n( "S&uggest" ) );
    m_replaceBtn->setText( tr2i18n( "&Replace" ) );
    TQWhatsThis::add( m_replaceBtn, tr2i18n( "<qt>\n"
"<p>Click here to replace this occurrence of the unknown text with the text in the edit box above (to the left).</p>\n"
"</qt>" ) );
    m_replaceAllBtn->setText( tr2i18n( "R&eplace All" ) );
    TQWhatsThis::add( m_replaceAllBtn, tr2i18n( "<qt>\n"
"<p>Click here to replace all occurrences of the unknown text with the text in the edit box above (to the left).</p>\n"
"</qt>" ) );
    m_skipBtn->setText( tr2i18n( "&Ignore" ) );
    TQWhatsThis::add( m_skipBtn, tr2i18n( "<qt>\n"
"<p>Click here to let this occurrence of the unknown word remain as is.</p>\n"
"<p>This action is useful when the word is a name, an acronym, a foreign word or any other unknown word that you want to use but not add to the dictionary.</p>\n"
"</qt>" ) );
    m_skipAllBtn->setText( tr2i18n( "I&gnore All" ) );
    TQWhatsThis::add( m_skipAllBtn, tr2i18n( "<qt>\n"
"<p>Click here to let all occurrences of the unknown word remain as they are.</p>\n"
"<p>This action is useful when the word is a name, an acronym, a foreign word or any other unknown word that you want to use but not add to the dictionary.</p>\n"
"</qt>" ) );
    m_autoCorrect->setText( tr2i18n( "Autocorrect" ) );
    TQWhatsThis::add( m_autoCorrect, tr2i18n( "<qt>\n"
"<p>Click here to let all occurrences of the unknown word remain as they are.</p>\n"
"<p>This action is useful when the word is a name, an acronym, a foreign word or any other unknown word that you want to use but not add to the dictionary.</p>\n"
"</qt>" ) );
}

/****************************************************************************
** KSpell2UI meta object code from reading C++ file 'tdespell2ui.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "tdespell2ui.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *KSpell2UI::className() const
{
    return "KSpell2UI";
}

TQMetaObject *KSpell2UI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KSpell2UI( "KSpell2UI", &KSpell2UI::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString KSpell2UI::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "KSpell2UI", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString KSpell2UI::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "KSpell2UI", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* KSpell2UI::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KSpell2UI", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KSpell2UI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* KSpell2UI::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "KSpell2UI" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool KSpell2UI::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool KSpell2UI::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool KSpell2UI::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool KSpell2UI::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
