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

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

#include "importdlgbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ImportDialogBase 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.
 */
ImportDialogBase::ImportDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "import_dialog" );
    import_dialogLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "import_dialogLayout"); 

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

    import_dialogLayout->addWidget( dir_label, 0, 0 );

    vcsCombo = new TQComboBox( false, this, "vcsCombo" );
    vcsCombo->setEnabled( false );
    vcsCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, vcsCombo->sizePolicy().hasHeightForWidth() ) );

    import_dialogLayout->addWidget( vcsCombo, 1, 1 );

    fetchModuleButton = new TQPushButton( this, "fetchModuleButton" );
    fetchModuleButton->setEnabled( false );
    fetchModuleButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, fetchModuleButton->sizePolicy().hasHeightForWidth() ) );
    fetchModuleButton->setAutoDefault( false );

    import_dialogLayout->addWidget( fetchModuleButton, 1, 2 );

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

    import_dialogLayout->addWidget( textLabel1, 1, 0 );

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

    import_dialogLayout->addWidget( name_label, 2, 0 );

    name_edit = new KLineEdit( this, "name_edit" );
    name_edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 1, 0, name_edit->sizePolicy().hasHeightForWidth() ) );

    import_dialogLayout->addMultiCellWidget( name_edit, 2, 2, 1, 2 );

    Layout1 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout1"); 
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Spacer3 );

    ok_button = new TQPushButton( this, "ok_button" );
    ok_button->setDefault( true );
    Layout1->addWidget( ok_button );

    cancel_button = new TQPushButton( this, "cancel_button" );
    Layout1->addWidget( cancel_button );

    import_dialogLayout->addMultiCellLayout( Layout1, 10, 10, 0, 2 );

    project_combo = new TQComboBox( false, this, "project_combo" );
    project_combo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 1, 0, project_combo->sizePolicy().hasHeightForWidth() ) );

    import_dialogLayout->addMultiCellWidget( project_combo, 3, 3, 1, 2 );

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

    import_dialogLayout->addWidget( project_label, 3, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    import_dialogLayout->addMultiCellWidget( line1, 9, 9, 0, 2 );

    urlinput_edit = new KURLRequester( this, "urlinput_edit" );

    import_dialogLayout->addMultiCellWidget( urlinput_edit, 0, 0, 1, 2 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    import_dialogLayout->addItem( Spacer2, 8, 2 );

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

    import_dialogLayout->addWidget( TextLabel5, 7, 0 );

    email_edit = new KLineEdit( this, "email_edit" );
    email_edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 1, 0, email_edit->sizePolicy().hasHeightForWidth() ) );

    import_dialogLayout->addMultiCellWidget( email_edit, 7, 7, 1, 2 );

    author_edit = new KLineEdit( this, "author_edit" );
    author_edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 1, 0, author_edit->sizePolicy().hasHeightForWidth() ) );

    import_dialogLayout->addMultiCellWidget( author_edit, 6, 6, 1, 2 );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    import_dialogLayout->addItem( Spacer1, 5, 2 );

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

    import_dialogLayout->addWidget( author_label, 6, 0 );

    infrastructureBox = new TQCheckBox( this, "infrastructureBox" );
    infrastructureBox->setEnabled( true );

    import_dialogLayout->addMultiCellWidget( infrastructureBox, 4, 4, 1, 2 );
    languageChange();
    resize( TQSize(437, 293).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( ok_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancel_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( project_combo, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( projectTypeChanged(const TQString&) ) );
    connect( project_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( projectTypeChanged(int) ) );

    // tab order
    setTabOrder( urlinput_edit, vcsCombo );
    setTabOrder( vcsCombo, fetchModuleButton );
    setTabOrder( fetchModuleButton, name_edit );
    setTabOrder( name_edit, project_combo );
    setTabOrder( project_combo, author_edit );
    setTabOrder( author_edit, email_edit );
    setTabOrder( email_edit, ok_button );
    setTabOrder( ok_button, cancel_button );

    // buddies
    dir_label->setBuddy( urlinput_edit );
    textLabel1->setBuddy( vcsCombo );
    name_label->setBuddy( name_edit );
    project_label->setBuddy( project_combo );
    TextLabel5->setBuddy( email_edit );
    author_label->setBuddy( author_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ImportDialogBase::languageChange()
{
    setCaption( tr2i18n( "Import Existing Project" ) );
    dir_label->setText( tr2i18n( "&Directory:" ) );
    fetchModuleButton->setText( tr2i18n( "Fetch &Module" ) );
    textLabel1->setText( tr2i18n( "&Fetch from:" ) );
    name_label->setText( tr2i18n( "Project &name:" ) );
    ok_button->setText( tr2i18n( "&OK" ) );
    cancel_button->setText( tr2i18n( "&Cancel" ) );
    project_label->setText( tr2i18n( "&Project type:" ) );
    TextLabel5->setText( tr2i18n( "&Email:" ) );
    TQToolTip::add( email_edit, tr2i18n( "If there exists a file AUTHOR in the\n"
"directory, and it has email addresses\n"
"formated as XXXX <.....> the XXXX\n"
"will be the author, everything between \n"
"<....> is the email address." ) );
    TQToolTip::add( author_edit, tr2i18n( "If there exists a file AUTHOR in the\n"
"directory, and it has email addresses\n"
"formated as XXXX <.....> the XXXX\n"
"will be the author, everything between \n"
"<....> is the email address." ) );
    author_label->setText( tr2i18n( "&Author:" ) );
    infrastructureBox->setText( tr2i18n( "Generate build system infrastructure" ) );
}

void ImportDialogBase::dirButtonClicked()
{
    tqWarning( "ImportDialogBase::dirButtonClicked(): Not implemented yet" );
}

void ImportDialogBase::dirChanged()
{
    tqWarning( "ImportDialogBase::dirChanged(): Not implemented yet" );
}

void ImportDialogBase::projectTypeChanged(const TQString&)
{
    tqWarning( "ImportDialogBase::projectTypeChanged(const TQString&): Not implemented yet" );
}

void ImportDialogBase::projectTypeChanged(int)
{
    tqWarning( "ImportDialogBase::projectTypeChanged(int): Not implemented yet" );
}

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

TQMetaObject *ImportDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ImportDialogBase( "ImportDialogBase", &ImportDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ImportDialogBase::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 = {"dirChanged", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUMethod slot_2 = {"dirButtonClicked", 0, 0 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"projectTypeChanged", 1, param_slot_3 };
    static const TQUParameter param_slot_4[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"projectTypeChanged", 1, param_slot_4 };
    static const TQMetaData slot_tbl[] = {
	{ "dirChanged()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "dirButtonClicked()", &slot_2, TQMetaData::Protected },
	{ "projectTypeChanged(const TQString&)", &slot_3, TQMetaData::Protected },
	{ "projectTypeChanged(int)", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ImportDialogBase", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ImportDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ImportDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: dirChanged(); break;
    case 1: languageChange(); break;
    case 2: dirButtonClicked(); break;
    case 3: projectTypeChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 4: projectTypeChanged((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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