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

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

#include "ktouchprefgenerallayout.h"

#include <ntqvariant.h>
#include <tdefontrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox1->setFrameShadow( TQGroupBox::Sunken );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    kcfg_BeepOnError = new TQCheckBox( groupBox1, "kcfg_BeepOnError" );
    groupBox1Layout->addWidget( kcfg_BeepOnError );

    kcfg_SoundOnLevel = new TQCheckBox( groupBox1, "kcfg_SoundOnLevel" );
    groupBox1Layout->addWidget( kcfg_SoundOnLevel );
    KTouchPrefGeneralLayoutLayout->addWidget( groupBox1 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

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

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

    layout2->addWidget( textLabel2, 1, 1 );
    spacer3_2 = new TQSpacerItem( 227, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer3_2, 1, 2 );

    kcfg_SlidingSpeed = new TQSlider( groupBox3, "kcfg_SlidingSpeed" );
    kcfg_SlidingSpeed->setMaximumSize( TQSize( 32767, 20 ) );
    kcfg_SlidingSpeed->setMinValue( 1 );
    kcfg_SlidingSpeed->setMaxValue( 20 );
    kcfg_SlidingSpeed->setOrientation( TQSlider::Horizontal );
    kcfg_SlidingSpeed->setTickmarks( TQSlider::Both );
    kcfg_SlidingSpeed->setTickInterval( 1 );

    layout2->addMultiCellWidget( kcfg_SlidingSpeed, 0, 0, 1, 3 );
    spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    layout2->addItem( spacer4, 1, 0 );

    textLabel3 = new TQLabel( groupBox3, "textLabel3" );

    layout2->addWidget( textLabel3, 1, 3 );

    textLabel1_2 = new TQLabel( groupBox3, "textLabel1_2" );

    layout2->addWidget( textLabel1_2, 0, 0 );
    groupBox3Layout->addLayout( layout2 );
    spacer5 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    groupBox3Layout->addItem( spacer5 );

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

    textLabel1 = new TQLabel( groupBox3, "textLabel1" );
    layout3->addWidget( textLabel1 );

    kcfg_MaxSlidingWidgetHeight = new TQSpinBox( groupBox3, "kcfg_MaxSlidingWidgetHeight" );
    kcfg_MaxSlidingWidgetHeight->setMaxValue( 1000 );
    kcfg_MaxSlidingWidgetHeight->setMinValue( 50 );
    layout3->addWidget( kcfg_MaxSlidingWidgetHeight );

    textLabel2_2 = new TQLabel( groupBox3, "textLabel2_2" );
    layout3->addWidget( textLabel2_2 );
    groupBox3Layout->addLayout( layout3 );
    spacer5_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    groupBox3Layout->addItem( spacer5_2 );

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

    fontTextLabel = new TQLabel( groupBox3, "fontTextLabel" );

    layout2_2->addWidget( fontTextLabel, 1, 0 );
    spacer3 = new TQSpacerItem( 114, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2_2->addItem( spacer3, 1, 1 );

    kcfg_Font = new TDEFontRequester( groupBox3, "kcfg_Font" );
    TQFont kcfg_Font_font(  kcfg_Font->font() );
    kcfg_Font_font.setFamily( "Monospace" );
    kcfg_Font_font.setPointSize( 13 );
    kcfg_Font->setFont( kcfg_Font_font ); 

    layout2_2->addMultiCellWidget( kcfg_Font, 2, 2, 0, 1 );

    kcfg_OverrideLectureFont = new TQCheckBox( groupBox3, "kcfg_OverrideLectureFont" );

    layout2_2->addWidget( kcfg_OverrideLectureFont, 0, 0 );
    groupBox3Layout->addLayout( layout2_2 );
    KTouchPrefGeneralLayoutLayout->addWidget( groupBox3 );
    spacer15 = new TQSpacerItem( 31, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KTouchPrefGeneralLayoutLayout->addItem( spacer15 );
    languageChange();
    resize( TQSize(485, 351).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KTouchPrefGeneralLayout::languageChange()
{
    setCaption( tr2i18n( "General Options" ) );
    groupBox1->setTitle( tr2i18n( "Sound" ) );
    kcfg_BeepOnError->setText( tr2i18n( "&Beep on error" ) );
    TQToolTip::add( kcfg_BeepOnError, tr2i18n( "Emit a beep on each typing error" ) );
    TQWhatsThis::add( kcfg_BeepOnError, tr2i18n( "If checked (default) this will emit a beep each time you make a typing error." ) );
    kcfg_SoundOnLevel->setText( tr2i18n( "&Sound on automatic level change" ) );
    TQToolTip::add( kcfg_SoundOnLevel, tr2i18n( "Play a sound when the level automatically changes." ) );
    TQWhatsThis::add( kcfg_SoundOnLevel, tr2i18n( "If this is checked (default) a sound will be played each time you automatically change of level." ) );
    groupBox3->setTitle( tr2i18n( "Text Line Settings" ) );
    textLabel2->setText( tr2i18n( "20: Fast" ) );
    textLabel3->setText( tr2i18n( "Slow: 1" ) );
    textLabel1_2->setText( tr2i18n( "Sliding speed:" ) );
    textLabel1->setText( tr2i18n( "Maximum height of sliding line widget:" ) );
    textLabel2_2->setText( tr2i18n( "in pixels" ) );
    fontTextLabel->setText( tr2i18n( "Font for displayed/typed text:" ) );
    TQToolTip::add( kcfg_Font, tr2i18n( "Change the font for the student and teacher lines" ) );
    TQWhatsThis::add( kcfg_Font, tr2i18n( "This button will display a font dialog where you can change the font for the student and the teacher lines. When you leave the font dialog, the new font is previewed in the line below and only applied when you click the Apply button below." ) );
    kcfg_OverrideLectureFont->setText( tr2i18n( "Override lecture font" ) );
    TQToolTip::add( kcfg_OverrideLectureFont, tr2i18n( "If you want to override the font of the training lecture check this box and set your own font." ) );
    TQWhatsThis::add( kcfg_OverrideLectureFont, tr2i18n( "Most lectures suggest a font to use. This is necessary for not so common languages where characters may be displayed in a strange way and distort the sliding line. If you check this button you can choose your own font and override the lecture font." ) );
}

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

TQMetaObject *KTouchPrefGeneralLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KTouchPrefGeneralLayout( "KTouchPrefGeneralLayout", &KTouchPrefGeneralLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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