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

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

#include "keyexport.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "keyexport.ui.h"

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

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

    KeyExportLayout->addWidget( exportAttributes, 1, 0 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KeyExportLayout->addItem( spacer1, 2, 0 );

    buttonGroup2 = new TQButtonGroup( this, "buttonGroup2" );
    buttonGroup2->setColumnLayout(0, TQt::Vertical );
    buttonGroup2->layout()->setSpacing( 6 );
    buttonGroup2->layout()->setMargin( 11 );
    buttonGroup2Layout = new TQGridLayout( buttonGroup2->layout() );
    buttonGroup2Layout->setAlignment( TQt::AlignTop );

    checkMail = new TQRadioButton( buttonGroup2, "checkMail" );

    buttonGroup2Layout->addMultiCellWidget( checkMail, 0, 0, 0, 1 );

    checkServer = new TQRadioButton( buttonGroup2, "checkServer" );

    buttonGroup2Layout->addMultiCellWidget( checkServer, 2, 2, 0, 1 );

    checkClipboard = new TQRadioButton( buttonGroup2, "checkClipboard" );

    buttonGroup2Layout->addMultiCellWidget( checkClipboard, 1, 1, 0, 1 );

    newFilename = new KURLRequester( buttonGroup2, "newFilename" );
    newFilename->setEnabled( true );

    buttonGroup2Layout->addWidget( newFilename, 3, 1 );

    checkFile = new TQRadioButton( buttonGroup2, "checkFile" );
    checkFile->setChecked( true );

    buttonGroup2Layout->addWidget( checkFile, 3, 0 );

    KeyExportLayout->addWidget( buttonGroup2, 0, 0 );
    languageChange();
    resize( TQSize(370, 167).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KeyExport::languageChange()
{
    exportAttributes->setText( tr2i18n( "Export attributes (photo id)" ) );
    buttonGroup2->setTitle( TQString::null );
    checkMail->setText( tr2i18n( "Email" ) );
    checkServer->setText( tr2i18n( "Default key server" ) );
    checkClipboard->setText( tr2i18n( "Clipboard" ) );
    checkFile->setText( tr2i18n( "File:" ) );
}

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

TQMetaObject *KeyExport::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KeyExport( "KeyExport", &KeyExport::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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