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

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

#include "kmyfirewallruleeditormac.h"

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

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

    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.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 ) );
    KMyFirewallRuleEditorMacLayout->addWidget( TextLabel1 );

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

    c_src_mac = new TQCheckBox( this, "c_src_mac" );
    Layout3->addWidget( c_src_mac );

    t_src_mac1 = new TQLineEdit( this, "t_src_mac1" );
    t_src_mac1->setEnabled( false );
    t_src_mac1->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac1->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac1->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac1 );

    TextLabel1_2_6 = new TQLabel( this, "TextLabel1_2_6" );
    TextLabel1_2_6->setMaximumSize( TQSize( 5, 32767 ) );
    Layout3->addWidget( TextLabel1_2_6 );

    t_src_mac2 = new TQLineEdit( this, "t_src_mac2" );
    t_src_mac2->setEnabled( false );
    t_src_mac2->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac2->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac2->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac2 );

    TextLabel1_2_5 = new TQLabel( this, "TextLabel1_2_5" );
    TextLabel1_2_5->setMaximumSize( TQSize( 5, 32767 ) );
    Layout3->addWidget( TextLabel1_2_5 );

    t_src_mac3 = new TQLineEdit( this, "t_src_mac3" );
    t_src_mac3->setEnabled( false );
    t_src_mac3->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac3->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac3->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac3 );

    TextLabel1_2_4 = new TQLabel( this, "TextLabel1_2_4" );
    TextLabel1_2_4->setMaximumSize( TQSize( 5, 32767 ) );
    Layout3->addWidget( TextLabel1_2_4 );

    t_src_mac4 = new TQLineEdit( this, "t_src_mac4" );
    t_src_mac4->setEnabled( false );
    t_src_mac4->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac4->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac4->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac4 );

    TextLabel1_2_3 = new TQLabel( this, "TextLabel1_2_3" );
    TextLabel1_2_3->setMaximumSize( TQSize( 5, 32767 ) );
    Layout3->addWidget( TextLabel1_2_3 );

    t_src_mac5 = new TQLineEdit( this, "t_src_mac5" );
    t_src_mac5->setEnabled( false );
    t_src_mac5->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac5->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac5->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac5 );

    TextLabel1_2_2 = new TQLabel( this, "TextLabel1_2_2" );
    TextLabel1_2_2->setMaximumSize( TQSize( 5, 32767 ) );
    Layout3->addWidget( TextLabel1_2_2 );

    t_src_mac6 = new TQLineEdit( this, "t_src_mac6" );
    t_src_mac6->setEnabled( false );
    t_src_mac6->setMinimumSize( TQSize( 40, 0 ) );
    t_src_mac6->setMaximumSize( TQSize( 40, 32767 ) );
    t_src_mac6->setMaxLength( 2 );
    Layout3->addWidget( t_src_mac6 );

    c_inv_src_mac = new TQCheckBox( this, "c_inv_src_mac" );
    c_inv_src_mac->setEnabled( false );
    c_inv_src_mac->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, c_inv_src_mac->sizePolicy().hasHeightForWidth() ) );
    Layout3->addWidget( c_inv_src_mac );
    KMyFirewallRuleEditorMacLayout->addLayout( Layout3 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    TextLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
    TextLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    KMyFirewallRuleEditorMacLayout->addWidget( TextLabel2 );
    Spacer7 = new TQSpacerItem( 16, 22, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    KMyFirewallRuleEditorMacLayout->addItem( Spacer7 );

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

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

    b_help = new TQPushButton( this, "b_help" );
    layout13->addWidget( b_help );
    Spacer5 = new TQSpacerItem( 80, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout13->addItem( Spacer5 );

    b_ok = new TQPushButton( this, "b_ok" );
    layout13->addWidget( b_ok );
    KMyFirewallRuleEditorMacLayout->addLayout( layout13 );
    languageChange();
    resize( TQSize(568, 192).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac1, TQ_SLOT( setEnabled(bool) ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), c_inv_src_mac, TQ_SLOT( setEnabled(bool) ) );
    connect( b_ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac2, TQ_SLOT( setEnabled(bool) ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac3, TQ_SLOT( setEnabled(bool) ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac4, TQ_SLOT( setEnabled(bool) ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac5, TQ_SLOT( setEnabled(bool) ) );
    connect( c_src_mac, TQ_SIGNAL( toggled(bool) ), t_src_mac6, 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
 */
KMyFirewallRuleEditorMac::~KMyFirewallRuleEditorMac()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallRuleEditorMac::languageChange()
{
    setCaption( tr2i18n( "MAC Options" ) );
    TextLabel1->setText( tr2i18n( "MAC Options" ) );
    c_src_mac->setText( tr2i18n( "Source MAC:" ) );
    TextLabel1_2_6->setText( tr2i18n( "<b>:</b>" ) );
    TextLabel1_2_5->setText( tr2i18n( "<b>:</b>" ) );
    TextLabel1_2_4->setText( tr2i18n( "<b>:</b>" ) );
    TextLabel1_2_3->setText( tr2i18n( "<b>:</b>" ) );
    TextLabel1_2_2->setText( tr2i18n( "<b>:</b>" ) );
    c_inv_src_mac->setText( tr2i18n( "Invert" ) );
    TextLabel2->setText( tr2i18n( "NOTE: By checking the \"Invert\" checkbox the rule will only match if the address found in the packet header is not one you defined." ) );
    kPushButton1->setText( tr2i18n( "&Cancel" ) );
    b_help->setText( tr2i18n( "&Help" ) );
    b_ok->setText( tr2i18n( "&Apply" ) );
}

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

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

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

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

TQMetaObject *KMyFirewallRuleEditorMac::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallRuleEditorMac( "KMyFirewallRuleEditorMac", &KMyFirewallRuleEditorMac::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallRuleEditorMac::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 = {"accept", 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 },
	{ "accept()", &slot_1, TQMetaData::Public },
	{ "reject()", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KMyFirewallRuleEditorMac", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallRuleEditorMac.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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