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

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

#include "ikwsopts_ui.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <tdelistview.h>
#include <ntqcheckbox.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    cbEnableShortcuts = new TQCheckBox( this, "cbEnableShortcuts" );

    FilterOptionsUILayout->addMultiCellWidget( cbEnableShortcuts, 0, 0, 0, 2 );

    pbChange = new TQPushButton( this, "pbChange" );
    pbChange->setEnabled( false );

    FilterOptionsUILayout->addWidget( pbChange, 2, 2 );

    pbDelete = new TQPushButton( this, "pbDelete" );
    pbDelete->setEnabled( false );

    FilterOptionsUILayout->addWidget( pbDelete, 3, 2 );

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

    FilterOptionsUILayout->addWidget( pbNew, 1, 2 );

    cbCategories = new TQCheckBox( this, "cbCategories" );
    cbCategories->setChecked( true );

    FilterOptionsUILayout->addMultiCellWidget( cbCategories, 5, 5, 0, 1 );
    spacer1 = new TQSpacerItem( 21, 150, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    FilterOptionsUILayout->addItem( spacer1, 4, 2 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    FilterOptionsUILayout->addMultiCellWidget( line1, 6, 6, 0, 2 );

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

    FilterOptionsUILayout->addMultiCellWidget( cmbDefaultEngine, 7, 7, 1, 2 );

    lbDefaultEngine = new TQLabel( this, "lbDefaultEngine" );
    lbDefaultEngine->setEnabled( true );
    lbDefaultEngine->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, lbDefaultEngine->sizePolicy().hasHeightForWidth() ) );

    FilterOptionsUILayout->addWidget( lbDefaultEngine, 7, 0 );

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

    FilterOptionsUILayout->addWidget( lbDelimiter, 8, 0 );

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

    FilterOptionsUILayout->addMultiCellWidget( cmbDelimiter, 8, 8, 1, 2 );

    lvSearchProviders = new TDEListView( this, "lvSearchProviders" );
    lvSearchProviders->addColumn( tr2i18n( "Name" ) );
    lvSearchProviders->addColumn( tr2i18n( "Shortcuts" ) );
    lvSearchProviders->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 1, lvSearchProviders->sizePolicy().hasHeightForWidth() ) );
    lvSearchProviders->setShowSortIndicator( true );
    lvSearchProviders->setResizeMode( TDEListView::AllColumns );
    lvSearchProviders->setRootIsDecorated( true );

    FilterOptionsUILayout->addMultiCellWidget( lvSearchProviders, 1, 4, 0, 1 );
    languageChange();
    resize( TQSize(371, 355).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
    lbDefaultEngine->setBuddy( cmbDefaultEngine );
    lbDelimiter->setBuddy( cmbDelimiter );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FilterOptionsUI::languageChange()
{
    setCaption( tr2i18n( "FilterOptionsUI" ) );
    cbEnableShortcuts->setText( tr2i18n( "&Enable Web shortcuts" ) );
    TQWhatsThis::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:TDE</b> will result in a search of the word <b>TDE</b> on the Google(TM) search engine.\n"
"</qt>" ) );
    pbChange->setText( tr2i18n( "Chan&ge..." ) );
    TQWhatsThis::add( pbChange, tr2i18n( "Modify a search provider." ) );
    pbDelete->setText( tr2i18n( "De&lete" ) );
    TQWhatsThis::add( pbDelete, tr2i18n( "Delete the selected search provider." ) );
    pbNew->setText( tr2i18n( "&New..." ) );
    TQWhatsThis::add( pbNew, tr2i18n( "Add a search provider." ) );
    cbCategories->setText( tr2i18n( "Show grouped in &categories" ) );
    cbCategories->setAccel( TQKeySequence( tr2i18n( "Alt+C" ) ) );
    TQWhatsThis::add( cbCategories, tr2i18n( "<qt>\n"
"                    If checked, the search providers will be shown grouped by category (Web Search, Images, etc.). Otherwise, all the engines are shown ungrouped in alphabetic order.\n"
"                    </qt>" ) );
    cmbDefaultEngine->clear();
    cmbDefaultEngine->insertItem( tr2i18n( "None" ) );
    TQWhatsThis::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>" ) );
    lbDefaultEngine->setText( tr2i18n( "Default &search engine:" ) );
    TQWhatsThis::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>" ) );
    lbDelimiter->setText( tr2i18n( "&Keyword delimiter:" ) );
    TQWhatsThis::add( lbDelimiter, tr2i18n( "Choose the delimiter that separates the keyword from the phrase or word to be searched." ) );
    cmbDelimiter->clear();
    cmbDelimiter->insertItem( tr2i18n( "Colon" ) );
    cmbDelimiter->insertItem( tr2i18n( "Space" ) );
    TQWhatsThis::add( cmbDelimiter, tr2i18n( "Choose the delimiter that separates the keyword from the phrase or word to be searched." ) );
    lvSearchProviders->header()->setLabel( 0, tr2i18n( "Name" ) );
    lvSearchProviders->header()->setLabel( 1, tr2i18n( "Shortcuts" ) );
    TQWhatsThis::add( lvSearchProviders, tr2i18n( "List of search providers, their associated shortcuts and whether they shall be listed in menus." ) );
}

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

TQMetaObject *FilterOptionsUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FilterOptionsUI( "FilterOptionsUI", &FilterOptionsUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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