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

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

#include "kmyfirewallgenericinterfacehostwidget.h"

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

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

    layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout2"); 

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

    c_log_out = new TQCheckBox( groupBox6_5, "c_log_out" );
    c_log_out->setEnabled( true );

    groupBox6_5Layout->addWidget( c_log_out, 4, 0 );

    c_log_in = new TQCheckBox( groupBox6_5, "c_log_in" );
    c_log_in->setEnabled( true );

    groupBox6_5Layout->addWidget( c_log_in, 3, 0 );

    m_host_desc = new TQTextEdit( groupBox6_5, "m_host_desc" );
    m_host_desc->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, m_host_desc->sizePolicy().hasHeightForWidth() ) );
    m_host_desc->setWordWrap( TQTextEdit::NoWrap );
    m_host_desc->setReadOnly( true );

    groupBox6_5Layout->addWidget( m_host_desc, 2, 0 );

    textLabel1_2_2 = new TQLabel( groupBox6_5, "textLabel1_2_2" );
    textLabel1_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_2_2->sizePolicy().hasHeightForWidth() ) );

    groupBox6_5Layout->addWidget( textLabel1_2_2, 1, 0 );

    layout19 = new TQHBoxLayout( 0, 0, 6, "layout19"); 

    textLabel3_3 = new TQLabel( groupBox6_5, "textLabel3_3" );
    textLabel3_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel3_3->sizePolicy().hasHeightForWidth() ) );
    layout19->addWidget( textLabel3_3 );

    m_sb_host_1 = new KIntSpinBox( groupBox6_5, "m_sb_host_1" );
    m_sb_host_1->setEnabled( false );
    m_sb_host_1->setMaxValue( 255 );
    layout19->addWidget( m_sb_host_1 );

    textLabel4_5 = new TQLabel( groupBox6_5, "textLabel4_5" );
    textLabel4_5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_5->sizePolicy().hasHeightForWidth() ) );
    textLabel4_5->setAlignment( int( TQLabel::AlignBottom ) );
    layout19->addWidget( textLabel4_5 );

    m_sb_host_2 = new KIntSpinBox( groupBox6_5, "m_sb_host_2" );
    m_sb_host_2->setEnabled( false );
    m_sb_host_2->setMaxValue( 255 );
    layout19->addWidget( m_sb_host_2 );

    textLabel4_4_3 = new TQLabel( groupBox6_5, "textLabel4_4_3" );
    textLabel4_4_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_4_3->sizePolicy().hasHeightForWidth() ) );
    textLabel4_4_3->setAlignment( int( TQLabel::AlignBottom ) );
    layout19->addWidget( textLabel4_4_3 );

    m_sb_host_3 = new KIntSpinBox( groupBox6_5, "m_sb_host_3" );
    m_sb_host_3->setEnabled( false );
    m_sb_host_3->setMaxValue( 255 );
    layout19->addWidget( m_sb_host_3 );

    textLabel4_3_3 = new TQLabel( groupBox6_5, "textLabel4_3_3" );
    textLabel4_3_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_3_3->sizePolicy().hasHeightForWidth() ) );
    textLabel4_3_3->setAlignment( int( TQLabel::AlignBottom ) );
    layout19->addWidget( textLabel4_3_3 );

    m_sb_host_4 = new KIntSpinBox( groupBox6_5, "m_sb_host_4" );
    m_sb_host_4->setEnabled( false );
    m_sb_host_4->setMaxValue( 255 );
    layout19->addWidget( m_sb_host_4 );

    groupBox6_5Layout->addLayout( layout19, 0, 0 );

    layout2->addMultiCellWidget( groupBox6_5, 1, 1, 0, 2 );

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

    layout2->addWidget( l_currHost, 0, 0 );

    b_delHost = new KPushButton( this, "b_delHost" );

    layout2->addWidget( b_delHost, 0, 2 );

    b_newHost = new KPushButton( this, "b_newHost" );

    layout2->addWidget( b_newHost, 0, 1 );

    KMyFirewallGenericInterfaceHostWidgetLayout->addLayout( layout2, 0, 1 );

    m_lv_zones = new TDEListView( this, "m_lv_zones" );
    m_lv_zones->addColumn( tr2i18n( "Host" ) );
    m_lv_zones->addColumn( tr2i18n( "IP" ) );
    m_lv_zones->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 12, 0, m_lv_zones->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallGenericInterfaceHostWidgetLayout->addWidget( m_lv_zones, 0, 0 );
    languageChange();
    resize( TQSize(668, 401).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallGenericInterfaceHostWidget::languageChange()
{
    setCaption( tr2i18n( "Hosts" ) );
    groupBox6_5->setTitle( tr2i18n( "Host Options" ) );
    c_log_out->setText( tr2i18n( "Log outgoing packets" ) );
    c_log_in->setText( tr2i18n( "Log incoming packets" ) );
    textLabel1_2_2->setText( tr2i18n( "Notes:" ) );
    textLabel3_3->setText( tr2i18n( "IP:" ) );
    textLabel4_5->setText( tr2i18n( "." ) );
    textLabel4_4_3->setText( tr2i18n( "." ) );
    textLabel4_3_3->setText( tr2i18n( "." ) );
    l_currHost->setText( tr2i18n( "Host:" ) );
    b_delHost->setText( tr2i18n( "&Delete" ) );
    b_newHost->setText( tr2i18n( "&New" ) );
    m_lv_zones->header()->setLabel( 0, tr2i18n( "Host" ) );
    m_lv_zones->header()->setLabel( 1, tr2i18n( "IP" ) );
}

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

TQMetaObject *KMyFirewallGenericInterfaceHostWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallGenericInterfaceHostWidget( "KMyFirewallGenericInterfaceHostWidget", &KMyFirewallGenericInterfaceHostWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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