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

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

#include "chatwindowappearance_preferences.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    kcfg_ShowDate = new TQCheckBox( kcfg_Timestamping, "kcfg_ShowDate" );

    kcfg_TimestampingLayout->addMultiCellWidget( kcfg_ShowDate, 1, 1, 0, 2 );

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

    kcfg_TimestampingLayout->addWidget( textLabel1, 0, 0 );

    kcfg_TimestampFormat = new TQComboBox( false, kcfg_Timestamping, "kcfg_TimestampFormat" );
    kcfg_TimestampFormat->setEditable( true );

    kcfg_TimestampingLayout->addWidget( kcfg_TimestampFormat, 0, 1 );
    spacer127 = new TQSpacerItem( 191, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    kcfg_TimestampingLayout->addItem( spacer127, 0, 2 );
    ChatWindowAppearance_ConfigLayout->addWidget( kcfg_Timestamping );

    kcfg_ShowBacklog = new TQGroupBox( this, "kcfg_ShowBacklog" );
    kcfg_ShowBacklog->setCheckable( true );
    kcfg_ShowBacklog->setColumnLayout(0, TQt::Vertical );
    kcfg_ShowBacklog->layout()->setSpacing( 6 );
    kcfg_ShowBacklog->layout()->setMargin( 11 );
    kcfg_ShowBacklogLayout = new TQHBoxLayout( kcfg_ShowBacklog->layout() );
    kcfg_ShowBacklogLayout->setAlignment( TQt::AlignTop );

    textLabel1_2 = new TQLabel( kcfg_ShowBacklog, "textLabel1_2" );
    kcfg_ShowBacklogLayout->addWidget( textLabel1_2 );

    kcfg_BacklogLines = new KIntSpinBox( kcfg_ShowBacklog, "kcfg_BacklogLines" );
    kcfg_BacklogLines->setMaxValue( 100 );
    kcfg_BacklogLines->setValue( 10 );
    kcfg_ShowBacklogLayout->addWidget( kcfg_BacklogLines );
    spacer3 = new TQSpacerItem( 251, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    kcfg_ShowBacklogLayout->addItem( spacer3 );
    ChatWindowAppearance_ConfigLayout->addWidget( kcfg_ShowBacklog );

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

    kcfg_ShowTopic = new TQCheckBox( groupBox2, "kcfg_ShowTopic" );

    groupBox2Layout->addMultiCellWidget( kcfg_ShowTopic, 0, 0, 0, 1 );

    kcfg_ShowModeButtons = new TQCheckBox( groupBox2, "kcfg_ShowModeButtons" );

    groupBox2Layout->addMultiCellWidget( kcfg_ShowModeButtons, 1, 1, 0, 1 );

    kcfg_ShowIRCViewScrollBar = new TQCheckBox( groupBox2, "kcfg_ShowIRCViewScrollBar" );

    groupBox2Layout->addMultiCellWidget( kcfg_ShowIRCViewScrollBar, 8, 8, 0, 1 );

    kcfg_ShowNicknameBox = new TQCheckBox( groupBox2, "kcfg_ShowNicknameBox" );

    groupBox2Layout->addMultiCellWidget( kcfg_ShowNicknameBox, 7, 7, 0, 1 );

    kcfg_ShowQuickButtons = new TQCheckBox( groupBox2, "kcfg_ShowQuickButtons" );
    kcfg_ShowQuickButtons->setEnabled( false );

    groupBox2Layout->addWidget( kcfg_ShowQuickButtons, 6, 1 );
    spacer10 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    groupBox2Layout->addItem( spacer10, 6, 0 );

    kcfg_ShowRealNames = new TQCheckBox( groupBox2, "kcfg_ShowRealNames" );
    kcfg_ShowRealNames->setEnabled( false );

    groupBox2Layout->addWidget( kcfg_ShowRealNames, 5, 1 );
    spacer9 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    groupBox2Layout->addMultiCell( spacer9, 4, 5, 0, 0 );

    kcfg_ShowNickList = new TQCheckBox( groupBox2, "kcfg_ShowNickList" );

    groupBox2Layout->addMultiCellWidget( kcfg_ShowNickList, 2, 2, 0, 1 );

    kcfg_AutoUserhost = new TQCheckBox( groupBox2, "kcfg_AutoUserhost" );
    kcfg_AutoUserhost->setEnabled( false );

    groupBox2Layout->addMultiCellWidget( kcfg_AutoUserhost, 3, 4, 1, 1 );
    spacer9_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    groupBox2Layout->addItem( spacer9_2, 3, 0 );
    ChatWindowAppearance_ConfigLayout->addWidget( groupBox2 );

    kcfg_ShowBackgroundImage = new TQGroupBox( this, "kcfg_ShowBackgroundImage" );
    kcfg_ShowBackgroundImage->setCheckable( true );
    kcfg_ShowBackgroundImage->setColumnLayout(0, TQt::Vertical );
    kcfg_ShowBackgroundImage->layout()->setSpacing( 6 );
    kcfg_ShowBackgroundImage->layout()->setMargin( 11 );
    kcfg_ShowBackgroundImageLayout = new TQHBoxLayout( kcfg_ShowBackgroundImage->layout() );
    kcfg_ShowBackgroundImageLayout->setAlignment( TQt::AlignTop );

    textLabel4 = new TQLabel( kcfg_ShowBackgroundImage, "textLabel4" );
    kcfg_ShowBackgroundImageLayout->addWidget( textLabel4 );

    kcfg_BackgroundImage = new KURLRequester( kcfg_ShowBackgroundImage, "kcfg_BackgroundImage" );
    kcfg_ShowBackgroundImageLayout->addWidget( kcfg_BackgroundImage );
    ChatWindowAppearance_ConfigLayout->addWidget( kcfg_ShowBackgroundImage );
    spacer90 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ChatWindowAppearance_ConfigLayout->addItem( spacer90 );
    languageChange();
    resize( TQSize(401, 502).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_ShowNickList, TQ_SIGNAL( toggled(bool) ), kcfg_AutoUserhost, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_ShowNickList, TQ_SIGNAL( toggled(bool) ), kcfg_ShowQuickButtons, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_ShowNickList, TQ_SIGNAL( toggled(bool) ), kcfg_ShowRealNames, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( kcfg_TimestampFormat, kcfg_ShowDate );
    setTabOrder( kcfg_ShowDate, kcfg_BacklogLines );
    setTabOrder( kcfg_BacklogLines, kcfg_ShowTopic );
    setTabOrder( kcfg_ShowTopic, kcfg_ShowModeButtons );
    setTabOrder( kcfg_ShowModeButtons, kcfg_ShowNickList );
    setTabOrder( kcfg_ShowNickList, kcfg_AutoUserhost );
    setTabOrder( kcfg_AutoUserhost, kcfg_ShowRealNames );
    setTabOrder( kcfg_ShowRealNames, kcfg_ShowQuickButtons );
    setTabOrder( kcfg_ShowQuickButtons, kcfg_ShowNicknameBox );
    setTabOrder( kcfg_ShowNicknameBox, kcfg_ShowIRCViewScrollBar );
    setTabOrder( kcfg_ShowIRCViewScrollBar, kcfg_BackgroundImage );
    setTabOrder( kcfg_BackgroundImage, kcfg_ShowBackgroundImage );
    setTabOrder( kcfg_ShowBackgroundImage, kcfg_Timestamping );
    setTabOrder( kcfg_Timestamping, kcfg_ShowBacklog );

    // buddies
    textLabel1->setBuddy( kcfg_TimestampFormat );
    textLabel1_2->setBuddy( kcfg_BacklogLines );
    textLabel4->setBuddy( kcfg_BackgroundImage );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ChatWindowAppearance_Config::languageChange()
{
    kcfg_Timestamping->setTitle( tr2i18n( "Enable &Timestamps" ) );
    kcfg_ShowDate->setText( tr2i18n( "Sho&w dates" ) );
    textLabel1->setText( tr2i18n( "&Format:" ) );
    kcfg_ShowBacklog->setTitle( tr2i18n( "Show &Backlog" ) );
    textLabel1_2->setText( tr2i18n( "&Lines: " ) );
    groupBox2->setTitle( tr2i18n( "&Layout" ) );
    kcfg_ShowTopic->setText( tr2i18n( "&Show channel topic" ) );
    kcfg_ShowModeButtons->setText( tr2i18n( "Show channel &mode buttons" ) );
    kcfg_ShowIRCViewScrollBar->setText( tr2i18n( "Show sc&rollbar" ) );
    kcfg_ShowNicknameBox->setText( tr2i18n( "Show bo&x to change own nickname" ) );
    kcfg_ShowQuickButtons->setText( tr2i18n( "Show &quick buttons" ) );
    kcfg_ShowRealNames->setText( tr2i18n( "Show real names in nickname list" ) );
    kcfg_ShowNickList->setText( tr2i18n( "Show channel &nick list and quick buttons" ) );
    kcfg_AutoUserhost->setText( tr2i18n( "Show hostmas&ks in nickname list" ) );
    kcfg_ShowBackgroundImage->setTitle( tr2i18n( "Enable Back&ground Image" ) );
    textLabel4->setText( tr2i18n( "P&ath:" ) );
}

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

TQMetaObject *ChatWindowAppearance_Config::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ChatWindowAppearance_Config( "ChatWindowAppearance_Config", &ChatWindowAppearance_Config::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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