#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdebase3/kdebase3-3.5.10-11.i686/src/kdebase-3.5.10/kcontrol/css/cssconfig.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "cssconfig.h"

#include <qvariant.h>
#include <kdialog.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <kurlrequester.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"

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

    ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, ButtonGroup1->sizePolicy().hasHeightForWidth() ) );
    ButtonGroup1->setExclusive( TRUE );
    ButtonGroup1->setColumnLayout(0, Qt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new QVBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( Qt::AlignTop );

    useDefault = new QRadioButton( ButtonGroup1, "useDefault" );
    useDefault->setChecked( TRUE );
    ButtonGroup1Layout->addWidget( useDefault );

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

    layout3 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 
    spacer9_2 = new QSpacerItem( 16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    layout3->addItem( spacer9_2 );

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

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

    layout2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 
    spacer9 = new QSpacerItem( 16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    layout2->addItem( spacer9 );

    customize = new QPushButton( ButtonGroup1, "customize" );
    customize->setEnabled( FALSE );
    layout2->addWidget( customize );
    spacer3 = new QSpacerItem( 451, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer3 );
    ButtonGroup1Layout->addLayout( layout2 );
    CSSConfigDialogLayout->addWidget( ButtonGroup1 );
    spacer11 = new QSpacerItem( 20, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
    CSSConfigDialogLayout->addItem( spacer11 );
    languageChange();
    resize( QSize(487, 195).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CSSConfigDialog::languageChange()
{
    QWhatsThis::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" ) );
    QWhatsThis::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" ) );
    QWhatsThis::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" ) );
    QWhatsThis::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" ) );
    QWhatsThis::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..." ) );
}

#include "cssconfig.moc"
