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

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

#include "page_autoconnectbase.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    KLVAutoConnect = new TDEListView( this, "KLVAutoConnect" );
    KLVAutoConnect->addColumn( tr2i18n( "Auto Connect List" ) );
    KLVAutoConnect->addColumn( tr2i18n( "Port/Key" ) );
    KLVAutoConnect->addColumn( tr2i18n( "Server Password" ) );
    KLVAutoConnect->addColumn( tr2i18n( "SSL" ) );
    KLVAutoConnect->setRootIsDecorated( true );
    KLVAutoConnect->setFullWidth( true );
    PageAutoConnectBaseLayout->addWidget( KLVAutoConnect );

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

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

    layout9 = new TQVBoxLayout( 0, 0, 6, "layout9"); 

    textLabelSever = new TQLabel( groupBox12, "textLabelSever" );
    layout9->addWidget( textLabelSever );

    ServerLE = new TQLineEdit( groupBox12, "ServerLE" );
    layout9->addWidget( ServerLE );
    layout13->addLayout( layout9 );

    layout12 = new TQVBoxLayout( 0, 0, 6, "layout12"); 

    textLabelPort = new TQLabel( groupBox12, "textLabelPort" );
    layout12->addWidget( textLabelPort );

    PortKI = new KIntNumInput( groupBox12, "PortKI" );
    layout12->addWidget( PortKI );
    layout13->addLayout( layout12 );

    layout11 = new TQVBoxLayout( 0, 0, 6, "layout11"); 

    textLabelPass = new TQLabel( groupBox12, "textLabelPass" );
    layout11->addWidget( textLabelPass );

    PassLE = new TQLineEdit( groupBox12, "PassLE" );
    layout11->addWidget( PassLE );
    layout13->addLayout( layout11 );

    layout15 = new TQVBoxLayout( 0, 0, 6, "layout15"); 

    textLabelSSL = new TQLabel( groupBox12, "textLabelSSL" );
    layout15->addWidget( textLabelSSL );

    sslCB = new TQCheckBox( groupBox12, "sslCB" );
    layout15->addWidget( sslCB );
    layout13->addLayout( layout15 );
    groupBox12Layout->addLayout( layout13 );

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

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    textLabelChan = new TQLabel( groupBox12, "textLabelChan" );
    layout3->addWidget( textLabelChan );

    ChannelLE = new TQLineEdit( groupBox12, "ChannelLE" );
    layout3->addWidget( ChannelLE );
    layout12_2->addLayout( layout3 );

    layout9_2 = new TQVBoxLayout( 0, 0, 6, "layout9_2"); 

    textLabelKey = new TQLabel( groupBox12, "textLabelKey" );
    layout9_2->addWidget( textLabelKey );

    KeyLE = new TQLineEdit( groupBox12, "KeyLE" );
    layout9_2->addWidget( KeyLE );
    layout12_2->addLayout( layout9_2 );
    groupBox12Layout->addLayout( layout12_2 );

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

    NewPB = new TQPushButton( groupBox12, "NewPB" );
    layout17->addWidget( NewPB );

    AddPB = new TQPushButton( groupBox12, "AddPB" );
    layout17->addWidget( AddPB );

    DeletePB = new TQPushButton( groupBox12, "DeletePB" );
    layout17->addWidget( DeletePB );
    groupBox12Layout->addLayout( layout17 );
    PageAutoConnectBaseLayout->addWidget( groupBox12 );
    languageChange();
    resize( TQSize(551, 460).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( ServerLE, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( item_changed() ) );
    connect( PortKI, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( item_changed() ) );
    connect( PassLE, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( item_changed() ) );
    connect( sslCB, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( item_changed() ) );
    connect( ChannelLE, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( item_changed() ) );
    connect( KeyLE, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( item_changed() ) );
    connect( NewPB, TQ_SIGNAL( pressed() ), this, TQ_SLOT( new_pressed() ) );
    connect( AddPB, TQ_SIGNAL( pressed() ), this, TQ_SLOT( add_pressed() ) );
    connect( DeletePB, TQ_SIGNAL( pressed() ), this, TQ_SLOT( delete_pressed() ) );
    connect( KLVAutoConnect, TQ_SIGNAL( clicked(TQListViewItem*) ), this, TQ_SLOT( kvl_clicked(TQListViewItem*) ) );

    // tab order
    setTabOrder( KLVAutoConnect, ServerLE );
    setTabOrder( ServerLE, PortKI );
    setTabOrder( PortKI, PassLE );
    setTabOrder( PassLE, sslCB );
    setTabOrder( sslCB, ChannelLE );
    setTabOrder( ChannelLE, KeyLE );
    setTabOrder( KeyLE, NewPB );
    setTabOrder( NewPB, AddPB );
    setTabOrder( AddPB, DeletePB );

    // buddies
    textLabelPort->setBuddy( PortKI );
    textLabelSSL->setBuddy( PortKI );
    textLabelChan->setBuddy( ChannelLE );
    textLabelKey->setBuddy( KeyLE );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PageAutoConnectBase::languageChange()
{
    setCaption( tr2i18n( "Auto Connect" ) );
    KLVAutoConnect->header()->setLabel( 0, tr2i18n( "Auto Connect List" ) );
    KLVAutoConnect->header()->setLabel( 1, tr2i18n( "Port/Key" ) );
    KLVAutoConnect->header()->setLabel( 2, tr2i18n( "Server Password" ) );
    KLVAutoConnect->header()->setLabel( 3, tr2i18n( "SSL" ) );
    groupBox12->setTitle( tr2i18n( "Auto Connect Setup" ) );
    textLabelSever->setText( tr2i18n( "Server:" ) );
    textLabelPort->setText( tr2i18n( "&Port:" ) );
    textLabelPass->setText( tr2i18n( "Server password:" ) );
    textLabelSSL->setText( TQString::null );
    sslCB->setText( tr2i18n( "Use SS&L" ) );
    textLabelChan->setText( tr2i18n( "&Channel:" ) );
    textLabelKey->setText( tr2i18n( "&Key:" ) );
    NewPB->setText( tr2i18n( "&New" ) );
    AddPB->setText( tr2i18n( "&Add" ) );
    DeletePB->setText( tr2i18n( "&Delete" ) );
}

void PageAutoConnectBase::item_changed()
{
    tqWarning( "PageAutoConnectBase::item_changed(): Not implemented yet" );
}

void PageAutoConnectBase::new_pressed()
{
    tqWarning( "PageAutoConnectBase::new_pressed(): Not implemented yet" );
}

void PageAutoConnectBase::add_pressed()
{
    tqWarning( "PageAutoConnectBase::add_pressed(): Not implemented yet" );
}

void PageAutoConnectBase::delete_pressed()
{
    tqWarning( "PageAutoConnectBase::delete_pressed(): Not implemented yet" );
}

void PageAutoConnectBase::KLVAutoConnect_clicked(TQListViewItem*)
{
    tqWarning( "PageAutoConnectBase::KLVAutoConnect_clicked(TQListViewItem*): Not implemented yet" );
}

void PageAutoConnectBase::kcl_clicked(TQListViewItem*)
{
    tqWarning( "PageAutoConnectBase::kcl_clicked(TQListViewItem*): Not implemented yet" );
}

void PageAutoConnectBase::kvl_clicked(TQListViewItem*)
{
    tqWarning( "PageAutoConnectBase::kvl_clicked(TQListViewItem*): Not implemented yet" );
}

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

TQMetaObject *PageAutoConnectBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PageAutoConnectBase( "PageAutoConnectBase", &PageAutoConnectBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PageAutoConnectBase::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 = {"item_changed", 0, 0 };
    static const TQUMethod slot_1 = {"new_pressed", 0, 0 };
    static const TQUMethod slot_2 = {"add_pressed", 0, 0 };
    static const TQUMethod slot_3 = {"delete_pressed", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"KLVAutoConnect_clicked", 1, param_slot_4 };
    static const TQUParameter param_slot_5[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_5 = {"kcl_clicked", 1, param_slot_5 };
    static const TQUParameter param_slot_6[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"kvl_clicked", 1, param_slot_6 };
    static const TQUMethod slot_7 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "item_changed()", &slot_0, TQMetaData::Public },
	{ "new_pressed()", &slot_1, TQMetaData::Public },
	{ "add_pressed()", &slot_2, TQMetaData::Public },
	{ "delete_pressed()", &slot_3, TQMetaData::Public },
	{ "KLVAutoConnect_clicked(TQListViewItem*)", &slot_4, TQMetaData::Public },
	{ "kcl_clicked(TQListViewItem*)", &slot_5, TQMetaData::Public },
	{ "kvl_clicked(TQListViewItem*)", &slot_6, TQMetaData::Public },
	{ "languageChange()", &slot_7, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PageAutoConnectBase", parentObject,
	slot_tbl, 8,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PageAutoConnectBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PageAutoConnectBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: item_changed(); break;
    case 1: new_pressed(); break;
    case 2: add_pressed(); break;
    case 3: delete_pressed(); break;
    case 4: KLVAutoConnect_clicked((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 5: kcl_clicked((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 6: kvl_clicked((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 7: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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