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

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

#include "kmyfirewallprotocolpropertieswidget.h"

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

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

    m_gb_protocol_option = new TQGroupBox( this, "m_gb_protocol_option" );
    m_gb_protocol_option->setColumnLayout(0, TQt::Vertical );
    m_gb_protocol_option->layout()->setSpacing( 6 );
    m_gb_protocol_option->layout()->setMargin( 11 );
    m_gb_protocol_optionLayout = new TQGridLayout( m_gb_protocol_option->layout() );
    m_gb_protocol_optionLayout->setAlignment( TQt::AlignTop );

    m_cb_log = new TQCheckBox( m_gb_protocol_option, "m_cb_log" );
    m_cb_log->setEnabled( true );

    m_gb_protocol_optionLayout->addWidget( m_cb_log, 2, 0 );

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

    m_cb_limit = new TQCheckBox( m_gb_protocol_option, "m_cb_limit" );
    layout9->addWidget( m_cb_limit );

    m_sb_limit_rate = new TQSpinBox( m_gb_protocol_option, "m_sb_limit_rate" );
    m_sb_limit_rate->setEnabled( false );
    m_sb_limit_rate->setMinValue( 1 );
    layout9->addWidget( m_sb_limit_rate );

    m_lbl_slash = new TQLabel( m_gb_protocol_option, "m_lbl_slash" );
    m_lbl_slash->setEnabled( false );
    m_lbl_slash->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, m_lbl_slash->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( m_lbl_slash );

    m_cb_limit_interval = new TQComboBox( false, m_gb_protocol_option, "m_cb_limit_interval" );
    m_cb_limit_interval->setEnabled( false );
    m_cb_limit_interval->setEditable( false );
    m_cb_limit_interval->setInsertionPolicy( TQComboBox::NoInsertion );
    m_cb_limit_interval->setDuplicatesEnabled( false );
    layout9->addWidget( m_cb_limit_interval );

    m_gb_protocol_optionLayout->addLayout( layout9, 1, 0 );

    KMyFirewallProtocolPropertiesWidgetLayout->addWidget( m_gb_protocol_option, 0, 1 );

    m_gb_protocol_description = new TQGroupBox( this, "m_gb_protocol_description" );
    m_gb_protocol_description->setColumnLayout(0, TQt::Vertical );
    m_gb_protocol_description->layout()->setSpacing( 6 );
    m_gb_protocol_description->layout()->setMargin( 11 );
    m_gb_protocol_descriptionLayout = new TQGridLayout( m_gb_protocol_description->layout() );
    m_gb_protocol_descriptionLayout->setAlignment( TQt::AlignTop );

    m_l_protocol_desc = new TQLabel( m_gb_protocol_description, "m_l_protocol_desc" );
    m_l_protocol_desc->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    m_gb_protocol_descriptionLayout->addWidget( m_l_protocol_desc, 0, 0 );

    KMyFirewallProtocolPropertiesWidgetLayout->addWidget( m_gb_protocol_description, 0, 0 );
    languageChange();
    resize( TQSize(557, 95).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_cb_limit, TQ_SIGNAL( toggled(bool) ), m_sb_limit_rate, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cb_limit, TQ_SIGNAL( toggled(bool) ), m_lbl_slash, TQ_SLOT( setEnabled(bool) ) );
    connect( m_cb_limit, TQ_SIGNAL( toggled(bool) ), m_cb_limit_interval, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallProtocolPropertiesWidget::languageChange()
{
    setCaption( tr2i18n( "Form2" ) );
    m_gb_protocol_option->setTitle( tr2i18n( "Protocol Options" ) );
    m_cb_log->setText( tr2i18n( "Log packets maching this protocol" ) );
    m_cb_limit->setText( tr2i18n( "Limit matches" ) );
    m_lbl_slash->setText( tr2i18n( "/" ) );
    m_cb_limit_interval->clear();
    m_cb_limit_interval->insertItem( tr2i18n( "second" ) );
    m_cb_limit_interval->insertItem( tr2i18n( "minute" ) );
    m_cb_limit_interval->insertItem( tr2i18n( "hour" ) );
    m_gb_protocol_description->setTitle( tr2i18n( "Protocol Documentation" ) );
}

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

TQMetaObject *KMyFirewallProtocolPropertiesWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallProtocolPropertiesWidget( "KMyFirewallProtocolPropertiesWidget", &KMyFirewallProtocolPropertiesWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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