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

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

#include "svn_switchdlgbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    SvnSwitchDlgBaseLayout->addMultiCellWidget( nonRecurseCheck, 4, 4, 0, 1 );

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

    SvnSwitchDlgBaseLayout->addMultiCellWidget( line1, 5, 5, 0, 1 );

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

    cancelBtn = new KPushButton( this, "cancelBtn" );
    cancelBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, cancelBtn->sizePolicy().hasHeightForWidth() ) );

    layout2->addWidget( cancelBtn, 0, 2 );
    spacer1 = new TQSpacerItem( 150, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1, 0, 0 );

    okBtn = new KPushButton( this, "okBtn" );
    okBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, okBtn->sizePolicy().hasHeightForWidth() ) );

    layout2->addWidget( okBtn, 0, 1 );

    SvnSwitchDlgBaseLayout->addMultiCellLayout( layout2, 6, 6, 0, 1 );

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

    SvnSwitchDlgBaseLayout->addWidget( textLabel2_2, 2, 0 );

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

    SvnSwitchDlgBaseLayout->addWidget( currentUrlEdit, 2, 1 );

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

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

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

    SvnSwitchDlgBaseLayout->addWidget( wcUrlEdit, 1, 1 );

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

    switchOnlyRadio = new TQRadioButton( buttonGroup1, "switchOnlyRadio" );
    buttonGroup1Layout->addWidget( switchOnlyRadio );

    relocationRadio = new TQRadioButton( buttonGroup1, "relocationRadio" );
    buttonGroup1Layout->addWidget( relocationRadio );

    SvnSwitchDlgBaseLayout->addMultiCellWidget( buttonGroup1, 0, 0, 0, 1 );

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

    SvnSwitchDlgBaseLayout->addWidget( textLabel2, 3, 0 );

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

    SvnSwitchDlgBaseLayout->addWidget( destUrlEdit, 3, 1 );
    languageChange();
    resize( TQSize(603, 255).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() ) );
    connect( destUrlEdit, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( accept() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SvnSwitchDlgBase::languageChange()
{
    setCaption( tr2i18n( "Subversion Switch" ) );
    nonRecurseCheck->setText( tr2i18n( "Non-recursive. (Switch its immediate children only)" ) );
    cancelBtn->setText( tr2i18n( "Cancel" ) );
    okBtn->setText( tr2i18n( "OK" ) );
    textLabel2_2->setText( tr2i18n( "Current Repository URL" ) );
    textLabel1->setText( tr2i18n( "Working copy to switch" ) );
    buttonGroup1->setTitle( tr2i18n( "Working Mode" ) );
    switchOnlyRadio->setText( tr2i18n( "svn switch" ) );
    relocationRadio->setText( tr2i18n( "svn switch --relocation" ) );
    textLabel2->setText( tr2i18n( "New destination URL" ) );
}

void SvnSwitchDlgBase::Form1_destroyed(TQObject*)
{
    tqWarning( "SvnSwitchDlgBase::Form1_destroyed(TQObject*): Not implemented yet" );
}

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

TQMetaObject *SvnSwitchDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SvnSwitchDlgBase( "SvnSwitchDlgBase", &SvnSwitchDlgBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SvnSwitchDlgBase::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_ptr, "TQObject", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"Form1_destroyed", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "Form1_destroyed(TQObject*)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SvnSwitchDlgBase", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SvnSwitchDlgBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool SvnSwitchDlgBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: Form1_destroyed((TQObject*)static_QUType_ptr.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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