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

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

#include "vcscolorsconfigwidgetbase.h"

#include <ntqvariant.h>
#include <kcolorcombo.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

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

    textLabel3 = new TQLabel( groupBox1, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel3, 2, 0 );

    textLabel4 = new TQLabel( groupBox1, "textLabel4" );
    textLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel4, 3, 0 );

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

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

    textLabel5 = new TQLabel( groupBox1, "textLabel5" );
    textLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel5->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel5, 4, 0 );

    textLabel5_3 = new TQLabel( groupBox1, "textLabel5_3" );
    textLabel5_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel5_3->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel5_3, 6, 0 );

    textLabel5_2 = new TQLabel( groupBox1, "textLabel5_2" );
    textLabel5_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel5_2->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel5_2, 5, 0 );

    textLabel6 = new TQLabel( groupBox1, "textLabel6" );
    textLabel6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel6->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel6, 7, 0 );

    textLabel6_2 = new TQLabel( groupBox1, "textLabel6_2" );
    textLabel6_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel6_2->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( textLabel6_2, 8, 0 );

    fileModifiedColorCombo = new KColorCombo( groupBox1, "fileModifiedColorCombo" );

    groupBox1Layout->addWidget( fileModifiedColorCombo, 2, 1 );

    fileConflictColorCombo = new KColorCombo( groupBox1, "fileConflictColorCombo" );

    groupBox1Layout->addWidget( fileConflictColorCombo, 3, 1 );

    fileUnknownColorCombo = new KColorCombo( groupBox1, "fileUnknownColorCombo" );

    groupBox1Layout->addWidget( fileUnknownColorCombo, 7, 1 );

    fileNeedsCheckoutColorCombo = new KColorCombo( groupBox1, "fileNeedsCheckoutColorCombo" );

    groupBox1Layout->addWidget( fileNeedsCheckoutColorCombo, 6, 1 );

    defaultColorCombo = new KColorCombo( groupBox1, "defaultColorCombo" );

    groupBox1Layout->addWidget( defaultColorCombo, 8, 1 );

    fileStickyColorCombo = new KColorCombo( groupBox1, "fileStickyColorCombo" );

    groupBox1Layout->addWidget( fileStickyColorCombo, 4, 1 );

    fileNeedsPatchColorCombo = new KColorCombo( groupBox1, "fileNeedsPatchColorCombo" );

    groupBox1Layout->addWidget( fileNeedsPatchColorCombo, 5, 1 );

    fileAddedColorCombo = new KColorCombo( groupBox1, "fileAddedColorCombo" );

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

    fileUpdatedColorCombo = new KColorCombo( groupBox1, "fileUpdatedColorCombo" );

    groupBox1Layout->addWidget( fileUpdatedColorCombo, 1, 1 );
    VCSColorsConfigWidgetBaseLayout->addWidget( groupBox1 );
    languageChange();
    resize( TQSize(410, 324).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel2->setBuddy( fileUpdatedColorCombo );
    textLabel3->setBuddy( fileModifiedColorCombo );
    textLabel4->setBuddy( fileConflictColorCombo );
    textLabel1->setBuddy( fileAddedColorCombo );
    textLabel5->setBuddy( fileStickyColorCombo );
    textLabel5_3->setBuddy( fileStickyColorCombo );
    textLabel5_2->setBuddy( fileStickyColorCombo );
    textLabel6->setBuddy( fileUnknownColorCombo );
    textLabel6_2->setBuddy( defaultColorCombo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void VCSColorsConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Colors for VCS Visual Feedback" ) );
    groupBox1->setTitle( tr2i18n( "Colors to Use for Version Control Feedback" ) );
    textLabel2->setText( tr2i18n( "&Updated:" ) );
    textLabel3->setText( tr2i18n( "&Modified:" ) );
    textLabel4->setText( tr2i18n( "Co&nflict:" ) );
    textLabel1->setText( tr2i18n( "&Added:" ) );
    textLabel5->setText( tr2i18n( "&Sticky:" ) );
    textLabel5_3->setText( tr2i18n( "&Needs checkout:" ) );
    textLabel5_2->setText( tr2i18n( "&Needs patch:" ) );
    textLabel6->setText( tr2i18n( "Un&known:" ) );
    textLabel6_2->setText( tr2i18n( "&Default:" ) );
}

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

TQMetaObject *VCSColorsConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_VCSColorsConfigWidgetBase( "VCSColorsConfigWidgetBase", &VCSColorsConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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