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

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

#include "tabnotifications_preferences.h"

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

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

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

    kcfg_TabNotificationsText = new TQCheckBox( groupBox4, "kcfg_TabNotificationsText" );
    kcfg_TabNotificationsText->setChecked( true );

    groupBox4Layout->addWidget( kcfg_TabNotificationsText, 0, 0 );

    kcfg_TabNotificationsLeds = new TQCheckBox( groupBox4, "kcfg_TabNotificationsLeds" );

    groupBox4Layout->addWidget( kcfg_TabNotificationsLeds, 1, 0 );
    TabNotifications_ConfigLayout->addWidget( groupBox4 );

    groupBox5 = new TQGroupBox( this, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQGridLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

    kcfg_TabNotificationsSystem = new TQCheckBox( groupBox5, "kcfg_TabNotificationsSystem" );
    kcfg_TabNotificationsSystem->setChecked( true );

    groupBox5Layout->addMultiCellWidget( kcfg_TabNotificationsSystem, 5, 5, 0, 2 );
    spacer45_2 = new TQSpacerItem( 50, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer45_2, 5, 3 );

    kcfg_TabNotificationsSystemColor = new KColorButton( groupBox5, "kcfg_TabNotificationsSystemColor" );

    groupBox5Layout->addWidget( kcfg_TabNotificationsSystemColor, 5, 4 );

    kcfg_TabNotificationsMsgs = new TQCheckBox( groupBox5, "kcfg_TabNotificationsMsgs" );
    kcfg_TabNotificationsMsgs->setChecked( true );

    groupBox5Layout->addWidget( kcfg_TabNotificationsMsgs, 0, 0 );
    spacer42 = new TQSpacerItem( 50, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addMultiCell( spacer42, 0, 0, 1, 3 );

    kcfg_TabNotificationsMsgsColor = new KColorButton( groupBox5, "kcfg_TabNotificationsMsgsColor" );
    kcfg_TabNotificationsMsgsColor->setDefaultColor( TQColor( 0, 0, 0 ) );

    groupBox5Layout->addWidget( kcfg_TabNotificationsMsgsColor, 0, 4 );
    spacer42_2 = new TQSpacerItem( 60, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer42_2, 1, 3 );

    kcfg_TabNotificationsPrivate = new TQCheckBox( groupBox5, "kcfg_TabNotificationsPrivate" );
    kcfg_TabNotificationsPrivate->setChecked( true );

    groupBox5Layout->addMultiCellWidget( kcfg_TabNotificationsPrivate, 1, 1, 0, 2 );

    kcfg_TabNotificationsPrivateColor = new KColorButton( groupBox5, "kcfg_TabNotificationsPrivateColor" );
    kcfg_TabNotificationsPrivateColor->setDefaultColor( TQColor( 0, 0, 0 ) );

    groupBox5Layout->addWidget( kcfg_TabNotificationsPrivateColor, 1, 4 );

    kcfg_TabNotificationsNick = new TQCheckBox( groupBox5, "kcfg_TabNotificationsNick" );
    kcfg_TabNotificationsNick->setChecked( true );

    groupBox5Layout->addMultiCellWidget( kcfg_TabNotificationsNick, 2, 2, 0, 2 );
    spacer44 = new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer44, 2, 3 );
    spacer45 = new TQSpacerItem( 50, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addMultiCell( spacer45, 3, 3, 1, 3 );

    kcfg_TabNotificationsNickColor = new KColorButton( groupBox5, "kcfg_TabNotificationsNickColor" );

    groupBox5Layout->addWidget( kcfg_TabNotificationsNickColor, 2, 4 );

    kcfg_TabNotificationsHighlightsColor = new KColorButton( groupBox5, "kcfg_TabNotificationsHighlightsColor" );

    groupBox5Layout->addWidget( kcfg_TabNotificationsHighlightsColor, 3, 4 );

    kcfg_TabNotificationsEvents = new TQCheckBox( groupBox5, "kcfg_TabNotificationsEvents" );
    kcfg_TabNotificationsEvents->setChecked( false );

    groupBox5Layout->addMultiCellWidget( kcfg_TabNotificationsEvents, 4, 4, 0, 1 );

    kcfg_TabNotificationsHighlights = new TQCheckBox( groupBox5, "kcfg_TabNotificationsHighlights" );
    kcfg_TabNotificationsHighlights->setChecked( true );

    groupBox5Layout->addWidget( kcfg_TabNotificationsHighlights, 3, 0 );
    spacer43 = new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addMultiCell( spacer43, 4, 4, 2, 3 );

    kcfg_TabNotificationsEventsColor = new KColorButton( groupBox5, "kcfg_TabNotificationsEventsColor" );
    kcfg_TabNotificationsEventsColor->setEnabled( false );

    groupBox5Layout->addWidget( kcfg_TabNotificationsEventsColor, 4, 4 );
    TabNotifications_ConfigLayout->addWidget( groupBox5 );

    groupBox10 = new TQGroupBox( this, "groupBox10" );
    groupBox10->setColumnLayout(0, TQt::Vertical );
    groupBox10->layout()->setSpacing( 6 );
    groupBox10->layout()->setMargin( 11 );
    groupBox10Layout = new TQGridLayout( groupBox10->layout() );
    groupBox10Layout->setAlignment( TQt::AlignTop );

    kcfg_TabNotificationsOverride = new TQCheckBox( groupBox10, "kcfg_TabNotificationsOverride" );

    groupBox10Layout->addWidget( kcfg_TabNotificationsOverride, 0, 0 );
    TabNotifications_ConfigLayout->addWidget( groupBox10 );
    spacer47 = new TQSpacerItem( 21, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabNotifications_ConfigLayout->addItem( spacer47 );
    languageChange();
    resize( TQSize(278, 418).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_TabNotificationsMsgs, TQ_SIGNAL( toggled(bool) ), kcfg_TabNotificationsMsgsColor, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_TabNotificationsEvents, TQ_SIGNAL( toggled(bool) ), kcfg_TabNotificationsEventsColor, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_TabNotificationsNick, TQ_SIGNAL( toggled(bool) ), kcfg_TabNotificationsNickColor, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_TabNotificationsHighlights, TQ_SIGNAL( toggled(bool) ), kcfg_TabNotificationsHighlightsColor, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_TabNotificationsSystem, TQ_SIGNAL( toggled(bool) ), kcfg_TabNotificationsSystemColor, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_TabNotificationsText, kcfg_TabNotificationsLeds );
    setTabOrder( kcfg_TabNotificationsLeds, kcfg_TabNotificationsMsgs );
    setTabOrder( kcfg_TabNotificationsMsgs, kcfg_TabNotificationsMsgsColor );
    setTabOrder( kcfg_TabNotificationsMsgsColor, kcfg_TabNotificationsPrivate );
    setTabOrder( kcfg_TabNotificationsPrivate, kcfg_TabNotificationsPrivateColor );
    setTabOrder( kcfg_TabNotificationsPrivateColor, kcfg_TabNotificationsNick );
    setTabOrder( kcfg_TabNotificationsNick, kcfg_TabNotificationsNickColor );
    setTabOrder( kcfg_TabNotificationsNickColor, kcfg_TabNotificationsHighlights );
    setTabOrder( kcfg_TabNotificationsHighlights, kcfg_TabNotificationsHighlightsColor );
    setTabOrder( kcfg_TabNotificationsHighlightsColor, kcfg_TabNotificationsEvents );
    setTabOrder( kcfg_TabNotificationsEvents, kcfg_TabNotificationsEventsColor );
    setTabOrder( kcfg_TabNotificationsEventsColor, kcfg_TabNotificationsSystem );
    setTabOrder( kcfg_TabNotificationsSystem, kcfg_TabNotificationsSystemColor );
    setTabOrder( kcfg_TabNotificationsSystemColor, kcfg_TabNotificationsOverride );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TabNotifications_Config::languageChange()
{
    groupBox4->setTitle( tr2i18n( "Look" ) );
    kcfg_TabNotificationsText->setText( tr2i18n( "Use colored text" ) );
    kcfg_TabNotificationsLeds->setText( tr2i18n( "Use colored LEDs" ) );
    groupBox5->setTitle( tr2i18n( "Notifications" ) );
    kcfg_TabNotificationsSystem->setText( tr2i18n( "Application event" ) );
    TQWhatsThis::add( kcfg_TabNotificationsSystem, tr2i18n( "Application events occur in Konsole tabs, the DCC Status tab and other application tabs not used directly for chatting." ) );
    kcfg_TabNotificationsSystemColor->setText( TQString::null );
    kcfg_TabNotificationsMsgs->setText( tr2i18n( "Message" ) );
    kcfg_TabNotificationsMsgsColor->setText( TQString::null );
    kcfg_TabNotificationsPrivate->setText( tr2i18n( "Private message" ) );
    kcfg_TabNotificationsPrivateColor->setText( TQString::null );
    kcfg_TabNotificationsNick->setText( tr2i18n( "Current nick used" ) );
    kcfg_TabNotificationsNickColor->setText( TQString::null );
    kcfg_TabNotificationsHighlightsColor->setText( TQString::null );
    kcfg_TabNotificationsEvents->setText( tr2i18n( "Channel event" ) );
    TQWhatsThis::add( kcfg_TabNotificationsEvents, tr2i18n( "Channel events are mode changes or users joining/leaving a channel." ) );
    kcfg_TabNotificationsHighlights->setText( tr2i18n( "Highlight" ) );
    kcfg_TabNotificationsEventsColor->setText( TQString::null );
    groupBox10->setTitle( tr2i18n( "Options" ) );
    kcfg_TabNotificationsOverride->setText( tr2i18n( "Give precedence to chat window highlight colors" ) );
    TQWhatsThis::add( kcfg_TabNotificationsOverride, tr2i18n( "If you select this, the colors you chose in the Highlights preferences page will override the colors for \"Current nick used\" and \"Highlight\"." ) );
}

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

TQMetaObject *TabNotifications_Config::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TabNotifications_Config( "TabNotifications_Config", &TabNotifications_Config::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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