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

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

#include "vpnauthentication.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqwidgetstack.h>
#include <ntqwidget.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    pushOK = new KPushButton( this, "pushOK" );
    pushOK->setDefault( true );

    AuthenticationDialogLayout->addWidget( pushOK, 4, 1 );

    chkStorePasswordsPermanent = new TQCheckBox( this, "chkStorePasswordsPermanent" );

    AuthenticationDialogLayout->addMultiCellWidget( chkStorePasswordsPermanent, 3, 3, 1, 2 );

    pushCancel = new KPushButton( this, "pushCancel" );

    AuthenticationDialogLayout->addWidget( pushCancel, 4, 2 );
    spacer1 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    AuthenticationDialogLayout->addItem( spacer1, 4, 0 );

    labelPixmap = new TQLabel( this, "labelPixmap" );
    labelPixmap->setScaledContents( false );
    labelPixmap->setAlignment( int( TQLabel::AlignTop ) );

    AuthenticationDialogLayout->addMultiCellWidget( labelPixmap, 1, 4, 0, 0 );
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    AuthenticationDialogLayout->addItem( spacer2, 2, 1 );

    widgetStack = new TQWidgetStack( this, "widgetStack" );
    widgetStack->setFrameShape( TQWidgetStack::NoFrame );

    WStackPage = new TQWidget( widgetStack, "WStackPage" );
    widgetStack->addWidget( WStackPage, 0 );

    AuthenticationDialogLayout->addMultiCellWidget( widgetStack, 1, 1, 1, 2 );
    languageChange();
    resize( TQSize(426, 224).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cancel() ) );
    connect( pushOK, TQ_SIGNAL( clicked() ), this, TQ_SLOT( ok() ) );

    // tab order
    setTabOrder( pushOK, pushCancel );
    setTabOrder( pushCancel, chkStorePasswordsPermanent );
    setTabOrder( chkStorePasswordsPermanent, widgetStack );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AuthenticationDialog::languageChange()
{
    setCaption( tr2i18n( "AuthenticationDialog" ) );
    pushOK->setText( tr2i18n( "OK" ) );
    chkStorePasswordsPermanent->setText( tr2i18n( "Save passwords permanent" ) );
    pushCancel->setText( tr2i18n( "Cancel" ) );
}

void AuthenticationDialog::ok()
{
    tqWarning( "AuthenticationDialog::ok(): Not implemented yet" );
}

void AuthenticationDialog::cancel()
{
    tqWarning( "AuthenticationDialog::cancel(): Not implemented yet" );
}

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

TQMetaObject *AuthenticationDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AuthenticationDialog( "AuthenticationDialog", &AuthenticationDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AuthenticationDialog::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 = {"languageChange", 0, 0 };
    static const TQUMethod slot_1 = {"ok", 0, 0 };
    static const TQUMethod slot_2 = {"cancel", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "ok()", &slot_1, TQMetaData::Protected },
	{ "cancel()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AuthenticationDialog", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AuthenticationDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool AuthenticationDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: ok(); break;
    case 2: cancel(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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