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

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

#include "svn_mergeoptiondlgbase.h"

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

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

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

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

    groupBox1Layout->addWidget( textLabel1, 0, 0 );

    dest = new KURLRequester( groupBox1, "dest" );

    groupBox1Layout->addWidget( dest, 1, 0 );

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( groupBox1, 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 );

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

    buttonGroup2Layout->addWidget( revnum1, 3, 1 );

    revnumbtn1 = new TQRadioButton( buttonGroup2, "revnumbtn1" );
    revnumbtn1->setChecked( true );

    buttonGroup2Layout->addWidget( revnumbtn1, 3, 0 );

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

    buttonGroup2Layout->addWidget( revkindbtn1, 3, 2 );

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

    buttonGroup2Layout->addWidget( revkind1, 3, 3 );

    src1 = new KURLRequester( buttonGroup2, "src1" );

    buttonGroup2Layout->addMultiCellWidget( src1, 1, 1, 0, 3 );

    textLabel3 = new TQLabel( buttonGroup2, "textLabel3" );

    buttonGroup2Layout->addMultiCellWidget( textLabel3, 0, 0, 0, 3 );

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

    buttonGroup2Layout->addMultiCellWidget( textLabel2, 2, 2, 0, 3 );

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( buttonGroup2, 1, 1, 0, 2 );

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

    revnumbtn2 = new TQRadioButton( buttonGroup2_2, "revnumbtn2" );

    buttonGroup2_2Layout->addWidget( revnumbtn2, 3, 0 );

    revkindbtn2 = new TQRadioButton( buttonGroup2_2, "revkindbtn2" );
    revkindbtn2->setChecked( true );

    buttonGroup2_2Layout->addWidget( revkindbtn2, 3, 2 );

    src2 = new KURLRequester( buttonGroup2_2, "src2" );

    buttonGroup2_2Layout->addMultiCellWidget( src2, 1, 1, 0, 3 );

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

    buttonGroup2_2Layout->addMultiCellWidget( textLabel2_2, 2, 2, 0, 3 );

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

    buttonGroup2_2Layout->addWidget( revkind2, 3, 3 );

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

    buttonGroup2_2Layout->addWidget( revnum2, 3, 1 );

    textLabel3_2 = new TQLabel( buttonGroup2_2, "textLabel3_2" );

    buttonGroup2_2Layout->addMultiCellWidget( textLabel3_2, 0, 0, 0, 3 );

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( buttonGroup2_2, 2, 2, 0, 2 );

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

    SvnMergeOptionDialogBaseLayout->addWidget( okBtn, 7, 1 );
    spacer1 = new TQSpacerItem( 171, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    SvnMergeOptionDialogBaseLayout->addItem( spacer1, 7, 0 );

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

    SvnMergeOptionDialogBaseLayout->addWidget( cancelBtn, 7, 2 );

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

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( forceCheck, 4, 4, 0, 2 );

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

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( nonRecurse, 3, 3, 0, 2 );

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

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( ignoreAncestryCheck, 5, 5, 0, 2 );

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

    SvnMergeOptionDialogBaseLayout->addMultiCellWidget( dryRunCheck, 6, 6, 0, 2 );
    languageChange();
    resize( TQSize(473, 590).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
 */
SvnMergeOptionDialogBase::~SvnMergeOptionDialogBase()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SvnMergeOptionDialogBase::languageChange()
{
    setCaption( tr2i18n( "Subversion Merge" ) );
    groupBox1->setTitle( tr2i18n( "Destination" ) );
    textLabel1->setText( tr2i18n( "Destination working path" ) );
    buttonGroup2->setTitle( tr2i18n( "Source 1" ) );
    revnumbtn1->setText( tr2i18n( "Number:" ) );
    revkindbtn1->setText( tr2i18n( "Keyword:" ) );
    revkind1->clear();
    revkind1->insertItem( tr2i18n( "HEAD" ) );
    revkind1->insertItem( tr2i18n( "BASE" ) );
    revkind1->insertItem( tr2i18n( "COMMITTED" ) );
    revkind1->insertItem( tr2i18n( "PREV" ) );
    revkind1->setCurrentItem( 1 );
    textLabel3->setText( tr2i18n( "Source URL or working path:" ) );
    textLabel2->setText( tr2i18n( "Specify revision as" ) );
    buttonGroup2_2->setTitle( tr2i18n( "Source 2" ) );
    revnumbtn2->setText( tr2i18n( "Number:" ) );
    revkindbtn2->setText( tr2i18n( "Keyword:" ) );
    textLabel2_2->setText( tr2i18n( "Specify revision as" ) );
    revkind2->clear();
    revkind2->insertItem( tr2i18n( "HEAD" ) );
    revkind2->insertItem( tr2i18n( "BASE" ) );
    revkind2->insertItem( tr2i18n( "COMMITTED" ) );
    revkind2->insertItem( tr2i18n( "PREV" ) );
    revkind2->setCurrentItem( 0 );
    textLabel3_2->setText( tr2i18n( "Source URL or working path:" ) );
    okBtn->setText( tr2i18n( "OK" ) );
    cancelBtn->setText( tr2i18n( "Cancel" ) );
    forceCheck->setText( tr2i18n( "--force (Force to delete locally modified or unversioned items.)" ) );
    nonRecurse->setText( tr2i18n( "--non-recursive" ) );
    ignoreAncestryCheck->setText( tr2i18n( "--ignore-ancestry" ) );
    dryRunCheck->setText( tr2i18n( "--dry-run (Only receive full result notification\n"
"                without actually modifying working copy)" ) );
}

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

TQMetaObject *SvnMergeOptionDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SvnMergeOptionDialogBase( "SvnMergeOptionDialogBase", &SvnMergeOptionDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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