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

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

#include "appearanceconfig_colors.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <tdefontrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox3->setFrameShadow( TQGroupBox::Sunken );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

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

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

    foregroundColor = new KColorButton( groupBox3, "foregroundColor" );

    groupBox3Layout->addWidget( foregroundColor, 3, 1 );

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

    groupBox3Layout->addWidget( textLabel2, 3, 0 );

    linkColor = new KColorButton( groupBox3, "linkColor" );
    linkColor->setColor( TQColor( 0, 85, 255 ) );

    groupBox3Layout->addWidget( linkColor, 2, 1 );

    backgroundColor = new KColorButton( groupBox3, "backgroundColor" );

    groupBox3Layout->addWidget( backgroundColor, 3, 3 );

    textLabel1_2 = new TQLabel( groupBox3, "textLabel1_2" );

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

    textColor = new KColorButton( groupBox3, "textColor" );

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

    bgColor = new KColorButton( groupBox3, "bgColor" );
    bgColor->setColor( TQColor( 255, 255, 255 ) );

    groupBox3Layout->addWidget( bgColor, 1, 3 );

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

    groupBox3Layout->addWidget( textLabel1, 3, 2 );

    textLabel1_3 = new TQLabel( groupBox3, "textLabel1_3" );

    groupBox3Layout->addWidget( textLabel1_3, 2, 0 );

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

    groupBox3Layout->addWidget( textLabel2_2, 1, 2 );

    fontFace = new TDEFontRequester( groupBox3, "fontFace" );

    groupBox3Layout->addMultiCellWidget( fontFace, 0, 0, 1, 3 );
    AppearanceConfig_ColorsLayout->addWidget( groupBox3 );

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

    mBgOverride = new TQCheckBox( groupBox4, "mBgOverride" );
    groupBox4Layout->addWidget( mBgOverride );

    mFgOverride = new TQCheckBox( groupBox4, "mFgOverride" );
    groupBox4Layout->addWidget( mFgOverride );

    mRtfOverride = new TQCheckBox( groupBox4, "mRtfOverride" );
    groupBox4Layout->addWidget( mRtfOverride );
    AppearanceConfig_ColorsLayout->addWidget( groupBox4 );

    groupBox3_2 = new TQGroupBox( this, "groupBox3_2" );
    groupBox3_2->setColumnLayout(0, TQt::Vertical );
    groupBox3_2->layout()->setSpacing( 6 );
    groupBox3_2->layout()->setMargin( 11 );
    groupBox3_2Layout = new TQVBoxLayout( groupBox3_2->layout() );
    groupBox3_2Layout->setAlignment( TQt::AlignTop );

    mUseCustomFonts = new TQCheckBox( groupBox3_2, "mUseCustomFonts" );
    groupBox3_2Layout->addWidget( mUseCustomFonts );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 
    spacer13 = new TQSpacerItem( 20, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( spacer13 );

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

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

    mGroupFontLabel = new TQLabel( groupBox3_2, "mGroupFontLabel" );
    mGroupFontLabel->setEnabled( false );
    layout5->addWidget( mGroupFontLabel );

    mGroupFont = new TDEFontRequester( groupBox3_2, "mGroupFont" );
    mGroupFont->setEnabled( false );
    layout5->addWidget( mGroupFont );
    layout8->addLayout( layout5 );

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

    mNormalFontLabel = new TQLabel( groupBox3_2, "mNormalFontLabel" );
    mNormalFontLabel->setEnabled( false );
    layout6->addWidget( mNormalFontLabel );

    mNormalFont = new TDEFontRequester( groupBox3_2, "mNormalFont" );
    mNormalFont->setEnabled( false );
    layout6->addWidget( mNormalFont );
    layout8->addLayout( layout6 );

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

    mSmallFontLabel = new TQLabel( groupBox3_2, "mSmallFontLabel" );
    mSmallFontLabel->setEnabled( false );
    layout7->addWidget( mSmallFontLabel );

    mSmallFont = new TDEFontRequester( groupBox3_2, "mSmallFont" );
    mSmallFont->setEnabled( false );
    layout7->addWidget( mSmallFont );
    layout8->addLayout( layout7 );
    layout9->addLayout( layout8 );
    groupBox3_2Layout->addLayout( layout9 );

    layout6_2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout6_2"); 

    mGroupNameColor = new KColorButton( groupBox3_2, "mGroupNameColor" );

    layout6_2->addWidget( mGroupNameColor, 1, 1 );

    idleContactColor = new KColorButton( groupBox3_2, "idleContactColor" );
    idleContactColor->setEnabled( false );

    layout6_2->addWidget( idleContactColor, 0, 1 );

    mGreyIdleMetaContacts = new TQCheckBox( groupBox3_2, "mGreyIdleMetaContacts" );

    layout6_2->addWidget( mGreyIdleMetaContacts, 0, 0 );

    textLabel1_4 = new TQLabel( groupBox3_2, "textLabel1_4" );

    layout6_2->addWidget( textLabel1_4, 1, 0 );
    groupBox3_2Layout->addLayout( layout6_2 );
    AppearanceConfig_ColorsLayout->addWidget( groupBox3_2 );
    spacer2 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    AppearanceConfig_ColorsLayout->addItem( spacer2 );
    languageChange();
    resize( TQSize(618, 594).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mNormalFontLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mNormalFont, TQ_SLOT( setEnabled(bool) ) );
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mSmallFontLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mSmallFont, TQ_SLOT( setEnabled(bool) ) );
    connect( mGreyIdleMetaContacts, TQ_SIGNAL( toggled(bool) ), idleContactColor, TQ_SLOT( setEnabled(bool) ) );
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mGroupFontLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( mUseCustomFonts, TQ_SIGNAL( toggled(bool) ), mGroupFont, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( bgColor, textColor );
    setTabOrder( textColor, linkColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AppearanceConfig_Colors::languageChange()
{
    setCaption( tr2i18n( "Colors" ) );
    groupBox3->setTitle( tr2i18n( "Chat Window" ) );
    textLabel3->setText( tr2i18n( "Base font:" ) );
    foregroundColor->setText( TQString::null );
    textLabel2->setText( tr2i18n( "Highlight foreground:" ) );
    linkColor->setText( TQString::null );
    backgroundColor->setText( TQString::null );
    textLabel1_2->setText( tr2i18n( "Base font color:" ) );
    textColor->setText( TQString::null );
    bgColor->setText( TQString::null );
    textLabel1->setText( tr2i18n( "Highlight background:" ) );
    textLabel1_3->setText( tr2i18n( "Link color:" ) );
    textLabel2_2->setText( tr2i18n( "Background color:" ) );
    groupBox4->setTitle( tr2i18n( "Formatting Overrides" ) );
    mBgOverride->setText( tr2i18n( "Do not show user specified &background color" ) );
    mFgOverride->setText( tr2i18n( "Do not show user specified &foreground color" ) );
    mRtfOverride->setText( tr2i18n( "Do not show user specified &rich text" ) );
    groupBox3_2->setTitle( tr2i18n( "Contact List" ) );
    mUseCustomFonts->setText( tr2i18n( "Use custom fonts for contact list items" ) );
    mGroupFontLabel->setText( tr2i18n( "Group font:" ) );
    mNormalFontLabel->setText( tr2i18n( "Normal font:" ) );
    mSmallFontLabel->setText( tr2i18n( "Small font:" ) );
    mGroupNameColor->setText( TQString::null );
    idleContactColor->setText( TQString::null );
    mGreyIdleMetaContacts->setText( tr2i18n( "Recolor contacts marked as idle:" ) );
    textLabel1_4->setText( tr2i18n( "Group name color:" ) );
}

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

TQMetaObject *AppearanceConfig_Colors::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AppearanceConfig_Colors( "AppearanceConfig_Colors", &AppearanceConfig_Colors::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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