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

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

#include "running.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <kcombobox.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqspinbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "running.ui.h"

/*
 *  Constructs a Running as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
Running::Running( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Running" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( true );
    RunningLayout = new TQGridLayout( this, 1, 1, 11, 6, "RunningLayout"); 

    tabWidget = new TQTabWidget( this, "tabWidget" );

    Widget8 = new TQWidget( tabWidget, "Widget8" );
    Widget8Layout = new TQGridLayout( Widget8, 1, 1, 11, 6, "Widget8Layout"); 

    I_m_ = new TQGroupBox( Widget8, "I_m_" );
    I_m_->setEnabled( false );
    I_m_->setColumnLayout(0, TQt::Vertical );
    I_m_->layout()->setSpacing( 6 );
    I_m_->layout()->setMargin( 11 );
    I_m_Layout = new TQGridLayout( I_m_->layout() );
    I_m_Layout->setAlignment( TQt::AlignTop );

    textLabel1_3_2 = new TQLabel( I_m_, "textLabel1_3_2" );

    I_m_Layout->addMultiCellWidget( textLabel1_3_2, 0, 0, 1, 4 );

    kcfg_DirServer = new TQLineEdit( I_m_, "kcfg_DirServer" );

    I_m_Layout->addWidget( kcfg_DirServer, 1, 2 );
    spacer3 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    I_m_Layout->addItem( spacer3, 0, 0 );
    spacer4 = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    I_m_Layout->addItem( spacer4, 0, 5 );
    spacer1 = new TQSpacerItem( 120, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    I_m_Layout->addMultiCell( spacer1, 1, 1, 0, 1 );
    spacer2 = new TQSpacerItem( 130, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    I_m_Layout->addMultiCell( spacer2, 1, 1, 4, 5 );

    Widget8Layout->addWidget( I_m_, 3, 0 );

    NormalOptions = new TQGroupBox( Widget8, "NormalOptions" );
    NormalOptions->setEnabled( false );
    NormalOptions->setColumnLayout(0, TQt::Vertical );
    NormalOptions->layout()->setSpacing( 6 );
    NormalOptions->layout()->setMargin( 11 );
    NormalOptionsLayout = new TQGridLayout( NormalOptions->layout() );
    NormalOptionsLayout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( NormalOptions, "textLabel1" );

    NormalOptionsLayout->addWidget( textLabel1, 0, 0 );

    pushButton10 = new TQPushButton( NormalOptions, "pushButton10" );

    NormalOptionsLayout->addWidget( pushButton10, 0, 2 );

    pushButton10_2 = new TQPushButton( NormalOptions, "pushButton10_2" );

    NormalOptionsLayout->addWidget( pushButton10_2, 0, 8 );

    textLabel1_2 = new TQLabel( NormalOptions, "textLabel1_2" );

    NormalOptionsLayout->addMultiCellWidget( textLabel1_2, 0, 0, 3, 6 );

    textLabel4 = new TQLabel( NormalOptions, "textLabel4" );

    NormalOptionsLayout->addMultiCellWidget( textLabel4, 1, 1, 0, 4 );

    kcfg_User = new TQLineEdit( NormalOptions, "kcfg_User" );

    NormalOptionsLayout->addWidget( kcfg_User, 0, 1 );

    kcfg_Group = new TQLineEdit( NormalOptions, "kcfg_Group" );

    NormalOptionsLayout->addWidget( kcfg_Group, 0, 7 );

    kcfg_DataDirectory = new KURLComboRequester( NormalOptions, "kcfg_DataDirectory" );
    kcfg_DataDirectory->setMode( 2 );

    NormalOptionsLayout->addMultiCellWidget( kcfg_DataDirectory, 1, 1, 5, 8 );

    Widget8Layout->addWidget( NormalOptions, 2, 0 );

    kcfg_DefaultRunningNormalOptions = new TQCheckBox( Widget8, "kcfg_DefaultRunningNormalOptions" );
    kcfg_DefaultRunningNormalOptions->setChecked( true );

    Widget8Layout->addWidget( kcfg_DefaultRunningNormalOptions, 1, 0 );

    Authentication = new TQGroupBox( Widget8, "Authentication" );
    Authentication->setColumnLayout(0, TQt::Vertical );
    Authentication->layout()->setSpacing( 6 );
    Authentication->layout()->setMargin( 11 );
    AuthenticationLayout = new TQGridLayout( Authentication->layout() );
    AuthenticationLayout->setAlignment( TQt::AlignTop );

    textLabel1_4 = new TQLabel( Authentication, "textLabel1_4" );

    AuthenticationLayout->addWidget( textLabel1_4, 0, 0 );

    kcfg_CookieAuthentication = new TQCheckBox( Authentication, "kcfg_CookieAuthentication" );

    AuthenticationLayout->addMultiCellWidget( kcfg_CookieAuthentication, 1, 1, 0, 1 );

    kcfg_HashedControlPassword = new TQLineEdit( Authentication, "kcfg_HashedControlPassword" );

    AuthenticationLayout->addWidget( kcfg_HashedControlPassword, 0, 1 );

    kcfg_GenerateRandomPassword = new TQCheckBox( Authentication, "kcfg_GenerateRandomPassword" );
    kcfg_GenerateRandomPassword->setChecked( true );

    AuthenticationLayout->addMultiCellWidget( kcfg_GenerateRandomPassword, 2, 2, 0, 1 );

    Widget8Layout->addWidget( Authentication, 0, 0 );
    tabWidget->insertTab( Widget8, TQString::fromLatin1("") );

    Widget9 = new TQWidget( tabWidget, "Widget9" );
    Widget9Layout = new TQGridLayout( Widget9, 1, 1, 11, 6, "Widget9Layout"); 

    groupBox5 = new TQGroupBox( Widget9, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQGridLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

    textLabel3 = new TQLabel( groupBox5, "textLabel3" );

    groupBox5Layout->addMultiCellWidget( textLabel3, 1, 2, 2, 2 );

    textLabel2 = new TQLabel( groupBox5, "textLabel2" );

    groupBox5Layout->addMultiCellWidget( textLabel2, 1, 2, 0, 0 );

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

    groupBox5Layout->addWidget( PushAdd, 2, 6 );

    SOCKSBindAddressMany = new TQListView( groupBox5, "SOCKSBindAddressMany" );
    SOCKSBindAddressMany->addColumn( tr2i18n( "IP Address        " ) );
    SOCKSBindAddressMany->header()->setResizeEnabled( false, SOCKSBindAddressMany->header()->count() - 1 );
    SOCKSBindAddressMany->addColumn( tr2i18n( "Port" ) );
    SOCKSBindAddressMany->setSelectionMode( TQListView::Extended );
    SOCKSBindAddressMany->setAllColumnsShowFocus( true );

    groupBox5Layout->addMultiCellWidget( SOCKSBindAddressMany, 0, 1, 4, 6 );

    Address = new TQLineEdit( groupBox5, "Address" );

    groupBox5Layout->addWidget( Address, 2, 4 );

    kcfg_SOCKSBindAddressHost = new TQLineEdit( groupBox5, "kcfg_SOCKSBindAddressHost" );

    groupBox5Layout->addMultiCellWidget( kcfg_SOCKSBindAddressHost, 1, 2, 1, 1 );

    kcfg_SOCKSBindAddressPort = new TQSpinBox( groupBox5, "kcfg_SOCKSBindAddressPort" );
    kcfg_SOCKSBindAddressPort->setMaxValue( 65535 );

    groupBox5Layout->addMultiCellWidget( kcfg_SOCKSBindAddressPort, 1, 2, 3, 3 );

    Port = new TQSpinBox( groupBox5, "Port" );
    Port->setMaxValue( 65535 );

    groupBox5Layout->addWidget( Port, 2, 5 );

    textLabel7_2 = new TQLabel( groupBox5, "textLabel7_2" );

    groupBox5Layout->addMultiCellWidget( textLabel7_2, 0, 0, 0, 3 );

    Widget9Layout->addWidget( groupBox5, 0, 0 );

    groupBox6 = new TQGroupBox( Widget9, "groupBox6" );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQGridLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    SOCKSPolicy = new TQListView( groupBox6, "SOCKSPolicy" );
    SOCKSPolicy->addColumn( tr2i18n( "Policy" ) );
    SOCKSPolicy->addColumn( tr2i18n( "IP Address        " ) );
    SOCKSPolicy->header()->setResizeEnabled( false, SOCKSPolicy->header()->count() - 1 );
    SOCKSPolicy->addColumn( tr2i18n( "Port" ) );
    SOCKSPolicy->setSelectionMode( TQListView::Extended );
    SOCKSPolicy->setAllColumnsShowFocus( true );

    groupBox6Layout->addMultiCellWidget( SOCKSPolicy, 0, 0, 1, 4 );

    SocksPort = new TQSpinBox( groupBox6, "SocksPort" );
    SocksPort->setMaxValue( 65535 );

    groupBox6Layout->addWidget( SocksPort, 1, 3 );

    PushAdd2 = new TQPushButton( groupBox6, "PushAdd2" );

    groupBox6Layout->addWidget( PushAdd2, 1, 4 );

    SocksAddress = new TQLineEdit( groupBox6, "SocksAddress" );

    groupBox6Layout->addWidget( SocksAddress, 1, 2 );

    Policy = new TQComboBox( false, groupBox6, "Policy" );

    groupBox6Layout->addWidget( Policy, 1, 1 );
    spacer7 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox6Layout->addItem( spacer7, 2, 2 );

    textLabel5 = new TQLabel( groupBox6, "textLabel5" );

    groupBox6Layout->addMultiCellWidget( textLabel5, 0, 1, 0, 0 );

    Widget9Layout->addWidget( groupBox6, 1, 0 );
    tabWidget->insertTab( Widget9, TQString::fromLatin1("") );

    RunningLayout->addWidget( tabWidget, 0, 0 );
    languageChange();
    resize( TQSize(607, 560).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( SOCKSPolicy, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( SOCKSPolicy_contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    connect( SOCKSBindAddressMany, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( SOCKSBindAddressMany_contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    connect( PushAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( PushAdd_clicked() ) );
    connect( PushAdd2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( PushAdd2_clicked() ) );
    connect( kcfg_DefaultRunningNormalOptions, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( kcfg_DefaultRunningNormalOptions_toggled(bool) ) );
    connect( kcfg_HashedControlPassword, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( kcfg_HashedControlPassword_textChanged(const TQString&) ) );
    connect( kcfg_CookieAuthentication, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( kcfg_CookieAuthentication_toggled(bool) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Running::languageChange()
{
    setCaption( tr2i18n( "MyDialog1" ) );
    I_m_->setTitle( tr2i18n( "I'm Special" ) );
    textLabel1_3_2->setText( tr2i18n( "<p>Use this special authoritative server for fetching the list of trusted servers. I hereby acknowledge that using such a server makes me more identifiable because I 'm not trusting the same servers as everyone else." ) );
    NormalOptions->setTitle( tr2i18n( "I'm Normal" ) );
    textLabel1->setText( tr2i18n( "Run as User" ) );
    pushButton10->setText( tr2i18n( ".." ) );
    pushButton10_2->setText( tr2i18n( ".." ) );
    textLabel1_2->setText( tr2i18n( "or as Group" ) );
    textLabel4->setText( tr2i18n( "Use this directory for temporary runtime storage: " ) );
    kcfg_DefaultRunningNormalOptions->setText( tr2i18n( "Let Tor look after m&y normal settings." ) );
    Authentication->setTitle( tr2i18n( "Authentication" ) );
    textLabel1_4->setText( tr2i18n( "Use this password to control Tor:" ) );
    kcfg_CookieAuthentication->setText( tr2i18n( "&Authenticate using cookie created by Tor" ) );
    kcfg_GenerateRandomPassword->setText( tr2i18n( "If No Authentication Set, Generate Random Password to Protect Session" ) );
    tabWidget->changeTab( Widget8, tr2i18n( "Startin&g Tor" ) );
    groupBox5->setTitle( tr2i18n( "Listen For Connecting Applications" ) );
    textLabel3->setText( tr2i18n( "Port:" ) );
    textLabel2->setText( tr2i18n( "IP:" ) );
    PushAdd->setText( tr2i18n( "O&K" ) );
    SOCKSBindAddressMany->header()->setLabel( 0, tr2i18n( "IP Address        " ) );
    SOCKSBindAddressMany->header()->setLabel( 1, tr2i18n( "Port" ) );
    textLabel7_2->setText( tr2i18n( "<p> If you're feeling fancy you can add a list of addresses and ports you want Tor to listen to applications on. But you're probably not doing anything fancy, so you'll just want to leave it at:" ) );
    groupBox6->setTitle( tr2i18n( "Other Computers That Can Use My Tor" ) );
    SOCKSPolicy->header()->setLabel( 0, tr2i18n( "Policy" ) );
    SOCKSPolicy->header()->setLabel( 1, tr2i18n( "IP Address        " ) );
    SOCKSPolicy->header()->setLabel( 2, tr2i18n( "Port" ) );
    PushAdd2->setText( tr2i18n( "OK" ) );
    Policy->clear();
    Policy->insertItem( tr2i18n( "accept" ) );
    Policy->insertItem( tr2i18n( "reject" ) );
    textLabel5->setText( tr2i18n( "<p> This is a list of rules stating who can and can't use your tor to connect to the internet." ) );
    tabWidget->changeTab( Widget9, tr2i18n( "&Using Tor" ) );
}

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

TQMetaObject *Running::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Running( "Running", &Running::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* Running::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"PushAdd_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"PushAdd2_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 = {"SOCKSBindAddressMany_contextMenuRequested", 3, param_slot_2 };
    static const TQUMethod slot_3 = {"slotDeleteEntry", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ 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_4 = {"SOCKSPolicy_contextMenuRequested", 3, param_slot_4 };
    static const TQUMethod slot_5 = {"slotDeletePolicyEntry", 0, 0 };
    static const TQUParameter param_slot_6[] = {
	{ "state", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"kcfg_DefaultRunningNormalOptions_toggled", 1, param_slot_6 };
    static const TQUParameter param_slot_7[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_7 = {"kcfg_CookieAuthentication_toggled", 1, param_slot_7 };
    static const TQUParameter param_slot_8[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_8 = {"kcfg_HashedControlPassword_textChanged", 1, param_slot_8 };
    static const TQUMethod slot_9 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "PushAdd_clicked()", &slot_0, TQMetaData::Public },
	{ "PushAdd2_clicked()", &slot_1, TQMetaData::Public },
	{ "SOCKSBindAddressMany_contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_2, TQMetaData::Public },
	{ "slotDeleteEntry()", &slot_3, TQMetaData::Public },
	{ "SOCKSPolicy_contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_4, TQMetaData::Public },
	{ "slotDeletePolicyEntry()", &slot_5, TQMetaData::Public },
	{ "kcfg_DefaultRunningNormalOptions_toggled(bool)", &slot_6, TQMetaData::Public },
	{ "kcfg_CookieAuthentication_toggled(bool)", &slot_7, TQMetaData::Public },
	{ "kcfg_HashedControlPassword_textChanged(const TQString&)", &slot_8, TQMetaData::Public },
	{ "languageChange()", &slot_9, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"Running", parentObject,
	slot_tbl, 10,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_Running.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool Running::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: PushAdd_clicked(); break;
    case 1: PushAdd2_clicked(); break;
    case 2: SOCKSBindAddressMany_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: SOCKSPolicy_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 5: slotDeletePolicyEntry(); break;
    case 6: kcfg_DefaultRunningNormalOptions_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 7: kcfg_CookieAuthentication_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 8: kcfg_HashedControlPassword_textChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 9: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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