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

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

#include "usability.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

#include "usability.ui.h"

/*
 *  Constructs a Usability as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
Usability::Usability( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Usability" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    UsabilityLayout = new TQGridLayout( this, 1, 1, 11, 6, "UsabilityLayout"); 

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

    PushAdd = new TQPushButton( groupBox12, "PushAdd" );

    groupBox12Layout->addWidget( PushAdd, 1, 3 );

    NewHost = new TQLineEdit( groupBox12, "NewHost" );

    groupBox12Layout->addWidget( NewHost, 1, 2 );

    kcfg_TrackHostExitsExpire = new TQSpinBox( groupBox12, "kcfg_TrackHostExitsExpire" );

    groupBox12Layout->addWidget( kcfg_TrackHostExitsExpire, 2, 2 );

    TrackHostExits = new TQListView( groupBox12, "TrackHostExits" );
    TrackHostExits->addColumn( tr2i18n( "Domains                " ) );
    TrackHostExits->setResizeMode( TQListView::AllColumns );

    groupBox12Layout->addMultiCellWidget( TrackHostExits, 0, 0, 2, 3 );

    textLabel10 = new TQLabel( groupBox12, "textLabel10" );

    groupBox12Layout->addWidget( textLabel10, 2, 0 );

    textLabel9 = new TQLabel( groupBox12, "textLabel9" );

    groupBox12Layout->addMultiCellWidget( textLabel9, 0, 1, 0, 0 );
    spacer2 = new TQSpacerItem( 70, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox12Layout->addItem( spacer2, 0, 1 );
    spacer3 = new TQSpacerItem( 65, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox12Layout->addItem( spacer3, 2, 1 );

    UsabilityLayout->addMultiCellWidget( groupBox12, 0, 0, 0, 2 );
    spacer5 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    UsabilityLayout->addItem( spacer5, 2, 1 );

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

    UsabilityLayout->addWidget( textLabel4_2_2_2_2, 2, 0 );

    kcfg_MaxCircuitDirtiness = new TQSpinBox( this, "kcfg_MaxCircuitDirtiness" );
    kcfg_MaxCircuitDirtiness->setMaxValue( 9999 );

    UsabilityLayout->addWidget( kcfg_MaxCircuitDirtiness, 2, 2 );

    groupBox13 = new TQGroupBox( this, "groupBox13" );
    groupBox13->setColumnLayout(0, TQt::Vertical );
    groupBox13->layout()->setSpacing( 6 );
    groupBox13->layout()->setMargin( 11 );
    groupBox13Layout = new TQGridLayout( groupBox13->layout() );
    groupBox13Layout->setAlignment( TQt::AlignTop );
    spacer1 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox13Layout->addItem( spacer1, 0, 1 );

    clearSelected = new TQPushButton( groupBox13, "clearSelected" );

    groupBox13Layout->addWidget( clearSelected, 1, 2 );

    textLabel11 = new TQLabel( groupBox13, "textLabel11" );

    groupBox13Layout->addMultiCellWidget( textLabel11, 0, 1, 0, 0 );

    LongLivedPorts = new TQListView( groupBox13, "LongLivedPorts" );
    LongLivedPorts->addColumn( tr2i18n( "Services " ) );
    LongLivedPorts->setSelectionMode( TQListView::Extended );
    LongLivedPorts->setResizeMode( TQListView::AllColumns );

    groupBox13Layout->addWidget( LongLivedPorts, 0, 2 );

    UsabilityLayout->addMultiCellWidget( groupBox13, 1, 1, 0, 2 );
    languageChange();
    resize( TQSize(540, 554).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( LongLivedPorts, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( LongLivedPorts_selectionChanged() ) );
    connect( TrackHostExits, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( TrackHostExits_contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    connect( PushAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( PushAdd_clicked() ) );
    connect( clearSelected, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clearSelected_clicked() ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Usability::languageChange()
{
    setCaption( tr2i18n( "Form1" ) );
    groupBox12->setTitle( tr2i18n( "Session Continuity" ) );
    PushAdd->setText( tr2i18n( "O&K" ) );
    kcfg_TrackHostExitsExpire->setSuffix( tr2i18n( " minutes" ) );
    TrackHostExits->header()->setLabel( 0, tr2i18n( "Domains                " ) );
    textLabel10->setText( tr2i18n( "Maximum Length of Session Time:" ) );
    textLabel9->setText( tr2i18n( "<p> This is a list of domains which might give you trouble if you connect from a range of different IP addresses during a single session. Adding them to this list ensures the same IP address is presented to the domain during the session." ) );
    textLabel4_2_2_2_2->setText( tr2i18n( "Don't reuse a connection if it is more than" ) );
    kcfg_MaxCircuitDirtiness->setSuffix( tr2i18n( " seconds old" ) );
    groupBox13->setTitle( tr2i18n( "Networks Services With Long Session Times" ) );
    clearSelected->setText( tr2i18n( "Clear Selected" ) );
    textLabel11->setText( tr2i18n( "<p> These services are known to have long session times. Select any of them that you use and this will ensure that their traffic is routed over servers that have a high-availability rating (i.e. are rarely offline)." ) );
    LongLivedPorts->header()->setLabel( 0, tr2i18n( "Services " ) );
    LongLivedPorts->clear();
    TQListViewItem * item = new TQListViewItem( LongLivedPorts, 0 );
    item->setText( 0, tr2i18n( "ftp" ) );

    item = new TQListViewItem( LongLivedPorts, item );
    item->setText( 0, tr2i18n( "msn" ) );

    item = new TQListViewItem( LongLivedPorts, item );
    item->setText( 0, tr2i18n( "jabber" ) );

    item = new TQListViewItem( LongLivedPorts, item );
    item->setText( 0, tr2i18n( "aol" ) );

    item = new TQListViewItem( LongLivedPorts, item );
    item->setText( 0, tr2i18n( "telnet" ) );

    item = new TQListViewItem( LongLivedPorts, item );
    item->setText( 0, tr2i18n( "ssh" ) );

}

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

TQMetaObject *Usability::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Usability( "Usability", &Usability::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* Usability::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 = {"LongLivedPorts_selectionChanged", 0, 0 };
    static const TQUMethod slot_1 = {"PushAdd_clicked", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In },
	{ "point", &static_QUType_varptr, "\x0e", TQUParameter::In },
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"TrackHostExits_contextMenuRequested", 3, param_slot_2 };
    static const TQUMethod slot_3 = {"slotDeleteEntry", 0, 0 };
    static const TQUMethod slot_4 = {"clearSelected_clicked", 0, 0 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "LongLivedPorts_selectionChanged()", &slot_0, TQMetaData::Public },
	{ "PushAdd_clicked()", &slot_1, TQMetaData::Public },
	{ "TrackHostExits_contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_2, TQMetaData::Public },
	{ "slotDeleteEntry()", &slot_3, TQMetaData::Public },
	{ "clearSelected_clicked()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected }
    };
    static const TQUMethod signal_0 = {"settingsChanged", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "settingsChanged()", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"Usability", parentObject,
	slot_tbl, 6,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_Usability.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL settingsChanged
void Usability::settingsChanged()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

bool Usability::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: LongLivedPorts_selectionChanged(); break;
    case 1: PushAdd_clicked(); break;
    case 2: TrackHostExits_contextMenuRequested((TQListViewItem*)static_QUType_ptr.get(_o+1),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+2)),(int)static_QUType_int.get(_o+3)); break;
    case 3: slotDeleteEntry(); break;
    case 4: clearSelected_clicked(); break;
    case 5: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool Usability::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: settingsChanged(); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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