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

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

#include "kmyfirewallgenericinterfaceeditprotocolwidget.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistbox.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqsplitter.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqtextedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    textLabel6 = new TQLabel( this, "textLabel6" );
    KMyFirewallGenericInterfaceEditProtocolWidgetLayout->addWidget( textLabel6 );

    splitter4 = new TQSplitter( this, "splitter4" );
    splitter4->setOrientation( TQSplitter::Horizontal );

    TQWidget* privateLayoutWidget = new TQWidget( splitter4, "layout13" );
    layout13 = new TQVBoxLayout( privateLayoutWidget, 11, 6, "layout13"); 

    m_cb_showAll = new TQCheckBox( privateLayoutWidget, "m_cb_showAll" );
    layout13->addWidget( m_cb_showAll );

    m_lv_protocols = new TDEListView( privateLayoutWidget, "m_lv_protocols" );
    m_lv_protocols->addColumn( tr2i18n( "Protocol" ) );
    m_lv_protocols->header()->setClickEnabled( false, m_lv_protocols->header()->count() - 1 );
    m_lv_protocols->header()->setResizeEnabled( false, m_lv_protocols->header()->count() - 1 );
    m_lv_protocols->addColumn( tr2i18n( "Properties" ) );
    m_lv_protocols->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, m_lv_protocols->sizePolicy().hasHeightForWidth() ) );
    m_lv_protocols->setShowSortIndicator( true );
    m_lv_protocols->setRootIsDecorated( true );
    m_lv_protocols->setResizeMode( TDEListView::AllColumns );
    m_lv_protocols->setFullWidth( true );
    m_lv_protocols->setItemsMovable( false );
    layout13->addWidget( m_lv_protocols );

    TQWidget* privateLayoutWidget_2 = new TQWidget( splitter4, "layout15" );
    layout15 = new TQVBoxLayout( privateLayoutWidget_2, 11, 6, "layout15"); 

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

    m_b_new_protocol = new KPushButton( privateLayoutWidget_2, "m_b_new_protocol" );
    layout14->addWidget( m_b_new_protocol );

    m_b_del_protocol = new KPushButton( privateLayoutWidget_2, "m_b_del_protocol" );
    layout14->addWidget( m_b_del_protocol );
    layout15->addLayout( layout14 );

    m_gb_edit = new TQGroupBox( privateLayoutWidget_2, "m_gb_edit" );
    m_gb_edit->setEnabled( false );
    m_gb_edit->setColumnLayout(0, TQt::Vertical );
    m_gb_edit->layout()->setSpacing( 6 );
    m_gb_edit->layout()->setMargin( 11 );
    m_gb_editLayout = new TQGridLayout( m_gb_edit->layout() );
    m_gb_editLayout->setAlignment( TQt::AlignTop );

    layout33 = new TQGridLayout( 0, 1, 1, 0, 6, "layout33"); 

    m_lb_udpPorts = new TDEListBox( m_gb_edit, "m_lb_udpPorts" );

    layout33->addWidget( m_lb_udpPorts, 1, 1 );

    textLabel1_2 = new TQLabel( m_gb_edit, "textLabel1_2" );

    layout33->addWidget( textLabel1_2, 0, 0 );

    textLabel2 = new TQLabel( m_gb_edit, "textLabel2" );

    layout33->addMultiCellWidget( textLabel2, 2, 2, 0, 1 );

    textLabel1_2_2 = new TQLabel( m_gb_edit, "textLabel1_2_2" );

    layout33->addWidget( textLabel1_2_2, 0, 1 );

    m_lb_tcpPorts = new TDEListBox( m_gb_edit, "m_lb_tcpPorts" );
    m_lb_tcpPorts->setMinimumSize( TQSize( 0, 80 ) );

    layout33->addWidget( m_lb_tcpPorts, 1, 0 );

    m_te_desc = new TQTextEdit( m_gb_edit, "m_te_desc" );
    m_te_desc->setMaximumSize( TQSize( 32767, 150 ) );

    layout33->addMultiCellWidget( m_te_desc, 3, 3, 0, 1 );

    m_gb_editLayout->addMultiCellLayout( layout33, 3, 3, 0, 1 );

    m_bg_protocol = new TQButtonGroup( m_gb_edit, "m_bg_protocol" );
    m_bg_protocol->setLineWidth( 0 );
    m_bg_protocol->setColumnLayout(0, TQt::Vertical );
    m_bg_protocol->layout()->setSpacing( 2 );
    m_bg_protocol->layout()->setMargin( 2 );
    m_bg_protocolLayout = new TQGridLayout( m_bg_protocol->layout() );
    m_bg_protocolLayout->setAlignment( TQt::AlignTop );

    m_rb_tcp = new TQRadioButton( m_bg_protocol, "m_rb_tcp" );
    m_rb_tcp->setChecked( true );

    m_bg_protocolLayout->addWidget( m_rb_tcp, 0, 0 );

    m_rb_udp = new TQRadioButton( m_bg_protocol, "m_rb_udp" );

    m_bg_protocolLayout->addWidget( m_rb_udp, 0, 1 );

    m_gb_editLayout->addWidget( m_bg_protocol, 2, 0 );

    layout27 = new TQGridLayout( 0, 1, 1, 0, 6, "layout27"); 

    m_le_protocolName = new TQLineEdit( m_gb_edit, "m_le_protocolName" );

    layout27->addWidget( m_le_protocolName, 0, 1 );

    textLabel2_2 = new TQLabel( m_gb_edit, "textLabel2_2" );

    layout27->addWidget( textLabel2_2, 0, 0 );

    m_gb_editLayout->addMultiCellLayout( layout27, 0, 0, 0, 1 );

    layout37 = new TQVBoxLayout( 0, 0, 6, "layout37"); 

    m_b_add_port = new KPushButton( m_gb_edit, "m_b_add_port" );
    layout37->addWidget( m_b_add_port );

    m_b_del_port = new KPushButton( m_gb_edit, "m_b_del_port" );
    layout37->addWidget( m_b_del_port );

    m_gb_editLayout->addMultiCellLayout( layout37, 1, 2, 1, 1 );

    m_sb_port_num = new TQSpinBox( m_gb_edit, "m_sb_port_num" );
    m_sb_port_num->setMaxValue( 65535 );
    m_sb_port_num->setMinValue( 1 );

    m_gb_editLayout->addWidget( m_sb_port_num, 1, 0 );
    layout15->addWidget( m_gb_edit );
    KMyFirewallGenericInterfaceEditProtocolWidgetLayout->addWidget( splitter4 );
    languageChange();
    resize( TQSize(732, 436).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallGenericInterfaceEditProtocolWidget::languageChange()
{
    setCaption( tr2i18n( "KMyFirewallGenericInterfaceEditProtocolWidget" ) );
    textLabel6->setText( tr2i18n( "<qt>Here you can define custom protocols for the <b>Generic Interface</b>.<br>\n"
"This required if you like to use a protocol not directely suppotred by KMyFirewall.</qt>" ) );
    m_cb_showAll->setText( tr2i18n( "Show All" ) );
    TQToolTip::add( m_cb_showAll, tr2i18n( "If checked the list view also contains all protocols that are available by default, not only the ones you defined" ) );
    m_lv_protocols->header()->setLabel( 0, tr2i18n( "Protocol" ) );
    m_lv_protocols->header()->setLabel( 1, tr2i18n( "Properties" ) );
    m_b_new_protocol->setText( tr2i18n( "&New Protocol" ) );
    m_b_del_protocol->setText( tr2i18n( "&Delete Protocol" ) );
    m_gb_edit->setTitle( tr2i18n( "Edit Protocol" ) );
    textLabel1_2->setText( tr2i18n( "TCP Ports" ) );
    textLabel2->setText( tr2i18n( "Protocol Description" ) );
    textLabel1_2_2->setText( tr2i18n( "UDP Ports" ) );
    m_bg_protocol->setTitle( TQString::null );
    m_rb_tcp->setText( tr2i18n( "TCP" ) );
    m_rb_udp->setText( tr2i18n( "UDP" ) );
    textLabel2_2->setText( tr2i18n( "Name:" ) );
    m_b_add_port->setText( tr2i18n( "&Add Port" ) );
    m_b_del_port->setText( tr2i18n( "D&elete Port" ) );
}

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

TQMetaObject *KMyFirewallGenericInterfaceEditProtocolWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallGenericInterfaceEditProtocolWidget( "KMyFirewallGenericInterfaceEditProtocolWidget", &KMyFirewallGenericInterfaceEditProtocolWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallGenericInterfaceEditProtocolWidget::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(
	"KMyFirewallGenericInterfaceEditProtocolWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallGenericInterfaceEditProtocolWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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