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

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

#include "kmyfirewallruleeditortos.h"

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

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

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

    cb_tos = new TQComboBox( false, gb_title, "cb_tos" );
    cb_tos->setEnabled( false );
    cb_tos->setInsertionPolicy( TQComboBox::NoInsertion );
    cb_tos->setDuplicatesEnabled( false );

    gb_titleLayout->addWidget( cb_tos, 1, 0 );

    c_use_tos = new TQCheckBox( gb_title, "c_use_tos" );

    gb_titleLayout->addWidget( c_use_tos, 0, 0 );

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

    b_ok_2 = new TQPushButton( gb_title, "b_ok_2" );
    layout30->addWidget( b_ok_2 );

    b_cancel_2 = new TQPushButton( gb_title, "b_cancel_2" );
    layout30->addWidget( b_cancel_2 );

    b_ok = new TQPushButton( gb_title, "b_ok" );
    layout30->addWidget( b_ok );

    gb_titleLayout->addLayout( layout30, 3, 0 );
    spacer1 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    gb_titleLayout->addItem( spacer1, 2, 0 );

    KMyFirewallRuleEditorTosLayout->addWidget( gb_title, 0, 0 );
    languageChange();
    resize( TQSize(280, 158).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( b_ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( c_use_tos, TQ_SIGNAL( toggled(bool) ), cb_tos, TQ_SLOT( setEnabled(bool) ) );
    connect( b_cancel_2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotHelp() ) );
    connect( b_ok_2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KMyFirewallRuleEditorTos::languageChange()
{
    setCaption( tr2i18n( "IP Options" ) );
    gb_title->setTitle( tr2i18n( "TOS (Type Of Service) Options" ) );
    cb_tos->clear();
    cb_tos->insertItem( tr2i18n( "Normal-Service" ) );
    cb_tos->insertItem( tr2i18n( "Minimize-Delay" ) );
    cb_tos->insertItem( tr2i18n( "Maximize-Throughput" ) );
    cb_tos->insertItem( tr2i18n( "Maximize-Reliability" ) );
    cb_tos->insertItem( tr2i18n( "Minimize-Cost" ) );
    c_use_tos->setText( tr2i18n( "TOS" ) );
    b_ok_2->setText( tr2i18n( "&Cancel" ) );
    b_cancel_2->setText( tr2i18n( "&Help" ) );
    b_ok->setText( tr2i18n( "&Apply" ) );
}

void KMyFirewallRuleEditorTos::slotHelp()
{
    tqWarning( "KMyFirewallRuleEditorTos::slotHelp(): Not implemented yet" );
}

void KMyFirewallRuleEditorTos::accept()
{
    tqWarning( "KMyFirewallRuleEditorTos::accept(): Not implemented yet" );
}

void KMyFirewallRuleEditorTos::reject()
{
    tqWarning( "KMyFirewallRuleEditorTos::reject(): Not implemented yet" );
}

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

TQMetaObject *KMyFirewallRuleEditorTos::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KMyFirewallRuleEditorTos( "KMyFirewallRuleEditorTos", &KMyFirewallRuleEditorTos::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KMyFirewallRuleEditorTos::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 = {"slotHelp", 0, 0 };
    static const TQUMethod slot_1 = {"accept", 0, 0 };
    static const TQUMethod slot_2 = {"reject", 0, 0 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotHelp()", &slot_0, TQMetaData::Public },
	{ "accept()", &slot_1, TQMetaData::Public },
	{ "reject()", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KMyFirewallRuleEditorTos", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KMyFirewallRuleEditorTos.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KMyFirewallRuleEditorTos::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotHelp(); break;
    case 1: accept(); break;
    case 2: reject(); break;
    case 3: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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