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

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

#include "releaseinputdialogbase.h"

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

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

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
    buttonGroup1->setAlignment( int( TQButtonGroup::AlignVCenter | TQButtonGroup::AlignLeft ) );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    headRadio = new TQRadioButton( buttonGroup1, "headRadio" );
    headRadio->setChecked( true );
    buttonGroup1Layout->addWidget( headRadio );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 

    revisionRadio = new TQRadioButton( buttonGroup1, "revisionRadio" );
    revisionRadio->setChecked( false );
    layout3->addWidget( revisionRadio );

    revisionEdit = new KLineEdit( buttonGroup1, "revisionEdit" );
    revisionEdit->setEnabled( false );
    layout3->addWidget( revisionEdit );
    buttonGroup1Layout->addLayout( layout3 );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 

    dateRadio = new TQRadioButton( buttonGroup1, "dateRadio" );
    layout2->addWidget( dateRadio );

    dateEdit = new KLineEdit( buttonGroup1, "dateEdit" );
    dateEdit->setEnabled( false );
    layout2->addWidget( dateEdit );
    buttonGroup1Layout->addLayout( layout2 );
    ReleaseInputDialogBaseLayout->addWidget( buttonGroup1 );

    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 );

    revertCheck = new TQCheckBox( groupBox1, "revertCheck" );

    groupBox1Layout->addWidget( revertCheck, 0, 0 );
    ReleaseInputDialogBaseLayout->addWidget( groupBox1 );

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

    layout2_2 = new TQHBoxLayout( 0, 0, 6, "layout2_2"); 
    Horizontal_Spacing2 = new TQSpacerItem( 140, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2_2->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout2_2->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout2_2->addWidget( buttonCancel );
    ReleaseInputDialogBaseLayout->addLayout( layout2_2 );
    languageChange();
    resize( TQSize(626, 239).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( dateRadio, TQ_SIGNAL( toggled(bool) ), dateEdit, TQ_SLOT( setEnabled(bool) ) );
    connect( revisionRadio, TQ_SIGNAL( toggled(bool) ), revisionEdit, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ReleaseInputDialogBase::languageChange()
{
    setCaption( tr2i18n( "Update/Revert to Release/Branch/Date" ) );
    buttonGroup1->setTitle( tr2i18n( "Revision" ) );
    headRadio->setText( tr2i18n( "&Most recent from current branch" ) );
    revisionRadio->setText( tr2i18n( "An arbitrary &revision/tag/branch:" ) );
    TQToolTip::add( revisionEdit, tr2i18n( "Type your release name here (leave empty for HEAD)" ) );
    TQWhatsThis::add( revisionEdit, tr2i18n( "Fill the field with the release or branch name (e.g. <i>make_it_cool, tdevelop_alpha5, ...</i>)" ) );
    dateRadio->setText( tr2i18n( "An arbitrary &date:" ) );
    TQWhatsThis::add( dateEdit, tr2i18n( "FIll the field with a date (e.g. <i>20030204</i>)" ) );
    groupBox1->setTitle( tr2i18n( "Additional Options" ) );
    revertCheck->setText( tr2i18n( "&Enforce even if the file has been locally modified (revert)" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *ReleaseInputDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ReleaseInputDialogBase( "ReleaseInputDialogBase", &ReleaseInputDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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