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

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

#include "passwordlayout.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    buttonGroup = new TQButtonGroup( this, "buttonGroup" );
    buttonGroup->setLineWidth( 0 );
    buttonGroup->setColumnLayout(0, TQt::Vertical );
    buttonGroup->layout()->setSpacing( KDialog::spacingHint() );
    buttonGroup->layout()->setMargin( 0 );
    buttonGroupLayout = new TQVBoxLayout( buttonGroup->layout() );
    buttonGroupLayout->setAlignment( TQt::AlignTop );

    noPasswordRadioButton = new TQRadioButton( buttonGroup, "noPasswordRadioButton" );
    buttonGroupLayout->addWidget( noPasswordRadioButton );

    passwordRadioButton = new TQRadioButton( buttonGroup, "passwordRadioButton" );
    buttonGroupLayout->addWidget( passwordRadioButton );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 

    publicPrivateRadioButton = new TQRadioButton( buttonGroup, "publicPrivateRadioButton" );
    publicPrivateRadioButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, publicPrivateRadioButton->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( publicPrivateRadioButton );

    keyCombo = new TQComboBox( false, buttonGroup, "keyCombo" );
    layout2->addWidget( keyCombo );
    buttonGroupLayout->addLayout( layout2 );
    PasswordLayoutLayout->addWidget( buttonGroup );
    spacer = new TQSpacerItem( 20, 6, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PasswordLayoutLayout->addItem( spacer );
    languageChange();
    resize( TQSize(314, 69).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PasswordLayout::languageChange()
{
    setCaption( tr2i18n( "Password Protection" ) );
    buttonGroup->setTitle( TQString::null );
    noPasswordRadioButton->setText( tr2i18n( "&No protection" ) );
    passwordRadioButton->setText( tr2i18n( "Protect basket with a &password" ) );
    publicPrivateRadioButton->setText( tr2i18n( "Protect basket with private &key:" ) );
}

void PasswordLayout::changeKey()
{
    tqWarning( "PasswordLayout::changeKey(): Not implemented yet" );
}

void PasswordLayout::clearKey()
{
    tqWarning( "PasswordLayout::clearKey(): Not implemented yet" );
}

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

TQMetaObject *PasswordLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PasswordLayout( "PasswordLayout", &PasswordLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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