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

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

#include "projectwizardwidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "projectwizardwidget.ui.h"

/*
 *  Constructs a ProjectStep1 as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ProjectStep1::ProjectStep1( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ProjectStep1" );
    ProjectStep1Layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "ProjectStep1Layout"); 

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

    layout3 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3"); 

    _projectFile = new KURLRequester( this, "_projectFile" );
    _projectFile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, _projectFile->sizePolicy().hasHeightForWidth() ) );

    layout3->addWidget( _projectFile, 1, 1 );

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

    layout3->addWidget( textLabel1_2, 2, 0 );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setEnabled( true );

    layout3->addWidget( textLabel1, 0, 0 );

    _projectLanguage = new TQComboBox( false, this, "_projectLanguage" );
    _projectLanguage->setEditable( true );

    layout3->addWidget( _projectLanguage, 2, 1 );

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

    layout3->addWidget( textLabel2_2, 3, 0 );

    _projectName = new KLineEdit( this, "_projectName" );
    _projectName->setEnabled( true );

    layout3->addWidget( _projectName, 0, 1 );

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

    layout3->addWidget( textLabel2, 1, 0 );

    _projectType = new TQComboBox( false, this, "_projectType" );
    _projectType->setEditable( false );

    layout3->addWidget( _projectType, 3, 1 );
    ProjectStep1Layout->addLayout( layout3 );
    languageChange();
    resize( TQSize(486, 432).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( _projectName, _projectFile );
    setTabOrder( _projectFile, _projectLanguage );
    setTabOrder( _projectLanguage, _projectType );

    // buddies
    textLabel1_2->setBuddy( _projectLanguage );
    textLabel1->setBuddy( _projectName );
    textLabel2_2->setBuddy( _projectType );
    textLabel2->setBuddy( _projectFile );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ProjectStep1::languageChange()
{
    textLabel1_3->setText( tr2i18n( "<font size=\"+1\">Welcome to Project Wizard!</font>\n"
"<br/>\n"
"<p>\n"
"The wizard will help you to setup a new translation\n"
"project for KBabel.\n"
"</p>\n"
"<p>\n"
"First of all, you need to choose the project name\n"
"and the file, where the configuration should be stored.\n"
"</p>\n"
"<p>\n"
"You should also choose a language to translate into\n"
"and also a type of the translation project.\n"
"</p>" ) );
    TQWhatsThis::add( _projectFile, tr2i18n( "<qt>\n"
"<p><b>Configuration File Name</b><br/>\n"
"The name of a file to store the configuration of the\n"
"project.</p>\n"
"</qt>" ) );
    textLabel1_2->setText( tr2i18n( "&Language:" ) );
    TQWhatsThis::add( textLabel1_2, tr2i18n( "<qt>\n"
"<p>\n"
"<b>Language</b><br/>\n"
"The destination language of the project, i.e., the language\n"
"to translate into. It should follow the ISO 631 language naming\n"
"standard.</p>\n"
"</qt>" ) );
    textLabel1->setText( tr2i18n( "Project &name:" ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "<qt><p><b>Project name</b><br/>\n"
"The project name is an identification of a project for\n"
"you. It is shown in the project configuration dialog\n"
"as well as in the title of windows opened for the project.\n"
"<br/>\n"
"<br/>\n"
"<b>Note:</b> The project name cannot be later changed.<\n"
"</p></qt>" ) );
    TQWhatsThis::add( _projectLanguage, tr2i18n( "<qt>\n"
"<p>\n"
"<b>Language</b><br/>\n"
"The destination language of the project, i.e., the language\n"
"to translate into. It should follow the ISO 631 language naming\n"
"standard.</p>\n"
"</qt>" ) );
    textLabel2_2->setText( tr2i18n( "Project &type:" ) );
    TQWhatsThis::add( textLabel2_2, tr2i18n( "<qt>\n"
"<p>\n"
"<b>Project Type</b>\n"
"The project type allows to tune the settings for the\n"
"particular type of the well-known translation projects.\n"
"For example, it sets up the validation tools,\n"
"an accelerator marker and formatting of the header.\n"
"</p>\n"
"<p>Currently known types:\n"
"<ul>\n"
"<li><b>TDE</b>: Trinity Desktop Environment Internalization project</li>\n"
"<li><b>GNOME</b>: GNOME Translation project</li>\n"
"<li><b>Translation Robot</b>: Translation Project Robot</li>\n"
"<li><b>Other</b>: Other kind of project. No tuning will be\n"
"done</li>\n"
"</ul>\n"
"</p>\n"
"</qt>" ) );
    TQWhatsThis::add( _projectName, tr2i18n( "<qt><p><b>Project name</b><br/>\n"
"The project name is an identification of a project for\n"
"you. It is shown in the project configuration dialog\n"
"as well as in the title of windows opened for the project.\n"
"<br/>\n"
"<br/>\n"
"<b>Note:</b> The project name cannot be later changed.<\n"
"</p></qt>" ) );
    textLabel2->setText( tr2i18n( "Configuration &file name:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "<qt>\n"
"<p><b>Configuration File Name</b><br/>\n"
"The name of a file to store the configuration of the\n"
"project.</p>\n"
"</qt>" ) );
    _projectType->clear();
    _projectType->insertItem( tr2i18n( "TDE" ) );
    _projectType->insertItem( tr2i18n( "GNOME" ) );
    _projectType->insertItem( tr2i18n( "Translation Project Robot" ) );
    _projectType->insertItem( tr2i18n( "Other" ) );
    TQWhatsThis::add( _projectType, tr2i18n( "<qt>\n"
"<p>\n"
"<b>Project Type</b>\n"
"The project type allows to tune the settings for the\n"
"particular type of the well-known translation projects.\n"
"For example, it sets up the validation tools,\n"
"an accelerator marker and formatting of the header.\n"
"</p>\n"
"<p>Currently known types:\n"
"<ul>\n"
"<li><b>TDE</b>: Trinity Desktop Environment Internalization project</li>\n"
"<li><b>GNOME</b>: GNOME Translation project</li>\n"
"<li><b>Translation Robot</b>: Translation Project Robot</li>\n"
"<li><b>Other</b>: Other kind of project. No tuning will be\n"
"done</li>\n"
"</ul>\n"
"</p>\n"
"</qt>" ) );
}

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

TQMetaObject *ProjectStep1::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ProjectStep1( "ProjectStep1", &ProjectStep1::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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