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

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

#include "kmyfirewallruleeditorstate.h"

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

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

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
    TextLabel1->setMinimumSize( TQSize( 0, 40 ) );
    TextLabel1->setMaximumSize( TQSize( 32767, 40 ) );
    TQFont TextLabel1_font(  TextLabel1->font() );
    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 ) );
    KMyFirewallRuleEditorStateLayout->addWidget( TextLabel1 );

    gb_conntrack = new TQGroupBox( this, "gb_conntrack" );
    gb_conntrack->setFrameShape( TQGroupBox::GroupBoxPanel );
    gb_conntrack->setFrameShadow( TQGroupBox::Sunken );
    gb_conntrack->setColumnLayout(0, TQt::Vertical );
    gb_conntrack->layout()->setSpacing( 6 );
    gb_conntrack->layout()->setMargin( 11 );
    gb_conntrackLayout = new TQGridLayout( gb_conntrack->layout() );
    gb_conntrackLayout->setAlignment( TQt::AlignTop );

    c_use_conntrack = new TQCheckBox( gb_conntrack, "c_use_conntrack" );
    c_use_conntrack->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, c_use_conntrack->sizePolicy().hasHeightForWidth() ) );

    gb_conntrackLayout->addMultiCellWidget( c_use_conntrack, 0, 0, 0, 1 );

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

    gb_conntrackLayout->addWidget( c_new, 1, 0 );

    c_related = new TQCheckBox( gb_conntrack, "c_related" );
    c_related->setEnabled( false );
    c_related->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)3, 0, 0, c_related->sizePolicy().hasHeightForWidth() ) );

    gb_conntrackLayout->addWidget( c_related, 2, 0 );

    c_established = new TQCheckBox( gb_conntrack, "c_established" );
    c_established->setEnabled( false );
    c_established->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)3, 0, 0, c_established->sizePolicy().hasHeightForWidth() ) );

    gb_conntrackLayout->addWidget( c_established, 3, 0 );

    c_invalid = new TQCheckBox( gb_conntrack, "c_invalid" );
    c_invalid->setEnabled( false );
    c_invalid->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)3, 0, 0, c_invalid->sizePolicy().hasHeightForWidth() ) );

    gb_conntrackLayout->addWidget( c_invalid, 4, 0 );

    TextLabel5 = new TQLabel( gb_conntrack, "TextLabel5" );
    TextLabel5->setEnabled( false );
    TextLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
    TextLabel5->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    gb_conntrackLayout->addMultiCellWidget( TextLabel5, 3, 3, 1, 2 );

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

    gb_conntrackLayout->addMultiCellWidget( TextLabel4, 4, 4, 1, 2 );

    TextLabel6 = new TQLabel( gb_conntrack, "TextLabel6" );
    TextLabel6->setEnabled( false );
    TextLabel6->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    gb_conntrackLayout->addMultiCellWidget( TextLabel6, 2, 2, 1, 2 );

    TextLabel3 = new TQLabel( gb_conntrack, "TextLabel3" );
    TextLabel3->setEnabled( false );
    TextLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
    TextLabel3->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    gb_conntrackLayout->addMultiCellWidget( TextLabel3, 1, 1, 1, 2 );

    TextLabel2 = new TQLabel( gb_conntrack, "TextLabel2" );
    TextLabel2->setEnabled( false );
    TextLabel2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    gb_conntrackLayout->addWidget( TextLabel2, 0, 2 );
    KMyFirewallRuleEditorStateLayout->addWidget( gb_conntrack );

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

    b_ok_2 = new TQPushButton( this, "b_ok_2" );
    layout18->addWidget( b_ok_2 );
    Spacer12_2_2 = new TQSpacerItem( 90, 20, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
    layout18->addItem( Spacer12_2_2 );

    b_help = new TQPushButton( this, "b_help" );
    layout18->addWidget( b_help );
    Spacer12_2 = new TQSpacerItem( 90, 20, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
    layout18->addItem( Spacer12_2 );

    b_ok = new TQPushButton( this, "b_ok" );
    layout18->addWidget( b_ok );
    KMyFirewallRuleEditorStateLayout->addLayout( layout18 );
    languageChange();
    resize( TQSize(493, 361).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( b_ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOk() ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), c_new, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), c_related, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), c_established, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), c_invalid, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), TextLabel3, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), TextLabel6, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), TextLabel5, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), TextLabel4, TQ_SLOT( setEnabled(bool) ) );
    connect( c_use_conntrack, TQ_SIGNAL( toggled(bool) ), TextLabel2, TQ_SLOT( setEnabled(bool) ) );
    connect( b_help, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotHelp() ) );
    connect( b_ok_2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallRuleEditorState::languageChange()
{
    setCaption( tr2i18n( "Configure Connection Tracking" ) );
    TextLabel1->setText( tr2i18n( "Connection Tracking Options" ) );
    gb_conntrack->setTitle( tr2i18n( "Configure Connection Tracking" ) );
    c_use_conntrack->setText( tr2i18n( "Use connection tracking" ) );
    c_new->setText( tr2i18n( "NEW" ) );
    c_related->setText( tr2i18n( "RELATED" ) );
    c_established->setText( tr2i18n( "ESTABLISHED" ) );
    c_invalid->setText( tr2i18n( "INVALID" ) );
    TextLabel5->setText( tr2i18n( "Packets that are associated with a connection that has packets sent in both directions." ) );
    TextLabel4->setText( tr2i18n( "Packets that are not associated with any known connection." ) );
    TextLabel6->setText( tr2i18n( "Packets that are associated with an existing bi-directional connection and start a new connection (e.g. FTP)." ) );
    TextLabel3->setText( tr2i18n( "Packets that start new connections and are not associated with any known connection." ) );
    TextLabel2->setText( tr2i18n( "Match packets with state:" ) );
    b_ok_2->setText( tr2i18n( "&Cancel" ) );
    b_help->setText( tr2i18n( "&Help" ) );
    b_ok->setText( tr2i18n( "&Apply" ) );
}

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

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

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

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

TQMetaObject *KMyFirewallRuleEditorState::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallRuleEditorState( "KMyFirewallRuleEditorState", &KMyFirewallRuleEditorState::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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