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

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

#include "behaviorconfig_events.h"

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

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

    notifyGroupBox = new TQButtonGroup( this, "notifyGroupBox" );
    notifyGroupBox->setColumnLayout(0, TQt::Vertical );
    notifyGroupBox->layout()->setSpacing( 6 );
    notifyGroupBox->layout()->setMargin( 11 );
    notifyGroupBoxLayout = new TQVBoxLayout( notifyGroupBox->layout() );
    notifyGroupBoxLayout->setAlignment( TQt::AlignTop );

    mTrayflashNotifyChk = new TQCheckBox( notifyGroupBox, "mTrayflashNotifyChk" );
    notifyGroupBoxLayout->addWidget( mTrayflashNotifyChk );

    layout11_2 = new TQHBoxLayout( 0, 0, 6, "layout11_2"); 
    spacer10_2 = new TQSpacerItem( 16, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout11_2->addItem( spacer10_2 );

    mTrayflashNotifyLeftClickOpensMessageChk = new TQCheckBox( notifyGroupBox, "mTrayflashNotifyLeftClickOpensMessageChk" );
    mTrayflashNotifyLeftClickOpensMessageChk->setEnabled( false );
    layout11_2->addWidget( mTrayflashNotifyLeftClickOpensMessageChk );
    notifyGroupBoxLayout->addLayout( layout11_2 );

    mBalloonNotifyChk = new TQCheckBox( notifyGroupBox, "mBalloonNotifyChk" );
    notifyGroupBoxLayout->addWidget( mBalloonNotifyChk );

    layout11 = new TQHBoxLayout( 0, 0, 6, "layout11"); 
    spacer10 = new TQSpacerItem( 16, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout11->addItem( spacer10 );

    mBalloonNotifyIgnoreClosesChatViewChk = new TQCheckBox( notifyGroupBox, "mBalloonNotifyIgnoreClosesChatViewChk" );
    mBalloonNotifyIgnoreClosesChatViewChk->setEnabled( false );
    layout11->addWidget( mBalloonNotifyIgnoreClosesChatViewChk );
    notifyGroupBoxLayout->addLayout( layout11 );

    layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); 
    spacer7 = new TQSpacerItem( 16, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout7->addItem( spacer7 );

    mCloseBalloonChk = new TQCheckBox( notifyGroupBox, "mCloseBalloonChk" );
    mCloseBalloonChk->setEnabled( false );
    mCloseBalloonChk->setChecked( false );
    layout7->addWidget( mCloseBalloonChk );

    mBalloonCloseDelay = new TQSpinBox( notifyGroupBox, "mBalloonCloseDelay" );
    mBalloonCloseDelay->setEnabled( false );
    mBalloonCloseDelay->setMaxValue( 120 );
    mBalloonCloseDelay->setMinValue( 1 );
    mBalloonCloseDelay->setValue( 30 );
    layout7->addWidget( mBalloonCloseDelay );
    spacer6 = new TQSpacerItem( 70, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer6 );
    notifyGroupBoxLayout->addLayout( layout7 );

    mQueueOnlyHighlightedMessagesInGroupChatsChk = new TQCheckBox( notifyGroupBox, "mQueueOnlyHighlightedMessagesInGroupChatsChk" );
    notifyGroupBoxLayout->addWidget( mQueueOnlyHighlightedMessagesInGroupChatsChk );

    mQueueOnlyMessagesOnAnotherDesktopChk = new TQCheckBox( notifyGroupBox, "mQueueOnlyMessagesOnAnotherDesktopChk" );
    notifyGroupBoxLayout->addWidget( mQueueOnlyMessagesOnAnotherDesktopChk );
    BehaviorConfig_EventsLayout->addWidget( notifyGroupBox );

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

    mSoundIfAwayChk = new TQCheckBox( groupBox1, "mSoundIfAwayChk" );
    groupBox1Layout->addWidget( mSoundIfAwayChk );

    mEventIfActive = new TQCheckBox( groupBox1, "mEventIfActive" );
    groupBox1Layout->addWidget( mEventIfActive );

    mTrayflashNotifySetCurrentDesktopToChatViewChk = new TQCheckBox( groupBox1, "mTrayflashNotifySetCurrentDesktopToChatViewChk" );
    groupBox1Layout->addWidget( mTrayflashNotifySetCurrentDesktopToChatViewChk );

    mRaiseMsgWindowChk = new TQCheckBox( groupBox1, "mRaiseMsgWindowChk" );
    groupBox1Layout->addWidget( mRaiseMsgWindowChk );
    BehaviorConfig_EventsLayout->addWidget( groupBox1 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    BehaviorConfig_EventsLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(427, 386).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( mTrayflashNotifyChk, TQ_SIGNAL( toggled(bool) ), mTrayflashNotifyLeftClickOpensMessageChk, TQ_SLOT( setEnabled(bool) ) );
    connect( mBalloonNotifyChk, TQ_SIGNAL( toggled(bool) ), mBalloonNotifyIgnoreClosesChatViewChk, TQ_SLOT( setEnabled(bool) ) );
    connect( mBalloonNotifyChk, TQ_SIGNAL( toggled(bool) ), mCloseBalloonChk, TQ_SLOT( setEnabled(bool) ) );
    connect( mBalloonNotifyChk, TQ_SIGNAL( toggled(bool) ), mBalloonCloseDelay, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( mTrayflashNotifyChk, mBalloonNotifyChk );
    setTabOrder( mBalloonNotifyChk, mQueueOnlyHighlightedMessagesInGroupChatsChk );
    setTabOrder( mQueueOnlyHighlightedMessagesInGroupChatsChk, mQueueOnlyMessagesOnAnotherDesktopChk );
    setTabOrder( mQueueOnlyMessagesOnAnotherDesktopChk, mSoundIfAwayChk );
    setTabOrder( mSoundIfAwayChk, mEventIfActive );
    setTabOrder( mEventIfActive, mTrayflashNotifySetCurrentDesktopToChatViewChk );
    setTabOrder( mTrayflashNotifySetCurrentDesktopToChatViewChk, mRaiseMsgWindowChk );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void BehaviorConfig_Events::languageChange()
{
    setCaption( tr2i18n( "Events" ) );
    notifyGroupBox->setTitle( tr2i18n( "Tray Flash && Bubble" ) );
    mTrayflashNotifyChk->setText( tr2i18n( "Flash s&ystem tray" ) );
    TQToolTip::add( mTrayflashNotifyChk, tr2i18n( "Flash the system tray icon on an incoming message" ) );
    TQWhatsThis::add( mTrayflashNotifyChk, tr2i18n( "Flash the system tray icon whenever a message comes in." ) );
    mTrayflashNotifyLeftClickOpensMessageChk->setText( tr2i18n( "&Left mouse click opens message" ) );
    TQToolTip::add( mTrayflashNotifyLeftClickOpensMessageChk, tr2i18n( "Left mouse click on flashing system tray opens message instead of restoring/minimizing contact list" ) );
    TQWhatsThis::add( mTrayflashNotifyLeftClickOpensMessageChk, tr2i18n( "A left mouse click on the flashing system tray icon opens the incoming message instead of restoring/minimizing the contact list (e.g. to check who is sending messages). A middle click always opens this message." ) );
    mBalloonNotifyChk->setText( tr2i18n( "Sho&w bubble" ) );
    TQToolTip::add( mBalloonNotifyChk, tr2i18n( "Show a bubble on an incoming message" ) );
    TQWhatsThis::add( mBalloonNotifyChk, tr2i18n( "Show a bubble whenever a message comes in." ) );
    mBalloonNotifyIgnoreClosesChatViewChk->setText( tr2i18n( "Button \"&Ignore\" closes chat" ) );
    TQToolTip::add( mBalloonNotifyIgnoreClosesChatViewChk, tr2i18n( "The \"Ignore\" button of the bubble closes the chat window for the sender" ) );
    TQWhatsThis::add( mBalloonNotifyIgnoreClosesChatViewChk, tr2i18n( "If there is already a chat window opened for the sender of the message displayed in the bubble the \"Ignore\" button will close this chat window." ) );
    mCloseBalloonChk->setText( tr2i18n( "Close &bubble automatically after" ) );
    TQToolTip::add( mCloseBalloonChk, tr2i18n( "Automatically close bubble after fixed amount of time" ) );
    TQWhatsThis::add( mCloseBalloonChk, tr2i18n( "Bubbles will automatically be closed after a fixed amount of time. A closed one will be replaced by a new one if another message is waiting." ) );
    mBalloonCloseDelay->setSuffix( tr2i18n( " Sec" ) );
    mQueueOnlyHighlightedMessagesInGroupChatsChk->setText( tr2i18n( "Exclude non-highlighted messages in grou&p chats" ) );
    TQToolTip::add( mQueueOnlyHighlightedMessagesInGroupChatsChk, tr2i18n( "Notify only highlighted messages in group chats" ) );
    TQWhatsThis::add( mQueueOnlyHighlightedMessagesInGroupChatsChk, tr2i18n( "In very active group chats important messages can be singled out by excluding non-highlighted messages from notification." ) );
    mQueueOnlyMessagesOnAnotherDesktopChk->setText( tr2i18n( "Exclude messages in chats on current des&ktop" ) );
    TQToolTip::add( mQueueOnlyMessagesOnAnotherDesktopChk, tr2i18n( "Do not display notification for messages in chat windows on current desktop" ) );
    TQWhatsThis::add( mQueueOnlyMessagesOnAnotherDesktopChk, tr2i18n( "This option allows you to turn off the notification of events for chat windows that are on the current desktop. If this option is turned on, then only chat windows on different desktops than the current one will notify you that an event has occured. Otherwise, all chat windows will notify you that an event has occured." ) );
    groupBox1->setTitle( tr2i18n( "Miscellaneous" ) );
    mSoundIfAwayChk->setText( tr2i18n( "E&nable events while away" ) );
    TQToolTip::add( mSoundIfAwayChk, tr2i18n( "Enable events if your account status is \"Away\"" ) );
    TQWhatsThis::add( mSoundIfAwayChk, tr2i18n( "Enable notification events even if your account status is \"Away\" or less available, e.g. \"Not Available\" or \"Do not Disturb\". Note: This does not affect the flashing of the system tray icon." ) );
    mEventIfActive->setText( tr2i18n( "Enable events for acti&ve chat windows" ) );
    TQToolTip::add( mEventIfActive, tr2i18n( "Enable events for incoming messages if the chat window is active" ) );
    TQWhatsThis::add( mEventIfActive, tr2i18n( "Enable notification events for incoming messages even if the receiving chat window is active. Note: Neither the system tray icon flashes nor the bubble is shown." ) );
    mTrayflashNotifySetCurrentDesktopToChatViewChk->setText( tr2i18n( "Switch &to desktop containing chat on opening message" ) );
    TQToolTip::add( mTrayflashNotifySetCurrentDesktopToChatViewChk, tr2i18n( "Switch to the desktop which contains the chat window for the sender when opening his/her message" ) );
    TQWhatsThis::add( mTrayflashNotifySetCurrentDesktopToChatViewChk, tr2i18n( "If there is already a chat window open for the sender of the message, opening his/her message will cause a switch to the desktop which contains this chat window." ) );
    mRaiseMsgWindowChk->setText( tr2i18n( "&Raise window on incoming message" ) );
    TQToolTip::add( mRaiseMsgWindowChk, tr2i18n( "Raise the chat window/tab on an incoming message" ) );
    TQWhatsThis::add( mRaiseMsgWindowChk, tr2i18n( "If there is already a chat window opened for the sender of an incoming message this window will be put on the current desktop and in front of all other windows." ) );
}

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

TQMetaObject *BehaviorConfig_Events::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_BehaviorConfig_Events( "BehaviorConfig_Events", &BehaviorConfig_Events::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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