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

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

#include "checkoutdialogbase.h"

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

/*
 *  Constructs a CheckoutDialogBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CheckoutDialogBase::CheckoutDialogBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "CheckoutDialogBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    CheckoutDialogBaseLayout = new TQVBoxLayout( this, 11, 6, "CheckoutDialogBaseLayout"); 

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    textLabel1_2 = new TQLabel( groupBox1, "textLabel1_2" );
    groupBox1Layout->addWidget( textLabel1_2 );

    workURLRequester = new KURLRequester( groupBox1, "workURLRequester" );
    groupBox1Layout->addWidget( workURLRequester );

    layout4 = new TQGridLayout( 0, 1, 1, 0, 6, "layout4"); 

    serverPaths = new TQComboBox( false, groupBox1, "serverPaths" );
    serverPaths->setEditable( true );

    layout4->addWidget( serverPaths, 1, 1 );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

    layout4->addWidget( textLabel2, 0, 1 );
    groupBox1Layout->addLayout( layout4 );
    CheckoutDialogBaseLayout->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    layout5 = new TQGridLayout( 0, 1, 1, 0, 6, "layout5"); 
    spacer4 = new TQSpacerItem( 156, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4, 1, 1 );

    textLabel1_4 = new TQLabel( groupBox2, "textLabel1_4" );

    layout5->addWidget( textLabel1_4, 0, 0 );

    textLabel1_3 = new TQLabel( groupBox2, "textLabel1_3" );
    textLabel1_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) );

    layout5->addWidget( textLabel1_3, 0, 2 );

    tagEdit = new KLineEdit( groupBox2, "tagEdit" );
    tagEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, tagEdit->sizePolicy().hasHeightForWidth() ) );

    layout5->addWidget( tagEdit, 1, 2 );

    moduleEdit = new KLineEdit( groupBox2, "moduleEdit" );

    layout5->addWidget( moduleEdit, 1, 0 );
    groupBox2Layout->addLayout( layout5 );

    pruneDirsCheck = new TQCheckBox( groupBox2, "pruneDirsCheck" );
    pruneDirsCheck->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, pruneDirsCheck->sizePolicy().hasHeightForWidth() ) );
    pruneDirsCheck->setChecked( true );
    groupBox2Layout->addWidget( pruneDirsCheck );

    modulesListView = new TDEListView( groupBox2, "modulesListView" );
    modulesListView->addColumn( tr2i18n( "Module" ) );
    modulesListView->addColumn( tr2i18n( "Real Path" ) );
    modulesListView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, modulesListView->sizePolicy().hasHeightForWidth() ) );
    groupBox2Layout->addWidget( modulesListView );

    layout5_2 = new TQHBoxLayout( 0, 0, 6, "layout5_2"); 
    spacer4_2 = new TQSpacerItem( 421, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer4_2 );

    fetchModulesButton = new TQPushButton( groupBox2, "fetchModulesButton" );
    fetchModulesButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, fetchModulesButton->sizePolicy().hasHeightForWidth() ) );
    fetchModulesButton->setAutoDefault( true );
    layout5_2->addWidget( fetchModulesButton );
    groupBox2Layout->addLayout( layout5_2 );
    CheckoutDialogBaseLayout->addWidget( groupBox2 );
    languageChange();
    resize( TQSize(671, 538).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( workURLRequester, serverPaths );
    setTabOrder( serverPaths, moduleEdit );
    setTabOrder( moduleEdit, tagEdit );
    setTabOrder( tagEdit, modulesListView );
    setTabOrder( modulesListView, pruneDirsCheck );
    setTabOrder( pruneDirsCheck, fetchModulesButton );

    // buddies
    textLabel1_2->setBuddy( workURLRequester );
    textLabel2->setBuddy( serverPaths );
    textLabel1_4->setBuddy( moduleEdit );
    textLabel1_3->setBuddy( tagEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CheckoutDialogBase::languageChange()
{
    setCaption( tr2i18n( "CVS Server Configuration" ) );
    groupBox1->setTitle( tr2i18n( "Configuration" ) );
    textLabel1_2->setText( tr2i18n( "&Local destination directory:" ) );
    textLabel2->setText( tr2i18n( "&Server path (e.g. :pserver:slavekb@cvs.trinitydesktop.org:/home/tde):" ) );
    groupBox2->setTitle( tr2i18n( "Select Module" ) );
    textLabel1_4->setText( tr2i18n( "&Module:" ) );
    textLabel1_3->setText( tr2i18n( "&Tag/branch:" ) );
    pruneDirsCheck->setText( tr2i18n( "&Prune directories" ) );
    TQWhatsThis::add( pruneDirsCheck, tr2i18n( "Creates subdirs if needed" ) );
    modulesListView->header()->setLabel( 0, tr2i18n( "Module" ) );
    modulesListView->header()->setLabel( 1, tr2i18n( "Real Path" ) );
    fetchModulesButton->setText( tr2i18n( "&Fetch Modules List" ) );
    TQToolTip::add( fetchModulesButton, tr2i18n( "Fetch modules list from server" ) );
    TQWhatsThis::add( fetchModulesButton, tr2i18n( "Click to fetch modules list from server you specified" ) );
}

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

TQMetaObject *CheckoutDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CheckoutDialogBase( "CheckoutDialogBase", &CheckoutDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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