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

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

#include "tdeshortcutdialog_advanced.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a TDEShortcutDialogAdvanced as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
TDEShortcutDialogAdvanced::TDEShortcutDialogAdvanced( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "TDEShortcutDialogAdvanced" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    TDEShortcutDialogAdvancedLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "TDEShortcutDialogAdvancedLayout"); 

    m_frameMore = new TQButtonGroup( this, "m_frameMore" );
    m_frameMore->setFrameShape( TQButtonGroup::NoFrame );
    m_frameMore->setFrameShadow( TQButtonGroup::Plain );
    m_frameMore->setColumnLayout(0, TQt::Vertical );
    m_frameMore->layout()->setSpacing( KDialog::spacingHint() );
    m_frameMore->layout()->setMargin( 0 );
    m_frameMoreLayout = new TQGridLayout( m_frameMore->layout() );
    m_frameMoreLayout->setAlignment( TQt::AlignTop );

    m_btnAlternate = new TQRadioButton( m_frameMore, "m_btnAlternate" );
    m_btnAlternate->setFocusPolicy( TQRadioButton::NoFocus );

    m_frameMoreLayout->addWidget( m_btnAlternate, 1, 0 );

    m_btnPrimary = new TQRadioButton( m_frameMore, "m_btnPrimary" );
    m_btnPrimary->setFocusPolicy( TQRadioButton::NoFocus );

    m_frameMoreLayout->addWidget( m_btnPrimary, 0, 0 );

    layout6 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout6"); 

    m_txtAlternate = new KPushButton( m_frameMore, "m_txtAlternate" );
    m_txtAlternate->setPaletteBackgroundColor( TQColor( 255, 255, 255 ) );
    m_txtAlternate->setFocusPolicy( KPushButton::ClickFocus );
    m_txtAlternate->setAutoDefault( false );
    m_txtAlternate->setDefault( false );
    layout6->addWidget( m_txtAlternate );
    spacer6 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer6 );

    m_frameMoreLayout->addLayout( layout6, 1, 2 );

    layout7 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout7"); 

    m_txtPrimary = new KPushButton( m_frameMore, "m_txtPrimary" );
    m_txtPrimary->setPaletteBackgroundColor( TQColor( 255, 255, 255 ) );
    m_txtPrimary->setCursor( TQCursor( 4 ) );
    m_txtPrimary->setFocusPolicy( KPushButton::ClickFocus );
    m_txtPrimary->setAutoDefault( false );
    layout7->addWidget( m_txtPrimary );
    spacer5 = new TQSpacerItem( 21, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer5 );

    m_frameMoreLayout->addLayout( layout7, 0, 2 );

    m_btnClearPrimary = new TQPushButton( m_frameMore, "m_btnClearPrimary" );
    m_btnClearPrimary->setFlat( true );

    m_frameMoreLayout->addWidget( m_btnClearPrimary, 0, 1 );

    m_btnClearAlternate = new TQPushButton( m_frameMore, "m_btnClearAlternate" );
    m_btnClearAlternate->setFlat( true );

    m_frameMoreLayout->addWidget( m_btnClearAlternate, 1, 1 );

    m_btnMultiKey = new TQCheckBox( m_frameMore, "m_btnMultiKey" );
    m_btnMultiKey->setFocusPolicy( TQCheckBox::NoFocus );

    m_frameMoreLayout->addWidget( m_btnMultiKey, 2, 0 );
    TDEShortcutDialogAdvancedLayout->addWidget( m_frameMore );
    languageChange();
    resize( TQSize(359, 157).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_txtPrimary, TQ_SIGNAL( clicked() ), m_btnPrimary, TQ_SLOT( animateClick() ) );
    connect( m_txtAlternate, TQ_SIGNAL( clicked() ), m_btnAlternate, TQ_SLOT( animateClick() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TDEShortcutDialogAdvanced::languageChange()
{
    m_frameMore->setTitle( TQString::null );
    m_btnAlternate->setText( tr2i18n( "Alternate shortcut:" ) );
    m_btnPrimary->setText( tr2i18n( "Primary shortcut:" ) );
    m_txtAlternate->setText( TQString::null );
    m_txtPrimary->setText( TQString::null );
    TQWhatsThis::add( m_txtPrimary, tr2i18n( "The currently set shortcut or the shortcut you are entering will show up here." ) );
    m_btnClearPrimary->setText( tr2i18n( "x" ) );
    TQToolTip::add( m_btnClearPrimary, tr2i18n( "Clear shortcut" ) );
    m_btnClearAlternate->setText( tr2i18n( "x" ) );
    TQToolTip::add( m_btnClearAlternate, tr2i18n( "Clear shortcut" ) );
    m_btnMultiKey->setText( tr2i18n( "Multi-key mode" ) );
    TQToolTip::add( m_btnMultiKey, tr2i18n( "Enable the entry of multi-key shortcuts" ) );
    TQWhatsThis::add( m_btnMultiKey, tr2i18n( "Select this checkbox to enable the entry of multi-key shortcuts.  A multi-key shortcut consists of a sequence of up to 4 keys.  For example, you could assign \"Ctrl+F,B\" to Font-Bold and \"Ctrl+F,U\" to Font-Underline." ) );
}

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

TQMetaObject *TDEShortcutDialogAdvanced::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TDEShortcutDialogAdvanced( "TDEShortcutDialogAdvanced", &TDEShortcutDialogAdvanced::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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