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

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

#include "manualproxy_ui.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <knuminput.h>
#include <tdelistbox.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ManualProxyDlgUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ManualProxyDlgUI::ManualProxyDlgUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ManualProxyDlgUI" );
    ManualProxyDlgUILayout = new TQVBoxLayout( this, 0, 6, "ManualProxyDlgUILayout"); 

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

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

    gbServersLayout->addWidget( lbFtp, 2, 0 );

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

    gbServersLayout->addWidget( lbHttps, 1, 0 );

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

    gbServersLayout->addWidget( lbHttp, 0, 0 );

    leHttp = new KLineEdit( gbServers, "leHttp" );

    gbServersLayout->addWidget( leHttp, 0, 1 );

    leHttps = new KLineEdit( gbServers, "leHttps" );

    gbServersLayout->addWidget( leHttps, 1, 1 );

    leFtp = new KLineEdit( gbServers, "leFtp" );

    gbServersLayout->addWidget( leFtp, 2, 1 );

    sbFtp = new KIntSpinBox( gbServers, "sbFtp" );
    sbFtp->setMaxValue( 65536 );

    gbServersLayout->addWidget( sbFtp, 2, 2 );

    sbHttps = new KIntSpinBox( gbServers, "sbHttps" );
    sbHttps->setMaxValue( 65536 );

    gbServersLayout->addWidget( sbHttps, 1, 2 );

    sbHttp = new KIntSpinBox( gbServers, "sbHttp" );
    sbHttp->setMaximumSize( TQSize( 32767, 32767 ) );
    sbHttp->setMaxValue( 65536 );

    gbServersLayout->addWidget( sbHttp, 0, 2 );
    spacer1 = new TQSpacerItem( 51, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    gbServersLayout->addItem( spacer1, 3, 0 );

    cbSameProxy = new TQCheckBox( gbServers, "cbSameProxy" );

    gbServersLayout->addMultiCellWidget( cbSameProxy, 3, 3, 1, 2 );

    pbCopyDown = new TQPushButton( gbServers, "pbCopyDown" );

    gbServersLayout->addWidget( pbCopyDown, 0, 3 );
    ManualProxyDlgUILayout->addWidget( gbServers );

    gbExceptions = new TQGroupBox( this, "gbExceptions" );
    gbExceptions->setColumnLayout(0, TQt::Vertical );
    gbExceptions->layout()->setSpacing( 6 );
    gbExceptions->layout()->setMargin( 11 );
    gbExceptionsLayout = new TQVBoxLayout( gbExceptions->layout() );
    gbExceptionsLayout->setAlignment( TQt::AlignTop );

    cbReverseProxy = new TQCheckBox( gbExceptions, "cbReverseProxy" );
    gbExceptionsLayout->addWidget( cbReverseProxy );

    layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout2"); 

    pbDeleteAll = new TQPushButton( gbExceptions, "pbDeleteAll" );
    pbDeleteAll->setEnabled( false );

    layout2->addWidget( pbDeleteAll, 3, 1 );

    pbDelete = new TQPushButton( gbExceptions, "pbDelete" );
    pbDelete->setEnabled( false );

    layout2->addWidget( pbDelete, 2, 1 );

    pbNew = new TQPushButton( gbExceptions, "pbNew" );

    layout2->addWidget( pbNew, 0, 1 );

    pbChange = new TQPushButton( gbExceptions, "pbChange" );
    pbChange->setEnabled( false );

    layout2->addWidget( pbChange, 1, 1 );
    spacer2 = new TQSpacerItem( 20, 114, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout2->addItem( spacer2, 4, 1 );

    lbExceptions = new TDEListBox( gbExceptions, "lbExceptions" );

    layout2->addMultiCellWidget( lbExceptions, 0, 4, 0, 0 );
    gbExceptionsLayout->addLayout( layout2 );
    ManualProxyDlgUILayout->addWidget( gbExceptions );
    languageChange();
    resize( TQSize(489, 438).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( leHttp, sbHttp );
    setTabOrder( sbHttp, leHttps );
    setTabOrder( leHttps, sbHttps );
    setTabOrder( sbHttps, leFtp );
    setTabOrder( leFtp, sbFtp );
    setTabOrder( sbFtp, cbSameProxy );
    setTabOrder( cbSameProxy, pbCopyDown );
    setTabOrder( pbCopyDown, cbReverseProxy );
    setTabOrder( cbReverseProxy, pbNew );
    setTabOrder( pbNew, pbChange );
    setTabOrder( pbChange, pbDelete );
    setTabOrder( pbDelete, pbDeleteAll );

    // buddies
    lbFtp->setBuddy( leFtp );
    lbHttps->setBuddy( leHttps );
    lbHttp->setBuddy( leHttp );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ManualProxyDlgUI::languageChange()
{
    gbServers->setTitle( tr2i18n( "Ser&vers" ) );
    lbFtp->setText( tr2i18n( "&FTP:" ) );
    lbHttps->setText( tr2i18n( "HTTP&S:" ) );
    lbHttp->setText( tr2i18n( "H&TTP:" ) );
    TQWhatsThis::add( leHttp, tr2i18n( "Enter the address of the HTTP proxy server." ) );
    TQWhatsThis::add( leHttps, tr2i18n( "Enter the address of the HTTPS proxy server." ) );
    TQWhatsThis::add( leFtp, tr2i18n( "Enter the address of the FTP proxy server." ) );
    TQWhatsThis::add( sbFtp, tr2i18n( "Enter the port number of the FTP proxy server. Default 8080. Another common value is 3128." ) );
    TQWhatsThis::add( sbHttps, tr2i18n( "Enter the port number of the HTTP proxy server. Default is 8080. Another common value is 3128." ) );
    TQWhatsThis::add( sbHttp, tr2i18n( "Enter the port number of the HTTP proxy server. Default is 8080. Another common value is 3128." ) );
    cbSameProxy->setText( tr2i18n( "&Use the same proxy server for all protocols" ) );
    pbCopyDown->setText( TQString::null );
    gbExceptions->setTitle( tr2i18n( "E&xceptions" ) );
    cbReverseProxy->setText( tr2i18n( "Use proxy only for entries in this list" ) );
    TQWhatsThis::add( cbReverseProxy, tr2i18n( "<qt>\n"
"Reverse the use of the exception list. Checking this box will result in the proxy servers being used only when the requested URL matches one of the addresses listed here.<p>This feature is useful if all you want or need is to use a proxy server  for a few specific sites.<p>If you have more complex requirements you might want to use a configuration script.\n"
"</qt>" ) );
    pbDeleteAll->setText( tr2i18n( "D&elete All" ) );
    TQWhatsThis::add( pbDeleteAll, tr2i18n( "Remove all proxy exception addresses from the list." ) );
    pbDelete->setText( tr2i18n( "De&lete" ) );
    TQWhatsThis::add( pbDelete, tr2i18n( "Remove the selected proxy exception address from the list." ) );
    pbNew->setText( tr2i18n( "&New..." ) );
    TQWhatsThis::add( pbNew, tr2i18n( "Add new proxy exception address to the list." ) );
    pbChange->setText( tr2i18n( "C&hange..." ) );
    TQWhatsThis::add( pbChange, tr2i18n( "Change the selected proxy exception address." ) );
}

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

TQMetaObject *ManualProxyDlgUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ManualProxyDlgUI( "ManualProxyDlgUI", &ManualProxyDlgUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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