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

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

#include "kcmgtkwidget.h"

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

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

    styleGroup = new TQButtonGroup( this, "styleGroup" );
    styleGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, styleGroup->sizePolicy().hasHeightForWidth() ) );
    styleGroup->setColumnLayout(0, TQt::Vertical );
    styleGroup->layout()->setSpacing( 6 );
    styleGroup->layout()->setMargin( 11 );
    styleGroupLayout = new TQHBoxLayout( styleGroup->layout() );
    styleGroupLayout->setAlignment( TQt::AlignTop );

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

    styleIcon = new TQLabel( styleGroup, "styleIcon" );
    styleIcon->setScaledContents( true );
    layout12->addWidget( styleIcon );
    spacer3 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout12->addItem( spacer3 );
    styleGroupLayout->addLayout( layout12 );

    layout17 = new TQGridLayout( 0, 1, 1, 0, 6, "layout17"); 
    spacer8_2 = new TQSpacerItem( 150, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout17->addItem( spacer8_2, 1, 2 );

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

    warning3 = new TQPushButton( styleGroup, "warning3" );
    layout16->addWidget( warning3 );
    spacer12 = new TQSpacerItem( 176, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout16->addItem( spacer12 );

    layout17->addMultiCellLayout( layout16, 3, 3, 0, 2 );

    styleKde = new TQRadioButton( styleGroup, "styleKde" );

    layout17->addMultiCellWidget( styleKde, 0, 0, 0, 2 );

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

    layout17->addWidget( styleBox, 1, 1 );

    styleOther = new TQRadioButton( styleGroup, "styleOther" );
    styleOther->setChecked( false );

    layout17->addWidget( styleOther, 1, 0 );

    warning1 = new TQLabel( styleGroup, "warning1" );

    layout17->addMultiCellWidget( warning1, 2, 2, 0, 2 );

    warning2 = new KURLLabel( styleGroup, "warning2" );

    layout17->addMultiCellWidget( warning2, 4, 4, 0, 2 );
    styleGroupLayout->addLayout( layout17 );
    KcmGtkWidgetLayout->addWidget( styleGroup );

    styleGroup3 = new TQButtonGroup( this, "styleGroup3" );
    styleGroup3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, styleGroup3->sizePolicy().hasHeightForWidth() ) );
    styleGroup3->setColumnLayout(0, TQt::Vertical );
    styleGroup3->layout()->setSpacing( 6 );
    styleGroup3->layout()->setMargin( 11 );
    styleGroup3Layout = new TQHBoxLayout( styleGroup3->layout() );
    styleGroup3Layout->setAlignment( TQt::AlignTop );

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

    styleIcon3 = new TQLabel( styleGroup3, "styleIcon3" );
    styleIcon3->setScaledContents( true );
    layout12_2->addWidget( styleIcon3 );
    spacer3_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout12_2->addItem( spacer3_2 );
    styleGroup3Layout->addLayout( layout12_2 );

    layout17_2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout17_2"); 
    spacer8_2_2 = new TQSpacerItem( 150, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout17_2->addItem( spacer8_2_2, 1, 2 );

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

    warning6 = new TQPushButton( styleGroup3, "warning6" );
    layout16_2->addWidget( warning6 );
    spacer12_2 = new TQSpacerItem( 176, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout16_2->addItem( spacer12_2 );

    layout17_2->addMultiCellLayout( layout16_2, 3, 3, 0, 2 );

    styleKde3 = new TQRadioButton( styleGroup3, "styleKde3" );

    layout17_2->addMultiCellWidget( styleKde3, 0, 0, 0, 2 );

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

    layout17_2->addWidget( styleBox3, 1, 1 );

    styleOther3 = new TQRadioButton( styleGroup3, "styleOther3" );
    styleOther3->setChecked( false );

    layout17_2->addWidget( styleOther3, 1, 0 );

    warning4 = new TQLabel( styleGroup3, "warning4" );

    layout17_2->addMultiCellWidget( warning4, 2, 2, 0, 2 );

    warning5 = new KURLLabel( styleGroup3, "warning5" );

    layout17_2->addMultiCellWidget( warning5, 4, 4, 0, 2 );
    styleGroup3Layout->addLayout( layout17_2 );
    KcmGtkWidgetLayout->addWidget( styleGroup3 );

    fontGroup = new TQButtonGroup( this, "fontGroup" );
    fontGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, fontGroup->sizePolicy().hasHeightForWidth() ) );
    fontGroup->setColumnLayout(0, TQt::Vertical );
    fontGroup->layout()->setSpacing( 6 );
    fontGroup->layout()->setMargin( 11 );
    fontGroupLayout = new TQHBoxLayout( fontGroup->layout() );
    fontGroupLayout->setAlignment( TQt::AlignTop );

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

    fontIcon = new TQLabel( fontGroup, "fontIcon" );
    fontIcon->setScaledContents( true );
    layout7_2->addWidget( fontIcon );
    spacer3_2_2 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout7_2->addItem( spacer3_2_2 );
    fontGroupLayout->addLayout( layout7_2 );

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

    fontChange = new TQPushButton( fontGroup, "fontChange" );

    layout14->addWidget( fontChange, 1, 1 );
    spacer7 = new TQSpacerItem( 238, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout14->addItem( spacer7, 1, 2 );

    fontOther = new TQRadioButton( fontGroup, "fontOther" );

    layout14->addWidget( fontOther, 1, 0 );

    layout10 = new TQHBoxLayout( 0, 0, 6, "layout10"); 
    spacer8_3 = new TQSpacerItem( 20, 10, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout10->addItem( spacer8_3 );

    fontPreview2 = new KSqueezedTextLabel( fontGroup, "fontPreview2" );
    layout10->addWidget( fontPreview2 );

    layout14->addMultiCellLayout( layout10, 3, 3, 0, 2 );

    fontKde = new TQRadioButton( fontGroup, "fontKde" );

    layout14->addMultiCellWidget( fontKde, 0, 0, 0, 2 );

    layout13 = new TQHBoxLayout( 0, 0, 6, "layout13"); 
    spacer9 = new TQSpacerItem( 20, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout13->addItem( spacer9 );

    fontPreview = new KSqueezedTextLabel( fontGroup, "fontPreview" );
    fontPreview->setAlignment( int( KSqueezedTextLabel::AlignVCenter ) );
    layout13->addWidget( fontPreview );

    layout14->addMultiCellLayout( layout13, 2, 2, 0, 2 );
    fontGroupLayout->addLayout( layout14 );
    KcmGtkWidgetLayout->addWidget( fontGroup );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQHBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

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

    keyboardIcon = new TQLabel( groupBox2, "keyboardIcon" );
    layout10_2->addWidget( keyboardIcon );
    spacer10 = new TQSpacerItem( 21, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout10_2->addItem( spacer10 );
    groupBox2Layout->addLayout( layout10_2 );

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

    emacsBox = new TQCheckBox( groupBox2, "emacsBox" );
    layout12_3->addWidget( emacsBox );

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

    emacsDetails = new TQPushButton( groupBox2, "emacsDetails" );
    layout11->addWidget( emacsDetails );
    spacer11_2 = new TQSpacerItem( 141, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout11->addItem( spacer11_2 );
    layout12_3->addLayout( layout11 );
    groupBox2Layout->addLayout( layout12_3 );
    KcmGtkWidgetLayout->addWidget( groupBox2 );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    KcmGtkWidgetLayout->addWidget( textLabel1_2 );
    spacer2 = new TQSpacerItem( 51, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KcmGtkWidgetLayout->addItem( spacer2 );
    languageChange();
    resize( TQSize(506, 615).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( styleKde, styleOther );
    setTabOrder( styleOther, styleBox );
    setTabOrder( styleBox, warning3 );
    setTabOrder( warning3, warning2 );
    setTabOrder( warning2, styleKde3 );
    setTabOrder( styleKde3, styleOther3 );
    setTabOrder( styleOther3, styleBox3 );
    setTabOrder( styleBox3, warning4 );
    setTabOrder( warning4, warning5 );
    setTabOrder( warning5, fontKde );
    setTabOrder( fontKde, fontOther );
    setTabOrder( fontOther, fontChange );
    setTabOrder( fontChange, emacsBox );
    setTabOrder( emacsBox, emacsDetails );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KcmGtkWidget::languageChange()
{
    setCaption( tr2i18n( "Form2" ) );
    styleGroup->setTitle( tr2i18n( "GTK2 Styles" ) );
    warning3->setText( tr2i18n( "Change search paths..." ) );
    styleKde->setText( tr2i18n( "&Use my TDE style in GTK2 applications" ) );
    styleOther->setText( tr2i18n( "Use &another style:" ) );
    warning1->setText( tr2i18n( "<b>Warning:</b> The GTK2-TQt theme engine is not installed.  This means you will not be able to use your TDE style in GTK2 applications." ) );
    warning2->setText( tr2i18n( "GTK2-TQt theme engine homepage" ) );
    warning2->setProperty( "url", tr2i18n( "http://gtk-qt.ecs.soton.ac.uk/" ) );
    styleGroup3->setTitle( tr2i18n( "GTK3 Styles" ) );
    warning6->setText( tr2i18n( "Change search paths..." ) );
    styleKde3->setText( tr2i18n( "&Use my TDE style in GTK3 applications" ) );
    styleOther3->setText( tr2i18n( "Use &another style:" ) );
    warning4->setText( tr2i18n( "<b>Warning:</b> The Gtk3-TQt theme engine is not installed.  This means you will not be able to use your TDE style in GTK3 applications." ) );
    warning5->setText( tr2i18n( "Gtk3-TQt theme engine homepage" ) );
    warning5->setProperty( "url", tr2i18n( "http://www.trinitydesktop.org/" ) );
    fontGroup->setTitle( tr2i18n( "GTK2 Fonts" ) );
    fontChange->setText( tr2i18n( "Change..." ) );
    fontOther->setText( tr2i18n( "Use another font:" ) );
    fontPreview2->setText( tr2i18n( "The Quick Brown Fox Jumped Over The Lazy Dog" ) );
    fontKde->setText( tr2i18n( "Use m&y TDE fonts in GTK2 applications" ) );
    fontPreview->setText( tr2i18n( "Preview line 1" ) );
    groupBox2->setTitle( tr2i18n( "GTK2 Keyboard Shortcuts" ) );
    keyboardIcon->setText( TQString::null );
    emacsBox->setText( tr2i18n( "Use Emacs-like key&board shortcuts for text editing" ) );
    emacsDetails->setText( tr2i18n( "Details..." ) );
    textLabel1_2->setText( tr2i18n( "Note that changes made here will only affect GTK applications when TDE is running.  To change the styles and fonts used by applications in GNOME, use the GNOME configuration tools." ) );
}

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

TQMetaObject *KcmGtkWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KcmGtkWidget( "KcmGtkWidget", &KcmGtkWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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