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

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

#include "kmyfirewallmynetworkwidget.h"

#include <ntqvariant.h>
#include <ktabwidget.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqsplitter.h>
#include <ntqwidgetstack.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    splitter1 = new TQSplitter( this, "splitter1" );
    splitter1->setOrientation( TQSplitter::Vertical );
    splitter1->setChildrenCollapsible( false );

    m_lv_zones = new TDEListView( splitter1, "m_lv_zones" );
    m_lv_zones->addColumn( tr2i18n( "Network/Target" ) );
    m_lv_zones->addColumn( tr2i18n( "Address/Mask" ) );
    m_lv_zones->addColumn( tr2i18n( "System" ) );
    m_lv_zones->addColumn( tr2i18n( "Backend" ) );
    m_lv_zones->addColumn( tr2i18n( "Description" ) );
    m_lv_zones->setResizePolicy( TDEListView::AutoOneFit );
    m_lv_zones->setResizeMode( TDEListView::AllColumns );
    m_lv_zones->setFullWidth( true );
    m_lv_zones->setItemsMovable( false );

    m_wsEdit = new TQWidgetStack( splitter1, "m_wsEdit" );

    ws_pageHostProperties = new TQWidget( m_wsEdit, "ws_pageHostProperties" );
    ws_pageHostPropertiesLayout = new TQGridLayout( ws_pageHostProperties, 1, 1, 5, 4, "ws_pageHostPropertiesLayout"); 

    kt_hostProperties = new KTabWidget( ws_pageHostProperties, "kt_hostProperties" );
    kt_hostProperties->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)7, 0, 0, kt_hostProperties->sizePolicy().hasHeightForWidth() ) );
    kt_hostProperties->setCurrentPage( -1 );

    ws_pageHostPropertiesLayout->addWidget( kt_hostProperties, 0, 0 );
    m_wsEdit->addWidget( ws_pageHostProperties, 0 );

    ws_pageZoneProperties = new TQWidget( m_wsEdit, "ws_pageZoneProperties" );
    ws_pageZonePropertiesLayout = new TQGridLayout( ws_pageZoneProperties, 1, 1, 5, 4, "ws_pageZonePropertiesLayout"); 

    kt_zoneProperties = new KTabWidget( ws_pageZoneProperties, "kt_zoneProperties" );
    kt_zoneProperties->setCurrentPage( -1 );

    ws_pageZonePropertiesLayout->addWidget( kt_zoneProperties, 0, 0 );
    m_wsEdit->addWidget( ws_pageZoneProperties, 1 );

    KMyFirewallMyNetworkWidgetLayout->addWidget( splitter1, 0, 0 );
    languageChange();
    resize( TQSize(686, 571).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallMyNetworkWidget::languageChange()
{
    setCaption( tr2i18n( "Protocols" ) );
    m_lv_zones->header()->setLabel( 0, tr2i18n( "Network/Target" ) );
    m_lv_zones->header()->setLabel( 1, tr2i18n( "Address/Mask" ) );
    m_lv_zones->header()->setLabel( 2, tr2i18n( "System" ) );
    m_lv_zones->header()->setLabel( 3, tr2i18n( "Backend" ) );
    m_lv_zones->header()->setLabel( 4, tr2i18n( "Description" ) );
}

void KMyFirewallMyNetworkWidget::m_lv_zones_itemRenamed(TQListViewItem*,int,const TQString&)
{
    tqWarning( "KMyFirewallMyNetworkWidget::m_lv_zones_itemRenamed(TQListViewItem*,int,const TQString&): Not implemented yet" );
}

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

TQMetaObject *KMyFirewallMyNetworkWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallMyNetworkWidget( "KMyFirewallMyNetworkWidget", &KMyFirewallMyNetworkWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallMyNetworkWidget::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In },
	{ 0, &static_QUType_int, 0, TQUParameter::In },
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"m_lv_zones_itemRenamed", 3, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "m_lv_zones_itemRenamed(TQListViewItem*,int,const TQString&)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KMyFirewallMyNetworkWidget", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallMyNetworkWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KMyFirewallMyNetworkWidget::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: m_lv_zones_itemRenamed((TQListViewItem*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2),(const TQString&)static_QUType_TQString.get(_o+3)); break;
    case 1: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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