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

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

#include "chatwindowbehaviour_preferences.h"

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

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

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( KDialog::spacingHint() );
    groupBox3->layout()->setMargin( KDialog::marginHint() );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    kcfg_Beep = new TQCheckBox( groupBox3, "kcfg_Beep" );

    groupBox3Layout->addMultiCellWidget( kcfg_Beep, 0, 0, 0, 2 );

    kcfg_HideUnimportantEvents = new TQCheckBox( groupBox3, "kcfg_HideUnimportantEvents" );

    groupBox3Layout->addMultiCellWidget( kcfg_HideUnimportantEvents, 1, 1, 0, 2 );

    kcfg_DisableExpansion = new TQCheckBox( groupBox3, "kcfg_DisableExpansion" );

    groupBox3Layout->addMultiCellWidget( kcfg_DisableExpansion, 2, 2, 0, 2 );

    kcfg_RedirectServerAndAppMsgToStatusPane = new TQCheckBox( groupBox3, "kcfg_RedirectServerAndAppMsgToStatusPane" );

    groupBox3Layout->addMultiCellWidget( kcfg_RedirectServerAndAppMsgToStatusPane, 3, 3, 0, 2 );

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

    groupBox3Layout->addWidget( textLabel1, 6, 0 );
    spacer1_2 = new TQSpacerItem( 410, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox3Layout->addMultiCell( spacer1_2, 5, 5, 0, 2 );

    kcfg_UseLiteralModes = new TQCheckBox( groupBox3, "kcfg_UseLiteralModes" );

    groupBox3Layout->addMultiCellWidget( kcfg_UseLiteralModes, 4, 4, 0, 2 );

    kcfg_ScrollbackMax = new TQSpinBox( groupBox3, "kcfg_ScrollbackMax" );
    kcfg_ScrollbackMax->setMaxValue( 2000 );

    groupBox3Layout->addWidget( kcfg_ScrollbackMax, 6, 1 );
    spacer1 = new TQSpacerItem( 230, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox3Layout->addItem( spacer1, 6, 2 );
    ChatwindowBehaviour_ConfigLayout->addWidget( groupBox3 );

    groupBox3_2 = new TQGroupBox( this, "groupBox3_2" );
    groupBox3_2->setColumnLayout(0, TQt::Vertical );
    groupBox3_2->layout()->setSpacing( KDialog::spacingHint() );
    groupBox3_2->layout()->setMargin( KDialog::marginHint() );
    groupBox3_2Layout = new TQGridLayout( groupBox3_2->layout() );
    groupBox3_2Layout->setAlignment( TQt::AlignTop );

    kcfg_MarkerLineInAllViews = new TQCheckBox( groupBox3_2, "kcfg_MarkerLineInAllViews" );

    groupBox3_2Layout->addMultiCellWidget( kcfg_MarkerLineInAllViews, 2, 2, 0, 1 );

    kcfg_AutomaticRememberLine = new TQCheckBox( groupBox3_2, "kcfg_AutomaticRememberLine" );

    groupBox3_2Layout->addMultiCellWidget( kcfg_AutomaticRememberLine, 0, 0, 0, 1 );

    kcfg_AutomaticRememberLineOnlyOnTextChange = new TQCheckBox( groupBox3_2, "kcfg_AutomaticRememberLineOnlyOnTextChange" );
    kcfg_AutomaticRememberLineOnlyOnTextChange->setEnabled( false );

    groupBox3_2Layout->addWidget( kcfg_AutomaticRememberLineOnlyOnTextChange, 1, 1 );
    spacer9 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    groupBox3_2Layout->addItem( spacer9, 1, 0 );
    ChatwindowBehaviour_ConfigLayout->addWidget( groupBox3_2 );

    kcfg_AutoWhoContinuousEnabled = new TQGroupBox( this, "kcfg_AutoWhoContinuousEnabled" );
    kcfg_AutoWhoContinuousEnabled->setCheckable( true );
    kcfg_AutoWhoContinuousEnabled->setChecked( false );
    kcfg_AutoWhoContinuousEnabled->setColumnLayout(0, TQt::Vertical );
    kcfg_AutoWhoContinuousEnabled->layout()->setSpacing( KDialog::spacingHint() );
    kcfg_AutoWhoContinuousEnabled->layout()->setMargin( KDialog::marginHint() );
    kcfg_AutoWhoContinuousEnabledLayout = new TQGridLayout( kcfg_AutoWhoContinuousEnabled->layout() );
    kcfg_AutoWhoContinuousEnabledLayout->setAlignment( TQt::AlignTop );
    spacer3 = new TQSpacerItem( 170, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    kcfg_AutoWhoContinuousEnabledLayout->addItem( spacer3, 2, 2 );
    spacer2 = new TQSpacerItem( 190, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    kcfg_AutoWhoContinuousEnabledLayout->addMultiCell( spacer2, 0, 1, 2, 2 );

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

    kcfg_AutoWhoContinuousEnabledLayout->addWidget( textLabel2, 0, 0 );

    kcfg_AutoWhoNicksLimit = new TQSpinBox( kcfg_AutoWhoContinuousEnabled, "kcfg_AutoWhoNicksLimit" );
    kcfg_AutoWhoNicksLimit->setMaxValue( 1000 );
    kcfg_AutoWhoNicksLimit->setMinValue( 0 );
    kcfg_AutoWhoNicksLimit->setValue( 300 );

    kcfg_AutoWhoContinuousEnabledLayout->addMultiCellWidget( kcfg_AutoWhoNicksLimit, 0, 1, 1, 1 );

    kcfg_AutoWhoContinuousInterval = new TQSpinBox( kcfg_AutoWhoContinuousEnabled, "kcfg_AutoWhoContinuousInterval" );
    kcfg_AutoWhoContinuousInterval->setEnabled( false );
    kcfg_AutoWhoContinuousInterval->setMaxValue( 1000 );
    kcfg_AutoWhoContinuousInterval->setMinValue( 30 );

    kcfg_AutoWhoContinuousEnabledLayout->addWidget( kcfg_AutoWhoContinuousInterval, 2, 1 );

    whoIntervalLbl = new TQLabel( kcfg_AutoWhoContinuousEnabled, "whoIntervalLbl" );

    kcfg_AutoWhoContinuousEnabledLayout->addMultiCellWidget( whoIntervalLbl, 1, 2, 0, 0 );
    ChatwindowBehaviour_ConfigLayout->addWidget( kcfg_AutoWhoContinuousEnabled );
    spacer6 = new TQSpacerItem( 41, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ChatwindowBehaviour_ConfigLayout->addItem( spacer6 );
    languageChange();
    resize( TQSize(458, 461).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_AutoWhoContinuousEnabled, TQ_SIGNAL( toggled(bool) ), kcfg_AutoWhoContinuousInterval, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_AutomaticRememberLine, TQ_SIGNAL( toggled(bool) ), kcfg_AutomaticRememberLineOnlyOnTextChange, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_Beep, kcfg_HideUnimportantEvents );
    setTabOrder( kcfg_HideUnimportantEvents, kcfg_DisableExpansion );
    setTabOrder( kcfg_DisableExpansion, kcfg_RedirectServerAndAppMsgToStatusPane );
    setTabOrder( kcfg_RedirectServerAndAppMsgToStatusPane, kcfg_UseLiteralModes );
    setTabOrder( kcfg_UseLiteralModes, kcfg_ScrollbackMax );
    setTabOrder( kcfg_ScrollbackMax, kcfg_AutomaticRememberLine );
    setTabOrder( kcfg_AutomaticRememberLine, kcfg_AutomaticRememberLineOnlyOnTextChange );
    setTabOrder( kcfg_AutomaticRememberLineOnlyOnTextChange, kcfg_MarkerLineInAllViews );
    setTabOrder( kcfg_MarkerLineInAllViews, kcfg_AutoWhoNicksLimit );
    setTabOrder( kcfg_AutoWhoNicksLimit, kcfg_AutoWhoContinuousInterval );
    setTabOrder( kcfg_AutoWhoContinuousInterval, kcfg_AutoWhoContinuousEnabled );
    setTabOrder( kcfg_AutoWhoContinuousEnabled, kcfg_AutoWhoContinuousEnabled );

    // buddies
    textLabel1->setBuddy( kcfg_ScrollbackMax );
    textLabel2->setBuddy( kcfg_AutoWhoNicksLimit );
    whoIntervalLbl->setBuddy( kcfg_AutoWhoContinuousInterval );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ChatwindowBehaviour_Config::languageChange()
{
    groupBox3->setTitle( tr2i18n( "General" ) );
    kcfg_Beep->setText( tr2i18n( "Enable s&ystem bell on incoming ASCII BEL" ) );
    TQWhatsThis::add( kcfg_Beep, tr2i18n( "Sounds the system bell when you receive an ASCII BEL (0x07) control character" ) );
    kcfg_HideUnimportantEvents->setText( tr2i18n( "Hide &Join/Part/Nick events" ) );
    kcfg_DisableExpansion->setText( tr2i18n( "Disable variable (e.g. %C, %B, %G...) e&xpansion" ) );
    TQWhatsThis::add( kcfg_DisableExpansion, tr2i18n( "Do not expand variables when sending text to the server. A variable starts with '%'; for example, %B will expand to the characters needed to make a text bold." ) );
    kcfg_RedirectServerAndAppMsgToStatusPane->setText( tr2i18n( "&Redirect status messages to the server status window" ) );
    textLabel1->setText( tr2i18n( "Scroll&back limit:" ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "How many lines to keep in buffers, 0 = unlimited" ) );
    kcfg_UseLiteralModes->setText( tr2i18n( "&Use raw modes for mode changes" ) );
    TQWhatsThis::add( kcfg_UseLiteralModes, tr2i18n( "Keep channel mode string as a combination of characters instead of translating them into human readable words. E.g. '*** Channel modes: no messages from outside' will become '*** Channel modes: n'" ) );
    kcfg_ScrollbackMax->setSuffix( tr2i18n( " lines" ) );
    kcfg_ScrollbackMax->setSpecialValueText( tr2i18n( "Unlimited" ) );
    TQWhatsThis::add( kcfg_ScrollbackMax, tr2i18n( "How many lines to keep in buffers, 0 = unlimited" ) );
    groupBox3_2->setTitle( tr2i18n( "Marker Lines" ) );
    kcfg_MarkerLineInAllViews->setText( tr2i18n( "Show manually inserted lines in all chat windows" ) );
    kcfg_AutomaticRememberLine->setText( tr2i18n( "Mark the last position in a chat window when it is hidden" ) );
    TQWhatsThis::add( kcfg_AutomaticRememberLine, tr2i18n( "Inserts a remember line into the chat window when you switch to another chat window or minimize the application." ) );
    kcfg_AutomaticRememberLineOnlyOnTextChange->setText( tr2i18n( "Move the line only when new text is about to be shown" ) );
    kcfg_AutoWhoContinuousEnabled->setTitle( tr2i18n( "Enable Automatic User Information Look Up (/WHO)" ) );
    textLabel2->setText( tr2i18n( "Max. number of users in a channel:" ) );
    kcfg_AutoWhoNicksLimit->setSuffix( tr2i18n( " nicks" ) );
    kcfg_AutoWhoContinuousInterval->setPrefix( TQString::null );
    kcfg_AutoWhoContinuousInterval->setSuffix( tr2i18n( " seconds" ) );
    whoIntervalLbl->setText( tr2i18n( "Update interval:" ) );
}

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

TQMetaObject *ChatwindowBehaviour_Config::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ChatwindowBehaviour_Config( "ChatwindowBehaviour_Config", &ChatwindowBehaviour_Config::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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