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

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

#include "kmyfirewallselectactivetarget.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KMyFirewallSelectActiveTarget 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.
 */
KMyFirewallSelectActiveTarget::KMyFirewallSelectActiveTarget( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KMyFirewallSelectActiveTarget" );
    KMyFirewallSelectActiveTargetLayout = new TQGridLayout( this, 1, 1, 11, 6, "KMyFirewallSelectActiveTargetLayout"); 
    spacer2 = new TQSpacerItem( 339, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    KMyFirewallSelectActiveTargetLayout->addMultiCell( spacer2, 4, 4, 1, 3 );

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

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

    m_lbl_message = new TQLabel( this, "m_lbl_message" );
    m_lbl_message->setTextFormat( TQLabel::RichText );

    KMyFirewallSelectActiveTargetLayout->addMultiCellWidget( m_lbl_message, 1, 1, 0, 4 );

    m_cmd_ok = new KPushButton( this, "m_cmd_ok" );

    KMyFirewallSelectActiveTargetLayout->addWidget( m_cmd_ok, 4, 4 );

    m_cmd_cancel = new KPushButton( this, "m_cmd_cancel" );

    KMyFirewallSelectActiveTargetLayout->addWidget( m_cmd_cancel, 4, 0 );
    spacer1 = new TQSpacerItem( 178, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    KMyFirewallSelectActiveTargetLayout->addMultiCell( spacer1, 2, 2, 3, 4 );

    m_lbl_currentTarget = new TQLabel( this, "m_lbl_currentTarget" );
    TQFont m_lbl_currentTarget_font(  m_lbl_currentTarget->font() );
    m_lbl_currentTarget_font.setBold( true );
    m_lbl_currentTarget->setFont( m_lbl_currentTarget_font ); 

    KMyFirewallSelectActiveTargetLayout->addWidget( m_lbl_currentTarget, 2, 2 );

    m_lv_zones = new TDEListView( this, "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->setFullWidth( true );

    KMyFirewallSelectActiveTargetLayout->addMultiCellWidget( m_lv_zones, 3, 3, 0, 4 );
    languageChange();
    resize( TQSize(560, 282).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallSelectActiveTarget::languageChange()
{
    setCaption( tr2i18n( "Select Target" ) );
    textLabel2->setText( tr2i18n( "Current Selected Target:" ) );
    m_lbl_message->setText( tr2i18n( "NO Message loaded!" ) );
    m_cmd_ok->setText( tr2i18n( "&Ok" ) );
    m_cmd_cancel->setText( tr2i18n( "&Cancel" ) );
    m_lbl_currentTarget->setText( tr2i18n( "NO Target Selected" ) );
    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" ) );
}

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

TQMetaObject *KMyFirewallSelectActiveTarget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallSelectActiveTarget( "KMyFirewallSelectActiveTarget", &KMyFirewallSelectActiveTarget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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