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

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

#include "kmyfirewallgenericinterfaceicmp.h"

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

/*
 *  Constructs a KMyFirewallGenericInterfaceIcmp as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KMyFirewallGenericInterfaceIcmp::KMyFirewallGenericInterfaceIcmp( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KMyFirewallGenericInterfaceIcmp" );
    KMyFirewallGenericInterfaceIcmpLayout = new TQGridLayout( this, 1, 1, 2, 2, "KMyFirewallGenericInterfaceIcmpLayout"); 
    spacer3 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    KMyFirewallGenericInterfaceIcmpLayout->addItem( spacer3, 1, 0 );

    GroupBox2_2 = new TQGroupBox( this, "GroupBox2_2" );
    GroupBox2_2->setColumnLayout(0, TQt::Vertical );
    GroupBox2_2->layout()->setSpacing( 6 );
    GroupBox2_2->layout()->setMargin( 11 );
    GroupBox2_2Layout = new TQGridLayout( GroupBox2_2->layout() );
    GroupBox2_2Layout->setAlignment( TQt::AlignTop );
    spacer4 = new TQSpacerItem( 401, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    GroupBox2_2Layout->addItem( spacer4, 3, 0 );

    TextLabel3_2_2_2 = new TQLabel( GroupBox2_2, "TextLabel3_2_2_2" );
    TextLabel3_2_2_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    GroupBox2_2Layout->addMultiCellWidget( TextLabel3_2_2_2, 2, 2, 0, 1 );

    c_limit_ping = new TQCheckBox( GroupBox2_2, "c_limit_ping" );
    c_limit_ping->setChecked( true );

    GroupBox2_2Layout->addWidget( c_limit_ping, 3, 1 );

    c_allow_ping = new TQCheckBox( GroupBox2_2, "c_allow_ping" );
    c_allow_ping->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, c_allow_ping->sizePolicy().hasHeightForWidth() ) );
    c_allow_ping->setChecked( true );

    GroupBox2_2Layout->addWidget( c_allow_ping, 1, 1 );
    spacer5 = new TQSpacerItem( 381, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    GroupBox2_2Layout->addItem( spacer5, 1, 0 );

    TextLabel2_3_2_2 = new TQLabel( GroupBox2_2, "TextLabel2_3_2_2" );
    TextLabel2_3_2_2->setTextFormat( TQLabel::RichText );
    TextLabel2_3_2_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    GroupBox2_2Layout->addMultiCellWidget( TextLabel2_3_2_2, 0, 0, 0, 1 );

    KMyFirewallGenericInterfaceIcmpLayout->addWidget( GroupBox2_2, 0, 0 );
    languageChange();
    resize( TQSize(564, 366).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( c_allow_ping, TQ_SIGNAL( toggled(bool) ), c_limit_ping, TQ_SLOT( setEnabled(bool) ) );
    connect( c_allow_ping, TQ_SIGNAL( toggled(bool) ), TextLabel3_2_2_2, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallGenericInterfaceIcmp::languageChange()
{
    setCaption( tr2i18n( "ICMP" ) );
    GroupBox2_2->setTitle( tr2i18n( "ICMP Options" ) );
    TextLabel3_2_2_2->setText( tr2i18n( "<p><b>By limiting the ping requests you allow past your firewall, you can avoid DoS (Denial of Service) attacks.</b><br>\n"
"Those attacks are based on the fact that every computer can only handle a limited number of open connections.\n"
"A DoS attack is mostly performed by a lot of hosts connecting to the victim host until it gives up.</p>" ) );
    c_limit_ping->setText( tr2i18n( "Limit replies " ) );
    c_allow_ping->setText( tr2i18n( "Reply to echo-requests" ) );
    TextLabel2_3_2_2->setText( tr2i18n( "<p>The so-called <b>Ping</b> is an ICMP packet that is sent to a host to check if it's running or not.<br>\n"
"If you disable \"Reply to echo-request\", your computer will be invisible for most of the common programs used to hack/crack hosts on the Internet.<br>\n"
"However, there are a lot of network programs that use ping requests to find and check the connections to their client/server host.</p>" ) );
}

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

TQMetaObject *KMyFirewallGenericInterfaceIcmp::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallGenericInterfaceIcmp( "KMyFirewallGenericInterfaceIcmp", &KMyFirewallGenericInterfaceIcmp::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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