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

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

#include "cvsoptionswidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CvsOptionsWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CvsOptionsWidgetBase::CvsOptionsWidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "cvsOptionsWidget" );
    cvsOptionsWidgetLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "cvsOptionsWidgetLayout"); 

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( KDialog::spacingHint() );
    groupBox4->layout()->setMargin( KDialog::marginHint() );
    groupBox4Layout = new TQVBoxLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    m_rshLabel = new TQLabel( groupBox4, "m_rshLabel" );
    m_rshLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_rshLabel->sizePolicy().hasHeightForWidth() ) );
    groupBox4Layout->addWidget( m_rshLabel );

    cvsRshEnvVarEdit = new KLineEdit( groupBox4, "cvsRshEnvVarEdit" );
    groupBox4Layout->addWidget( cvsRshEnvVarEdit );

    textLabel1_2 = new TQLabel( groupBox4, "textLabel1_2" );
    groupBox4Layout->addWidget( textLabel1_2 );

    serverLocationEdit = new KLineEdit( groupBox4, "serverLocationEdit" );
    groupBox4Layout->addWidget( serverLocationEdit );
    cvsOptionsWidgetLayout->addWidget( groupBox4 );

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

    createNewDirWhenUpdateCheck = new TQCheckBox( groupBox1, "createNewDirWhenUpdateCheck" );
    groupBox1Layout->addWidget( createNewDirWhenUpdateCheck );

    pruneEmptyDirWhenUpdateCheck = new TQCheckBox( groupBox1, "pruneEmptyDirWhenUpdateCheck" );
    groupBox1Layout->addWidget( pruneEmptyDirWhenUpdateCheck );

    recursiveWhenUpdateCheck = new TQCheckBox( groupBox1, "recursiveWhenUpdateCheck" );
    groupBox1Layout->addWidget( recursiveWhenUpdateCheck );
    cvsOptionsWidgetLayout->addWidget( groupBox1 );

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

    recursiveWhenCommitRemoveCheck = new TQCheckBox( groupBox2, "recursiveWhenCommitRemoveCheck" );
    groupBox2Layout->addWidget( recursiveWhenCommitRemoveCheck );
    cvsOptionsWidgetLayout->addWidget( groupBox2 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( KDialog::spacingHint() );
    groupBox3->layout()->setMargin( KDialog::marginHint() );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    diffOptionsEdit = new KLineEdit( groupBox3, "diffOptionsEdit" );
    diffOptionsEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, diffOptionsEdit->sizePolicy().hasHeightForWidth() ) );

    groupBox3Layout->addWidget( diffOptionsEdit, 1, 0 );

    m_diffLabel = new TQLabel( groupBox3, "m_diffLabel" );
    m_diffLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_diffLabel->sizePolicy().hasHeightForWidth() ) );

    groupBox3Layout->addWidget( m_diffLabel, 0, 0 );

    contextLinesInput = new KIntNumInput( groupBox3, "contextLinesInput" );
    contextLinesInput->setValue( 3 );
    contextLinesInput->setMinValue( 0 );
    contextLinesInput->setMaxValue( 65535 );

    groupBox3Layout->addWidget( contextLinesInput, 1, 1 );

    textLabel1 = new TQLabel( groupBox3, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );

    groupBox3Layout->addWidget( textLabel1, 0, 1 );
    cvsOptionsWidgetLayout->addWidget( groupBox3 );
    languageChange();
    resize( TQSize(500, 507).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    m_rshLabel->setBuddy( cvsRshEnvVarEdit );
    textLabel1_2->setBuddy( serverLocationEdit );
    m_diffLabel->setBuddy( diffOptionsEdit );
    textLabel1->setBuddy( contextLinesInput );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CvsOptionsWidgetBase::languageChange()
{
    setCaption( tr2i18n( "CVS Options" ) );
    groupBox4->setTitle( tr2i18n( "Common Settings" ) );
    m_rshLabel->setText( tr2i18n( "&Remote shell (CVS_RSH environment variable):" ) );
    TQToolTip::add( cvsRshEnvVarEdit, tr2i18n( "sets the CVS_RSH variable" ) );
    TQWhatsThis::add( cvsRshEnvVarEdit, tr2i18n( "Set this option to \"ssh\" to use ssh as remote shell for CVS. Note that you need password-less login (see the ssh documentation for how to generate a public/private key pair) otherwise CVS will just hang forever." ) );
    textLabel1_2->setText( tr2i18n( "CVS server &location:" ) );
    groupBox1->setTitle( tr2i18n( "When Updating" ) );
    createNewDirWhenUpdateCheck->setText( tr2i18n( "Create &new directories (if any)" ) );
    pruneEmptyDirWhenUpdateCheck->setText( tr2i18n( "&Prune empty directories" ) );
    recursiveWhenUpdateCheck->setText( tr2i18n( "&Update subdirectories too" ) );
    groupBox2->setTitle( tr2i18n( "When Committing/Removing" ) );
    recursiveWhenCommitRemoveCheck->setText( tr2i18n( "&Be recursive" ) );
    groupBox3->setTitle( tr2i18n( "When Creating Diffs" ) );
    m_diffLabel->setText( tr2i18n( "Use these e&xtra options:" ) );
    textLabel1->setText( tr2i18n( "Con&text lines:" ) );
}

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

TQMetaObject *CvsOptionsWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CvsOptionsWidgetBase( "CvsOptionsWidgetBase", &CvsOptionsWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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