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

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

#include "ctags2_createtagfilebase.h"

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

/*
 *  Constructs a CTags2CreateTagFileBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
CTags2CreateTagFileBase::CTags2CreateTagFileBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CTags2CreateTagFileBase" );
    CTags2CreateTagFileBaseLayout = new TQVBoxLayout( this, 11, 6, "CTags2CreateTagFileBaseLayout"); 

    textLabel3 = new TQLabel( this, "textLabel3" );
    CTags2CreateTagFileBaseLayout->addWidget( textLabel3 );

    displayName = new KLineEdit( this, "displayName" );
    CTags2CreateTagFileBaseLayout->addWidget( displayName );

    textLabel1_3 = new TQLabel( this, "textLabel1_3" );
    CTags2CreateTagFileBaseLayout->addWidget( textLabel1_3 );

    newTagFilePath = new KURLRequester( this, "newTagFilePath" );
    CTags2CreateTagFileBaseLayout->addWidget( newTagFilePath );

    textLabel2_2 = new TQLabel( this, "textLabel2_2" );
    CTags2CreateTagFileBaseLayout->addWidget( textLabel2_2 );

    dirToTag = new KURLRequester( this, "dirToTag" );
    CTags2CreateTagFileBaseLayout->addWidget( dirToTag );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 
    spacer3 = new TQSpacerItem( 81, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer3 );

    createTagFileButton = new TQPushButton( this, "createTagFileButton" );
    layout6->addWidget( createTagFileButton );

    cancelButton = new TQPushButton( this, "cancelButton" );
    layout6->addWidget( cancelButton );
    CTags2CreateTagFileBaseLayout->addLayout( layout6 );
    languageChange();
    resize( TQSize(373, 198).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( createTagFileButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( displayName, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( validate() ) );
    connect( newTagFilePath, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( validate() ) );
    connect( dirToTag, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( validate() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CTags2CreateTagFileBase::languageChange()
{
    setCaption( tr2i18n( "Create new tags file" ) );
    textLabel3->setText( tr2i18n( "Name:" ) );
    textLabel1_3->setText( tr2i18n( "Target tags file path:" ) );
    textLabel2_2->setText( tr2i18n( "Directory to tag:" ) );
    createTagFileButton->setText( tr2i18n( "&Create" ) );
    cancelButton->setText( tr2i18n( "C&ancel" ) );
}

void CTags2CreateTagFileBase::createTagFile()
{
    tqWarning( "CTags2CreateTagFileBase::createTagFile(): Not implemented yet" );
}

void CTags2CreateTagFileBase::validate()
{
    tqWarning( "CTags2CreateTagFileBase::validate(): Not implemented yet" );
}

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

TQMetaObject *CTags2CreateTagFileBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CTags2CreateTagFileBase( "CTags2CreateTagFileBase", &CTags2CreateTagFileBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool CTags2CreateTagFileBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: createTagFile(); break;
    case 1: validate(); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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