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

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

#include "ctags2_widgetbase.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 CTags2WidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CTags2WidgetBase::CTags2WidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "CTags2WidgetBase" );
    CTags2WidgetBaseLayout = new TQVBoxLayout( this, 2, 6, "CTags2WidgetBaseLayout"); 

    output_view = new TDEListView( this, "output_view" );
    output_view->addColumn( tr2i18n( "Tag" ) );
    output_view->addColumn( tr2i18n( "Type" ) );
    output_view->addColumn( tr2i18n( "File" ) );
    output_view->setAllColumnsShowFocus( true );
    output_view->setResizeMode( TDEListView::AllColumns );
    CTags2WidgetBaseLayout->addWidget( output_view );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout3->addWidget( textLabel1 );

    input_edit = new KLineEdit( this, "input_edit" );
    layout3->addWidget( input_edit );

    hitcount_label = new TQLabel( this, "hitcount_label" );
    layout3->addWidget( hitcount_label );
    spacer1 = new TQSpacerItem( 80, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer1 );

    datetime_label = new TQLabel( this, "datetime_label" );
    layout3->addWidget( datetime_label );

    generate_button = new TQPushButton( this, "generate_button" );
    generate_button->setFocusPolicy( TQPushButton::NoFocus );
    layout3->addWidget( generate_button );
    CTags2WidgetBaseLayout->addLayout( layout3 );
    languageChange();
    resize( TQSize(780, 397).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( input_edit, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( line_edit_changed() ) );
    connect( input_edit, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( line_edit_changed_delayed() ) );
    connect( generate_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( regeneratebutton_clicked() ) );

    // tab order
    setTabOrder( input_edit, output_view );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CTags2WidgetBase::languageChange()
{
    setCaption( TQString::null );
    output_view->header()->setLabel( 0, tr2i18n( "Tag" ) );
    output_view->header()->setLabel( 1, tr2i18n( "Type" ) );
    output_view->header()->setLabel( 2, tr2i18n( "File" ) );
    TQWhatsThis::add( output_view, tr2i18n( "Result view for a tag lookup. Click a line to go to the corresponding place in the code." ) );
    textLabel1->setText( tr2i18n( "Lookup:" ) );
    TQWhatsThis::add( input_edit, tr2i18n( "Type the identifier you want to lookup. <p> The identifier will populate and display a reducing list as you type." ) );
    hitcount_label->setText( tr2i18n( "Hits:" ) );
    datetime_label->setText( tr2i18n( "Date:" ) );
    generate_button->setText( tr2i18n( "Regenerate" ) );
    TQWhatsThis::add( generate_button, tr2i18n( "Press to regenerate CTags database.<p>This will take some time on a large project." ) );
}

void CTags2WidgetBase::line_edit_changed_delayed()
{
    tqWarning( "CTags2WidgetBase::line_edit_changed_delayed(): Not implemented yet" );
}

void CTags2WidgetBase::line_edit_changed()
{
    tqWarning( "CTags2WidgetBase::line_edit_changed(): Not implemented yet" );
}

void CTags2WidgetBase::regeneratebutton_clicked()
{
    tqWarning( "CTags2WidgetBase::regeneratebutton_clicked(): Not implemented yet" );
}

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

TQMetaObject *CTags2WidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CTags2WidgetBase( "CTags2WidgetBase", &CTags2WidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CTags2WidgetBase::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 TQUMethod slot_1 = {"line_edit_changed_delayed", 0, 0 };
    static const TQUMethod slot_2 = {"line_edit_changed", 0, 0 };
    static const TQUMethod slot_3 = {"regeneratebutton_clicked", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "line_edit_changed_delayed()", &slot_1, TQMetaData::Private },
	{ "line_edit_changed()", &slot_2, TQMetaData::Private },
	{ "regeneratebutton_clicked()", &slot_3, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CTags2WidgetBase", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CTags2WidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CTags2WidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: line_edit_changed_delayed(); break;
    case 2: line_edit_changed(); break;
    case 3: regeneratebutton_clicked(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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