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

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

#include "irccolorchooserui.h"

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

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

    m_previewLbl = new TQLabel( this, "m_previewLbl" );
    m_previewLbl->setFrameShape( TQLabel::Panel );
    m_previewLbl->setFrameShadow( TQLabel::Sunken );
    m_previewLbl->setAlignment( int( TQLabel::AlignCenter ) );

    IRCColorChooserUILayout->addMultiCellWidget( m_previewLbl, 2, 2, 0, 1 );

    m_fgColorCBox = new KComboBox( false, this, "m_fgColorCBox" );
    m_fgColorCBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_fgColorCBox->sizePolicy().hasHeightForWidth() ) );

    IRCColorChooserUILayout->addWidget( m_fgColorCBox, 0, 1 );

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

    IRCColorChooserUILayout->addWidget( m_fgColorLbl, 0, 0 );

    m_bgColorCBox = new KComboBox( false, this, "m_bgColorCBox" );
    m_bgColorCBox->setEnabled( true );
    m_bgColorCBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_bgColorCBox->sizePolicy().hasHeightForWidth() ) );

    IRCColorChooserUILayout->addWidget( m_bgColorCBox, 1, 1 );

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

    IRCColorChooserUILayout->addWidget( m_bgColorLbl, 1, 0 );
    languageChange();
    resize( TQSize(249, 122).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    m_fgColorLbl->setBuddy( m_fgColorCBox );
    m_bgColorLbl->setBuddy( m_bgColorCBox );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void IRCColorChooserUI::languageChange()
{
    m_previewLbl->setText( tr2i18n( "Preview" ) );
    TQToolTip::add( m_previewLbl, tr2i18n( "This is how your message will look with these colors" ) );
    TQWhatsThis::add( m_previewLbl, tr2i18n( "<qt>This is a preview of how your readers may see view your message if you select these colors.<br>\n"
"<b>Note: Not all clients support this, and some users may have chosen to ignore your color changes.</b>\n"
"</qt>" ) );
    TQToolTip::add( m_fgColorCBox, tr2i18n( "The chosen text color is added to the input line." ) );
    TQWhatsThis::add( m_fgColorCBox, tr2i18n( "<qt>Here you choose what color you want you the text in the next message you send to be.  If you choose a color and click Ok, the chosen color is added to the Input Line.  Any text written after this will be in the chosen color, until you change the color again.<br>\n"
"<b>Note:  Not all users turn on the option to see this.</b></qt>" ) );
    m_fgColorLbl->setText( tr2i18n( "&Foreground color:" ) );
    TQToolTip::add( m_fgColorLbl, tr2i18n( "The chosen text color is added to the input line." ) );
    TQWhatsThis::add( m_fgColorLbl, tr2i18n( "<qt>Here you choose what color you want you the text in the next message you send to be.  If you choose a color and click Ok, the chosen color is added to the Input Line.  Any text written after this will be in the chosen color, until you change the color again.<br>\n"
"<b>Note:  Not all users turn on the option to see this.</b></qt>" ) );
    TQToolTip::add( m_bgColorCBox, tr2i18n( "The chosen text-background color is added to the input line." ) );
    TQWhatsThis::add( m_bgColorCBox, tr2i18n( "<qt>Here you choose what color you want you background for the text in the next message you send to be.\n"
"If you choose a color and click Ok, the chosen color is added to the Input Line.\n"
"Any text written after this will have the chosen color, until you change the color again.<br>\n"
"Choosing the default \"<i>None</i>\" will not change the background color of your message, so your readers will view your message with their normal background text color.<br>\n"
"<b>Note:  Not all clients support this, and not all users turn on the option to see this.</b></qt>" ) );
    m_bgColorLbl->setText( tr2i18n( "&Background color:" ) );
    TQToolTip::add( m_bgColorLbl, tr2i18n( "The chosen text-background color is added to the input line." ) );
    TQWhatsThis::add( m_bgColorLbl, tr2i18n( "<qt>Here you choose what color you want you background for the text in the next message you send to be.\n"
"If you choose a color and click Ok, the chosen color is added to the Input Line.\n"
"Any text written after this will have the chosen color, until you change the color again.<br>\n"
"Choosing the default \"<i>None</i>\" will not change the background color of your message, so your readers will view your message with their normal background text color.<br>\n"
"<b>Note:  Not all clients support this, and not all users turn on the option to see this.</b></qt>" ) );
}

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

TQMetaObject *IRCColorChooserUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_IRCColorChooserUI( "IRCColorChooserUI", &IRCColorChooserUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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