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

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

#include "kmyfirewallinterfacewidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KMyFirewallInterfaceWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KMyFirewallInterfaceWidget::KMyFirewallInterfaceWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KMyFirewallInterfaceWidget" );
    KMyFirewallInterfaceWidgetLayout = new TQGridLayout( this, 1, 1, 2, 2, "KMyFirewallInterfaceWidgetLayout"); 

    l_int = new TQLabel( this, "l_int" );
    l_int->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    KMyFirewallInterfaceWidgetLayout->addWidget( l_int, 0, 0 );

    layout10 = new TQGridLayout( 0, 1, 1, 0, 6, "layout10"); 
    spacer4 = new TQSpacerItem( 20, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout10->addItem( spacer4, 3, 0 );

    m_lb_int = new TQListBox( this, "m_lb_int" );
    m_lb_int->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, m_lb_int->sizePolicy().hasHeightForWidth() ) );

    layout10->addMultiCellWidget( m_lb_int, 0, 3, 2, 2 );

    m_b_del_int = new TQPushButton( this, "m_b_del_int" );

    layout10->addMultiCellWidget( m_b_del_int, 2, 2, 0, 1 );

    m_b_add_int = new TQPushButton( this, "m_b_add_int" );

    layout10->addMultiCellWidget( m_b_add_int, 1, 1, 0, 1 );

    m_cb_int_name = new KComboBox( false, this, "m_cb_int_name" );
    m_cb_int_name->setEditable( true );
    m_cb_int_name->setDuplicatesEnabled( false );

    layout10->addWidget( m_cb_int_name, 0, 0 );

    m_sb_int_num = new KIntSpinBox( this, "m_sb_int_num" );
    m_sb_int_num->setMaxValue( 10 );

    layout10->addWidget( m_sb_int_num, 0, 1 );

    KMyFirewallInterfaceWidgetLayout->addLayout( layout10, 1, 0 );
    languageChange();
    resize( TQSize(327, 192).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallInterfaceWidget::languageChange()
{
    setCaption( tr2i18n( "KMyFirewallInterfaceWidget" ) );
    l_int->setText( tr2i18n( "Please add your available network Interfaces here:" ) );
    TQWhatsThis::add( m_lb_int, tr2i18n( "Here you can see the currently entered network interfaces" ) );
    m_b_del_int->setText( tr2i18n( "Remove Interface" ) );
    m_b_add_int->setText( tr2i18n( "Add Interface" ) );
    m_cb_int_name->clear();
    m_cb_int_name->insertItem( tr2i18n( "eth" ) );
    m_cb_int_name->insertItem( tr2i18n( "ippp" ) );
    m_cb_int_name->insertItem( tr2i18n( "ppp" ) );
    m_cb_int_name->insertItem( tr2i18n( "ppoe" ) );
    m_cb_int_name->insertItem( tr2i18n( "lo" ) );
}

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

TQMetaObject *KMyFirewallInterfaceWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallInterfaceWidget( "KMyFirewallInterfaceWidget", &KMyFirewallInterfaceWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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