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

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

#include "searchpref.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SEPreferences as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SEPreferences::SEPreferences( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "SEPreferences" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 500, 350 ) );
    SEPreferencesLayout = new TQVBoxLayout( this, 11, 6, "SEPreferencesLayout"); 

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    openExternal = new TQCheckBox( buttonGroup1, "openExternal" );
    buttonGroup1Layout->addWidget( openExternal );

    useDefaultBrowser = new TQRadioButton( buttonGroup1, "useDefaultBrowser" );
    buttonGroup1Layout->addWidget( useDefaultBrowser );

    layout29 = new TQHBoxLayout( 0, 0, 6, "layout29"); 

    useCustomBrowser = new TQRadioButton( buttonGroup1, "useCustomBrowser" );
    layout29->addWidget( useCustomBrowser );

    customBrowser = new KLineEdit( buttonGroup1, "customBrowser" );
    layout29->addWidget( customBrowser );
    spacer20 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout29->addItem( spacer20 );
    buttonGroup1Layout->addLayout( layout29 );
    SEPreferencesLayout->addWidget( buttonGroup1 );

    groupBox8 = new TQGroupBox( this, "groupBox8" );
    groupBox8->setColumnLayout(0, TQt::Vertical );
    groupBox8->layout()->setSpacing( 6 );
    groupBox8->layout()->setMargin( 11 );
    groupBox8Layout = new TQVBoxLayout( groupBox8->layout() );
    groupBox8Layout->setAlignment( TQt::AlignTop );

    m_infoLabel = new KActiveLabel( groupBox8, "m_infoLabel" );
    groupBox8Layout->addWidget( m_infoLabel );

    layout22 = new TQHBoxLayout( 0, 0, 6, "layout22"); 

    textLabel3 = new TQLabel( groupBox8, "textLabel3" );
    layout22->addWidget( textLabel3 );

    m_engine_name = new KLineEdit( groupBox8, "m_engine_name" );
    layout22->addWidget( m_engine_name );
    groupBox8Layout->addLayout( layout22 );

    layout23 = new TQHBoxLayout( 0, 0, 6, "layout23"); 

    textLabel4 = new TQLabel( groupBox8, "textLabel4" );
    layout23->addWidget( textLabel4 );

    m_engine_url = new KLineEdit( groupBox8, "m_engine_url" );
    layout23->addWidget( m_engine_url );

    btnAdd = new TQPushButton( groupBox8, "btnAdd" );
    btnAdd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, btnAdd->sizePolicy().hasHeightForWidth() ) );
    layout23->addWidget( btnAdd );
    groupBox8Layout->addLayout( layout23 );

    m_engines = new TQListView( groupBox8, "m_engines" );
    m_engines->addColumn( tr2i18n( "Engines" ) );
    m_engines->addColumn( tr2i18n( "URL" ) );
    m_engines->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_engines->sizePolicy().hasHeightForWidth() ) );
    m_engines->setMinimumSize( TQSize( 0, 50 ) );
    m_engines->setResizeMode( TQListView::AllColumns );
    groupBox8Layout->addWidget( m_engines );

    layout5 = new TQHBoxLayout( 0, 0, 6, "layout5"); 

    btnRemove = new TQPushButton( groupBox8, "btnRemove" );
    layout5->addWidget( btnRemove );

    btnRemoveAll = new TQPushButton( groupBox8, "btnRemoveAll" );
    layout5->addWidget( btnRemoveAll );
    spacer19 = new TQSpacerItem( 16, 20, TQSizePolicy::Maximum, TQSizePolicy::Minimum );
    layout5->addItem( spacer19 );

    btn_add_default = new TQPushButton( groupBox8, "btn_add_default" );
    layout5->addWidget( btn_add_default );

    btnUpdate = new KPushButton( groupBox8, "btnUpdate" );
    layout5->addWidget( btnUpdate );
    groupBox8Layout->addLayout( layout5 );
    SEPreferencesLayout->addWidget( groupBox8 );
    languageChange();
    resize( TQSize(529, 515).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btnUpdate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnUpdate_clicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SEPreferences::languageChange()
{
    setCaption( tr2i18n( "Search Preferences" ) );
    buttonGroup1->setTitle( tr2i18n( "External Browser" ) );
    openExternal->setText( tr2i18n( "Open searches in external browser" ) );
    useDefaultBrowser->setText( tr2i18n( "Use default browser" ) );
    useCustomBrowser->setText( tr2i18n( "Custom browser path:" ) );
    groupBox8->setTitle( tr2i18n( "Search Engines" ) );
    m_infoLabel->setText( TQString::null );
    textLabel3->setText( tr2i18n( "Search engine name:" ) );
    textLabel4->setText( tr2i18n( "URL:" ) );
    btnAdd->setText( tr2i18n( "&Add" ) );
    m_engines->header()->setLabel( 0, tr2i18n( "Engines" ) );
    m_engines->header()->setLabel( 1, tr2i18n( "URL" ) );
    btnRemove->setText( tr2i18n( "&Remove" ) );
    btnRemoveAll->setText( tr2i18n( "R&emove All" ) );
    btn_add_default->setText( tr2i18n( "Add Defau&lt" ) );
    btnUpdate->setText( tr2i18n( "Update From Internet" ) );
}

void SEPreferences::btnUpdate_clicked()
{
    tqWarning( "SEPreferences::btnUpdate_clicked(): Not implemented yet" );
}

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

TQMetaObject *SEPreferences::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SEPreferences( "SEPreferences", &SEPreferences::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SEPreferences::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 = {"btnUpdate_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "btnUpdate_clicked()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SEPreferences", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SEPreferences.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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