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

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

#include "kgpgrevokewidget.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kgpgrevokewidget.ui.h"

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

    keyID = new TQLabel( this, "keyID" );
    keyID->setAlignment( int( TQLabel::AlignVCenter ) );

    KgpgRevokeWidgetLayout->addWidget( keyID, 0, 1 );

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

    KgpgRevokeWidgetLayout->addWidget( cbPrint, 5, 0 );

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

    KgpgRevokeWidgetLayout->addWidget( textLabel1, 0, 0 );

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

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

    comboBox1 = new TQComboBox( false, this, "comboBox1" );

    KgpgRevokeWidgetLayout->addWidget( comboBox1, 1, 1 );

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

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

    cbSave = new TQCheckBox( this, "cbSave" );
    cbSave->setChecked( true );

    KgpgRevokeWidgetLayout->addWidget( cbSave, 4, 0 );

    cbImport = new TQCheckBox( this, "cbImport" );
    cbImport->setEnabled( true );

    KgpgRevokeWidgetLayout->addWidget( cbImport, 7, 0 );

    textDescription = new TQTextEdit( this, "textDescription" );

    KgpgRevokeWidgetLayout->addMultiCellWidget( textDescription, 3, 3, 0, 1 );

    kURLRequester1 = new KURLRequester( this, "kURLRequester1" );

    KgpgRevokeWidgetLayout->addWidget( kURLRequester1, 4, 1 );
    languageChange();
    resize( TQSize(459, 230).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cbSave, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( cbSave_toggled(bool) ) );

    // tab order
    setTabOrder( comboBox1, textDescription );
    setTabOrder( textDescription, cbSave );
    setTabOrder( cbSave, cbPrint );
    setTabOrder( cbPrint, cbImport );
    setTabOrder( cbImport, kURLRequester1 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KgpgRevokeWidget::languageChange()
{
    keyID->setText( tr2i18n( "key id" ) );
    cbPrint->setText( tr2i18n( "Print certificate" ) );
    textLabel1->setText( tr2i18n( "Create revocation certificate for" ) );
    textLabel4->setText( tr2i18n( "Description:" ) );
    comboBox1->clear();
    comboBox1->insertItem( tr2i18n( "No Reason" ) );
    comboBox1->insertItem( tr2i18n( "Key Has Been Compromised" ) );
    comboBox1->insertItem( tr2i18n( "Key is Superseded" ) );
    comboBox1->insertItem( tr2i18n( "Key is No Longer Used" ) );
    textLabel3->setText( tr2i18n( "Reason for revocation:" ) );
    cbSave->setText( tr2i18n( "Save certificate:" ) );
    cbImport->setText( tr2i18n( "Import into keyring" ) );
}

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

TQMetaObject *KgpgRevokeWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KgpgRevokeWidget( "KgpgRevokeWidget", &KgpgRevokeWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KgpgRevokeWidget::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(
	"KgpgRevokeWidget", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KgpgRevokeWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KgpgRevokeWidget::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 KgpgRevokeWidget::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

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

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