#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/componentchooser/browserconfig_ui.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "browserconfig_ui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qlabel.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qtoolbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kdialog.h"

/*
 *  Constructs a BrowserConfig_UI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
BrowserConfig_UI::BrowserConfig_UI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "BrowserConfig_UI" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    BrowserConfig_UILayout = new QVBoxLayout( this, 0, KDialog::spacingHint(), "BrowserConfig_UILayout"); 

    buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setFrameShape( QButtonGroup::NoFrame );
    buttonGroup1->setColumnLayout(0, Qt::Vertical );
    buttonGroup1->layout()->setSpacing( KDialog::spacingHint() );
    buttonGroup1->layout()->setMargin( KDialog::marginHint() );
    buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( Qt::AlignTop );

    label = new QLabel( buttonGroup1, "label" );
    buttonGroup1Layout->addWidget( label );

    radioKIO = new QRadioButton( buttonGroup1, "radioKIO" );
    radioKIO->setChecked( TRUE );
    buttonGroup1Layout->addWidget( radioKIO );

    radioExec = new QRadioButton( buttonGroup1, "radioExec" );
    buttonGroup1Layout->addWidget( radioExec );

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

    lineExec = new QLineEdit( buttonGroup1, "lineExec" );
    lineExec->setEnabled( FALSE );
    layout3->addWidget( lineExec );

    btnSelectBrowser = new QToolButton( buttonGroup1, "btnSelectBrowser" );
    btnSelectBrowser->setEnabled( FALSE );
    btnSelectBrowser->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, btnSelectBrowser->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( btnSelectBrowser );
    buttonGroup1Layout->addLayout( layout3 );
    BrowserConfig_UILayout->addWidget( buttonGroup1 );
    spacer9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    BrowserConfig_UILayout->addItem( spacer9 );
    languageChange();
    resize( QSize(394, 324).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( radioExec, SIGNAL( toggled(bool) ), lineExec, SLOT( setEnabled(bool) ) );
    connect( radioExec, SIGNAL( toggled(bool) ), btnSelectBrowser, SLOT( setEnabled(bool) ) );
    connect( btnSelectBrowser, SIGNAL( clicked() ), this, SLOT( selectBrowser() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void BrowserConfig_UI::languageChange()
{
    buttonGroup1->setTitle( QString::null );
    label->setText( tr2i18n( "<qt>Open <b>http</b> and <b>https</b> URLs</qt>" ) );
    radioKIO->setText( tr2i18n( "in an application based on the contents of the URL" ) );
    radioExec->setText( tr2i18n( "in the following browser:" ) );
    btnSelectBrowser->setText( tr2i18n( "..." ) );
}

void BrowserConfig_UI::selectBrowser()
{
    qWarning( "BrowserConfig_UI::selectBrowser(): Not implemented yet" );
}

#include "browserconfig_ui.moc"
