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

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

#include "komparesaveoptionsbase.h"

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

/*
 *  Constructs a KompareSaveOptionsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KompareSaveOptionsBase::KompareSaveOptionsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KompareSaveOptionsBase" );
    KompareSaveOptionsBaseLayout = new TQGridLayout( this, 1, 1, 0, 6, "KompareSaveOptionsBaseLayout"); 

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, GroupBox2->sizePolicy().hasHeightForWidth() ) );
    GroupBox2->setFrameShape( TQGroupBox::Panel );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQHBoxLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    m_directoryRequester = new KURLRequester( GroupBox2, "m_directoryRequester" );
    m_directoryRequester->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, m_directoryRequester->sizePolicy().hasHeightForWidth() ) );
    GroupBox2Layout->addWidget( m_directoryRequester );

    KompareSaveOptionsBaseLayout->addMultiCellWidget( GroupBox2, 1, 1, 0, 1 );

    m_CommandLineGB = new TQGroupBox( this, "m_CommandLineGB" );
    m_CommandLineGB->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, m_CommandLineGB->sizePolicy().hasHeightForWidth() ) );
    m_CommandLineGB->setFrameShape( TQGroupBox::Panel );
    m_CommandLineGB->setAlignment( int( TQGroupBox::AlignVCenter | TQGroupBox::AlignLeft ) );
    m_CommandLineGB->setColumnLayout(0, TQt::Vertical );
    m_CommandLineGB->layout()->setSpacing( 6 );
    m_CommandLineGB->layout()->setMargin( 11 );
    m_CommandLineGBLayout = new TQHBoxLayout( m_CommandLineGB->layout() );
    m_CommandLineGBLayout->setAlignment( TQt::AlignTop );

    m_CommandLineLabel = new TQLabel( m_CommandLineGB, "m_CommandLineLabel" );
    m_CommandLineGBLayout->addWidget( m_CommandLineLabel );

    KompareSaveOptionsBaseLayout->addMultiCellWidget( m_CommandLineGB, 2, 2, 0, 1 );

    m_OptionsGB = new TQButtonGroup( this, "m_OptionsGB" );
    m_OptionsGB->setColumnLayout(0, TQt::Vertical );
    m_OptionsGB->layout()->setSpacing( 6 );
    m_OptionsGB->layout()->setMargin( 11 );
    m_OptionsGBLayout = new TQVBoxLayout( m_OptionsGB->layout() );
    m_OptionsGBLayout->setAlignment( TQt::AlignTop );

    m_SmallerChangesCB = new TQCheckBox( m_OptionsGB, "m_SmallerChangesCB" );
    m_SmallerChangesCB->setChecked( true );
    m_OptionsGBLayout->addWidget( m_SmallerChangesCB );

    m_LargeFilesCB = new TQCheckBox( m_OptionsGB, "m_LargeFilesCB" );
    m_LargeFilesCB->setChecked( true );
    m_OptionsGBLayout->addWidget( m_LargeFilesCB );

    m_IgnoreCaseCB = new TQCheckBox( m_OptionsGB, "m_IgnoreCaseCB" );
    m_OptionsGBLayout->addWidget( m_IgnoreCaseCB );

    m_ExpandTabsCB = new TQCheckBox( m_OptionsGB, "m_ExpandTabsCB" );
    m_OptionsGBLayout->addWidget( m_ExpandTabsCB );

    m_IgnoreEmptyLinesCB = new TQCheckBox( m_OptionsGB, "m_IgnoreEmptyLinesCB" );
    m_OptionsGBLayout->addWidget( m_IgnoreEmptyLinesCB );

    m_IgnoreWhiteSpaceCB = new TQCheckBox( m_OptionsGB, "m_IgnoreWhiteSpaceCB" );
    m_OptionsGBLayout->addWidget( m_IgnoreWhiteSpaceCB );

    m_FunctionNamesCB = new TQCheckBox( m_OptionsGB, "m_FunctionNamesCB" );
    m_FunctionNamesCB->setChecked( true );
    m_OptionsGBLayout->addWidget( m_FunctionNamesCB );

    m_RecursiveCB = new TQCheckBox( m_OptionsGB, "m_RecursiveCB" );
    m_RecursiveCB->setChecked( true );
    m_OptionsGBLayout->addWidget( m_RecursiveCB );

    m_NewFilesCB = new TQCheckBox( m_OptionsGB, "m_NewFilesCB" );
    m_NewFilesCB->setChecked( true );
    m_NewFilesCB->setTristate( false );
    m_OptionsGBLayout->addWidget( m_NewFilesCB );

    KompareSaveOptionsBaseLayout->addWidget( m_OptionsGB, 0, 1 );

    m_FormatBG = new TQButtonGroup( this, "m_FormatBG" );
    m_FormatBG->setColumnLayout(0, TQt::Vertical );
    m_FormatBG->layout()->setSpacing( 6 );
    m_FormatBG->layout()->setMargin( 11 );
    m_FormatBGLayout = new TQVBoxLayout( m_FormatBG->layout() );
    m_FormatBGLayout->setAlignment( TQt::AlignTop );

    m_ContextRB = new TQRadioButton( m_FormatBG, "m_ContextRB" );
    m_FormatBGLayout->addWidget( m_ContextRB );

    m_EdRB = new TQRadioButton( m_FormatBG, "m_EdRB" );
    m_FormatBGLayout->addWidget( m_EdRB );

    m_NormalRB = new TQRadioButton( m_FormatBG, "m_NormalRB" );
    m_FormatBGLayout->addWidget( m_NormalRB );

    m_RCSRB = new TQRadioButton( m_FormatBG, "m_RCSRB" );
    m_FormatBGLayout->addWidget( m_RCSRB );

    m_UnifiedRB = new TQRadioButton( m_FormatBG, "m_UnifiedRB" );
    m_UnifiedRB->setChecked( true );
    m_FormatBGLayout->addWidget( m_UnifiedRB );

    m_SideBySideRB = new TQRadioButton( m_FormatBG, "m_SideBySideRB" );
    m_SideBySideRB->setChecked( false );
    m_FormatBGLayout->addWidget( m_SideBySideRB );

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

    m_ContextLinesLabel = new TQLabel( m_FormatBG, "m_ContextLinesLabel" );
    m_ContextLinesLayout->addWidget( m_ContextLinesLabel );

    m_ContextLinesSB = new TQSpinBox( m_FormatBG, "m_ContextLinesSB" );
    m_ContextLinesSB->setEnabled( true );
    m_ContextLinesSB->setMaxValue( 65535 );
    m_ContextLinesSB->setValue( 3 );
    m_ContextLinesLayout->addWidget( m_ContextLinesSB );
    m_FormatBGLayout->addLayout( m_ContextLinesLayout );

    KompareSaveOptionsBaseLayout->addWidget( m_FormatBG, 0, 0 );
    languageChange();
    resize( TQSize(558, 399).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KompareSaveOptionsBase::languageChange()
{
    GroupBox2->setTitle( tr2i18n( "Run Diff In" ) );
    m_CommandLineGB->setTitle( tr2i18n( "Command Line" ) );
    m_CommandLineLabel->setText( tr2i18n( "cd dir && diff -udHprNa -- source destination" ) );
    m_OptionsGB->setTitle( tr2i18n( "Options" ) );
    m_SmallerChangesCB->setText( tr2i18n( "Look for smaller changes" ) );
    m_LargeFilesCB->setText( tr2i18n( "Optimize for large files" ) );
    m_IgnoreCaseCB->setText( tr2i18n( "Ignore changes in case" ) );
    m_ExpandTabsCB->setText( tr2i18n( "Expand tabs to spaces" ) );
    m_IgnoreEmptyLinesCB->setText( tr2i18n( "Ignore added or removed empty lines" ) );
    m_IgnoreWhiteSpaceCB->setText( tr2i18n( "Ignore changes in whitespace" ) );
    m_FunctionNamesCB->setText( tr2i18n( "Show function names" ) );
    m_RecursiveCB->setText( tr2i18n( "Compare folders recursively" ) );
    m_NewFilesCB->setText( tr2i18n( "Treat new files as empty" ) );
    m_FormatBG->setTitle( tr2i18n( "Format" ) );
    m_ContextRB->setText( tr2i18n( "Context" ) );
    m_EdRB->setText( tr2i18n( "Ed" ) );
    m_NormalRB->setText( tr2i18n( "Normal" ) );
    m_RCSRB->setText( tr2i18n( "RCS" ) );
    m_UnifiedRB->setText( tr2i18n( "Unified" ) );
    m_SideBySideRB->setText( tr2i18n( "Side-by-side" ) );
    m_ContextLinesLabel->setText( tr2i18n( "Number of context lines:" ) );
}

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

TQMetaObject *KompareSaveOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KompareSaveOptionsBase( "KompareSaveOptionsBase", &KompareSaveOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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