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

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

#include "kmyfirewalliptdocoptions.h"

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

/*
 *  Constructs a KMyFirewallIPTDocOptions as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
KMyFirewallIPTDocOptions::KMyFirewallIPTDocOptions( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KMyFirewallIPTDocOptions" );
    KMyFirewallIPTDocOptionsLayout = new TQGridLayout( this, 1, 1, 11, 6, "KMyFirewallIPTDocOptionsLayout"); 

    TextLabel7 = new TQLabel( this, "TextLabel7" );
    TextLabel7->setMinimumSize( TQSize( 0, 40 ) );
    TextLabel7->setMaximumSize( TQSize( 32767, 40 ) );
    TQFont TextLabel7_font(  TextLabel7->font() );
    TextLabel7_font.setBold( true );
    TextLabel7->setFont( TextLabel7_font ); 
    TextLabel7->setFrameShape( TQLabel::StyledPanel );
    TextLabel7->setLineWidth( 2 );
    TextLabel7->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) );

    KMyFirewallIPTDocOptionsLayout->addWidget( TextLabel7, 0, 0 );

    GroupBox58 = new TQGroupBox( this, "GroupBox58" );
    GroupBox58->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, GroupBox58->sizePolicy().hasHeightForWidth() ) );
    GroupBox58->setColumnLayout(0, TQt::Vertical );
    GroupBox58->layout()->setSpacing( 6 );
    GroupBox58->layout()->setMargin( 11 );
    GroupBox58Layout = new TQVBoxLayout( GroupBox58->layout() );
    GroupBox58Layout->setAlignment( TQt::AlignTop );

    TextLabel2 = new TQLabel( GroupBox58, "TextLabel2" );
    TextLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    GroupBox58Layout->addWidget( TextLabel2 );

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

    TextLabel1 = new TQLabel( GroupBox58, "TextLabel1" );
    Layout8->addWidget( TextLabel1 );

    c_use_filter = new TQCheckBox( GroupBox58, "c_use_filter" );
    Layout8->addWidget( c_use_filter );

    c_use_nat = new TQCheckBox( GroupBox58, "c_use_nat" );
    Layout8->addWidget( c_use_nat );

    c_use_mangle = new TQCheckBox( GroupBox58, "c_use_mangle" );
    Layout8->addWidget( c_use_mangle );
    GroupBox58Layout->addLayout( Layout8 );

    KMyFirewallIPTDocOptionsLayout->addWidget( GroupBox58, 1, 0 );

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

    b_cancel = new TQPushButton( this, "b_cancel" );
    Layout65->addWidget( b_cancel );
    Spacer45 = new TQSpacerItem( 51, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout65->addItem( Spacer45 );

    b_help = new TQPushButton( this, "b_help" );
    b_help->setEnabled( true );
    Layout65->addWidget( b_help );
    Spacer46 = new TQSpacerItem( 21, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout65->addItem( Spacer46 );

    b_ok = new TQPushButton( this, "b_ok" );
    Layout65->addWidget( b_ok );

    KMyFirewallIPTDocOptionsLayout->addLayout( Layout65, 3, 0 );

    GroupBox59 = new TQGroupBox( this, "GroupBox59" );
    GroupBox59->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, GroupBox59->sizePolicy().hasHeightForWidth() ) );
    GroupBox59->setColumnLayout(0, TQt::Vertical );
    GroupBox59->layout()->setSpacing( 6 );
    GroupBox59->layout()->setMargin( 11 );
    GroupBox59Layout = new TQGridLayout( GroupBox59->layout() );
    GroupBox59Layout->setAlignment( TQt::AlignTop );

    c_use_modules = new TQCheckBox( GroupBox59, "c_use_modules" );

    GroupBox59Layout->addWidget( c_use_modules, 0, 0 );

    TextLabel3 = new TQLabel( GroupBox59, "TextLabel3" );
    TextLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
    TextLabel3->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    GroupBox59Layout->addWidget( TextLabel3, 0, 1 );

    c_use_ipfwd = new TQCheckBox( GroupBox59, "c_use_ipfwd" );

    GroupBox59Layout->addWidget( c_use_ipfwd, 1, 0 );

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

    GroupBox59Layout->addWidget( TextLabel4_2, 1, 1 );

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

    GroupBox59Layout->addWidget( TextLabel6_2, 2, 1 );

    c_use_syn_cookies = new TQCheckBox( GroupBox59, "c_use_syn_cookies" );

    GroupBox59Layout->addWidget( c_use_syn_cookies, 2, 0 );

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

    GroupBox59Layout->addWidget( TextLabel5, 3, 1 );

    Layout11 = new TQVBoxLayout( 0, 0, 6, "Layout11"); 

    c_use_rp_filter = new TQCheckBox( GroupBox59, "c_use_rp_filter" );
    Layout11->addWidget( c_use_rp_filter );

    c_use_martians = new TQCheckBox( GroupBox59, "c_use_martians" );
    c_use_martians->setEnabled( false );
    Layout11->addWidget( c_use_martians );

    GroupBox59Layout->addLayout( Layout11, 3, 0 );

    KMyFirewallIPTDocOptionsLayout->addWidget( GroupBox59, 2, 0 );
    languageChange();
    resize( TQSize(673, 649).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( b_cancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( b_ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( b_help, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotHelp() ) );
    connect( c_use_rp_filter, TQ_SIGNAL( toggled(bool) ), c_use_martians, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( b_ok, c_use_filter );
    setTabOrder( c_use_filter, c_use_nat );
    setTabOrder( c_use_nat, c_use_mangle );
    setTabOrder( c_use_mangle, c_use_modules );
    setTabOrder( c_use_modules, c_use_ipfwd );
    setTabOrder( c_use_ipfwd, c_use_syn_cookies );
    setTabOrder( c_use_syn_cookies, c_use_rp_filter );
    setTabOrder( c_use_rp_filter, c_use_martians );
    setTabOrder( c_use_martians, b_cancel );
    setTabOrder( b_cancel, b_help );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallIPTDocOptions::languageChange()
{
    setCaption( tr2i18n( "Document Options" ) );
    TextLabel7->setText( tr2i18n( "Here you can configure several general options that your firewall has." ) );
    GroupBox58->setTitle( tr2i18n( "IPTables" ) );
    TextLabel2->setText( tr2i18n( "Enable the iptables you like to use in your firewall." ) );
    TextLabel1->setText( tr2i18n( "Use tables:" ) );
    c_use_filter->setText( tr2i18n( "Filter" ) );
    c_use_nat->setText( tr2i18n( "Nat" ) );
    c_use_mangle->setText( tr2i18n( "Mangle" ) );
    b_cancel->setText( tr2i18n( "Cancel" ) );
    b_help->setText( tr2i18n( "Help" ) );
    b_ok->setText( tr2i18n( "OK" ) );
    GroupBox59->setTitle( tr2i18n( "Misc Kernel Settings" ) );
    c_use_modules->setText( tr2i18n( "Load modules" ) );
    TextLabel3->setText( tr2i18n( "<b>Enable this if you compiled iptables as modules</b>. For details about the required modules, take a look at the iptables man page." ) );
    c_use_ipfwd->setText( tr2i18n( "Use IP forward" ) );
    TextLabel4_2->setText( tr2i18n( "<b>Enable this if your host should act as a router</b>." ) );
    TextLabel6_2->setText( tr2i18n( "<b>Enable if you like to use Syn Cookies.</b> (needs support compiled in the kernel)" ) );
    c_use_syn_cookies->setText( tr2i18n( "Enable Syn cookies" ) );
    TextLabel5->setText( tr2i18n( "<b>Enable</b> if you like to use <b>Reverse Parse Filtering</b>." ) );
    c_use_rp_filter->setText( tr2i18n( "Use reverse path filter" ) );
    c_use_martians->setText( tr2i18n( "Log dropped packets" ) );
}

void KMyFirewallIPTDocOptions::slotHelp()
{
    tqWarning( "KMyFirewallIPTDocOptions::slotHelp(): Not implemented yet" );
}

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

TQMetaObject *KMyFirewallIPTDocOptions::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallIPTDocOptions( "KMyFirewallIPTDocOptions", &KMyFirewallIPTDocOptions::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallIPTDocOptions::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"slotHelp", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotHelp()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KMyFirewallIPTDocOptions", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallIPTDocOptions.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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