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

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

#include "kmousedlg.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqframe.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    handedBox = new TQButtonGroup( this, "handedBox" );
    handedBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, handedBox->sizePolicy().hasHeightForWidth() ) );
    handedBox->setFrameShape( TQButtonGroup::GroupBoxPanel );
    handedBox->setFrameShadow( TQButtonGroup::Sunken );
    handedBox->setExclusive( true );
    handedBox->setRadioButtonExclusive( true );
    handedBox->setColumnLayout(0, TQt::Vertical );
    handedBox->layout()->setSpacing( KDialog::spacingHint() );
    handedBox->layout()->setMargin( KDialog::marginHint() );
    handedBoxLayout = new TQGridLayout( handedBox->layout() );
    handedBoxLayout->setAlignment( TQt::AlignTop );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    handedBoxLayout->addItem( Spacer1, 2, 2 );
    Spacer53 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    handedBoxLayout->addItem( Spacer53, 2, 0 );

    rightHanded = new TQRadioButton( handedBox, "rightHanded" );
    rightHanded->setChecked( true );

    handedBoxLayout->addWidget( rightHanded, 0, 0 );

    leftHanded = new TQRadioButton( handedBox, "leftHanded" );

    handedBoxLayout->addWidget( leftHanded, 1, 0 );

    mousePix = new TQLabel( handedBox, "mousePix" );
    mousePix->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, mousePix->sizePolicy().hasHeightForWidth() ) );
    mousePix->setMaximumSize( TQSize( 150, 115 ) );
    mousePix->setScaledContents( true );

    handedBoxLayout->addMultiCellWidget( mousePix, 0, 2, 1, 1 );
    KMouseDlgLayout->addWidget( handedBox );

    cbScrollPolarity = new TQCheckBox( this, "cbScrollPolarity" );
    KMouseDlgLayout->addWidget( cbScrollPolarity );

    cbRevHistButtons = new TQCheckBox( this, "cbRevHistButtons" );
    KMouseDlgLayout->addWidget( cbRevHistButtons );

    GroupBox1 = new TQGroupBox( this, "GroupBox1" );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox1->layout()->setMargin( KDialog::marginHint() );
    GroupBox1Layout = new TQGridLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

    doubleClick = new TQRadioButton( GroupBox1, "doubleClick" );
    doubleClick->setChecked( false );

    GroupBox1Layout->addMultiCellWidget( doubleClick, 0, 0, 0, 2 );

    Line1 = new TQFrame( GroupBox1, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );

    GroupBox1Layout->addMultiCellWidget( Line1, 5, 5, 0, 2 );

    cbVisualActivate = new TQCheckBox( GroupBox1, "cbVisualActivate" );

    GroupBox1Layout->addMultiCellWidget( cbVisualActivate, 6, 6, 0, 2 );

    cb_pointershape = new TQCheckBox( GroupBox1, "cb_pointershape" );
    cb_pointershape->setChecked( true );

    GroupBox1Layout->addMultiCellWidget( cb_pointershape, 2, 2, 1, 2 );

    cbAutoSelect = new TQCheckBox( GroupBox1, "cbAutoSelect" );

    GroupBox1Layout->addMultiCellWidget( cbAutoSelect, 3, 3, 1, 2 );
    Spacer6 = new TQSpacerItem( 20, 60, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    GroupBox1Layout->addMultiCell( Spacer6, 2, 4, 0, 0 );

    layout7 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout7"); 

    lb_short = new TQLabel( GroupBox1, "lb_short" );

    layout7->addWidget( lb_short, 1, 1 );

    slAutoSelect = new TQSlider( GroupBox1, "slAutoSelect" );
    slAutoSelect->setMinimumSize( TQSize( 250, 0 ) );
    slAutoSelect->setMaxValue( 2000 );
    slAutoSelect->setOrientation( TQSlider::Horizontal );

    layout7->addMultiCellWidget( slAutoSelect, 0, 0, 1, 2 );
    Spacer8 = new TQSpacerItem( 230, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addMultiCell( Spacer8, 0, 1, 3, 3 );

    lDelay = new TQLabel( GroupBox1, "lDelay" );

    layout7->addWidget( lDelay, 0, 0 );

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

    layout7->addWidget( lb_long, 1, 2 );

    GroupBox1Layout->addLayout( layout7, 4, 2 );
    Spacer3 = new TQSpacerItem( 20, 21, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    GroupBox1Layout->addItem( Spacer3, 4, 1 );

    singleClick = new TQRadioButton( GroupBox1, "singleClick" );
    singleClick->setChecked( true );

    GroupBox1Layout->addMultiCellWidget( singleClick, 1, 1, 0, 2 );
    KMouseDlgLayout->addWidget( GroupBox1 );
    Spacer7 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KMouseDlgLayout->addItem( Spacer7 );
    languageChange();
    resize( TQSize(568, 434).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( singleClick, TQ_SIGNAL( toggled(bool) ), cb_pointershape, TQ_SLOT( setEnabled(bool) ) );
    connect( singleClick, TQ_SIGNAL( toggled(bool) ), cbAutoSelect, TQ_SLOT( setEnabled(bool) ) );
    connect( cbAutoSelect, TQ_SIGNAL( toggled(bool) ), slAutoSelect, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( rightHanded, leftHanded );
    setTabOrder( leftHanded, singleClick );
    setTabOrder( singleClick, cb_pointershape );
    setTabOrder( cb_pointershape, cbAutoSelect );
    setTabOrder( cbAutoSelect, slAutoSelect );
    setTabOrder( slAutoSelect, doubleClick );
    setTabOrder( doubleClick, cbVisualActivate );

    // buddies
    lDelay->setBuddy( slAutoSelect );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMouseDlg::languageChange()
{
    setCaption( tr2i18n( "KMouseDlg" ) );
    handedBox->setTitle( tr2i18n( "Button Order" ) );
    rightHanded->setText( tr2i18n( "Righ&t handed" ) );
    leftHanded->setText( tr2i18n( "Le&ft handed" ) );
    cbScrollPolarity->setText( tr2i18n( "Re&verse scroll direction" ) );
    TQWhatsThis::add( cbScrollPolarity, tr2i18n( "Change the direction of scrolling for the mouse wheel, if present." ) );
    cbRevHistButtons->setText( tr2i18n( "Swap &history navigation buttons" ) );
    TQWhatsThis::add( cbRevHistButtons, tr2i18n( "Swap the two history navigation buttons on the mouse, if present." ) );
    GroupBox1->setTitle( tr2i18n( "Icons" ) );
    doubleClick->setText( tr2i18n( "Dou&ble-click to open files and folders (select icons on first click)" ) );
    cbVisualActivate->setText( tr2i18n( "Visual f&eedback on activation" ) );
    cb_pointershape->setText( tr2i18n( "Cha&nge pointer shape over icons" ) );
    cbAutoSelect->setText( tr2i18n( "A&utomatically select icons" ) );
    lb_short->setText( tr2i18n( "Short" ) );
    lDelay->setText( tr2i18n( "Dela&y:" ) );
    lb_long->setText( tr2i18n( "Long" ) );
    singleClick->setText( tr2i18n( "&Single-click to open files and folders" ) );
}

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

TQMetaObject *KMouseDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMouseDlg( "KMouseDlg", &KMouseDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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