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

#include "ikwsopts_ui.h"

#include <qvariant.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <kcombobox.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <klistview.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

    cbEnableShortcuts = new QCheckBox( this, "cbEnableShortcuts" );
    FilterOptionsUILayout->addWidget( cbEnableShortcuts );

    layout10 = new QGridLayout( 0, 1, 1, 0, 6, "layout10"); 

    lbDelimiter = new QLabel( this, "lbDelimiter" );
    lbDelimiter->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, lbDelimiter->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( lbDelimiter, 5, 0 );

    lbDefaultEngine = new QLabel( this, "lbDefaultEngine" );
    lbDefaultEngine->setEnabled( TRUE );
    lbDefaultEngine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, lbDefaultEngine->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( lbDefaultEngine, 4, 0 );

    cmbDefaultEngine = new KComboBox( FALSE, this, "cmbDefaultEngine" );
    cmbDefaultEngine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, cmbDefaultEngine->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( cmbDefaultEngine, 4, 1 );

    pbChange = new QPushButton( this, "pbChange" );
    pbChange->setEnabled( FALSE );

    layout10->addWidget( pbChange, 1, 2 );

    pbDelete = new QPushButton( this, "pbDelete" );
    pbDelete->setEnabled( FALSE );

    layout10->addWidget( pbDelete, 2, 2 );

    pbNew = new QPushButton( this, "pbNew" );

    layout10->addWidget( pbNew, 0, 2 );
    spacer1 = new QSpacerItem( 21, 170, QSizePolicy::Minimum, QSizePolicy::Expanding );
    layout10->addMultiCell( spacer1, 3, 5, 2, 2 );

    lvSearchProviders = new KListView( this, "lvSearchProviders" );
    lvSearchProviders->addColumn( tr2i18n( "Name" ) );
    lvSearchProviders->addColumn( tr2i18n( "Shortcuts" ) );
    lvSearchProviders->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 1, lvSearchProviders->sizePolicy().hasHeightForWidth() ) );
    lvSearchProviders->setShowSortIndicator( TRUE );
    lvSearchProviders->setResizeMode( KListView::AllColumns );
    lvSearchProviders->setTreeStepSize( 0 );

    layout10->addMultiCellWidget( lvSearchProviders, 0, 3, 0, 1 );

    cmbDelimiter = new KComboBox( FALSE, this, "cmbDelimiter" );
    cmbDelimiter->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, cmbDelimiter->sizePolicy().hasHeightForWidth() ) );

    layout10->addWidget( cmbDelimiter, 5, 1 );
    FilterOptionsUILayout->addLayout( layout10 );
    languageChange();
    resize( QSize(360, 327).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( cbEnableShortcuts, lvSearchProviders );
    setTabOrder( lvSearchProviders, pbNew );
    setTabOrder( pbNew, pbChange );
    setTabOrder( pbChange, pbDelete );
    setTabOrder( pbDelete, cmbDefaultEngine );
    setTabOrder( cmbDefaultEngine, cmbDelimiter );

    // buddies
    lbDelimiter->setBuddy( cmbDelimiter );
    lbDefaultEngine->setBuddy( cmbDefaultEngine );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FilterOptionsUI::languageChange()
{
    cbEnableShortcuts->setText( tr2i18n( "&Enable Web shortcuts" ) );
    QWhatsThis::add( cbEnableShortcuts, tr2i18n( "<qt>\n"
"Enable shortcuts that allow you to quickly search for information on the web. For example, entering the shortcut <b>gg:KDE</b> will result in a search of the word <b>KDE</b> on the Google(TM) search engine.\n"
"</qt>" ) );
    lbDelimiter->setText( tr2i18n( "&Keyword delimiter:" ) );
    QWhatsThis::add( lbDelimiter, tr2i18n( "Choose the delimiter that separates the keyword from the phrase or word to be searched." ) );
    lbDefaultEngine->setText( tr2i18n( "Default &search engine:" ) );
    QWhatsThis::add( lbDefaultEngine, tr2i18n( "<qt>\n"
"Select the search engine to use for input boxes that provide automatic lookup services when you type in normal words and phrases instead of a URL. To disable this feature select <b>None</b> from the list.\n"
"</qt>" ) );
    cmbDefaultEngine->clear();
    cmbDefaultEngine->insertItem( tr2i18n( "None" ) );
    QWhatsThis::add( cmbDefaultEngine, tr2i18n( "<qt>\n"
"Select the search engine to use for input boxes that provide automatic lookup services when you type in normal words and phrases instead of a URL. To disable this feature select <b>None</b> from the list.\n"
"</qt>" ) );
    pbChange->setText( tr2i18n( "Chan&ge..." ) );
    QWhatsThis::add( pbChange, tr2i18n( "Modify a search provider." ) );
    pbDelete->setText( tr2i18n( "De&lete" ) );
    QWhatsThis::add( pbDelete, tr2i18n( "Delete the selected search provider." ) );
    pbNew->setText( tr2i18n( "&New..." ) );
    QWhatsThis::add( pbNew, tr2i18n( "Add a search provider." ) );
    lvSearchProviders->header()->setLabel( 0, tr2i18n( "Name" ) );
    lvSearchProviders->header()->setLabel( 1, tr2i18n( "Shortcuts" ) );
    QWhatsThis::add( lvSearchProviders, tr2i18n( "List of search providers, their associated shortcuts and whether they shall be listed in menus." ) );
    cmbDelimiter->clear();
    cmbDelimiter->insertItem( tr2i18n( "Colon" ) );
    cmbDelimiter->insertItem( tr2i18n( "Space" ) );
    QWhatsThis::add( cmbDelimiter, tr2i18n( "Choose the delimiter that separates the keyword from the phrase or word to be searched." ) );
}

#include "ikwsopts_ui.moc"
