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

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

#include "kmyfirewallhostwidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <kled.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqtextedit.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    m_sb_host_0 = new KIntSpinBox( this, "m_sb_host_0" );
    m_sb_host_0->setEnabled( false );
    m_sb_host_0->setMaxValue( 255 );
    layout19_3->addWidget( m_sb_host_0 );

    textLabel4_5 = new TQLabel( this, "textLabel4_5" );
    textLabel4_5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_5->sizePolicy().hasHeightForWidth() ) );
    textLabel4_5->setAlignment( int( TQLabel::AlignBottom ) );
    layout19_3->addWidget( textLabel4_5 );

    m_sb_host_1 = new KIntSpinBox( this, "m_sb_host_1" );
    m_sb_host_1->setEnabled( false );
    m_sb_host_1->setMaxValue( 255 );
    layout19_3->addWidget( m_sb_host_1 );

    textLabel4_4_3 = new TQLabel( this, "textLabel4_4_3" );
    textLabel4_4_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_4_3->sizePolicy().hasHeightForWidth() ) );
    textLabel4_4_3->setAlignment( int( TQLabel::AlignBottom ) );
    layout19_3->addWidget( textLabel4_4_3 );

    m_sb_host_2 = new KIntSpinBox( this, "m_sb_host_2" );
    m_sb_host_2->setEnabled( false );
    m_sb_host_2->setMaxValue( 255 );
    layout19_3->addWidget( m_sb_host_2 );

    textLabel4_3_3 = new TQLabel( this, "textLabel4_3_3" );
    textLabel4_3_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4_3_3->sizePolicy().hasHeightForWidth() ) );
    textLabel4_3_3->setAlignment( int( TQLabel::AlignBottom ) );
    layout19_3->addWidget( textLabel4_3_3 );

    m_sb_host_3 = new KIntSpinBox( this, "m_sb_host_3" );
    m_sb_host_3->setEnabled( false );
    m_sb_host_3->setMaxValue( 255 );
    layout19_3->addWidget( m_sb_host_3 );

    KMyFirewallHostWidgetLayout->addMultiCellLayout( layout19_3, 0, 0, 3, 4 );

    textLabel3_3 = new TQLabel( this, "textLabel3_3" );
    textLabel3_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel3_3->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( textLabel3_3, 0, 0, 0, 2 );

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

    m_sb_host_sshPort = new KIntSpinBox( this, "m_sb_host_sshPort" );
    m_sb_host_sshPort->setEnabled( false );
    m_sb_host_sshPort->setMaxValue( 65535 );
    m_sb_host_sshPort->setMinValue( 1 );
    m_sb_host_sshPort->setValue( 22 );
    layout2->addWidget( m_sb_host_sshPort );

    m_cmd_testSSH = new TQPushButton( this, "m_cmd_testSSH" );
    m_cmd_testSSH->setEnabled( false );
    m_cmd_testSSH->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, m_cmd_testSSH->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( m_cmd_testSSH );

    KMyFirewallHostWidgetLayout->addMultiCellLayout( layout2, 1, 1, 3, 4 );

    textLabel3_3_2_2 = new TQLabel( this, "textLabel3_3_2_2" );
    textLabel3_3_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel3_3_2_2->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( textLabel3_3_2_2, 1, 1, 0, 2 );

    m_cb_os = new KComboBox( false, this, "m_cb_os" );
    m_cb_os->setEnabled( false );

    KMyFirewallHostWidgetLayout->addWidget( m_cb_os, 2, 4 );

    m_cb_backend = new KComboBox( false, this, "m_cb_backend" );
    m_cb_backend->setEnabled( false );

    KMyFirewallHostWidgetLayout->addWidget( m_cb_backend, 3, 4 );

    textLabel3_3_2 = new TQLabel( this, "textLabel3_3_2" );
    textLabel3_3_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel3_3_2->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( textLabel3_3_2, 2, 2, 0, 3 );

    textLabel3_3_3 = new TQLabel( this, "textLabel3_3_3" );
    textLabel3_3_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel3_3_3->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( textLabel3_3_3, 3, 3, 0, 3 );

    m_host_desc = new TQTextEdit( this, "m_host_desc" );
    m_host_desc->setEnabled( true );
    m_host_desc->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, m_host_desc->sizePolicy().hasHeightForWidth() ) );
    m_host_desc->setWordWrap( TQTextEdit::NoWrap );
    m_host_desc->setReadOnly( true );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( m_host_desc, 4, 5, 4, 4 );

    textLabel1_2_2 = new TQLabel( this, "textLabel1_2_2" );
    textLabel1_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_2_2->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( textLabel1_2_2, 4, 4, 0, 3 );
    spacer12 = new TQSpacerItem( 20, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KMyFirewallHostWidgetLayout->addItem( spacer12, 5, 1 );

    m_lbl_configStatus = new TQLabel( this, "m_lbl_configStatus" );
    m_lbl_configStatus->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, m_lbl_configStatus->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addWidget( m_lbl_configStatus, 7, 1 );

    m_cmd_autoConf = new TQPushButton( this, "m_cmd_autoConf" );
    m_cmd_autoConf->setEnabled( false );
    m_cmd_autoConf->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_cmd_autoConf->sizePolicy().hasHeightForWidth() ) );

    KMyFirewallHostWidgetLayout->addWidget( m_cmd_autoConf, 7, 4 );
    spacer4 = new TQSpacerItem( 241, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KMyFirewallHostWidgetLayout->addMultiCell( spacer4, 7, 7, 2, 3 );

    m_led_configStatus = new KLed( this, "m_led_configStatus" );
    m_led_configStatus->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, m_led_configStatus->sizePolicy().hasHeightForWidth() ) );
    m_led_configStatus->setState( KLed::Off );
    m_led_configStatus->setShape( KLed::Circular );
    m_led_configStatus->setLook( KLed::Flat );
    m_led_configStatus->setDarkFactor( 300 );

    KMyFirewallHostWidgetLayout->addWidget( m_led_configStatus, 7, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setMargin( 2 );
    line1->setFrameShape( TQFrame::HLine );

    KMyFirewallHostWidgetLayout->addMultiCellWidget( line1, 6, 6, 0, 4 );
    languageChange();
    resize( TQSize(416, 246).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallHostWidget::languageChange()
{
    setCaption( tr2i18n( "KMyFirewallHostWidget" ) );
    textLabel4_5->setText( tr2i18n( "." ) );
    textLabel4_4_3->setText( tr2i18n( "." ) );
    textLabel4_3_3->setText( tr2i18n( "." ) );
    textLabel3_3->setText( tr2i18n( "IP Address:" ) );
    m_cmd_testSSH->setText( tr2i18n( "Test SSH Connection" ) );
    textLabel3_3_2_2->setText( tr2i18n( "SSH Port:" ) );
    m_cb_os->clear();
    m_cb_os->insertItem( tr2i18n( "Linux" ) );
    m_cb_backend->clear();
    m_cb_backend->insertItem( tr2i18n( "IPTables" ) );
    textLabel3_3_2->setText( tr2i18n( "Operating System:" ) );
    textLabel3_3_3->setText( tr2i18n( "Backend:" ) );
    textLabel1_2_2->setText( tr2i18n( "Notes:" ) );
    m_lbl_configStatus->setText( tr2i18n( "Config Invalid!" ) );
    m_cmd_autoConf->setText( tr2i18n( "Try Auto Configuration" ) );
}

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

TQMetaObject *KMyFirewallHostWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallHostWidget( "KMyFirewallHostWidget", &KMyFirewallHostWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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