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

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

#include "kmyfirewallchaineditornewchain.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KMyFirewallChainEditorNewChain 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.
 */
KMyFirewallChainEditorNewChain::KMyFirewallChainEditorNewChain( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KMyFirewallChainEditorNewChain" );
    KMyFirewallChainEditorNewChainLayout = new TQGridLayout( this, 1, 1, 2, 2, "KMyFirewallChainEditorNewChainLayout"); 

    TextLabel4 = new TQLabel( this, "TextLabel4" );
    TextLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
    TQFont TextLabel4_font(  TextLabel4->font() );
    TextLabel4_font.setPointSize( 9 );
    TextLabel4_font.setBold( true );
    TextLabel4->setFont( TextLabel4_font ); 
    TextLabel4->setFrameShape( TQLabel::StyledPanel );
    TextLabel4->setFrameShadow( TQLabel::Plain );
    TextLabel4->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    KMyFirewallChainEditorNewChainLayout->addWidget( TextLabel4, 0, 0 );

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

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

    t_name = new TQLineEdit( GroupBox13, "t_name" );
    t_name->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, t_name->sizePolicy().hasHeightForWidth() ) );
    t_name->setMaxLength( 33 );

    GroupBox13Layout->addWidget( t_name, 0, 0 );
    Layout2->addWidget( GroupBox13 );

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, ButtonGroup1->sizePolicy().hasHeightForWidth() ) );
    ButtonGroup1->setExclusive( true );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new TQHBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    c_filter = new TQRadioButton( ButtonGroup1, "c_filter" );
    c_filter->setChecked( true );
    ButtonGroup1Layout->addWidget( c_filter );

    c_nat = new TQRadioButton( ButtonGroup1, "c_nat" );
    ButtonGroup1Layout->addWidget( c_nat );

    c_mangle = new TQRadioButton( ButtonGroup1, "c_mangle" );
    ButtonGroup1Layout->addWidget( c_mangle );
    Layout2->addWidget( ButtonGroup1 );

    KMyFirewallChainEditorNewChainLayout->addLayout( Layout2, 1, 0 );

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

    b_cancel = new TQPushButton( this, "b_cancel" );
    Layout28->addWidget( b_cancel );
    Spacer12 = new TQSpacerItem( 79, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout28->addItem( Spacer12 );

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

    KMyFirewallChainEditorNewChainLayout->addLayout( Layout28, 3, 0 );
    Spacer2 = new TQSpacerItem( 16, 16, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    KMyFirewallChainEditorNewChainLayout->addItem( Spacer2, 2, 0 );
    languageChange();
    resize( TQSize(385, 174).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() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallChainEditorNewChain::languageChange()
{
    setCaption( tr2i18n( "New Chain" ) );
    TextLabel4->setText( tr2i18n( "Please define a unique (in the table) name and decide which table this chain should be added to." ) );
    GroupBox13->setTitle( tr2i18n( "Name" ) );
    ButtonGroup1->setTitle( tr2i18n( "Table" ) );
    c_filter->setText( tr2i18n( "filter" ) );
    c_nat->setText( tr2i18n( "nat" ) );
    c_mangle->setText( tr2i18n( "mangle" ) );
    b_cancel->setText( tr2i18n( "&Cancel" ) );
    b_ok->setText( tr2i18n( "&OK" ) );
}

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

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

TQMetaObject *KMyFirewallChainEditorNewChain::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallChainEditorNewChain( "KMyFirewallChainEditorNewChain", &KMyFirewallChainEditorNewChain::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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