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

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

#include "addtalkerwidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqlabel.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    buttonGroup2 = new TQButtonGroup( this, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQGridLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    synthesizerSelection = new KComboBox( false, buttonGroup2, "synthesizerSelection" );
    synthesizerSelection->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, synthesizerSelection->sizePolicy().hasHeightForWidth() ) );
    synthesizerSelection->setDuplicatesEnabled( false );

    buttonGroup2Layout->addWidget( synthesizerSelection, 2, 1 );

    languageSelection = new KComboBox( false, buttonGroup2, "languageSelection" );
    languageSelection->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, languageSelection->sizePolicy().hasHeightForWidth() ) );
    languageSelection->setDuplicatesEnabled( false );

    buttonGroup2Layout->addWidget( languageSelection, 1, 1 );
    spacer9 = new TQSpacerItem( 351, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonGroup2Layout->addMultiCell( spacer9, 0, 0, 0, 1 );

    synthesizerLabel = new TQLabel( buttonGroup2, "synthesizerLabel" );
    synthesizerLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    buttonGroup2Layout->addWidget( synthesizerLabel, 2, 0 );
    spacer10 = new TQSpacerItem( 25, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    buttonGroup2Layout->addItem( spacer10, 1, 2 );
    spacer6 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    buttonGroup2Layout->addItem( spacer6, 1, 4 );
    spacer7 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    buttonGroup2Layout->addItem( spacer7, 2, 4 );
    spacer10_2 = new TQSpacerItem( 25, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    buttonGroup2Layout->addItem( spacer10_2, 2, 2 );

    showAllLabel = new TQLabel( buttonGroup2, "showAllLabel" );
    TQFont showAllLabel_font(  showAllLabel->font() );
    showAllLabel_font.setUnderline( true );
    showAllLabel->setFont( showAllLabel_font ); 
    showAllLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    buttonGroup2Layout->addMultiCellWidget( showAllLabel, 0, 0, 2, 4 );

    languageLabel = new TQLabel( buttonGroup2, "languageLabel" );
    languageLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    buttonGroup2Layout->addWidget( languageLabel, 1, 0 );

    languageRadioButton = new TQRadioButton( buttonGroup2, "languageRadioButton" );
    languageRadioButton->setChecked( true );
    buttonGroup2->insert( languageRadioButton, 0 );

    buttonGroup2Layout->addWidget( languageRadioButton, 1, 3 );

    synthesizerRadioButton = new TQRadioButton( buttonGroup2, "synthesizerRadioButton" );
    buttonGroup2->insert( synthesizerRadioButton, 0 );

    buttonGroup2Layout->addWidget( synthesizerRadioButton, 2, 3 );

    AddTalkerWidgetLayout->addWidget( buttonGroup2, 0, 0 );
    languageChange();
    resize( TQSize(469, 153).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( languageSelection, synthesizerSelection );
    setTabOrder( synthesizerSelection, languageRadioButton );

    // buddies
    synthesizerLabel->setBuddy( synthesizerSelection );
    languageLabel->setBuddy( languageSelection );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddTalkerWidget::languageChange()
{
    setCaption( tr2i18n( "Add Talker" ) );
    buttonGroup2->setTitle( TQString::null );
    TQWhatsThis::add( synthesizerSelection, tr2i18n( "Select the speech synthesizer to do the speaking.", "What's this text" ) );
    TQWhatsThis::add( languageSelection, tr2i18n( "Select the language to be spoken.  Note that after you configure a Talker, your chosen Language may be overridden by the synthesizer, depending upon the options you choose.", "What's this text" ) );
    synthesizerLabel->setText( tr2i18n( "&Synthesizer:" ) );
    TQWhatsThis::add( synthesizerLabel, tr2i18n( "Select the speech synthesizer to do the speaking.", "What's this text" ) );
    showAllLabel->setText( tr2i18n( "Show All" ) );
    TQWhatsThis::add( showAllLabel, tr2i18n( "The radio buttons below determine which box shows all possibilities.  The box to the left of the checked button shows all possibilities.  The box to the left of the unchecked box only shows those possibilities that match the other box." ) );
    languageLabel->setText( tr2i18n( "&Language:" ) );
    TQWhatsThis::add( languageLabel, tr2i18n( "Select the language to be spoken.  Note that after you configure a Talker, your chosen Language may be overridden by the synthesizer, depending upon the options you choose.", "What's this text" ) );
    languageRadioButton->setText( TQString::null );
    TQWhatsThis::add( languageRadioButton, tr2i18n( "Check to list all the possible languages in the Language box at the left.  When a language has been chosen, the Synthesizer box will show only those synthesizers that can speak in the chosen language." ) );
    synthesizerRadioButton->setText( TQString::null );
    TQWhatsThis::add( synthesizerRadioButton, tr2i18n( "Check this box to display all the available synthesizers in the Synthesizer box to the left.  When a synthesizer is chosen, only the languages that can be spoken by that synthesizer appear in the Language box." ) );
}

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

TQMetaObject *AddTalkerWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddTalkerWidget( "AddTalkerWidget", &AddTalkerWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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