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

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

#include "cvsformbase.h"

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

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

    TextLabel5 = new TQLabel( this, "TextLabel5" );
    TextLabel5->setFrameShape( TQLabel::NoFrame );
    TextLabel5->setFrameShadow( TQLabel::Plain );

    CvsFormBaseLayout->addWidget( TextLabel5, 5, 0 );

    module_edit = new KLineEdit( this, "module_edit" );

    CvsFormBaseLayout->addMultiCellWidget( module_edit, 2, 2, 1, 3 );

    vendor_edit = new KLineEdit( this, "vendor_edit" );

    CvsFormBaseLayout->addMultiCellWidget( vendor_edit, 3, 3, 1, 3 );

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

    CvsFormBaseLayout->addWidget( TextLabel3, 4, 0 );

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

    CvsFormBaseLayout->addWidget( TextLabel2, 2, 0 );

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

    CvsFormBaseLayout->addWidget( TextLabel4, 3, 0 );

    message_edit = new KLineEdit( this, "message_edit" );

    CvsFormBaseLayout->addMultiCellWidget( message_edit, 4, 4, 1, 3 );

    release_edit = new KLineEdit( this, "release_edit" );

    CvsFormBaseLayout->addMultiCellWidget( release_edit, 5, 5, 1, 3 );

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TextLabel1->setFrameShape( TQLabel::NoFrame );
    TextLabel1->setFrameShadow( TQLabel::Plain );

    CvsFormBaseLayout->addWidget( TextLabel1, 0, 0 );

    serverPathEdit = new KLineEdit( this, "serverPathEdit" );

    CvsFormBaseLayout->addMultiCellWidget( serverPathEdit, 0, 0, 1, 3 );

    TextLabel1_2 = new TQLabel( this, "TextLabel1_2" );
    TextLabel1_2->setFrameShape( TQLabel::NoFrame );
    TextLabel1_2->setFrameShadow( TQLabel::Plain );

    CvsFormBaseLayout->addWidget( TextLabel1_2, 1, 0 );

    cvsRshComboBox = new TQComboBox( false, this, "cvsRshComboBox" );

    CvsFormBaseLayout->addWidget( cvsRshComboBox, 1, 1 );

    init_check = new TQCheckBox( this, "init_check" );

    CvsFormBaseLayout->addWidget( init_check, 1, 3 );
    spacer1 = new TQSpacerItem( 51, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    CvsFormBaseLayout->addItem( spacer1, 1, 2 );
    languageChange();
    resize( TQSize(603, 625).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( serverPathEdit, cvsRshComboBox );
    setTabOrder( cvsRshComboBox, init_check );
    setTabOrder( init_check, module_edit );
    setTabOrder( module_edit, vendor_edit );
    setTabOrder( vendor_edit, message_edit );
    setTabOrder( message_edit, release_edit );

    // buddies
    TextLabel5->setBuddy( release_edit );
    TextLabel3->setBuddy( message_edit );
    TextLabel2->setBuddy( module_edit );
    TextLabel4->setBuddy( vendor_edit );
    TextLabel1->setBuddy( serverPathEdit );
    TextLabel1_2->setBuddy( cvsRshComboBox );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CvsFormBase::languageChange()
{
    TQWhatsThis::add( this, tr2i18n( "This form allows you to create a CVS repository for your new project" ) );
    TextLabel5->setText( tr2i18n( "Release &tag:" ) );
    TQToolTip::add( module_edit, tr2i18n( "Enter the name of the repository" ) );
    TQWhatsThis::add( module_edit, tr2i18n( "CVS Repository name goes here.\n"
"Most of the thime you'll just reuse the project name" ) );
    vendor_edit->setText( tr2i18n( "vendor" ) );
    TQToolTip::add( vendor_edit, tr2i18n( "Enter the vendor name" ) );
    TextLabel3->setText( tr2i18n( "&Message:" ) );
    TextLabel2->setText( tr2i18n( "&Module:" ) );
    TextLabel4->setText( tr2i18n( "&Vendor tag:" ) );
    message_edit->setText( tr2i18n( "new project" ) );
    TQToolTip::add( message_edit, tr2i18n( "Repository creation message" ) );
    release_edit->setText( tr2i18n( "start" ) );
    TQToolTip::add( release_edit, tr2i18n( "Tag that will be associated with initial state" ) );
    TextLabel1->setText( tr2i18n( "&Server path:" ) );
    TQToolTip::add( serverPathEdit, tr2i18n( "Enter your CVS Root location" ) );
    TQWhatsThis::add( serverPathEdit, tr2i18n( "CVS Root location goes here, for example:<ul>\n"
"<li>/home/cvsroot or</li><li>:pserver:me@localhost:/home/cvs</li></ul>" ) );
    TextLabel1_2->setText( tr2i18n( "CVS_&RSH:" ) );
    cvsRshComboBox->clear();
    cvsRshComboBox->insertItem( TQString::null );
    cvsRshComboBox->insertItem( tr2i18n( "ssh" ) );
    init_check->setText( tr2i18n( "Init &root" ) );
    TQToolTip::add( init_check, tr2i18n( "Check if you defined a new CVS Root" ) );
}

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

TQMetaObject *CvsFormBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CvsFormBase( "CvsFormBase", &CvsFormBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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