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

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

#include "ignore_preferencesui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a Ignore_ConfigUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
Ignore_ConfigUI::Ignore_ConfigUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Ignore_ConfigUI" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setBaseSize( TQSize( 300, 200 ) );
    Ignore_ConfigUILayout = new TQGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "Ignore_ConfigUILayout"); 

    ignoreListView = new TDEListView( this, "ignoreListView" );
    ignoreListView->addColumn( tr2i18n( "Pattern" ) );
    ignoreListView->addColumn( tr2i18n( "Type" ) );
    ignoreListView->setFullWidth( true );

    Ignore_ConfigUILayout->addMultiCellWidget( ignoreListView, 0, 0, 0, 1 );

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

    Ignore_ConfigUILayout->addWidget( textLabel2, 1, 0 );

    txtPattern = new TQLineEdit( this, "txtPattern" );

    Ignore_ConfigUILayout->addWidget( txtPattern, 1, 1 );

    grpMessageTypes = new TQGroupBox( this, "grpMessageTypes" );
    grpMessageTypes->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, grpMessageTypes->sizePolicy().hasHeightForWidth() ) );
    grpMessageTypes->setColumnLayout(0, TQt::Vertical );
    grpMessageTypes->layout()->setSpacing( KDialog::spacingHint() );
    grpMessageTypes->layout()->setMargin( KDialog::marginHint() );
    grpMessageTypesLayout = new TQGridLayout( grpMessageTypes->layout() );
    grpMessageTypesLayout->setAlignment( TQt::AlignTop );

    chkCTCP = new TQCheckBox( grpMessageTypes, "chkCTCP" );

    grpMessageTypesLayout->addWidget( chkCTCP, 0, 1 );

    chkChannel = new TQCheckBox( grpMessageTypes, "chkChannel" );

    grpMessageTypesLayout->addWidget( chkChannel, 0, 0 );

    chkDCC = new TQCheckBox( grpMessageTypes, "chkDCC" );

    grpMessageTypesLayout->addWidget( chkDCC, 1, 1 );

    chkNotice = new TQCheckBox( grpMessageTypes, "chkNotice" );

    grpMessageTypesLayout->addWidget( chkNotice, 2, 0 );

    chkQuery = new TQCheckBox( grpMessageTypes, "chkQuery" );

    grpMessageTypesLayout->addWidget( chkQuery, 1, 0 );

    Ignore_ConfigUILayout->addMultiCellWidget( grpMessageTypes, 2, 2, 0, 1 );

    layout20 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "layout20"); 

    newButton = new KPushButton( this, "newButton" );
    layout20->addWidget( newButton );

    removeButton = new KPushButton( this, "removeButton" );
    layout20->addWidget( removeButton );

    removeAllButton = new KPushButton( this, "removeAllButton" );
    layout20->addWidget( removeAllButton );
    spacer9 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout20->addItem( spacer9 );

    Ignore_ConfigUILayout->addMultiCellLayout( layout20, 0, 2, 2, 2 );
    languageChange();
    resize( TQSize(374, 310).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( ignoreListView, txtPattern );
    setTabOrder( txtPattern, chkChannel );
    setTabOrder( chkChannel, chkQuery );
    setTabOrder( chkQuery, chkNotice );
    setTabOrder( chkNotice, chkCTCP );
    setTabOrder( chkCTCP, chkDCC );
    setTabOrder( chkDCC, newButton );
    setTabOrder( newButton, removeButton );
    setTabOrder( removeButton, removeAllButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Ignore_ConfigUI::languageChange()
{
    ignoreListView->header()->setLabel( 0, tr2i18n( "Pattern" ) );
    ignoreListView->header()->setLabel( 1, tr2i18n( "Type" ) );
    textLabel2->setText( tr2i18n( "Pattern:" ) );
    grpMessageTypes->setTitle( tr2i18n( "Message Types" ) );
    chkCTCP->setText( tr2i18n( "CTCP" ) );
    chkChannel->setText( tr2i18n( "Channel" ) );
    chkDCC->setText( tr2i18n( "DCC" ) );
    chkNotice->setText( tr2i18n( "Notice" ) );
    chkQuery->setText( tr2i18n( "Query" ) );
    newButton->setText( tr2i18n( "&New" ) );
    removeButton->setText( tr2i18n( "&Remove" ) );
    removeAllButton->setText( tr2i18n( "Remove &All" ) );
}

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

TQMetaObject *Ignore_ConfigUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Ignore_ConfigUI( "Ignore_ConfigUI", &Ignore_ConfigUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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