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

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

#include "newtoolwizard.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include <tqregexp.h>
#include <tqstringlist.h>
#include <ntqpushbutton.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kiletoolmanager.h"
#include "newtoolwizard.ui.h"

/*
 *  Constructs a NewToolWizard as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qwizard will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qwizard.
 */
NewToolWizard::NewToolWizard( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : KWizard( parent, name, modal, fl )
{
    if ( !name )
	setName( "NewToolWizard" );

    NamePage = new TQWidget( this, "NamePage" );
    NamePageLayout = new TQGridLayout( NamePage, 1, 1, 11, 6, "NamePageLayout"); 

    m_lbName = new TQLabel( NamePage, "m_lbName" );

    NamePageLayout->addWidget( m_lbName, 0, 0 );

    m_leName = new KLineEdit( NamePage, "m_leName" );
    m_leName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, m_leName->sizePolicy().hasHeightForWidth() ) );
    m_leName->setMinimumSize( TQSize( 100, 0 ) );

    NamePageLayout->addWidget( m_leName, 0, 1 );
    m_spacerName = new TQSpacerItem( 20, 70, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    NamePageLayout->addItem( m_spacerName, 1, 0 );

    m_lbWarning = new TQLabel( NamePage, "m_lbWarning" );

    NamePageLayout->addMultiCellWidget( m_lbWarning, 2, 2, 0, 1 );
    addPage( NamePage, TQString("") );

    WizardPage = new TQWidget( this, "WizardPage" );
    WizardPageLayout = new TQGridLayout( WizardPage, 1, 1, 11, 6, "WizardPageLayout"); 

    m_cbTools = new KComboBox( false, WizardPage, "m_cbTools" );

    WizardPageLayout->addWidget( m_cbTools, 0, 1 );
    m_spacerBehaviorLeft = new TQSpacerItem( 20, 111, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WizardPageLayout->addMultiCell( m_spacerBehaviorLeft, 1, 2, 1, 1 );

    m_lbBehavior = new TQLabel( WizardPage, "m_lbBehavior" );

    WizardPageLayout->addMultiCellWidget( m_lbBehavior, 0, 1, 0, 0 );
    m_spacerBehaviorRight = new TQSpacerItem( 20, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    WizardPageLayout->addItem( m_spacerBehaviorRight, 2, 0 );
    addPage( WizardPage, TQString("") );
    languageChange();
    resize( TQSize(449, 255).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_leName, m_cbTools );

    // buddies
    m_lbName->setBuddy( m_leName );
    m_lbBehavior->setBuddy( m_cbTools );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void NewToolWizard::languageChange()
{
    setCaption( tr2i18n( "New Tool" ) );
    m_lbName->setText( tr2i18n( "Type a short descriptive name for the &tool:" ) );
    m_leName->setText( TQString::null );
    m_lbWarning->setText( TQString::null );
    setTitle( NamePage, tr2i18n( "Name" ) );
    m_lbBehavior->setText( tr2i18n( "Select the default &behavior (class)\n"
"of this tool. It will inherit all properties\n"
"of the tool it is based upon.\n"
"\n"
"For example, selecting \"LaTeX\" will\n"
"cause your tool to behave just like\n"
"the standard \"LaTeX\" tool." ) );
    setTitle( WizardPage, tr2i18n( "Behavior" ) );
}

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

TQMetaObject *NewToolWizard::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_NewToolWizard( "NewToolWizard", &NewToolWizard::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* NewToolWizard::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 = KWizard::staticMetaObject();
    static const TQUParameter param_slot_0[] = {
	{ "pg", &static_QUType_ptr, "TQWidget", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"showPage", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ "name", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"nameChanged", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "showPage(TQWidget*)", &slot_0, TQMetaData::Public },
	{ "nameChanged(const TQString&)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"NewToolWizard", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_NewToolWizard.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool NewToolWizard::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: showPage((TQWidget*)static_QUType_ptr.get(_o+1)); break;
    case 1: nameChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return KWizard::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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