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

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

#include "eposconfwidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <kurlrequester.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    eposConfigurationBox = new TQGroupBox( this, "eposConfigurationBox" );
    eposConfigurationBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, eposConfigurationBox->sizePolicy().hasHeightForWidth() ) );
    eposConfigurationBox->setFrameShape( TQGroupBox::GroupBoxPanel );
    eposConfigurationBox->setFrameShadow( TQGroupBox::Sunken );
    eposConfigurationBox->setColumnLayout(0, TQt::Vertical );
    eposConfigurationBox->layout()->setSpacing( 6 );
    eposConfigurationBox->layout()->setMargin( 11 );
    eposConfigurationBoxLayout = new TQGridLayout( eposConfigurationBox->layout() );
    eposConfigurationBoxLayout->setAlignment( TQt::AlignTop );

    layout13 = new TQHBoxLayout( 0, 0, 6, "layout13"); 

    characterCodingLabel = new TQLabel( eposConfigurationBox, "characterCodingLabel" );
    characterCodingLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, characterCodingLabel->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( characterCodingLabel );

    characterCodingBox = new KComboBox( false, eposConfigurationBox, "characterCodingBox" );
    characterCodingBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, characterCodingBox->sizePolicy().hasHeightForWidth() ) );
    layout13->addWidget( characterCodingBox );

    eposConfigurationBoxLayout->addLayout( layout13, 2, 0 );

    layout17 = new TQHBoxLayout( 0, 0, 6, "layout17"); 

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

    timeLabel = new TQLabel( eposConfigurationBox, "timeLabel" );
    timeLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, timeLabel->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( timeLabel );

    frequencyLabel = new TQLabel( eposConfigurationBox, "frequencyLabel" );
    frequencyLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, frequencyLabel->sizePolicy().hasHeightForWidth() ) );
    layout14->addWidget( frequencyLabel );
    layout17->addLayout( layout14 );

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

    timeBox = new KIntSpinBox( eposConfigurationBox, "timeBox" );
    timeBox->setEnabled( true );
    timeBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, timeBox->sizePolicy().hasHeightForWidth() ) );
    timeBox->setMaxValue( 200 );
    timeBox->setMinValue( 50 );
    timeBox->setValue( 100 );
    layout15->addWidget( timeBox );

    frequencyBox = new KIntSpinBox( eposConfigurationBox, "frequencyBox" );
    frequencyBox->setEnabled( true );
    frequencyBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, frequencyBox->sizePolicy().hasHeightForWidth() ) );
    frequencyBox->setMaxValue( 200 );
    frequencyBox->setMinValue( 50 );
    frequencyBox->setValue( 100 );
    layout15->addWidget( frequencyBox );
    layout17->addLayout( layout15 );

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

    timeSlider = new TQSlider( eposConfigurationBox, "timeSlider" );
    timeSlider->setEnabled( true );
    timeSlider->setFocusPolicy( TQSlider::NoFocus );
    timeSlider->setMaxValue( 1000 );
    timeSlider->setLineStep( 10 );
    timeSlider->setPageStep( 100 );
    timeSlider->setValue( 500 );
    timeSlider->setOrientation( TQSlider::Horizontal );
    layout16->addWidget( timeSlider );

    frequencySlider = new TQSlider( eposConfigurationBox, "frequencySlider" );
    frequencySlider->setEnabled( true );
    frequencySlider->setFocusPolicy( TQSlider::NoFocus );
    frequencySlider->setMaxValue( 1000 );
    frequencySlider->setLineStep( 10 );
    frequencySlider->setPageStep( 100 );
    frequencySlider->setValue( 500 );
    frequencySlider->setOrientation( TQSlider::Horizontal );
    layout16->addWidget( frequencySlider );
    layout17->addLayout( layout16 );

    eposConfigurationBoxLayout->addLayout( layout17, 1, 0 );

    layout13_2 = new TQHBoxLayout( 0, 0, 6, "layout13_2"); 

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

    eposServerPathLabel = new TQLabel( eposConfigurationBox, "eposServerPathLabel" );
    eposServerPathLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposServerPathLabel->sizePolicy().hasHeightForWidth() ) );
    eposServerPathLabel->setAlignment( int( TQLabel::AlignVCenter ) );
    layout11->addWidget( eposServerPathLabel );

    eposClientPathLabel = new TQLabel( eposConfigurationBox, "eposClientPathLabel" );
    eposClientPathLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposClientPathLabel->sizePolicy().hasHeightForWidth() ) );
    eposClientPathLabel->setAlignment( int( TQLabel::AlignVCenter ) );
    layout11->addWidget( eposClientPathLabel );
    layout13_2->addLayout( layout11 );

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

    eposServerPath = new KURLRequester( eposConfigurationBox, "eposServerPath" );
    eposServerPath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposServerPath->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( eposServerPath );

    eposClientPath = new KURLRequester( eposConfigurationBox, "eposClientPath" );
    eposClientPath->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposClientPath->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( eposClientPath );
    layout13_2->addLayout( layout12 );

    eposConfigurationBoxLayout->addLayout( layout13_2, 0, 0 );

    advancedGroupBox = new TQGroupBox( eposConfigurationBox, "advancedGroupBox" );
    advancedGroupBox->setColumnLayout(0, TQt::Vertical );
    advancedGroupBox->layout()->setSpacing( 6 );
    advancedGroupBox->layout()->setMargin( 11 );
    advancedGroupBoxLayout = new TQGridLayout( advancedGroupBox->layout() );
    advancedGroupBoxLayout->setAlignment( TQt::AlignTop );

    layout14_2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout14_2"); 

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

    eposServerOptions = new TQLineEdit( advancedGroupBox, "eposServerOptions" );
    layout13_3->addWidget( eposServerOptions );

    eposClientOptions = new TQLineEdit( advancedGroupBox, "eposClientOptions" );
    layout13_3->addWidget( eposClientOptions );

    layout14_2->addLayout( layout13_3, 0, 1 );

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

    eposServerOptionsLabel = new TQLabel( advancedGroupBox, "eposServerOptionsLabel" );
    eposServerOptionsLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposServerOptionsLabel->sizePolicy().hasHeightForWidth() ) );
    eposServerOptionsLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout12_2->addWidget( eposServerOptionsLabel );

    eposClientOptionsLabel = new TQLabel( advancedGroupBox, "eposClientOptionsLabel" );
    eposClientOptionsLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, eposClientOptionsLabel->sizePolicy().hasHeightForWidth() ) );
    eposClientOptionsLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout12_2->addWidget( eposClientOptionsLabel );

    layout14_2->addLayout( layout12_2, 0, 0 );

    advancedGroupBoxLayout->addLayout( layout14_2, 0, 0 );

    eposConfigurationBoxLayout->addWidget( advancedGroupBox, 3, 0 );

    layout5 = new TQHBoxLayout( 0, 0, 6, "layout5"); 
    spacer2 = new TQSpacerItem( 410, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer2 );

    eposTest = new TQPushButton( eposConfigurationBox, "eposTest" );
    layout5->addWidget( eposTest );

    eposConfigurationBoxLayout->addLayout( layout5, 4, 0 );

    EposConfWidgetLayout->addWidget( eposConfigurationBox, 0, 0 );
    languageChange();
    resize( TQSize(535, 381).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( eposServerPath, eposClientPath );
    setTabOrder( eposClientPath, characterCodingBox );
    setTabOrder( characterCodingBox, eposTest );

    // buddies
    characterCodingLabel->setBuddy( characterCodingBox );
    timeLabel->setBuddy( timeBox );
    frequencyLabel->setBuddy( frequencyBox );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EposConfWidget::languageChange()
{
    setCaption( tr2i18n( "Epos Config UI" ) );
    TQWhatsThis::add( this, tr2i18n( "This is the configuration dialog for the Epos Czech and Slovak speech synthesizer." ) );
    eposConfigurationBox->setTitle( tr2i18n( "E&pos Configuration" ) );
    TQWhatsThis::add( eposConfigurationBox, tr2i18n( "This is the configuration dialog for the Epos Czech and Slovak speech synthesizer." ) );
    characterCodingLabel->setText( tr2i18n( "Character &encoding:" ) );
    TQWhatsThis::add( characterCodingBox, tr2i18n( "Specifies which character encoding is used for passing the text." ) );
    timeLabel->setText( tr2i18n( "Speed:" ) );
    TQWhatsThis::add( timeLabel, tr2i18n( "Sets the speed of speech.  Slide the slider to the left to slow speech down; to the right to increase talking speed.  Anything less than 75 percent is considered \"slow\", and anything greater than 125 percent is considered \"fast\"." ) );
    frequencyLabel->setText( tr2i18n( "Pitch:" ) );
    TQWhatsThis::add( frequencyLabel, tr2i18n( "Sets the tone (frequency) of speech.  Slide the slider to the left to lower the voice tone; to the right to increase tone.  Anything less than 75 percent is considered \"low\", and anything greater than 125 percent is considered \"high\"." ) );
    timeBox->setSuffix( tr2i18n( " %" ) );
    TQWhatsThis::add( timeBox, tr2i18n( "Sets the speed of speech.  Slide the slider to the left to slow speech down; to the right to increase talking speed.  Anything less than 75 percent is considered \"slow\", and anything greater than 125 percent is considered \"fast\"." ) );
    frequencyBox->setSuffix( tr2i18n( " %" ) );
    TQWhatsThis::add( frequencyBox, tr2i18n( "Sets the tone (frequency) of speech.  Slide the slider to the left to lower the voice tone; to the right to increase tone.  Anything less than 75 percent is considered \"low\", and anything greater than 125 percent is considered \"high\"." ) );
    TQWhatsThis::add( timeSlider, tr2i18n( "Sets the speed of speech.  Slide the slider to the left to slow speech down; to the right to increase talking speed.  Anything less than 75 percent is considered \"slow\", and anything greater than 125 percent is considered \"fast\"." ) );
    TQWhatsThis::add( frequencySlider, tr2i18n( "Sets the tone (frequency) of speech.  Slide the slider to the left to lower the voice tone; to the right to increase tone.  Anything less than 75 percent is considered \"low\", and anything greater than 125 percent is considered \"high\"." ) );
    eposServerPathLabel->setText( tr2i18n( "Epos server executable path:" ) );
    TQWhatsThis::add( eposServerPathLabel, tr2i18n( "If the Epos server program will be found due to your PATH environment variable, simply enter \"epos\", otherwise enter the full path to the Epos server executable program." ) );
    eposClientPathLabel->setText( tr2i18n( "Epos client executable path:" ) );
    TQWhatsThis::add( eposClientPathLabel, tr2i18n( "If the Epos client program will be found due to the PATH environment variable, simply enter \"say\" here.  Otherwise, specify the full path to the Epos client program." ) );
    eposServerPath->setProperty( "url", tr2i18n( "epos" ) );
    TQWhatsThis::add( eposServerPath, tr2i18n( "If the Epos server program will be found due to your PATH environment variable, simply enter \"epos\", otherwise enter the full path to the Epos server executable program." ) );
    eposClientPath->setProperty( "url", tr2i18n( "say" ) );
    TQWhatsThis::add( eposClientPath, tr2i18n( "If the Epos client program will be found due to the PATH environment variable, simply enter \"say\" here.  Otherwise, specify the full path to the Epos client program." ) );
    advancedGroupBox->setTitle( tr2i18n( "Additional Options (advanced)" ) );
    TQWhatsThis::add( eposServerOptions, tr2i18n( "Optional.  Enter any server command line options here.  To see available options, enter \"epos -h\" in a terminal.  Do not use \"-o\"." ) );
    TQWhatsThis::add( eposClientOptions, tr2i18n( "Specify options to be passed to Epos client.  To see available options, enter \"say -h\" in a terminal.  Do not use \"-o\"." ) );
    eposServerOptionsLabel->setText( tr2i18n( "Epos server:" ) );
    TQWhatsThis::add( eposServerOptionsLabel, tr2i18n( "Optional.  Enter any server command line options here.  To see available options, enter \"epos -h\" in a terminal.  Do not use \"-o\"." ) );
    eposClientOptionsLabel->setText( tr2i18n( "Epos client:" ) );
    TQWhatsThis::add( eposClientOptionsLabel, tr2i18n( "Specify options to be passed to Epos client.  Do not use -o.  To see available options, enter \"say -h\" in a terminal.  Do not use \"-o\"." ) );
    eposTest->setText( tr2i18n( "&Test" ) );
    TQWhatsThis::add( eposTest, tr2i18n( "Click to test the configuration.  If correct, you will hear a sentence spoken." ) );
}

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

TQMetaObject *EposConfWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EposConfWidget( "EposConfWidget", &EposConfWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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