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

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

#include "svn_copydlgwidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqlabel.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SvnCopyDialogBase 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.
 */
SvnCopyDialogBase::SvnCopyDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SvnCopyDialogBase" );
    SvnCopyDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "SvnCopyDialogBaseLayout"); 

    reqEdit = new KLineEdit( this, "reqEdit" );
    reqEdit->setReadOnly( true );

    SvnCopyDialogBaseLayout->addMultiCellWidget( reqEdit, 1, 1, 0, 2 );

    okBtn = new TQPushButton( this, "okBtn" );

    SvnCopyDialogBaseLayout->addWidget( okBtn, 5, 1 );
    spacer1 = new TQSpacerItem( 110, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    SvnCopyDialogBaseLayout->addItem( spacer1, 5, 0 );

    cancelBtn = new TQPushButton( this, "cancelBtn" );

    SvnCopyDialogBaseLayout->addWidget( cancelBtn, 5, 2 );

    buttonGroup3 = new TQButtonGroup( this, "buttonGroup3" );
    buttonGroup3->setColumnLayout(0, TQt::Vertical );
    buttonGroup3->layout()->setSpacing( 6 );
    buttonGroup3->layout()->setMargin( 11 );
    buttonGroup3Layout = new TQGridLayout( buttonGroup3->layout() );
    buttonGroup3Layout->setAlignment( TQt::AlignTop );

    destRequester = new KURLRequester( buttonGroup3, "destRequester" );

    buttonGroup3Layout->addWidget( destRequester, 1, 0 );

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

    buttonGroup3Layout->addWidget( textLabel2, 0, 0 );

    SvnCopyDialogBaseLayout->addMultiCellWidget( buttonGroup3, 4, 4, 0, 2 );

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

    SvnCopyDialogBaseLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 2 );

    buttonGroup2 = new TQButtonGroup( this, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQGridLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    revnumInput = new KIntNumInput( buttonGroup2, "revnumInput" );
    revnumInput->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, revnumInput->sizePolicy().hasHeightForWidth() ) );
    revnumInput->setMinValue( -1 );

    buttonGroup2Layout->addWidget( revnumInput, 0, 1 );

    revnumRadio = new TQRadioButton( buttonGroup2, "revnumRadio" );

    buttonGroup2Layout->addWidget( revnumRadio, 0, 0 );

    revkindRadio = new TQRadioButton( buttonGroup2, "revkindRadio" );

    buttonGroup2Layout->addWidget( revkindRadio, 1, 0 );

    revkindCombo = new KComboBox( false, buttonGroup2, "revkindCombo" );
    revkindCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 1, 0, revkindCombo->sizePolicy().hasHeightForWidth() ) );
    revkindCombo->setEditable( true );

    buttonGroup2Layout->addWidget( revkindCombo, 1, 1 );

    SvnCopyDialogBaseLayout->addMultiCellWidget( buttonGroup2, 3, 3, 0, 2 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    srcEdit = new KLineEdit( buttonGroup1, "srcEdit" );
    srcEdit->setReadOnly( false );

    buttonGroup1Layout->addWidget( srcEdit, 2, 0 );

    urlRadio = new TQRadioButton( buttonGroup1, "urlRadio" );

    buttonGroup1Layout->addWidget( urlRadio, 0, 0 );

    pathRadio = new TQRadioButton( buttonGroup1, "pathRadio" );

    buttonGroup1Layout->addWidget( pathRadio, 1, 0 );

    SvnCopyDialogBaseLayout->addMultiCellWidget( buttonGroup1, 2, 2, 0, 2 );
    languageChange();
    resize( TQSize(439, 433).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancelBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SvnCopyDialogBase::languageChange()
{
    setCaption( tr2i18n( "Subversion Copy" ) );
    okBtn->setText( tr2i18n( "OK" ) );
    cancelBtn->setText( tr2i18n( "Cancel" ) );
    buttonGroup3->setTitle( tr2i18n( "Destination" ) );
    textLabel2->setText( tr2i18n( "Specify either the full repository URL or local working path" ) );
    textLabel1->setText( tr2i18n( "Requested Local Path" ) );
    buttonGroup2->setTitle( tr2i18n( "Source Revision" ) );
    revnumRadio->setText( tr2i18n( "Specify by number:" ) );
    revkindRadio->setText( tr2i18n( "Specify by keyword:" ) );
    revkindCombo->clear();
    revkindCombo->insertItem( tr2i18n( "HEAD" ) );
    revkindCombo->insertItem( tr2i18n( "BASE" ) );
    revkindCombo->insertItem( tr2i18n( "WORKING" ) );
    buttonGroup1->setTitle( tr2i18n( "Source" ) );
    urlRadio->setText( tr2i18n( "Specify by the repository URL of this item" ) );
    pathRadio->setText( tr2i18n( "Specify by local path of this item" ) );
}

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

TQMetaObject *SvnCopyDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SvnCopyDialogBase( "SvnCopyDialogBase", &SvnCopyDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SvnCopyDialogBase::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 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SvnCopyDialogBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SvnCopyDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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