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

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

#include "keyproperties.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KeyProperties as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KeyProperties::KeyProperties( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KeyProperties" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    KeyPropertiesLayout = new TQGridLayout( this, 1, 1, 0, 6, "KeyPropertiesLayout"); 

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

    pLPhoto = new TQLabel( this, "pLPhoto" );
    pLPhoto->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, pLPhoto->sizePolicy().hasHeightForWidth() ) );
    pLPhoto->setMinimumSize( TQSize( 120, 140 ) );
    pLPhoto->setMaximumSize( TQSize( 32767, 140 ) );
    pLPhoto->setPaletteBackgroundColor( TQColor( 200, 200, 200 ) );
    pLPhoto->setFrameShape( TQLabel::Box );
    pLPhoto->setLineWidth( 2 );
    pLPhoto->setScaledContents( false );
    pLPhoto->setAlignment( int( TQLabel::AlignCenter ) );
    layout39->addWidget( pLPhoto );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout13->addWidget( textLabel1 );

    comboId = new KComboBox( false, this, "comboId" );
    layout13->addWidget( comboId );
    layout39->addLayout( layout13 );

    KeyPropertiesLayout->addMultiCellLayout( layout39, 0, 6, 3, 3 );

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

    cbDisabled = new TQCheckBox( this, "cbDisabled" );
    layout4->addWidget( cbDisabled );

    changeExp = new TQPushButton( this, "changeExp" );
    changeExp->setEnabled( true );
    changeExp->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, changeExp->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( changeExp );

    changePass = new TQPushButton( this, "changePass" );
    changePass->setEnabled( true );
    changePass->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, changePass->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( changePass );

    KeyPropertiesLayout->addMultiCellLayout( layout4, 7, 10, 3, 3 );

    labelLength = new TQLabel( this, "labelLength" );
    labelLength->setMargin( 0 );

    KeyPropertiesLayout->addWidget( labelLength, 9, 0 );

    labelCreation = new TQLabel( this, "labelCreation" );
    labelCreation->setMargin( 0 );

    KeyPropertiesLayout->addWidget( labelCreation, 3, 0 );

    labelID = new TQLabel( this, "labelID" );
    labelID->setMargin( 0 );

    KeyPropertiesLayout->addWidget( labelID, 7, 0 );

    tLTrust_2 = new TQLabel( this, "tLTrust_2" );
    tLTrust_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, tLTrust_2->sizePolicy().hasHeightForWidth() ) );
    tLTrust_2->setMargin( 0 );

    KeyPropertiesLayout->addWidget( tLTrust_2, 6, 0 );

    tLMail2_2 = new TQLabel( this, "tLMail2_2" );
    tLMail2_2->setMargin( 0 );

    KeyPropertiesLayout->addWidget( tLMail2_2, 1, 0 );

    labelAlgo = new TQLabel( this, "labelAlgo" );
    labelAlgo->setMargin( 0 );

    KeyPropertiesLayout->addWidget( labelAlgo, 8, 0 );

    labelExpiration = new TQLabel( this, "labelExpiration" );
    labelExpiration->setMargin( 0 );

    KeyPropertiesLayout->addWidget( labelExpiration, 4, 0 );

    txtTrust = new TQLabel( this, "txtTrust" );
    txtTrust->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, txtTrust->sizePolicy().hasHeightForWidth() ) );
    txtTrust->setMargin( 0 );

    KeyPropertiesLayout->addWidget( txtTrust, 5, 0 );

    tLComment2_2 = new TQLabel( this, "tLComment2_2" );
    tLComment2_2->setMargin( 0 );

    KeyPropertiesLayout->addWidget( tLComment2_2, 2, 0 );

    tLName2_2 = new TQLabel( this, "tLName2_2" );
    tLName2_2->setMargin( 0 );

    KeyPropertiesLayout->addWidget( tLName2_2, 0, 0 );

    lEFinger = new KLineEdit( this, "lEFinger" );
    lEFinger->setFrame( true );
    lEFinger->setReadOnly( true );

    KeyPropertiesLayout->addMultiCellWidget( lEFinger, 11, 11, 0, 3 );

    tLID_2 = new TQLabel( this, "tLID_2" );

    KeyPropertiesLayout->addMultiCellWidget( tLID_2, 10, 10, 0, 2 );

    tLComment = new KActiveLabel( this, "tLComment" );
    tLComment->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLComment->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLComment, 2, 2, 1, 2 );

    pixmapTrust = new TQLabel( this, "pixmapTrust" );
    pixmapTrust->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, pixmapTrust->sizePolicy().hasHeightForWidth() ) );
    pixmapTrust->setFrameShape( TQLabel::Box );
    pixmapTrust->setScaledContents( true );

    KeyPropertiesLayout->addWidget( pixmapTrust, 5, 2 );

    tLMail = new KActiveLabel( this, "tLMail" );
    tLMail->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLMail->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLMail, 1, 1, 1, 2 );

    tLID = new KActiveLabel( this, "tLID" );
    tLID->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLID->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLID, 7, 7, 1, 2 );

    tLExpiration = new KActiveLabel( this, "tLExpiration" );
    tLExpiration->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLExpiration->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLExpiration, 4, 4, 1, 2 );

    kCOwnerTrust = new KComboBox( false, this, "kCOwnerTrust" );

    KeyPropertiesLayout->addMultiCellWidget( kCOwnerTrust, 6, 6, 1, 2 );

    kLTrust = new TQLabel( this, "kLTrust" );
    kLTrust->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kLTrust->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addWidget( kLTrust, 5, 1 );

    tLLength = new TQLabel( this, "tLLength" );
    tLLength->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLLength->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLLength, 9, 9, 1, 2 );

    tLAlgo = new TQLabel( this, "tLAlgo" );
    tLAlgo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLAlgo->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLAlgo, 8, 8, 1, 2 );

    tLCreation = new KActiveLabel( this, "tLCreation" );
    tLCreation->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLCreation->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLCreation, 3, 3, 1, 2 );

    tLName = new KActiveLabel( this, "tLName" );
    tLName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, tLName->sizePolicy().hasHeightForWidth() ) );

    KeyPropertiesLayout->addMultiCellWidget( tLName, 0, 0, 1, 2 );
    languageChange();
    resize( TQSize(431, 350).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KeyProperties::languageChange()
{
    setCaption( tr2i18n( "Key Properties" ) );
    pLPhoto->setText( tr2i18n( "No Photo" ) );
    TQWhatsThis::add( pLPhoto, tr2i18n( "<qt><b>Photo:</b><br />\n"
"			<p>A photo can be included with a public key for extra security. The photo can be used as an additional method of authenticating the key. However, it should not be relied upon as the only form of authentication.</p>\n"
"			</qt>" ) );
    textLabel1->setText( tr2i18n( "Photo Id:" ) );
    cbDisabled->setText( tr2i18n( "Disable key" ) );
    changeExp->setText( tr2i18n( "Change Expiration..." ) );
    changePass->setText( tr2i18n( "Change Passphrase..." ) );
    labelLength->setText( tr2i18n( "Length:" ) );
    labelCreation->setText( tr2i18n( "Creation:" ) );
    labelID->setText( tr2i18n( "Key ID:" ) );
    tLTrust_2->setText( tr2i18n( "Owner trust:" ) );
    tLMail2_2->setText( tr2i18n( "Email:" ) );
    labelAlgo->setText( tr2i18n( "Algorithm:" ) );
    labelExpiration->setText( tr2i18n( "Expiration:" ) );
    txtTrust->setText( tr2i18n( "Trust:" ) );
    tLComment2_2->setText( tr2i18n( "Comment:" ) );
    tLName2_2->setText( tr2i18n( "Name:" ) );
    tLID_2->setText( tr2i18n( "Fingerprint:" ) );
    kCOwnerTrust->clear();
    kCOwnerTrust->insertItem( tr2i18n( "Don't Know" ) );
    kCOwnerTrust->insertItem( tr2i18n( "Do NOT Trust" ) );
    kCOwnerTrust->insertItem( tr2i18n( "Marginally" ) );
    kCOwnerTrust->insertItem( tr2i18n( "Fully" ) );
    kCOwnerTrust->insertItem( tr2i18n( "Ultimately" ) );
    kLTrust->setText( TQString::null );
    tLLength->setText( TQString::null );
    tLAlgo->setText( TQString::null );
}

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

TQMetaObject *KeyProperties::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KeyProperties( "KeyProperties", &KeyProperties::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KeyProperties::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 TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KeyProperties", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KeyProperties.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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