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

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

#include "searchproviderdlg_ui.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kcombobox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    leName = new KLineEdit( this, "leName" );

    SearchProviderDlgUILayout->addWidget( leName, 1, 0 );

    lbCharset = new TQLabel( this, "lbCharset" );

    SearchProviderDlgUILayout->addWidget( lbCharset, 8, 0 );

    lbQuery = new TQLabel( this, "lbQuery" );

    SearchProviderDlgUILayout->addWidget( lbQuery, 2, 0 );

    lbName = new TQLabel( this, "lbName" );

    SearchProviderDlgUILayout->addWidget( lbName, 0, 0 );

    leShortcut = new KLineEdit( this, "leShortcut" );

    SearchProviderDlgUILayout->addWidget( leShortcut, 5, 0 );

    lbShortcut = new TQLabel( this, "lbShortcut" );

    SearchProviderDlgUILayout->addWidget( lbShortcut, 4, 0 );

    leQuery = new KLineEdit( this, "leQuery" );

    SearchProviderDlgUILayout->addWidget( leQuery, 3, 0 );

    cbCharset = new KComboBox( false, this, "cbCharset" );

    SearchProviderDlgUILayout->addWidget( cbCharset, 9, 0 );

    lbCategory = new TQLabel( this, "lbCategory" );

    SearchProviderDlgUILayout->addWidget( lbCategory, 6, 0 );

    cbCategory = new KComboBox( false, this, "cbCategory" );

    SearchProviderDlgUILayout->addWidget( cbCategory, 7, 0 );
    languageChange();
    resize( TQSize(399, 206).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( leName, leQuery );
    setTabOrder( leQuery, leShortcut );
    setTabOrder( leShortcut, cbCategory );
    setTabOrder( cbCategory, cbCharset );

    // buddies
    lbCharset->setBuddy( cbCharset );
    lbQuery->setBuddy( leQuery );
    lbName->setBuddy( leName );
    lbShortcut->setBuddy( leShortcut );
    lbCategory->setBuddy( cbCategory );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SearchProviderDlgUI::languageChange()
{
    TQWhatsThis::add( leName, tr2i18n( "Enter the human readable name of the search provider here." ) );
    lbCharset->setText( tr2i18n( "&Charset:" ) );
    TQWhatsThis::add( lbCharset, tr2i18n( "Select the character set that will be used to encode your search query" ) );
    lbQuery->setText( tr2i18n( "Search &URI:" ) );
    TQWhatsThis::add( lbQuery, tr2i18n( "<qt>\n"
"Enter the URI that is used to do a search on the search engine here.<br/>The whole text to be searched for can be specified as \\{@} or \\{0}.<br/>\n"
"Recommended is \\{@}, since it removes all query variables (name=value) from the resulting string whereas \\{0} will be substituted with the unmodified query string.<br/>You can use \\{1} ... \\{n} to specify certain words from the query and \\{name} to specify a value given by 'name=value' in the user query.<br/>In addition it is possible to specify multiple references (names, numbers and strings) at once (\\{name1,name2,...,\"string\"}).<br/>The first matching value (from the left) will be used as substitution value for the resulting URI.<br/>A quoted string can be used as default value if nothing matches from the left of the reference list.\n"
"</qt>" ) );
    lbName->setText( tr2i18n( "Search &provider name:" ) );
    TQWhatsThis::add( lbName, tr2i18n( "Enter the human readable name of the search provider here." ) );
    TQWhatsThis::add( leShortcut, tr2i18n( "<qt>\n"
"The shortcuts entered here can be used as a pseudo-URI scheme in TDE. For example, the shortcut <b>av</b> can be used as in <b>av</b>:<b>my search</b>\n"
"</qt>" ) );
    lbShortcut->setText( tr2i18n( "UR&I shortcuts:" ) );
    TQWhatsThis::add( lbShortcut, tr2i18n( "<qt>\n"
"The shortcuts entered here can be used as a pseudo-URI scheme in TDE. For example, the shortcut <b>av</b> can be used as in <b>av</b>:<b>my search</b>\n"
"</qt>" ) );
    TQWhatsThis::add( leQuery, tr2i18n( "<qt>\n"
"Enter the URI that is used to do a search on the search engine here.<br/>The whole text to be searched for can be specified as \\{@} or \\{0}.<br/>\n"
"Recommended is \\{@}, since it removes all query variables (name=value) from the resulting string whereas \\{0} will be substituted with the unmodified query string.<br/>You can use \\{1} ... \\{n} to specify certain words from the query and \\{name} to specify a value given by 'name=value' in the user query.<br/>In addition it is possible to specify multiple references (names, numbers and strings) at once (\\{name1,name2,...,\"string\"}).<br/>The first matching value (from the left) will be used as substitution value for the resulting URI.<br/>A quoted string can be used as default value if nothing matches from the left of the reference list.\n"
"</qt>" ) );
    TQWhatsThis::add( cbCharset, tr2i18n( "Select the character set that will be used to encode your search query." ) );
    lbCategory->setText( tr2i18n( "&Category:" ) );
    TQWhatsThis::add( lbCategory, tr2i18n( "Select the category the search engine will be grouped under." ) );
    TQWhatsThis::add( cbCategory, tr2i18n( "Select the category the search engine will be grouped under." ) );
}

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

TQMetaObject *SearchProviderDlgUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SearchProviderDlgUI( "SearchProviderDlgUI", &SearchProviderDlgUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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