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

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

#include "configdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    buttonsize = new TQSpinBox( buttongroup, "buttonsize" );
    buttonsize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, buttonsize->sizePolicy().hasHeightForWidth() ) );
    buttonsize->setButtonSymbols( TQSpinBox::UpDownArrows );
    buttonsize->setMaxValue( 64 );
    buttonsize->setMinValue( 1 );
    buttonsize->setValue( 16 );

    buttongroupLayout->addMultiCellWidget( buttonsize, 0, 0, 2, 3 );

    animatebuttons = new TQCheckBox( buttongroup, "animatebuttons" );
    animatebuttons->setEnabled( true );
    animatebuttons->setChecked( true );

    buttongroupLayout->addMultiCellWidget( animatebuttons, 1, 1, 0, 3 );

    textLabel4 = new TQLabel( buttongroup, "textLabel4" );

    buttongroupLayout->addMultiCellWidget( textLabel4, 0, 0, 0, 1 );

    menuClose = new TQCheckBox( buttongroup, "menuClose" );
    menuClose->setEnabled( true );

    buttongroupLayout->addMultiCellWidget( menuClose, 3, 3, 0, 3 );
    spacer3 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    buttongroupLayout->addItem( spacer3, 2, 0 );

    btnComboBox = new TQComboBox( false, buttongroup, "btnComboBox" );
    btnComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, btnComboBox->sizePolicy().hasHeightForWidth() ) );

    buttongroupLayout->addWidget( btnComboBox, 2, 3 );

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

    buttongroupLayout->addMultiCellWidget( textLabel2, 2, 2, 1, 2 );
    spacer2 = new TQSpacerItem( 180, 140, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttongroupLayout->addMultiCell( spacer2, 0, 3, 4, 4 );

    ConfigDialogLayout->addWidget( buttongroup, 1, 0 );

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

    textLabel1_3 = new TQLabel( titlegroup, "textLabel1_3" );

    titlegroupLayout->addWidget( textLabel1_3, 0, 0 );

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

    titlegroupLayout->addWidget( textLabel1_2, 3, 0 );

    textLabel1 = new TQLabel( titlegroup, "textLabel1" );

    titlegroupLayout->addMultiCellWidget( textLabel1, 1, 2, 0, 0 );

    titlesize = new TQSpinBox( titlegroup, "titlesize" );
    titlesize->setMaxValue( 64 );
    titlesize->setMinValue( 16 );

    titlegroupLayout->addMultiCellWidget( titlesize, 2, 2, 1, 2 );

    framesize = new TQSpinBox( titlegroup, "framesize" );
    framesize->setMaxValue( 64 );
    framesize->setMinValue( 1 );
    framesize->setValue( 4 );

    titlegroupLayout->addMultiCellWidget( framesize, 3, 3, 1, 2 );

    titlealign = new TQButtonGroup( titlegroup, "titlealign" );
    titlealign->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, titlealign->sizePolicy().hasHeightForWidth() ) );
    titlealign->setFrameShape( TQButtonGroup::GroupBoxPanel );
    titlealign->setFrameShadow( TQButtonGroup::Sunken );
    titlealign->setLineWidth( 0 );
    titlealign->setAlignment( int( TQButtonGroup::AlignTop ) );
    titlealign->setColumnLayout(0, TQt::Vertical );
    titlealign->layout()->setSpacing( 6 );
    titlealign->layout()->setMargin( 0 );
    titlealignLayout = new TQHBoxLayout( titlealign->layout() );
    titlealignLayout->setAlignment( TQt::AlignTop );

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

    AlignLeft = new TQRadioButton( titlealign, "AlignLeft" );
    layout14->addWidget( AlignLeft );

    AlignHCenter = new TQRadioButton( titlealign, "AlignHCenter" );
    AlignHCenter->setChecked( true );
    layout14->addWidget( AlignHCenter );

    AlignRight = new TQRadioButton( titlealign, "AlignRight" );
    layout14->addWidget( AlignRight );
    titlealignLayout->addLayout( layout14 );

    titlegroupLayout->addMultiCellWidget( titlealign, 0, 1, 1, 2 );
    spacer1 = new TQSpacerItem( 231, 71, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    titlegroupLayout->addMultiCell( spacer1, 0, 3, 3, 3 );

    roundCorners = new TQCheckBox( titlegroup, "roundCorners" );
    roundCorners->setChecked( true );

    titlegroupLayout->addMultiCellWidget( roundCorners, 4, 4, 2, 3 );

    titleshadow = new TQCheckBox( titlegroup, "titleshadow" );
    titleshadow->setChecked( true );

    titlegroupLayout->addMultiCellWidget( titleshadow, 4, 4, 0, 1 );

    ConfigDialogLayout->addWidget( titlegroup, 0, 0 );
    languageChange();
    resize( TQSize(634, 371).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( animatebuttons, TQ_SIGNAL( toggled(bool) ), textLabel2, TQ_SLOT( setEnabled(bool) ) );
    connect( animatebuttons, TQ_SIGNAL( toggled(bool) ), btnComboBox, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( AlignLeft, AlignHCenter );
    setTabOrder( AlignHCenter, AlignRight );
    setTabOrder( AlignRight, titlesize );
    setTabOrder( titlesize, framesize );
    setTabOrder( framesize, titleshadow );
    setTabOrder( titleshadow, roundCorners );
    setTabOrder( roundCorners, buttonsize );
    setTabOrder( buttonsize, animatebuttons );
    setTabOrder( animatebuttons, btnComboBox );
    setTabOrder( btnComboBox, menuClose );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigDialog::languageChange()
{
    setCaption( tr2i18n( "Config Dialog" ) );
    buttongroup->setTitle( tr2i18n( "Buttons" ) );
    buttonsize->setSuffix( tr2i18n( " pixels" ) );
    buttonsize->setSpecialValueText( tr2i18n( "1 pixel" ) );
    animatebuttons->setText( tr2i18n( "Animate buttons" ) );
    TQWhatsThis::add( animatebuttons, tr2i18n( "Check this option if you want to use button animations when hovering with the mouse." ) );
    textLabel4->setText( tr2i18n( "Button size:" ) );
    menuClose->setText( tr2i18n( "Close window when menu double clicked" ) );
    btnComboBox->clear();
    btnComboBox->insertItem( tr2i18n( "Intensify" ) );
    btnComboBox->insertItem( tr2i18n( "Fade" ) );
    textLabel2->setText( tr2i18n( "Animation style:" ) );
    titlegroup->setTitle( tr2i18n( "Title Bar" ) );
    textLabel1_3->setText( tr2i18n( "Text alignment:" ) );
    textLabel1_2->setText( tr2i18n( "Frame width:" ) );
    textLabel1->setText( tr2i18n( "Title height:" ) );
    titlesize->setSuffix( tr2i18n( " pixels" ) );
    framesize->setSuffix( tr2i18n( " pixels" ) );
    framesize->setSpecialValueText( tr2i18n( "1 pixel" ) );
    titlealign->setTitle( TQString::null );
    TQToolTip::add( titlealign, TQString::null );
    TQWhatsThis::add( titlealign, tr2i18n( "Use these buttons to set the alignment of the window title" ) );
    AlignLeft->setText( tr2i18n( "Left" ) );
    TQToolTip::add( AlignLeft, TQString::null );
    AlignHCenter->setText( tr2i18n( "Center" ) );
    TQToolTip::add( AlignHCenter, TQString::null );
    AlignRight->setText( tr2i18n( "Right" ) );
    TQToolTip::add( AlignRight, TQString::null );
    roundCorners->setText( tr2i18n( "Round top corners" ) );
    titleshadow->setText( tr2i18n( "Use shadowed text" ) );
    TQWhatsThis::add( titleshadow, tr2i18n( "Check this option if you want the titlebar text to have a 3D look with a shadow behind it." ) );
}

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

TQMetaObject *ConfigDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigDialog( "ConfigDialog", &ConfigDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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