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

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

#include "kmousetoolui.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KMouseToolUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KMouseToolUI::KMouseToolUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KMouseToolUI" );
    KMouseToolUILayout = new TQGridLayout( this, 1, 1, 11, 6, "KMouseToolUILayout"); 
    spacer7 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KMouseToolUILayout->addItem( spacer7, 2, 0 );

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

    layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "layout9"); 
    dragTimeSpace = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( dragTimeSpace, 0, 0 );

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

    layout9->addWidget( dragTimeLabel, 0, 1 );

    groupBox1Layout->addLayout( layout9, 3, 0 );

    dragTimeEdit = new KIntSpinBox( groupBox1, "dragTimeEdit" );
    dragTimeEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, dragTimeEdit->sizePolicy().hasHeightForWidth() ) );
    dragTimeEdit->setMaxValue( 40 );
    dragTimeEdit->setMinValue( 1 );
    dragTimeEdit->setValue( 3 );

    groupBox1Layout->addWidget( dragTimeEdit, 3, 1 );

    dwellTimeEdit = new KIntSpinBox( groupBox1, "dwellTimeEdit" );
    dwellTimeEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, dwellTimeEdit->sizePolicy().hasHeightForWidth() ) );
    dwellTimeEdit->setMaxValue( 40 );
    dwellTimeEdit->setMinValue( 1 );
    dwellTimeEdit->setValue( 5 );

    groupBox1Layout->addWidget( dwellTimeEdit, 1, 1 );

    movementLabel = new TQLabel( groupBox1, "movementLabel" );

    groupBox1Layout->addWidget( movementLabel, 0, 0 );

    movementEdit = new KIntSpinBox( groupBox1, "movementEdit" );
    movementEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, movementEdit->sizePolicy().hasHeightForWidth() ) );
    movementEdit->setMaxValue( 40 );
    movementEdit->setMinValue( 1 );

    groupBox1Layout->addWidget( movementEdit, 0, 1 );

    cbStroke = new TQCheckBox( groupBox1, "cbStroke" );

    groupBox1Layout->addMultiCellWidget( cbStroke, 4, 4, 0, 1 );

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

    groupBox1Layout->addWidget( dwellTimeLabel, 1, 0 );

    cbDrag = new TQCheckBox( groupBox1, "cbDrag" );
    cbDrag->setChecked( true );

    groupBox1Layout->addMultiCellWidget( cbDrag, 2, 2, 0, 1 );

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

    buttonDefault = new KPushButton( groupBox1, "buttonDefault" );
    layout5->addWidget( buttonDefault );

    buttonReset = new KPushButton( groupBox1, "buttonReset" );
    layout5->addWidget( buttonReset );
    spacer4_2 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4_2 );

    buttonApply = new KPushButton( groupBox1, "buttonApply" );
    layout5->addWidget( buttonApply );

    groupBox1Layout->addMultiCellLayout( layout5, 7, 7, 0, 1 );

    cbStart = new TQCheckBox( groupBox1, "cbStart" );

    groupBox1Layout->addMultiCellWidget( cbStart, 6, 6, 0, 1 );

    cbClick = new TQCheckBox( groupBox1, "cbClick" );

    groupBox1Layout->addMultiCellWidget( cbClick, 5, 5, 0, 1 );

    KMouseToolUILayout->addWidget( groupBox1, 1, 0 );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    textLabel1->setScaledContents( false );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignJustify | TQLabel::AlignVCenter ) );
    layout5_2->addWidget( textLabel1 );
    spacer8 = new TQSpacerItem( 8, 8, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer8 );

    buttonStartStop = new KPushButton( this, "buttonStartStop" );
    buttonStartStop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, buttonStartStop->sizePolicy().hasHeightForWidth() ) );
    layout5_2->addWidget( buttonStartStop );

    KMouseToolUILayout->addLayout( layout5_2, 0, 0 );

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

    buttonHelp = new KPushButton( this, "buttonHelp" );
    layout5_3->addWidget( buttonHelp );
    spacer2 = new TQSpacerItem( 241, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5_3->addItem( spacer2 );

    buttonClose = new KPushButton( this, "buttonClose" );
    layout5_3->addWidget( buttonClose );

    buttonQuit = new KPushButton( this, "buttonQuit" );
    layout5_3->addWidget( buttonQuit );

    KMouseToolUILayout->addLayout( layout5_3, 3, 0 );
    languageChange();
    resize( TQSize(544, 395).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cbDrag, TQ_SIGNAL( toggled(bool) ), dragTimeLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( cbDrag, TQ_SIGNAL( toggled(bool) ), dragTimeEdit, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    dragTimeLabel->setBuddy( dragTimeEdit );
    movementLabel->setBuddy( movementEdit );
    dwellTimeLabel->setBuddy( dwellTimeEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMouseToolUI::languageChange()
{
    setCaption( tr2i18n( "KMouseTool" ) );
    groupBox1->setTitle( tr2i18n( "Settings" ) );
    dragTimeLabel->setText( tr2i18n( "Drag t&ime (1/10 sec):" ) );
    movementLabel->setText( tr2i18n( "&Minimum movement:" ) );
    cbStroke->setText( tr2i18n( "&Enable strokes" ) );
    dwellTimeLabel->setText( tr2i18n( "D&well time (1/10 sec):" ) );
    cbDrag->setText( tr2i18n( "Smar&t drag" ) );
    buttonDefault->setText( tr2i18n( "&Defaults" ) );
    buttonReset->setText( tr2i18n( "&Reset" ) );
    buttonApply->setText( tr2i18n( "&Apply" ) );
    cbStart->setText( tr2i18n( "Start with &TDE" ) );
    cbClick->setText( tr2i18n( "A&udible click" ) );
    textLabel1->setText( tr2i18n( "KMouseTool will run as a background application after you close this dialog. To change the settings again, restart KMouseTool or use the TDE system tray." ) );
    buttonStartStop->setText( tr2i18n( "&Start" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonClose->setText( tr2i18n( "&Close" ) );
    buttonQuit->setText( tr2i18n( "&Quit" ) );
}

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

TQMetaObject *KMouseToolUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMouseToolUI( "KMouseToolUI", &KMouseToolUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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