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

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

#include "creationsourcedetailsui.h"

#include <ntqvariant.h>
#include <kinputdialog.h>
#include <kurlrequester.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "klanguagebutton.h"
#include "klanguagebuttonhelper.h"
#include "creationsourcedetailsui.ui.h"

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

    spellCheckBox = new TQCheckBox( this, "spellCheckBox" );
    spellCheckBox->setChecked( false );

    CreationSourceDetailsUILayout->addMultiCellWidget( spellCheckBox, 3, 3, 0, 1 );

    encodingLabel = new TQLabel( this, "encodingLabel" );
    encodingLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, encodingLabel->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( encodingLabel, 1, 0 );

    urlLabel = new TQLabel( this, "urlLabel" );
    urlLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, urlLabel->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( urlLabel, 0, 0 );

    url = new KURLRequester( this, "url" );
    url->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, url->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( url, 0, 1 );

    encodingCombo = new KComboBox( false, this, "encodingCombo" );
    encodingCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, encodingCombo->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( encodingCombo, 1, 1 );

    ooDictURL = new KURLRequester( this, "ooDictURL" );
    ooDictURL->setEnabled( false );
    ooDictURL->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 1, 0, ooDictURL->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( ooDictURL, 4, 1 );

    languageLabel = new TQLabel( this, "languageLabel" );
    languageLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, languageLabel->sizePolicy().hasHeightForWidth() ) );

    CreationSourceDetailsUILayout->addWidget( languageLabel, 2, 0 );
    languageChange();
    resize( TQSize(421, 189).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( spellCheckBox, TQ_SIGNAL( toggled(bool) ), ooDictURL, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    encodingLabel->setBuddy( encodingCombo );
    urlLabel->setBuddy( url );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CreationSourceDetailsUI::languageChange()
{
    spellCheckBox->setText( tr2i18n( "&Compare to OpenOffice.org dictionary:" ) );
    TQWhatsThis::add( spellCheckBox, tr2i18n( "If you select this check box the words are spell-checked before they are inserted into the new dictionary." ) );
    encodingLabel->setText( tr2i18n( "Character &encoding:" ) );
    TQWhatsThis::add( encodingLabel, tr2i18n( "With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files." ) );
    urlLabel->setText( tr2i18n( "&Filename:" ) );
    TQWhatsThis::add( urlLabel, tr2i18n( "With this input field you specify which file you want to load for creating the new dictionary." ) );
    TQWhatsThis::add( url, tr2i18n( "With this input field you specify which file you want to load for creating the new dictionary." ) );
    TQWhatsThis::add( encodingCombo, tr2i18n( "With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files." ) );
    TQWhatsThis::add( ooDictURL, tr2i18n( "With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary." ) );
    languageLabel->setText( tr2i18n( "&Language:" ) );
    TQWhatsThis::add( languageLabel, tr2i18n( "With this combo box you decide which language should be associated with the new dictionary." ) );
}

/****************************************************************************
** CreationSourceDetailsUI meta object code from reading C++ file 'creationsourcedetailsui.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 "creationsourcedetailsui.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 *CreationSourceDetailsUI::className() const
{
    return "CreationSourceDetailsUI";
}

TQMetaObject *CreationSourceDetailsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CreationSourceDetailsUI( "CreationSourceDetailsUI", &CreationSourceDetailsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CreationSourceDetailsUI::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 TQUParameter param_slot_1[] = {
	{ "index", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"languageButton_activated", 1, param_slot_1 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "languageButton_activated(int)", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CreationSourceDetailsUI", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CreationSourceDetailsUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CreationSourceDetailsUI::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: languageButton_activated((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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