#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 <ntqlabel.h>
#include <ntqslider.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqspinbox.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" );
    ConfigDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "ConfigDialogLayout"); 

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

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

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    layout1->addWidget( textLabel1_2 );

    m_titleSize = new TQSlider( this, "m_titleSize" );
    m_titleSize->setMinValue( 22 );
    m_titleSize->setMaxValue( 44 );
    m_titleSize->setLineStep( 2 );
    m_titleSize->setPageStep( 2 );
    m_titleSize->setValue( 22 );
    m_titleSize->setOrientation( TQSlider::Horizontal );
    m_titleSize->setTickmarks( TQSlider::Below );
    layout1->addWidget( m_titleSize );
    layout4->addLayout( layout1 );

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout2->addWidget( textLabel2 );

    m_buttonSize = new TQSlider( this, "m_buttonSize" );
    m_buttonSize->setMinValue( 18 );
    m_buttonSize->setMaxValue( 40 );
    m_buttonSize->setLineStep( 2 );
    m_buttonSize->setPageStep( 2 );
    m_buttonSize->setValue( 18 );
    m_buttonSize->setOrientation( TQSlider::Horizontal );
    m_buttonSize->setTickmarks( TQSlider::Below );
    layout2->addWidget( m_buttonSize );
    layout4->addLayout( layout2 );

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

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

    m_borderSize = new TQSlider( this, "m_borderSize" );
    m_borderSize->setMinValue( 5 );
    m_borderSize->setMaxValue( 10 );
    m_borderSize->setPageStep( 1 );
    m_borderSize->setValue( 5 );
    m_borderSize->setOrientation( TQSlider::Horizontal );
    m_borderSize->setTickmarks( TQSlider::Below );
    layout3->addWidget( m_borderSize );
    layout4->addLayout( layout3 );

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

    m_lessRounded = new TQCheckBox( this, "m_lessRounded" );
    unnamed->addWidget( m_lessRounded );
    spacer1 = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    unnamed->addItem( spacer1 );

    textLabel99 = new TQLabel( this, "textLabel99" );
    unnamed->addWidget( textLabel99 );

    m_buttonStyle = new TQComboBox( false, this, "m_buttonStyle" );
    m_buttonStyle->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_buttonStyle->sizePolicy().hasHeightForWidth() ) );
    unnamed->addWidget( m_buttonStyle );
    layout4->addLayout( unnamed );
    layout11->addLayout( layout4 );

    layout10 = new TQHBoxLayout( 0, 0, 16, "layout10"); 

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

    m_resizeHandle = new TQCheckBox( this, "m_resizeHandle" );
    layout9->addWidget( m_resizeHandle );

    m_superSize = new TQCheckBox( this, "m_superSize" );
    layout9->addWidget( m_superSize );
    layout10->addLayout( layout9 );

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

    m_titleShadow = new TQCheckBox( this, "m_titleShadow" );
    layout6->addWidget( m_titleShadow );

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

    textLabel3 = new TQLabel( this, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
    layout99->addWidget( textLabel3 );

    m_titleShadowSize = new TQSpinBox( this, "m_titleShadowSize" );
    m_titleShadowSize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_titleShadowSize->sizePolicy().hasHeightForWidth() ) );
    m_titleShadowSize->setButtonSymbols( TQSpinBox::UpDownArrows );
    m_titleShadowSize->setMaxValue( 3 );
    m_titleShadowSize->setMinValue( 1 );
    m_titleShadowSize->setValue( 2 );
    layout99->addWidget( m_titleShadowSize );
    layout6->addLayout( layout99 );
    layout10->addLayout( layout6 );
    layout11->addLayout( layout10 );

    ConfigDialogLayout->addLayout( layout11, 0, 0 );
    languageChange();
    resize( TQSize(421, 308).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel1_2->setBuddy( m_titleSize );
    textLabel2->setBuddy( m_buttonSize );
    textLabel1->setBuddy( m_borderSize );
    textLabel99->setBuddy( m_buttonStyle );
    textLabel3->setBuddy( m_titleShadowSize );
}

/*
 *  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" ) );
    textLabel1_2->setText( tr2i18n( "&Titlebar size:" ) );
    textLabel1_2->setProperty( "accel", TQKeySequence( tr2i18n( "Alt+T" ) ) );
    textLabel2->setText( tr2i18n( "&Button size:" ) );
    textLabel2->setProperty( "accel", TQKeySequence( tr2i18n( "Alt+B" ) ) );
    textLabel1->setText( tr2i18n( "B&order size:" ) );
    textLabel1->setProperty( "accel", TQKeySequence( tr2i18n( "Alt+O" ) ) );
    TQWhatsThis::add( m_borderSize, tr2i18n( "Here you can change the size of the borders to fit your taste." ) );
    m_lessRounded->setText( tr2i18n( "Less rou&nded corners" ) );
    m_lessRounded->setAccel( TQKeySequence( tr2i18n( "Alt+N" ) ) );
    textLabel99->setText( tr2i18n( "Buttons st&yle:" ) );
    textLabel99->setProperty( "accel", TQKeySequence( tr2i18n( "Alt+U" ) ) );
    m_buttonStyle->clear();
    m_buttonStyle->insertItem( tr2i18n( "Round" ) );
    m_buttonStyle->insertItem( tr2i18n( "Square" ) );
    m_resizeHandle->setText( tr2i18n( "Paint resize &handles" ) );
    m_resizeHandle->setAccel( TQKeySequence( tr2i18n( "Alt+H" ) ) );
    m_superSize->setText( tr2i18n( "Supersi&ze handles" ) );
    m_superSize->setAccel( TQKeySequence( tr2i18n( "Alt+Z" ) ) );
    m_titleShadow->setText( tr2i18n( "Paint titlebar &shadow" ) );
    m_titleShadow->setAccel( TQKeySequence( tr2i18n( "Alt+S" ) ) );
    TQWhatsThis::add( m_titleShadow, tr2i18n( "Check this option if you want the buttons and title to have a 3D look with a shadow behind them." ) );
    textLabel3->setText( tr2i18n( "Shadow &distance:" ) );
}

/****************************************************************************
** 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
