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

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

#include "cssconfig.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, ButtonGroup1->sizePolicy().hasHeightForWidth() ) );
    ButtonGroup1->setExclusive( true );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new TQVBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    useDefault = new TQRadioButton( ButtonGroup1, "useDefault" );
    useDefault->setChecked( true );
    ButtonGroup1Layout->addWidget( useDefault );

    useUser = new TQRadioButton( ButtonGroup1, "useUser" );
    ButtonGroup1Layout->addWidget( useUser );

    layout3 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 
    spacer9_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout3->addItem( spacer9_2 );

    urlRequester = new KURLRequester( ButtonGroup1, "urlRequester" );
    urlRequester->setEnabled( false );
    layout3->addWidget( urlRequester );
    ButtonGroup1Layout->addLayout( layout3 );

    useAccess = new TQRadioButton( ButtonGroup1, "useAccess" );
    useAccess->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, useAccess->sizePolicy().hasHeightForWidth() ) );
    ButtonGroup1Layout->addWidget( useAccess );

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

    customize = new TQPushButton( ButtonGroup1, "customize" );
    customize->setEnabled( false );
    layout2->addWidget( customize );
    spacer3 = new TQSpacerItem( 451, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer3 );
    ButtonGroup1Layout->addLayout( layout2 );
    CSSConfigDialogLayout->addWidget( ButtonGroup1 );
    spacer11 = new TQSpacerItem( 20, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    CSSConfigDialogLayout->addItem( spacer11 );
    languageChange();
    resize( TQSize(487, 195).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( useAccess, TQ_SIGNAL( toggled(bool) ), customize, TQ_SLOT( setEnabled(bool) ) );
    connect( useUser, TQ_SIGNAL( toggled(bool) ), urlRequester, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CSSConfigDialog::languageChange()
{
    TQWhatsThis::add( this, tr2i18n( "<b>Stylesheets</b><p>See http://www.w3.org/Style/CSS for further information on cascading style sheets.</p>" ) );
    ButtonGroup1->setTitle( tr2i18n( "Stylesheets" ) );
    TQWhatsThis::add( ButtonGroup1, tr2i18n( "<b>Stylesheets</b><p>Use this groupbox to determine how Konqueror will render style sheets.</p>" ) );
    useDefault->setText( tr2i18n( "Us&e default stylesheet" ) );
    TQWhatsThis::add( useDefault, tr2i18n( "<b>Use default stylesheet</b><p>Select this option to use the default stylesheet.</p>" ) );
    useUser->setText( tr2i18n( "Use &user-defined stylesheet" ) );
    TQWhatsThis::add( useUser, tr2i18n( "<b>Use user-defined stylesheet</b><p>If this box is checked, Konqueror will try to load a user-defined style sheet as specified in the location below. The style sheet allows you to completely override the way web pages are rendered in your browser. The file specified should contain a valid style sheet (see http://www.w3.org/Style/CSS for further information on cascading style sheets).</p>" ) );
    useAccess->setText( tr2i18n( "U&se accessibility stylesheet" ) );
    TQWhatsThis::add( useAccess, tr2i18n( "<b>Use accessibility stylesheet</b><p>Selecting this option will allow you to define a default font, font size, and font color with a few simple clicks of the mouse. Simply wander over to the Customize... dialog and pick out your desired options.</p>" ) );
    customize->setText( tr2i18n( "Custom&ize..." ) );
}

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

TQMetaObject *CSSConfigDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CSSConfigDialog( "CSSConfigDialog", &CSSConfigDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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