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

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

#include "appearanceconfig_emoticons.h"

#include <ntqvariant.h>
#include <ktextedit.h>
#include <tdelistbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    chkUseEmoticons = new TQCheckBox( this, "chkUseEmoticons" );
    chkUseEmoticons->setChecked( true );
    AppearanceConfig_EmoticonsLayout->addWidget( chkUseEmoticons );

    chkRequireSpaces = new TQCheckBox( this, "chkRequireSpaces" );
    chkRequireSpaces->setChecked( true );
    AppearanceConfig_EmoticonsLayout->addWidget( chkRequireSpaces );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setFocusPolicy( TQLabel::NoFocus );
    AppearanceConfig_EmoticonsLayout->addWidget( textLabel1 );

    icon_theme_list = new TDEListBox( this, "icon_theme_list" );
    AppearanceConfig_EmoticonsLayout->addWidget( icon_theme_list );

    lblPreview = new TQLabel( this, "lblPreview" );
    AppearanceConfig_EmoticonsLayout->addWidget( lblPreview );

    icon_theme_preview = new KTextEdit( this, "icon_theme_preview" );
    icon_theme_preview->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, icon_theme_preview->sizePolicy().hasHeightForWidth() ) );
    icon_theme_preview->setMaximumSize( TQSize( 32767, 64 ) );
    icon_theme_preview->setReadOnly( true );
    AppearanceConfig_EmoticonsLayout->addWidget( icon_theme_preview );

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

    btnGetThemes = new TQPushButton( this, "btnGetThemes" );
    layout2->addWidget( btnGetThemes );

    btnEditThemes = new TQPushButton( this, "btnEditThemes" );
    layout2->addWidget( btnEditThemes );

    btnEditThemes_2 = new TQPushButton( this, "btnEditThemes_2" );
    layout2->addWidget( btnEditThemes_2 );

    btnInstallTheme = new TQPushButton( this, "btnInstallTheme" );
    layout2->addWidget( btnInstallTheme );

    btnRemoveTheme = new TQPushButton( this, "btnRemoveTheme" );
    btnRemoveTheme->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnRemoveTheme->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( btnRemoveTheme );
    spacer1 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );
    AppearanceConfig_EmoticonsLayout->addLayout( layout2 );
    languageChange();
    resize( TQSize(541, 395).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), chkRequireSpaces, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), lblPreview, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), icon_theme_list, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), lblPreview, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), textLabel1, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), btnGetThemes, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), btnInstallTheme, TQ_SLOT( setEnabled(bool) ) );
    connect( chkUseEmoticons, TQ_SIGNAL( toggled(bool) ), btnRemoveTheme, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AppearanceConfig_Emoticons::languageChange()
{
    chkUseEmoticons->setText( tr2i18n( "&Use emoticons" ) );
    TQWhatsThis::add( chkUseEmoticons, tr2i18n( "If this is checked, the text representation of emoticons in messages will be replaced by an image" ) );
    chkRequireSpaces->setText( tr2i18n( "&Require separators (spaces) around emoticons" ) );
    TQWhatsThis::add( chkRequireSpaces, tr2i18n( "If this is checked, only emoticons that are separated from the text by spaces will be shown as images." ) );
    textLabel1->setText( tr2i18n( "Select emoticon theme:" ) );
    lblPreview->setText( tr2i18n( "Preview:" ) );
    btnGetThemes->setText( tr2i18n( "&Get New Themes..." ) );
    TQWhatsThis::add( btnGetThemes, tr2i18n( "Download emoticon theme from the Internet" ) );
    btnEditThemes->setText( tr2i18n( "&Edit Theme..." ) );
    TQWhatsThis::add( btnEditThemes, tr2i18n( "Edit the selected emoticons theme" ) );
    btnEditThemes_2->setText( tr2i18n( "&Edit Theme..." ) );
    TQWhatsThis::add( btnEditThemes_2, tr2i18n( "Edit the selected emoticons theme" ) );
    btnInstallTheme->setText( tr2i18n( "&Install Theme File..." ) );
    btnRemoveTheme->setText( tr2i18n( "Remove Theme" ) );
}

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

TQMetaObject *AppearanceConfig_Emoticons::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AppearanceConfig_Emoticons( "AppearanceConfig_Emoticons", &AppearanceConfig_Emoticons::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool AppearanceConfig_Emoticons::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_Emoticons::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

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

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