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

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

#include "conf_gpg.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.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>

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

    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 );

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

    groupBox2Layout->addWidget( textLabel1_5_2, 0, 0 );

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

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

    gpg_conf_path = new KLineEdit( groupBox2, "gpg_conf_path" );
    gpg_conf_path->setEnabled( true );
    gpg_conf_path->setFrameShape( KLineEdit::Panel );
    gpg_conf_path->setLineWidth( 1 );
    gpg_conf_path->setReadOnly( true );

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

    changeHome = new TQPushButton( groupBox2, "changeHome" );

    groupBox2Layout->addWidget( changeHome, 1, 3 );

    gpg_home_path = new KLineEdit( groupBox2, "gpg_home_path" );
    gpg_home_path->setEnabled( true );
    gpg_home_path->setFrameShape( KLineEdit::Panel );
    gpg_home_path->setLineWidth( 1 );
    gpg_home_path->setReadOnly( true );

    groupBox2Layout->addMultiCellWidget( gpg_home_path, 1, 1, 1, 2 );
    spacer2 = new TQSpacerItem( 190, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox2Layout->addMultiCell( spacer2, 0, 0, 2, 3 );

    GPGConfLayout->addWidget( groupBox2, 0, 0 );
    spacer5 = new TQSpacerItem( 21, 54, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GPGConfLayout->addItem( spacer5, 3, 0 );

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

    GPGConfLayout->addWidget( use_agent, 2, 0 );

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

    kcfg_PubKeyring = new TQCheckBox( groupBox2_2, "kcfg_PubKeyring" );

    groupBox2_2Layout->addWidget( kcfg_PubKeyring, 0, 0 );

    kcfg_PrivKeyring = new TQCheckBox( groupBox2_2, "kcfg_PrivKeyring" );

    groupBox2_2Layout->addWidget( kcfg_PrivKeyring, 1, 0 );

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

    kcfg_PubKeyringUrl = new KURLRequester( groupBox2_2, "kcfg_PubKeyringUrl" );
    kcfg_PubKeyringUrl->setEnabled( false );
    layout1->addWidget( kcfg_PubKeyringUrl );

    kcfg_PrivKeyringUrl = new KURLRequester( groupBox2_2, "kcfg_PrivKeyringUrl" );
    kcfg_PrivKeyringUrl->setEnabled( false );
    layout1->addWidget( kcfg_PrivKeyringUrl );

    groupBox2_2Layout->addMultiCellLayout( layout1, 0, 1, 1, 1 );

    kcfg_OnlyAdditional = new TQCheckBox( groupBox2_2, "kcfg_OnlyAdditional" );
    kcfg_OnlyAdditional->setEnabled( false );

    groupBox2_2Layout->addMultiCellWidget( kcfg_OnlyAdditional, 2, 2, 0, 1 );

    GPGConfLayout->addWidget( groupBox2_2, 1, 0 );
    languageChange();
    resize( TQSize(550, 315).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GPGConf::languageChange()
{
    TQWhatsThis::add( this, tr2i18n( "<qt><b>Global Settings:</b><br />\n"
"	<p></p>\n"
"	</qt>" ) );
    groupBox2->setTitle( tr2i18n( "GnuPG Home" ) );
    textLabel1_5_2->setText( tr2i18n( "Configuration file:" ) );
    textLabel1_5_2_2->setText( tr2i18n( "Home location:" ) );
    changeHome->setText( tr2i18n( "Change..." ) );
    use_agent->setText( tr2i18n( "&Use GnuPG agent" ) );
    groupBox2_2->setTitle( tr2i18n( "Additional Keyring" ) );
    kcfg_PubKeyring->setText( tr2i18n( "Pu&blic:" ) );
    kcfg_PrivKeyring->setText( tr2i18n( "Private:" ) );
    kcfg_OnlyAdditional->setText( tr2i18n( "Use only this keyring" ) );
}

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

TQMetaObject *GPGConf::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GPGConf( "GPGConf", &GPGConf::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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