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

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

#include "languageoptionsbase.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    GroupBox3 = new TQGroupBox( this, "GroupBox3" );
    GroupBox3->setColumnLayout(0, TQt::Vertical );
    GroupBox3->layout()->setSpacing( 6 );
    GroupBox3->layout()->setMargin( 11 );
    GroupBox3Layout = new TQGridLayout( GroupBox3->layout() );
    GroupBox3Layout->setAlignment( TQt::AlignTop );

    b_langDel = new TQPushButton( GroupBox3, "b_langDel" );

    GroupBox3Layout->addWidget( b_langDel, 0, 2 );

    e_shortName2 = new TQLineEdit( GroupBox3, "e_shortName2" );
    e_shortName2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, e_shortName2->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addWidget( e_shortName2, 1, 1 );

    e_langLong = new TQLineEdit( GroupBox3, "e_langLong" );
    e_langLong->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, e_langLong->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addWidget( e_langLong, 2, 1 );

    d_kblayout = new KComboBox( false, GroupBox3, "d_kblayout" );

    GroupBox3Layout->addWidget( d_kblayout, 4, 1 );

    b_langPixmap = new TQPushButton( GroupBox3, "b_langPixmap" );

    GroupBox3Layout->addWidget( b_langPixmap, 3, 1 );

    d_shortName = new KComboBox( false, GroupBox3, "d_shortName" );

    GroupBox3Layout->addWidget( d_shortName, 0, 1 );

    label_shortName = new TQLabel( GroupBox3, "label_shortName" );
    label_shortName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, label_shortName->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addWidget( label_shortName, 0, 0 );

    label_shortName2 = new TQLabel( GroupBox3, "label_shortName2" );

    GroupBox3Layout->addWidget( label_shortName2, 1, 0 );

    label_langLong = new TQLabel( GroupBox3, "label_langLong" );

    GroupBox3Layout->addWidget( label_langLong, 2, 0 );

    label_langPixmap = new TQLabel( GroupBox3, "label_langPixmap" );

    GroupBox3Layout->addWidget( label_langPixmap, 3, 0 );

    label_kblayout = new TQLabel( GroupBox3, "label_kblayout" );
    label_kblayout->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, label_kblayout->sizePolicy().hasHeightForWidth() ) );

    GroupBox3Layout->addWidget( label_kblayout, 4, 0 );

    LanguageOptionsBaseLayout->addWidget( GroupBox3, 0, 0 );

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    b_lang_kde = new TQPushButton( GroupBox2, "b_lang_kde" );

    GroupBox2Layout->addMultiCellWidget( b_lang_kde, 1, 1, 0, 1 );

    b_lang_iso1 = new TQPushButton( GroupBox2, "b_lang_iso1" );

    GroupBox2Layout->addMultiCellWidget( b_lang_iso1, 2, 2, 0, 1 );

    b_langNew = new TQPushButton( GroupBox2, "b_langNew" );

    GroupBox2Layout->addWidget( b_langNew, 0, 1 );

    e_newName = new TQLineEdit( GroupBox2, "e_newName" );
    e_newName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, e_newName->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addWidget( e_newName, 0, 0 );

    LanguageOptionsBaseLayout->addWidget( GroupBox2, 1, 0 );
    spacer1 = new TQSpacerItem( 390, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    LanguageOptionsBaseLayout->addItem( spacer1, 2, 0 );
    languageChange();
    resize( TQSize(392, 327).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( d_shortName, e_shortName2 );
    setTabOrder( e_shortName2, e_langLong );
    setTabOrder( e_langLong, b_langPixmap );
    setTabOrder( b_langPixmap, d_kblayout );
    setTabOrder( d_kblayout, b_langDel );
    setTabOrder( b_langDel, e_newName );
    setTabOrder( e_newName, b_langNew );
    setTabOrder( b_langNew, b_lang_kde );
    setTabOrder( b_lang_kde, b_lang_iso1 );

    // buddies
    label_shortName->setBuddy( d_shortName );
    label_shortName2->setBuddy( e_shortName2 );
    label_langLong->setBuddy( e_langLong );
    label_langPixmap->setBuddy( b_langPixmap );
    label_kblayout->setBuddy( d_kblayout );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void LanguageOptionsBase::languageChange()
{
    GroupBox3->setTitle( tr2i18n( "Available Languages" ) );
    b_langDel->setText( tr2i18n( "&Delete" ) );
    TQToolTip::add( b_langDel, tr2i18n( "Delete the selected language" ) );
    TQWhatsThis::add( b_langDel, tr2i18n( "By clicking on this button you can delete the selected language." ) );
    TQToolTip::add( e_shortName2, tr2i18n( "Alternative language code" ) );
    TQWhatsThis::add( e_shortName2, tr2i18n( "An alternative language code is set here but you can change it if you want" ) );
    TQToolTip::add( e_langLong, tr2i18n( "Your own description of the language code." ) );
    TQWhatsThis::add( e_langLong, tr2i18n( "A description of the language is written here and you can modify it if you want." ) );
    TQToolTip::add( d_kblayout, tr2i18n( "Select a language or use the Add New Language Code to add one." ) );
    TQWhatsThis::add( d_kblayout, tr2i18n( "You can select a language with the drop down box or use the Add New Language Code dialog below to add one." ) );
    b_langPixmap->setText( TQString::null );
    TQToolTip::add( b_langPixmap, tr2i18n( "The flag representing the language" ) );
    TQWhatsThis::add( b_langPixmap, tr2i18n( "The default flag representing the language is set here but you can choose another picture by clicking on the button." ) );
    TQToolTip::add( d_shortName, tr2i18n( "Select a language or use the Add New Language Code to add one." ) );
    TQWhatsThis::add( d_shortName, tr2i18n( "You can select a language with the drop down box or use the Add New Language Code dialog below to add one." ) );
    label_shortName->setText( tr2i18n( "Language c&ode:" ) );
    TQToolTip::add( label_shortName, tr2i18n( "You can assign a language to each column" ) );
    TQWhatsThis::add( label_shortName, tr2i18n( "Each column can be assigned a language. This is internally done with the usual international language codes." ) );
    label_shortName2->setText( tr2i18n( "Alte&rnative code:" ) );
    TQToolTip::add( label_shortName2, tr2i18n( "Select a second language code if necessary" ) );
    TQWhatsThis::add( label_shortName2, tr2i18n( "Sometimes it may be useful to have a second language code because some languages have the usual short code and one or two longer codes." ) );
    label_langLong->setText( tr2i18n( "Lang&uage name:" ) );
    TQToolTip::add( label_langLong, tr2i18n( "Describe the language in your own terms." ) );
    TQWhatsThis::add( label_langLong, tr2i18n( "Here you can give the language code a descriptive name in your own language which is shown in the header buttons in the main view. " ) );
    label_langPixmap->setText( tr2i18n( "&Picture:" ) );
    TQToolTip::add( label_langPixmap, tr2i18n( "Set a picture for the language" ) );
    TQWhatsThis::add( label_langPixmap, tr2i18n( "Choose a picture to represent the language above." ) );
    label_kblayout->setText( tr2i18n( "Keyboard layout:" ) );
    TQToolTip::add( label_kblayout, tr2i18n( "You can assign a language to each column" ) );
    TQWhatsThis::add( label_kblayout, tr2i18n( "Each column can be assigned a language. This is internally done with the usual international language codes." ) );
    GroupBox2->setTitle( tr2i18n( "Add New Language Code" ) );
    b_lang_kde->setText( tr2i18n( "Add Language Data From &TDE Database" ) );
    TQToolTip::add( b_lang_kde, tr2i18n( "Obtains the language choices from the TDE database" ) );
    TQWhatsThis::add( b_lang_kde, tr2i18n( "Pressing this button opens a menu that contains all the countries that are known in your TDE installation. Ordered by country you can add your desired language properties to your personal list." ) );
    b_lang_iso1->setText( tr2i18n( "Add Language Data From ISO639-&1" ) );
    TQToolTip::add( b_lang_iso1, tr2i18n( "List of languages covered by ISO639-1" ) );
    TQWhatsThis::add( b_lang_iso1, tr2i18n( "Pressing this button opens a menu that contains all the language codes that are covered by \"ISO639-1\"" ) );
    b_langNew->setText( tr2i18n( "&Add" ) );
    TQToolTip::add( b_langNew, tr2i18n( "Allow addition of the language you typed." ) );
    TQWhatsThis::add( b_langNew, tr2i18n( "This button becomes available when you type a language code in the field." ) );
    TQToolTip::add( e_newName, tr2i18n( "Type your language code if you know it." ) );
    TQWhatsThis::add( e_newName, tr2i18n( "Type the language code if you know it or use one of the 2 buttons below to choose a language code." ) );
}

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

TQMetaObject *LanguageOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_LanguageOptionsBase( "LanguageOptionsBase", &LanguageOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* LanguageOptionsBase::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(
	"LanguageOptionsBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_LanguageOptionsBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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