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

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

#include "find_documentationbase.h"

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

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

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

    FindDocumentationBaseLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 2 );

    button_search = new TQPushButton( this, "button_search" );
    button_search->setDefault( false );

    FindDocumentationBaseLayout->addWidget( button_search, 1, 2 );

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

    FindDocumentationBaseLayout->addMultiCellWidget( search_term, 1, 1, 0, 1 );

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

    FindDocumentationBaseLayout->addWidget( butten_options, 3, 0 );
    spacer1 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    FindDocumentationBaseLayout->addMultiCell( spacer1, 3, 3, 1, 2 );

    result_list = new TDEListView( this, "result_list" );
    result_list->addColumn( TQString::null );
    result_list->setAllColumnsShowFocus( true );
    result_list->setResizeMode( TDEListView::LastColumn );

    FindDocumentationBaseLayout->addMultiCellWidget( result_list, 2, 2, 0, 2 );
    languageChange();
    resize( TQSize(222, 504).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( button_search, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startSearch() ) );
    connect( result_list, TQ_SIGNAL( executed(TQListViewItem*) ), this, TQ_SLOT( clickOnItem(TQListViewItem*) ) );
    connect( butten_options, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clickOptions() ) );
    connect( result_list, TQ_SIGNAL( mouseButtonPressed(int,TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( buttonPressedOnItem(int,TQListViewItem*,const TQPoint&,int) ) );
    connect( search_term, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( startSearch() ) );
    connect( result_list, TQ_SIGNAL( returnPressed(TQListViewItem*) ), this, TQ_SLOT( clickOnItem(TQListViewItem*) ) );

    // tab order
    setTabOrder( search_term, button_search );
    setTabOrder( button_search, result_list );
    setTabOrder( result_list, butten_options );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FindDocumentationBase::languageChange()
{
    setCaption( tr2i18n( "Find Documentation" ) );
    textLabel1->setText( tr2i18n( "Search term:" ) );
    button_search->setText( tr2i18n( "Search" ) );
    butten_options->setText( tr2i18n( "Options" ) );
    result_list->header()->setLabel( 0, TQString::null );
}

void FindDocumentationBase::clickOptions()
{
    tqWarning( "FindDocumentationBase::clickOptions(): Not implemented yet" );
}

void FindDocumentationBase::setSearchTerm(const TQString&)
{
    tqWarning( "FindDocumentationBase::setSearchTerm(const TQString&): Not implemented yet" );
}

void FindDocumentationBase::startSearch()
{
    tqWarning( "FindDocumentationBase::startSearch(): Not implemented yet" );
}

void FindDocumentationBase::searchInIndex()
{
    tqWarning( "FindDocumentationBase::searchInIndex(): Not implemented yet" );
}

void FindDocumentationBase::searchInContents()
{
    tqWarning( "FindDocumentationBase::searchInContents(): Not implemented yet" );
}

void FindDocumentationBase::searchInGoogle()
{
    tqWarning( "FindDocumentationBase::searchInGoogle(): Not implemented yet" );
}

void FindDocumentationBase::searchInMan()
{
    tqWarning( "FindDocumentationBase::searchInMan(): Not implemented yet" );
}

void FindDocumentationBase::searchInInfo()
{
    tqWarning( "FindDocumentationBase::searchInInfo(): Not implemented yet" );
}

void FindDocumentationBase::procManReadFromStdout()
{
    tqWarning( "FindDocumentationBase::procManReadFromStdout(): Not implemented yet" );
}

void FindDocumentationBase::procInfoReadFromStdout()
{
    tqWarning( "FindDocumentationBase::procInfoReadFromStdout(): Not implemented yet" );
}

void FindDocumentationBase::clickOnItem(TQListViewItem*)
{
    tqWarning( "FindDocumentationBase::clickOnItem(TQListViewItem*): Not implemented yet" );
}

void FindDocumentationBase::buttonPressedOnItem(int,TQListViewItem*,const TQPoint&,int)
{
    tqWarning( "FindDocumentationBase::buttonPressedOnItem(int,TQListViewItem*,const TQPoint&,int): Not implemented yet" );
}

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

TQMetaObject *FindDocumentationBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FindDocumentationBase( "FindDocumentationBase", &FindDocumentationBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FindDocumentationBase::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 = {"clickOptions", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ "term", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"setSearchTerm", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"startSearch", 0, 0 };
    static const TQUMethod slot_3 = {"searchInIndex", 0, 0 };
    static const TQUMethod slot_4 = {"searchInContents", 0, 0 };
    static const TQUMethod slot_5 = {"searchInGoogle", 0, 0 };
    static const TQUMethod slot_6 = {"searchInMan", 0, 0 };
    static const TQUMethod slot_7 = {"searchInInfo", 0, 0 };
    static const TQUMethod slot_8 = {"procManReadFromStdout", 0, 0 };
    static const TQUMethod slot_9 = {"procInfoReadFromStdout", 0, 0 };
    static const TQUParameter param_slot_10[] = {
	{ "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_10 = {"clickOnItem", 1, param_slot_10 };
    static const TQUParameter param_slot_11[] = {
	{ "button", &static_QUType_int, 0, TQUParameter::In },
	{ "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In },
	{ "pos", &static_QUType_varptr, "\x0e", TQUParameter::In },
	{ "c", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_11 = {"buttonPressedOnItem", 4, param_slot_11 };
    static const TQUMethod slot_12 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "clickOptions()", &slot_0, TQMetaData::Public },
	{ "setSearchTerm(const TQString&)", &slot_1, TQMetaData::Public },
	{ "startSearch()", &slot_2, TQMetaData::Public },
	{ "searchInIndex()", &slot_3, TQMetaData::Public },
	{ "searchInContents()", &slot_4, TQMetaData::Public },
	{ "searchInGoogle()", &slot_5, TQMetaData::Public },
	{ "searchInMan()", &slot_6, TQMetaData::Public },
	{ "searchInInfo()", &slot_7, TQMetaData::Public },
	{ "procManReadFromStdout()", &slot_8, TQMetaData::Public },
	{ "procInfoReadFromStdout()", &slot_9, TQMetaData::Public },
	{ "clickOnItem(TQListViewItem*)", &slot_10, TQMetaData::Public },
	{ "buttonPressedOnItem(int,TQListViewItem*,const TQPoint&,int)", &slot_11, TQMetaData::Public },
	{ "languageChange()", &slot_12, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"FindDocumentationBase", parentObject,
	slot_tbl, 13,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FindDocumentationBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool FindDocumentationBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: clickOptions(); break;
    case 1: setSearchTerm((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: startSearch(); break;
    case 3: searchInIndex(); break;
    case 4: searchInContents(); break;
    case 5: searchInGoogle(); break;
    case 6: searchInMan(); break;
    case 7: searchInInfo(); break;
    case 8: procManReadFromStdout(); break;
    case 9: procInfoReadFromStdout(); break;
    case 10: clickOnItem((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 11: buttonPressedOnItem((int)static_QUType_int.get(_o+1),(TQListViewItem*)static_QUType_ptr.get(_o+2),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+3)),(int)static_QUType_int.get(_o+4)); break;
    case 12: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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