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

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

#include "searchoptionsform.h"

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

/*
 *  Constructs a SearchOptionsForm as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "SearchOptionsForm" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 260, 130 ) );
    setBaseSize( TQSize( 420, 150 ) );
    SearchOptionsFormLayout = new TQHBoxLayout( this, 0, 3, "SearchOptionsFormLayout"); 

    searchGroupBox = new TQGroupBox( this, "searchGroupBox" );
    searchGroupBox->setMargin( 0 );
    searchGroupBox->setColumnLayout(0, TQt::Vertical );
    searchGroupBox->layout()->setSpacing( 3 );
    searchGroupBox->layout()->setMargin( 6 );
    searchGroupBoxLayout = new TQGridLayout( searchGroupBox->layout() );
    searchGroupBoxLayout->setAlignment( TQt::AlignTop );

    m_searchTextLabel = new TQLabel( searchGroupBox, "m_searchTextLabel" );
    m_searchTextLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchTextLabel->sizePolicy().hasHeightForWidth() ) );

    searchGroupBoxLayout->addWidget( m_searchTextLabel, 0, 0 );

    m_syntaxButton = new TQPushButton( searchGroupBox, "m_syntaxButton" );

    searchGroupBoxLayout->addWidget( m_syntaxButton, 0, 2 );

    m_chooseModulesButton = new TQPushButton( searchGroupBox, "m_chooseModulesButton" );

    searchGroupBoxLayout->addWidget( m_chooseModulesButton, 1, 2 );

    m_chooseRangeButton = new TQPushButton( searchGroupBox, "m_chooseRangeButton" );

    searchGroupBoxLayout->addWidget( m_chooseRangeButton, 2, 2 );

    m_searchScopeLabel = new TQLabel( searchGroupBox, "m_searchScopeLabel" );
    m_searchScopeLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchScopeLabel->sizePolicy().hasHeightForWidth() ) );

    searchGroupBoxLayout->addWidget( m_searchScopeLabel, 2, 0 );

    m_rangeChooserCombo = new KComboBox( false, searchGroupBox, "m_rangeChooserCombo" );
    m_rangeChooserCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_rangeChooserCombo->sizePolicy().hasHeightForWidth() ) );

    searchGroupBoxLayout->addWidget( m_rangeChooserCombo, 2, 1 );

    m_searchTextCombo = new KHistoryCombo( searchGroupBox, "m_searchTextCombo" );
    m_searchTextCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_searchTextCombo->sizePolicy().hasHeightForWidth() ) );
    m_searchTextCombo->setFocusPolicy( KHistoryCombo::WheelFocus );
    m_searchTextCombo->setSizeLimit( 25 );
    m_searchTextCombo->setInsertionPolicy( KHistoryCombo::AtBottom );
    m_searchTextCombo->setDuplicatesEnabled( false );

    searchGroupBoxLayout->addWidget( m_searchTextCombo, 0, 1 );

    m_modulesLabel = new TQLabel( searchGroupBox, "m_modulesLabel" );
    m_modulesLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_modulesLabel->sizePolicy().hasHeightForWidth() ) );
    m_modulesLabel->setTextFormat( TQLabel::RichText );
    m_modulesLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    searchGroupBoxLayout->addMultiCellWidget( m_modulesLabel, 1, 1, 0, 1 );
    SearchOptionsFormLayout->addWidget( searchGroupBox );
    languageChange();
    resize( TQSize(648, 130).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SearchOptionsForm::languageChange()
{
    setCaption( tr2i18n( "Search Options" ) );
    searchGroupBox->setTitle( tr2i18n( "Search parameters" ) );
    m_searchTextLabel->setText( tr2i18n( "Search for:" ) );
    m_syntaxButton->setText( tr2i18n( "&Help" ) );
    m_chooseModulesButton->setText( tr2i18n( "&Choose" ) );
    m_chooseRangeButton->setText( tr2i18n( "&Setup" ) );
    m_searchScopeLabel->setText( tr2i18n( "Search scope:" ) );
    m_modulesLabel->setText( tr2i18n( "Search in:" ) );
}

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

TQMetaObject *SearchOptionsForm::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SearchOptionsForm( "SearchOptionsForm", &SearchOptionsForm::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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