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

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

#include "colorpreferences.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kcfg_QuotedColor = new KColorButton( this, "kcfg_QuotedColor" );

    ColorPreferencesLayout->addWidget( kcfg_QuotedColor, 1, 1 );

    kcfg_BackgroundColor = new KColorButton( this, "kcfg_BackgroundColor" );

    ColorPreferencesLayout->addWidget( kcfg_BackgroundColor, 0, 1 );

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

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

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

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

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

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

    kcfg_ErrorColor = new KColorButton( this, "kcfg_ErrorColor" );

    ColorPreferencesLayout->addWidget( kcfg_ErrorColor, 2, 1 );

    label = new TQLabel( this, "label" );

    ColorPreferencesLayout->addWidget( label, 3, 0 );

    kcfg_SpellcheckErrorColor = new KColorButton( this, "kcfg_SpellcheckErrorColor" );

    ColorPreferencesLayout->addWidget( kcfg_SpellcheckErrorColor, 3, 1 );

    textLabel5 = new TQLabel( this, "textLabel5" );

    ColorPreferencesLayout->addWidget( textLabel5, 5, 0 );

    kcfg_TagColor = new KColorButton( this, "kcfg_TagColor" );

    ColorPreferencesLayout->addWidget( kcfg_TagColor, 6, 1 );

    kcfg_AccelColor = new KColorButton( this, "kcfg_AccelColor" );

    ColorPreferencesLayout->addWidget( kcfg_AccelColor, 5, 1 );

    textLabel4 = new TQLabel( this, "textLabel4" );

    ColorPreferencesLayout->addWidget( textLabel4, 4, 0 );

    kcfg_CformatColor = new KColorButton( this, "kcfg_CformatColor" );

    ColorPreferencesLayout->addWidget( kcfg_CformatColor, 4, 1 );

    textLabel6 = new TQLabel( this, "textLabel6" );

    ColorPreferencesLayout->addWidget( textLabel6, 6, 0 );
    spacer4 = new TQSpacerItem( 20, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ColorPreferencesLayout->addItem( spacer4, 7, 0 );
    languageChange();
    resize( TQSize(627, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel1->setBuddy( kcfg_BackgroundColor );
    textLabel2->setBuddy( kcfg_QuotedColor );
    textLabel3->setBuddy( kcfg_ErrorColor );
    label->setBuddy( kcfg_ErrorColor );
    textLabel5->setBuddy( kcfg_AccelColor );
    textLabel4->setBuddy( kcfg_CformatColor );
    textLabel6->setBuddy( kcfg_TagColor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ColorPreferences::languageChange()
{
    kcfg_QuotedColor->setText( TQString::null );
    kcfg_BackgroundColor->setText( TQString::null );
    textLabel1->setText( tr2i18n( "&Background color:" ) );
    textLabel2->setText( tr2i18n( "Color for &quoted characters:" ) );
    textLabel3->setText( tr2i18n( "Color for &syntax errors:" ) );
    kcfg_ErrorColor->setText( TQString::null );
    label->setText( tr2i18n( "Color for s&pellcheck errors:" ) );
    kcfg_SpellcheckErrorColor->setText( TQString::null );
    TQWhatsThis::add( kcfg_SpellcheckErrorColor, tr2i18n( "<qt>Here you can setup a color to display identified <b>mispelled</b> words and\n"
"phrases.</qt>" ) );
    textLabel5->setText( tr2i18n( "Color for &keyboard accelerators:" ) );
    kcfg_TagColor->setText( TQString::null );
    kcfg_AccelColor->setText( TQString::null );
    textLabel4->setText( tr2i18n( "Color for c-for&mat characters:" ) );
    kcfg_CformatColor->setText( TQString::null );
    textLabel6->setText( tr2i18n( "Color for &tags:" ) );
}

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

TQMetaObject *ColorPreferences::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ColorPreferences( "ColorPreferences", &ColorPreferences::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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