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

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

#include "conf_misc.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    miscWidget = new TQTabWidget( this, "miscWidget" );

    tab = new TQWidget( miscWidget, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    kcfg_AutoStart = new TQCheckBox( tab, "kcfg_AutoStart" );
    kcfg_AutoStart->setChecked( false );

    tabLayout->addWidget( kcfg_AutoStart, 0, 0 );

    kcfg_UseMouseSelection = new TQCheckBox( tab, "kcfg_UseMouseSelection" );
    kcfg_UseMouseSelection->setMinimumSize( TQSize( 0, 0 ) );

    tabLayout->addWidget( kcfg_UseMouseSelection, 1, 0 );

    kcfg_RemoteFileWarn = new TQCheckBox( tab, "kcfg_RemoteFileWarn" );
    kcfg_RemoteFileWarn->setMinimumSize( TQSize( 0, 0 ) );

    tabLayout->addWidget( kcfg_RemoteFileWarn, 2, 0 );

    groupShred = new TQGroupBox( tab, "groupShred" );
    groupShred->setColumnLayout(0, TQt::Vertical );
    groupShred->layout()->setSpacing( 6 );
    groupShred->layout()->setMargin( 11 );
    groupShredLayout = new TQGridLayout( groupShred->layout() );
    groupShredLayout->setAlignment( TQt::AlignTop );
    spacer7 = new TQSpacerItem( 91, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupShredLayout->addItem( spacer7, 2, 0 );

    pushShredder = new TQPushButton( groupShred, "pushShredder" );

    groupShredLayout->addWidget( pushShredder, 2, 1 );

    textLabel6 = new TQLabel( groupShred, "textLabel6" );
    textLabel6->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignJustify | TQLabel::AlignTop ) );

    groupShredLayout->addMultiCellWidget( textLabel6, 0, 0, 0, 1 );

    shredInfo = new TQLabel( groupShred, "shredInfo" );
    shredInfo->setAlignment( int( TQLabel::AlignTop ) );

    groupShredLayout->addMultiCellWidget( shredInfo, 1, 1, 0, 1 );

    tabLayout->addWidget( groupShred, 3, 0 );
    spacer8 = new TQSpacerItem( 20, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer8, 4, 0 );
    miscWidget->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( miscWidget, "TabPage" );
    TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); 

    textLabel1_2 = new TQLabel( TabPage, "textLabel1_2" );

    TabPageLayout->addWidget( textLabel1_2, 0, 0 );

    kcfg_LeftClick = new TQComboBox( false, TabPage, "kcfg_LeftClick" );
    kcfg_LeftClick->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, kcfg_LeftClick->sizePolicy().hasHeightForWidth() ) );

    TabPageLayout->addWidget( kcfg_LeftClick, 0, 1 );
    spacer3 = new TQSpacerItem( 21, 91, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer3, 3, 0 );

    groupBox11 = new TQGroupBox( TabPage, "groupBox11" );
    groupBox11->setColumnLayout(0, TQt::Vertical );
    groupBox11->layout()->setSpacing( 6 );
    groupBox11->layout()->setMargin( 11 );
    groupBox11Layout = new TQGridLayout( groupBox11->layout() );
    groupBox11Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox11, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );

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

    textLabel1_3 = new TQLabel( groupBox11, "textLabel1_3" );
    textLabel1_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) );

    groupBox11Layout->addWidget( textLabel1_3, 1, 0 );

    kcfg_SignMenu = new KComboBox( false, groupBox11, "kcfg_SignMenu" );
    kcfg_SignMenu->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, kcfg_SignMenu->sizePolicy().hasHeightForWidth() ) );

    groupBox11Layout->addWidget( kcfg_SignMenu, 0, 1 );

    kcfg_DecryptMenu = new KComboBox( false, groupBox11, "kcfg_DecryptMenu" );

    groupBox11Layout->addWidget( kcfg_DecryptMenu, 1, 1 );

    TabPageLayout->addMultiCellWidget( groupBox11, 1, 1, 0, 1 );

    groupBox3 = new TQGroupBox( TabPage, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    textLabel1_3_2 = new TQLabel( groupBox3, "textLabel1_3_2" );

    groupBox3Layout->addWidget( textLabel1_3_2, 0, 0 );

    textLabel1_2_2 = new TQLabel( groupBox3, "textLabel1_2_2" );

    groupBox3Layout->addWidget( textLabel1_2_2, 1, 0 );

    kcfg_UnencryptedDropEvent = new KComboBox( false, groupBox3, "kcfg_UnencryptedDropEvent" );

    groupBox3Layout->addWidget( kcfg_UnencryptedDropEvent, 0, 1 );

    kcfg_EncryptedDropEvent = new KComboBox( false, groupBox3, "kcfg_EncryptedDropEvent" );

    groupBox3Layout->addWidget( kcfg_EncryptedDropEvent, 1, 1 );

    TabPageLayout->addMultiCellWidget( groupBox3, 2, 2, 0, 1 );
    miscWidget->insertTab( TabPage, TQString::fromLatin1("") );
    MiscConfLayout->addWidget( miscWidget );
    languageChange();
    resize( TQSize(454, 334).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MiscConf::languageChange()
{
    kcfg_AutoStart->setText( tr2i18n( "Start KGpg automatically at login" ) );
    TQWhatsThis::add( kcfg_AutoStart, tr2i18n( "<qt><b>Start KGpg automatically at TDE startup:</b><br />\n"
"<p>If checked KGpg will start automatically each time that TDE starts up.</p></qt>" ) );
    kcfg_UseMouseSelection->setText( tr2i18n( "Use mouse selection instead of clipboard" ) );
    TQWhatsThis::add( kcfg_UseMouseSelection, tr2i18n( "<qt><b>Use mouse selection instead of clipboard:</b> <br />\n"
"			<p>If checked, clipboard operations in KGpg will use the selection clipboard, that means highlighting a text to copy, and middle button (or right+left together) to paste. If this option is not checked, the clipboard will work with Key shortcuts (Ctrl-c, Ctrl-v).</p></qt> " ) );
    kcfg_RemoteFileWarn->setText( tr2i18n( "Display warning before creating temporary files\n"
"(only occurs on remote files operations)" ) );
    TQWhatsThis::add( kcfg_RemoteFileWarn, tr2i18n( "<qt><b>Display warning before creating temporary files:</b><br />\n"
"			<p></p></qt>" ) );
    groupShred->setTitle( tr2i18n( "Shredder" ) );
    pushShredder->setText( tr2i18n( "Install Shredder" ) );
    textLabel6->setText( tr2i18n( "KGpg allows you to create a shredder on your desktop.\n"
"It will shred (overwrite several times before erasing) the\n"
"files you drop on it, making it almost impossible to recover\n"
"the original file." ) );
    shredInfo->setText( tr2i18n( "textLabel5" ) );
    miscWidget->changeTab( tab, tr2i18n( "Global Settings" ) );
    textLabel1_2->setText( tr2i18n( "Left mouse click opens (restart KGpg to apply):" ) );
    kcfg_LeftClick->clear();
    kcfg_LeftClick->insertItem( tr2i18n( "Key Manager" ) );
    kcfg_LeftClick->insertItem( tr2i18n( "Editor" ) );
    groupBox11->setTitle( tr2i18n( "Konqueror Service Menus" ) );
    textLabel1->setText( tr2i18n( "Sign file service menu:" ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "<qt><b>Sign file service menu:</b><br />\n"
"					<p></p>\n"
"					</qt>" ) );
    textLabel1_3->setText( tr2i18n( "Decrypt file service menu:" ) );
    TQWhatsThis::add( textLabel1_3, tr2i18n( "<qt><b>Decrypt file service menu:</b><br />\n"
"					<p></p>\n"
"					</qt>" ) );
    kcfg_SignMenu->clear();
    kcfg_SignMenu->insertItem( tr2i18n( "Disable" ) );
    kcfg_SignMenu->insertItem( tr2i18n( "Enable with All Files" ) );
    kcfg_DecryptMenu->clear();
    kcfg_DecryptMenu->insertItem( tr2i18n( "Disable" ) );
    kcfg_DecryptMenu->insertItem( tr2i18n( "Enable with All Files" ) );
    kcfg_DecryptMenu->insertItem( tr2i18n( "Enable with Encrypted Files" ) );
    groupBox3->setTitle( tr2i18n( "System Tray Applet" ) );
    textLabel1_3_2->setText( tr2i18n( "Event on unencrypted file drop:" ) );
    TQWhatsThis::add( textLabel1_3_2, tr2i18n( "<qt><b>Event on unencrypted file drop:</b><br />\n"
"					<p></p>\n"
"					</qt>" ) );
    textLabel1_2_2->setText( tr2i18n( "Event on encrypted file drop:" ) );
    TQWhatsThis::add( textLabel1_2_2, tr2i18n( "<qt><b>Event on encrypted file drop:</b><br />\n"
"					<p></p>\n"
"					</qt>" ) );
    kcfg_UnencryptedDropEvent->clear();
    kcfg_UnencryptedDropEvent->insertItem( tr2i18n( "Encrypt" ) );
    kcfg_UnencryptedDropEvent->insertItem( tr2i18n( "Sign" ) );
    kcfg_UnencryptedDropEvent->insertItem( tr2i18n( "Ask" ) );
    kcfg_EncryptedDropEvent->clear();
    kcfg_EncryptedDropEvent->insertItem( tr2i18n( "Decrypt & Save" ) );
    kcfg_EncryptedDropEvent->insertItem( tr2i18n( "Decrypt & Open in Editor" ) );
    kcfg_EncryptedDropEvent->insertItem( tr2i18n( "Ask" ) );
    miscWidget->changeTab( TabPage, tr2i18n( "Applet && Menus" ) );
}

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

TQMetaObject *MiscConf::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MiscConf( "MiscConf", &MiscConf::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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