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

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

#include "newkey.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "newkey.ui.h"

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

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    textLabel2 = new TQLabel( groupBox2, "textLabel2" );

    groupBox2Layout->addMultiCellWidget( textLabel2, 0, 0, 0, 1 );

    CBdefault = new TQCheckBox( groupBox2, "CBdefault" );

    groupBox2Layout->addMultiCellWidget( CBdefault, 6, 6, 0, 1 );

    LEfinger = new KLineEdit( groupBox2, "LEfinger" );
    LEfinger->setFrame( true );
    LEfinger->setReadOnly( true );

    groupBox2Layout->addMultiCellWidget( LEfinger, 5, 5, 0, 1 );

    textLabel6 = new TQLabel( groupBox2, "textLabel6" );

    groupBox2Layout->addMultiCellWidget( textLabel6, 4, 4, 0, 1 );

    textLabel3 = new TQLabel( groupBox2, "textLabel3" );

    groupBox2Layout->addWidget( textLabel3, 1, 0 );

    textLabel4 = new TQLabel( groupBox2, "textLabel4" );

    groupBox2Layout->addWidget( textLabel4, 2, 0 );

    textLabel5 = new TQLabel( groupBox2, "textLabel5" );

    groupBox2Layout->addWidget( textLabel5, 3, 0 );

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

    groupBox2Layout->addWidget( TLname, 1, 1 );

    TLemail = new TQLabel( groupBox2, "TLemail" );

    groupBox2Layout->addWidget( TLemail, 2, 1 );

    TLid = new TQLabel( groupBox2, "TLid" );

    groupBox2Layout->addWidget( TLid, 3, 1 );
    newKeyLayout->addWidget( groupBox2 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );

    groupBox1Layout->addMultiCellWidget( textLabel1, 0, 0, 0, 1 );

    CBprint = new TQCheckBox( groupBox1, "CBprint" );

    groupBox1Layout->addMultiCellWidget( CBprint, 2, 2, 0, 1 );

    CBsave = new TQCheckBox( groupBox1, "CBsave" );

    groupBox1Layout->addWidget( CBsave, 1, 0 );

    kURLRequester1 = new KURLRequester( groupBox1, "kURLRequester1" );
    kURLRequester1->setEnabled( false );

    groupBox1Layout->addWidget( kURLRequester1, 1, 1 );
    newKeyLayout->addWidget( groupBox1 );
    languageChange();
    resize( TQSize(625, 328).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( CBsave, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( CBsave_toggled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void newKey::languageChange()
{
    setCaption( tr2i18n( "New Key Pair Created" ) );
    groupBox2->setTitle( tr2i18n( "New Key Created" ) );
    textLabel2->setText( tr2i18n( "You have successfully created the following key:" ) );
    CBdefault->setText( tr2i18n( "Set as your default key" ) );
    TQWhatsThis::add( CBdefault, tr2i18n( "<qt><b>Set as your default key:</b><br />\n"
"			<p>Checking this option sets the newly created key pair as the default key pair.</p>\n"
"			</qt>" ) );
    textLabel6->setText( tr2i18n( "Fingerprint:" ) );
    textLabel3->setText( tr2i18n( "Name:" ) );
    textLabel4->setText( tr2i18n( "Email:" ) );
    textLabel5->setText( tr2i18n( "Key ID:" ) );
    TLname->setText( tr2i18n( "textLabel7" ) );
    TLemail->setText( tr2i18n( "textLabel8" ) );
    TLid->setText( tr2i18n( "textLabel10" ) );
    groupBox1->setTitle( tr2i18n( "Revocation Certificate" ) );
    textLabel1->setText( tr2i18n( "It is recommended to save or print a revocation certificate in case your key is compromised." ) );
    CBprint->setText( tr2i18n( "Print" ) );
    CBsave->setText( tr2i18n( "Save as:" ) );
}

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

TQMetaObject *newKey::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_newKey( "newKey", &newKey::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* newKey::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 TQUParameter param_slot_0[] = {
	{ "isOn", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"CBsave_toggled", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "CBsave_toggled(bool)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"newKey", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_newKey.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool newKey::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: CBsave_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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