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

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

#include "kmyfirewallgenericinterfacelogging.h"

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

/*
 *  Constructs a KMyFirewallGenericInterfaceLogging as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KMyFirewallGenericInterfaceLogging::KMyFirewallGenericInterfaceLogging( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KMyFirewallGenericInterfaceLogging" );
    KMyFirewallGenericInterfaceLoggingLayout = new TQGridLayout( this, 1, 1, 2, 2, "KMyFirewallGenericInterfaceLoggingLayout"); 
    spacer2 = new TQSpacerItem( 20, 81, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    KMyFirewallGenericInterfaceLoggingLayout->addItem( spacer2, 1, 0 );

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

    TextLabel1_3 = new TQLabel( GroupBox3_2, "TextLabel1_3" );
    TextLabel1_3->setTextFormat( TQLabel::RichText );
    TextLabel1_3->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    GroupBox3_2Layout->addMultiCellWidget( TextLabel1_3, 0, 0, 0, 1 );
    spacer1 = new TQSpacerItem( 381, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    GroupBox3_2Layout->addItem( spacer1, 1, 0 );

    m_c_log = new TQCheckBox( GroupBox3_2, "m_c_log" );
    m_c_log->setChecked( true );

    GroupBox3_2Layout->addWidget( m_c_log, 1, 1 );

    TextLabel5_2_2_2 = new TQLabel( GroupBox3_2, "TextLabel5_2_2_2" );
    TextLabel5_2_2_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );

    GroupBox3_2Layout->addWidget( TextLabel5_2_2_2, 2, 0 );

    m_le_logPrefix = new KRestrictedLine( GroupBox3_2, "m_le_logPrefix" );
    m_le_logPrefix->setMaxLength( 18 );

    GroupBox3_2Layout->addWidget( m_le_logPrefix, 2, 1 );

    m_c_limitLog = new TQCheckBox( GroupBox3_2, "m_c_limitLog" );
    m_c_limitLog->setChecked( true );

    GroupBox3_2Layout->addWidget( m_c_limitLog, 3, 1 );

    TextLabel3_3_2_2_2 = new TQLabel( GroupBox3_2, "TextLabel3_3_2_2_2" );
    TextLabel3_3_2_2_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    GroupBox3_2Layout->addWidget( TextLabel3_3_2_2_2, 3, 0 );

    KMyFirewallGenericInterfaceLoggingLayout->addWidget( GroupBox3_2, 0, 0 );
    languageChange();
    resize( TQSize(682, 366).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_c_log, TQ_SIGNAL( toggled(bool) ), m_c_limitLog, TQ_SLOT( setEnabled(bool) ) );
    connect( m_c_log, TQ_SIGNAL( toggled(bool) ), TextLabel3_3_2_2_2, TQ_SLOT( setEnabled(bool) ) );
    connect( m_c_log, TQ_SIGNAL( toggled(bool) ), m_le_logPrefix, TQ_SLOT( setEnabled(bool) ) );
    connect( m_c_log, TQ_SIGNAL( toggled(bool) ), TextLabel5_2_2_2, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallGenericInterfaceLogging::languageChange()
{
    setCaption( tr2i18n( "Logging" ) );
    GroupBox3_2->setTitle( tr2i18n( "Logging" ) );
    TextLabel1_3->setText( tr2i18n( "<p>Logging dropped packets will allow you to have a look at the \n"
"packets (source/destination IP/port, etc.) that tried to pass your \n"
"firewall unsuccessfully.<br>\n"
"This is very useful if any damage has been caused by an attack \n"
"and you want to find the person responsible.<br>\n"
"The entries are written to the system's main log file \n"
"(usually /var/log/messages).<p>" ) );
    m_c_log->setText( tr2i18n( "Log dropped packets" ) );
    TextLabel5_2_2_2->setText( tr2i18n( "<p>The logprefix is a string that is prepended to the lines written to your log file to help you find the lines you need.</p>" ) );
    m_le_logPrefix->setValidChars( tr2i18n( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ: " ) );
    m_c_limitLog->setText( tr2i18n( "Limit logged packets" ) );
    TextLabel3_3_2_2_2->setText( tr2i18n( "<p>Avoid \"Denial of Service\" attacks by limiting logging.</p>" ) );
}

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

TQMetaObject *KMyFirewallGenericInterfaceLogging::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallGenericInterfaceLogging( "KMyFirewallGenericInterfaceLogging", &KMyFirewallGenericInterfaceLogging::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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