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

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

#include "paranoia.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "paranoia.ui.h"

/*
 *  Constructs a FilterTable 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.
 */
FilterTable::FilterTable( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "FilterTable" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( true );
    FilterTableLayout = new TQGridLayout( this, 1, 1, 11, 6, "FilterTableLayout"); 

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

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

    FilterRules = new TQListView( Widget8, "FilterRules" );
    FilterRules->addColumn( TQString::null );
    FilterRules->addColumn( tr2i18n( "Description" ) );
    FilterRules->addColumn( tr2i18n( "Firewall Rule" ) );
    FilterRules->setSelectionMode( TQListView::Extended );
    FilterRules->setAllColumnsShowFocus( true );
    FilterRules->setResizeMode( TQListView::AllColumns );

    Widget8Layout->addMultiCellWidget( FilterRules, 2, 2, 0, 2 );

    pushAdd = new TQPushButton( Widget8, "pushAdd" );

    Widget8Layout->addWidget( pushAdd, 4, 2 );

    Description = new TQLineEdit( Widget8, "Description" );

    Widget8Layout->addWidget( Description, 3, 1 );

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

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

    textLabel1_3 = new TQLabel( Widget8, "textLabel1_3" );

    Widget8Layout->addWidget( textLabel1_3, 4, 0 );

    Filter = new TQLineEdit( Widget8, "Filter" );

    Widget8Layout->addWidget( Filter, 4, 1 );

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

    Widget8Layout->addMultiCellWidget( textLabel1_2, 1, 1, 0, 2 );

    kcfg_DNSFailSafeParanoia = new TQCheckBox( Widget8, "kcfg_DNSFailSafeParanoia" );

    Widget8Layout->addMultiCellWidget( kcfg_DNSFailSafeParanoia, 0, 0, 0, 2 );
    tabWidget->insertTab( Widget8, TQString::fromLatin1("") );

    TabPage = new TQWidget( tabWidget, "TabPage" );
    TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); 

    textLabel1_3_2_3 = new TQLabel( TabPage, "textLabel1_3_2_3" );

    TabPageLayout->addWidget( textLabel1_3_2_3, 3, 0 );

    textLabel1_3_4 = new TQLabel( TabPage, "textLabel1_3_4" );

    TabPageLayout->addWidget( textLabel1_3_4, 4, 0 );

    SystemFilterRules = new TQListView( TabPage, "SystemFilterRules" );
    SystemFilterRules->addColumn( TQString::null );
    SystemFilterRules->addColumn( tr2i18n( "Description" ) );
    SystemFilterRules->addColumn( tr2i18n( "Firewall Rule" ) );
    SystemFilterRules->setSelectionMode( TQListView::Extended );
    SystemFilterRules->setAllColumnsShowFocus( true );
    SystemFilterRules->setResizeMode( TQListView::AllColumns );

    TabPageLayout->addMultiCellWidget( SystemFilterRules, 2, 2, 0, 2 );

    kcfg_SystemFailSafeParanoia = new TQCheckBox( TabPage, "kcfg_SystemFailSafeParanoia" );
    kcfg_SystemFailSafeParanoia->setChecked( true );

    TabPageLayout->addMultiCellWidget( kcfg_SystemFailSafeParanoia, 0, 0, 0, 2 );

    textLabel1_2_3 = new TQLabel( TabPage, "textLabel1_2_3" );

    TabPageLayout->addMultiCellWidget( textLabel1_2_3, 1, 1, 0, 2 );

    pushAdd_Sys = new TQPushButton( TabPage, "pushAdd_Sys" );

    TabPageLayout->addWidget( pushAdd_Sys, 4, 2 );

    SystemDescription = new TQLineEdit( TabPage, "SystemDescription" );

    TabPageLayout->addWidget( SystemDescription, 3, 1 );

    SystemFilter = new TQLineEdit( TabPage, "SystemFilter" );

    TabPageLayout->addWidget( SystemFilter, 4, 1 );
    tabWidget->insertTab( TabPage, TQString::fromLatin1("") );

    FilterTableLayout->addWidget( tabWidget, 0, 0 );
    languageChange();
    resize( TQSize(531, 411).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( pushAdd_clicked() ) );
    connect( pushAdd_Sys, TQ_SIGNAL( clicked() ), this, TQ_SLOT( pushAdd_Sys_clicked() ) );
    connect( FilterRules, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( FilterRules_contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    connect( SystemFilterRules, TQ_SIGNAL( contextMenuRequested(TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( SystemFilterRules_contextMenuRequested(TQListViewItem*,const TQPoint&,int) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FilterTable::languageChange()
{
    setCaption( tr2i18n( "MyDialog1" ) );
    FilterRules->header()->setLabel( 0, TQString::null );
    FilterRules->header()->setLabel( 1, tr2i18n( "Description" ) );
    FilterRules->header()->setLabel( 2, tr2i18n( "Firewall Rule" ) );
    pushAdd->setText( tr2i18n( "&Add" ) );
    textLabel1_3_2->setText( tr2i18n( "Description:" ) );
    textLabel1_3->setText( tr2i18n( "Rule:" ) );
    textLabel1_2->setText( tr2i18n( "This is a list of filter rules that will route all DNS requests to Tor:" ) );
    kcfg_DNSFailSafeParanoia->setText( tr2i18n( "Use different Tor circuits for every connection while in this mode." ) );
    tabWidget->changeTab( Widget8, tr2i18n( "DNS FailSafe" ) );
    textLabel1_3_2_3->setText( tr2i18n( "Description:" ) );
    textLabel1_3_4->setText( tr2i18n( "Rule:" ) );
    SystemFilterRules->header()->setLabel( 0, TQString::null );
    SystemFilterRules->header()->setLabel( 1, tr2i18n( "Description" ) );
    SystemFilterRules->header()->setLabel( 2, tr2i18n( "Firewall Rule" ) );
    kcfg_SystemFailSafeParanoia->setText( tr2i18n( "Use different Tor circuits for every connection while in this mode." ) );
    textLabel1_2_3->setText( tr2i18n( "This is a list of filter rules that will route certain system traffic to Tor:" ) );
    pushAdd_Sys->setText( tr2i18n( "&Add" ) );
    tabWidget->changeTab( TabPage, tr2i18n( "System FailSafe" ) );
}

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

TQMetaObject *FilterTable::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FilterTable( "FilterTable", &FilterTable::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* FilterTable::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 = {"pushAdd_Sys_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 = {"FilterRules_contextMenuRequested", 3, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 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_3 = {"SystemFilterRules_contextMenuRequested", 3, param_slot_3 };
    static const TQUMethod slot_4 = {"slotDeleteEntry", 0, 0 };
    static const TQUMethod slot_5 = {"slotToggleEntry", 0, 0 };
    static const TQUMethod slot_6 = {"slotDeleteSystemEntry", 0, 0 };
    static const TQUMethod slot_7 = {"slotToggleSystemEntry", 0, 0 };
    static const TQUMethod slot_8 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "pushAdd_clicked()", &slot_0, TQMetaData::Public },
	{ "pushAdd_Sys_clicked()", &slot_1, TQMetaData::Public },
	{ "FilterRules_contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_2, TQMetaData::Public },
	{ "SystemFilterRules_contextMenuRequested(TQListViewItem*,const TQPoint&,int)", &slot_3, TQMetaData::Public },
	{ "slotDeleteEntry()", &slot_4, TQMetaData::Public },
	{ "slotToggleEntry()", &slot_5, TQMetaData::Public },
	{ "slotDeleteSystemEntry()", &slot_6, TQMetaData::Public },
	{ "slotToggleSystemEntry()", &slot_7, TQMetaData::Public },
	{ "languageChange()", &slot_8, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"FilterTable", parentObject,
	slot_tbl, 9,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_FilterTable.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool FilterTable::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: pushAdd_clicked(); break;
    case 1: pushAdd_Sys_clicked(); break;
    case 2: FilterRules_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: SystemFilterRules_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 4: slotDeleteEntry(); break;
    case 5: slotToggleEntry(); break;
    case 6: slotDeleteSystemEntry(); break;
    case 7: slotToggleSystemEntry(); break;
    case 8: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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