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

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

#include "kmyfirewallruleeditorinterface.h"

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

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

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TextLabel1->setMinimumSize( TQSize( 0, 40 ) );
    TextLabel1->setMaximumSize( TQSize( 32767, 40 ) );
    TQFont TextLabel1_font(  TextLabel1->font() );
    TextLabel1_font.setFamily( "Arial" );
    TextLabel1_font.setBold( true );
    TextLabel1->setFont( TextLabel1_font ); 
    TextLabel1->setFrameShape( TQLabel::StyledPanel );
    TextLabel1->setFrameShadow( TQLabel::Plain );
    TextLabel1->setLineWidth( 2 );
    TextLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) );
    KMyFirewallRuleEditorInterfaceLayout->addWidget( TextLabel1 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    TextLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    KMyFirewallRuleEditorInterfaceLayout->addWidget( TextLabel2 );

    tabWidget5 = new TQTabWidget( this, "tabWidget5" );

    tab = new TQWidget( tabWidget5, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    gb_in_int = new TQGroupBox( tab, "gb_in_int" );
    gb_in_int->setColumnLayout(0, TQt::Vertical );
    gb_in_int->layout()->setSpacing( 6 );
    gb_in_int->layout()->setMargin( 11 );
    gb_in_intLayout = new TQGridLayout( gb_in_int->layout() );
    gb_in_intLayout->setAlignment( TQt::AlignTop );

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

    gb_in_intLayout->addMultiCellWidget( TextLabel4, 0, 0, 0, 3 );

    c_inv_in_int = new TQCheckBox( gb_in_int, "c_inv_in_int" );
    c_inv_in_int->setEnabled( false );
    c_inv_in_int->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, c_inv_in_int->sizePolicy().hasHeightForWidth() ) );

    gb_in_intLayout->addWidget( c_inv_in_int, 1, 3 );

    cb_in_int = new TQComboBox( false, gb_in_int, "cb_in_int" );
    cb_in_int->setEnabled( false );
    cb_in_int->setEditable( true );
    cb_in_int->setInsertionPolicy( TQComboBox::NoInsertion );
    cb_in_int->setDuplicatesEnabled( false );

    gb_in_intLayout->addWidget( cb_in_int, 1, 2 );

    c_in_int = new TQCheckBox( gb_in_int, "c_in_int" );
    c_in_int->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, c_in_int->sizePolicy().hasHeightForWidth() ) );

    gb_in_intLayout->addWidget( c_in_int, 1, 0 );
    Spacer2 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    gb_in_intLayout->addItem( Spacer2, 1, 1 );

    tabLayout->addWidget( gb_in_int, 0, 0 );
    tabWidget5->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget5, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    gb_out_int = new TQGroupBox( tab_2, "gb_out_int" );
    gb_out_int->setColumnLayout(0, TQt::Vertical );
    gb_out_int->layout()->setSpacing( 6 );
    gb_out_int->layout()->setMargin( 11 );
    gb_out_intLayout = new TQGridLayout( gb_out_int->layout() );
    gb_out_intLayout->setAlignment( TQt::AlignTop );

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

    gb_out_intLayout->addMultiCellWidget( TextLabel3, 0, 0, 0, 3 );

    c_inv_out_int = new TQCheckBox( gb_out_int, "c_inv_out_int" );
    c_inv_out_int->setEnabled( false );
    c_inv_out_int->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, c_inv_out_int->sizePolicy().hasHeightForWidth() ) );

    gb_out_intLayout->addWidget( c_inv_out_int, 1, 3 );

    cb_out_int = new TQComboBox( false, gb_out_int, "cb_out_int" );
    cb_out_int->setEnabled( false );
    cb_out_int->setEditable( true );
    cb_out_int->setInsertionPolicy( TQComboBox::NoInsertion );
    cb_out_int->setDuplicatesEnabled( false );

    gb_out_intLayout->addWidget( cb_out_int, 1, 2 );
    Spacer1 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    gb_out_intLayout->addItem( Spacer1, 1, 1 );

    c_out_int = new TQCheckBox( gb_out_int, "c_out_int" );
    c_out_int->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, c_out_int->sizePolicy().hasHeightForWidth() ) );

    gb_out_intLayout->addWidget( c_out_int, 1, 0 );

    tabLayout_2->addWidget( gb_out_int, 0, 0 );
    tabWidget5->insertTab( tab_2, TQString::fromLatin1("") );
    KMyFirewallRuleEditorInterfaceLayout->addWidget( tabWidget5 );

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

    kPushButton1 = new KPushButton( this, "kPushButton1" );
    layout5->addWidget( kPushButton1 );
    Spacer3_2 = new TQSpacerItem( 80, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( Spacer3_2 );

    b_help = new TQPushButton( this, "b_help" );
    layout5->addWidget( b_help );
    Spacer3 = new TQSpacerItem( 130, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( Spacer3 );

    b_ok = new TQPushButton( this, "b_ok" );
    layout5->addWidget( b_ok );
    KMyFirewallRuleEditorInterfaceLayout->addLayout( layout5 );
    languageChange();
    resize( TQSize(576, 438).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( c_in_int, TQ_SIGNAL( toggled(bool) ), c_inv_in_int, TQ_SLOT( setEnabled(bool) ) );
    connect( c_out_int, TQ_SIGNAL( toggled(bool) ), c_inv_out_int, TQ_SLOT( setEnabled(bool) ) );
    connect( b_ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOk() ) );
    connect( c_in_int, TQ_SIGNAL( toggled(bool) ), cb_in_int, TQ_SLOT( setEnabled(bool) ) );
    connect( c_out_int, TQ_SIGNAL( toggled(bool) ), cb_out_int, TQ_SLOT( setEnabled(bool) ) );
    connect( b_help, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotHelp() ) );
    connect( kPushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallRuleEditorInterface::languageChange()
{
    setCaption( tr2i18n( "Interface Options" ) );
    TextLabel1->setText( tr2i18n( "Interface Options" ) );
    TextLabel2->setText( tr2i18n( "<b>ATTENTION: </b>Not All options are not always allowed! The program will attempt to check your settings, but as usual options may be accepted even if the configuration is not valid. If you get error messages at firewall startup, make sure that your configuration is valid. Have a look at the help or the \"iptables\" man page for more details." ) );
    gb_in_int->setTitle( tr2i18n( "Incoming Interface" ) );
    TextLabel4->setText( tr2i18n( "The incoming interface is only valid in the INPUT and FORWARD chains, and chains that are fed only by them." ) );
    c_inv_in_int->setText( tr2i18n( "Invert" ) );
    c_in_int->setText( tr2i18n( "Check for incoming interface" ) );
    tabWidget5->changeTab( tab, tr2i18n( "Incoming Interface" ) );
    gb_out_int->setTitle( tr2i18n( "Outgoing Interface" ) );
    TextLabel3->setText( tr2i18n( "Checking for the outgoing interface is only possible in the OUTPUT and FORWARD chains, and chains that are fed only by them." ) );
    c_inv_out_int->setText( tr2i18n( "Invert" ) );
    c_out_int->setText( tr2i18n( "Check for outgoing interface" ) );
    tabWidget5->changeTab( tab_2, tr2i18n( "Outgoing Interface" ) );
    kPushButton1->setText( tr2i18n( "&Cancel" ) );
    b_help->setText( tr2i18n( "&Help" ) );
    b_ok->setText( tr2i18n( "&Apply" ) );
}

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

void KMyFirewallRuleEditorInterface::slotOk()
{
    tqWarning( "KMyFirewallRuleEditorInterface::slotOk(): Not implemented yet" );
}

void KMyFirewallRuleEditorInterface::slotReadConfig()
{
    tqWarning( "KMyFirewallRuleEditorInterface::slotReadConfig(): Not implemented yet" );
}

void KMyFirewallRuleEditorInterface::accept()
{
    tqWarning( "KMyFirewallRuleEditorInterface::accept(): Not implemented yet" );
}

void KMyFirewallRuleEditorInterface::reject()
{
    tqWarning( "KMyFirewallRuleEditorInterface::reject(): Not implemented yet" );
}

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

TQMetaObject *KMyFirewallRuleEditorInterface::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallRuleEditorInterface( "KMyFirewallRuleEditorInterface", &KMyFirewallRuleEditorInterface::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallRuleEditorInterface::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 = {"slotHelp", 0, 0 };
    static const TQUMethod slot_1 = {"slotOk", 0, 0 };
    static const TQUMethod slot_2 = {"slotReadConfig", 0, 0 };
    static const TQUMethod slot_3 = {"accept", 0, 0 };
    static const TQUMethod slot_4 = {"reject", 0, 0 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotHelp()", &slot_0, TQMetaData::Public },
	{ "slotOk()", &slot_1, TQMetaData::Public },
	{ "slotReadConfig()", &slot_2, TQMetaData::Public },
	{ "accept()", &slot_3, TQMetaData::Public },
	{ "reject()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KMyFirewallRuleEditorInterface", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallRuleEditorInterface.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KMyFirewallRuleEditorInterface::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotHelp(); break;
    case 1: slotOk(); break;
    case 2: slotReadConfig(); break;
    case 3: accept(); break;
    case 4: reject(); break;
    case 5: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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