#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kdeui/kshortcutdialog_simple.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kshortcutdialog_simple.h"

#include <qvariant.h>
#include <kpushbutton.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kpushbutton.h"

/*
 *  Constructs a KShortcutDialogSimple as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KShortcutDialogSimple::KShortcutDialogSimple( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "KShortcutDialogSimple" );
    KShortcutDialogSimpleLayout = new QGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "KShortcutDialogSimpleLayout"); 

    textLabel2 = new QLabel( this, "textLabel2" );

    KShortcutDialogSimpleLayout->addWidget( textLabel2, 0, 0 );
    spacer3 = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
    KShortcutDialogSimpleLayout->addItem( spacer3, 1, 0 );

    m_txtShortcut = new KPushButton( this, "m_txtShortcut" );
    m_txtShortcut->setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
    m_txtShortcut->setCursor( QCursor( 4 ) );
    m_txtShortcut->setFocusPolicy( KPushButton::ClickFocus );
    m_txtShortcut->setAutoDefault( FALSE );
    m_txtShortcut->setDefault( FALSE );

    KShortcutDialogSimpleLayout->addWidget( m_txtShortcut, 0, 3 );

    m_btnClearShortcut = new QPushButton( this, "m_btnClearShortcut" );
    m_btnClearShortcut->setFlat( TRUE );

    KShortcutDialogSimpleLayout->addWidget( m_btnClearShortcut, 0, 2 );
    spacer2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    KShortcutDialogSimpleLayout->addItem( spacer2, 0, 4 );
    languageChange();
    resize( QSize(177, 36).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KShortcutDialogSimple::languageChange()
{
    textLabel2->setText( tr2i18n( "Shortcut:" ) );
    m_txtShortcut->setText( tr2i18n( "Alt+Tab" ) );
    m_btnClearShortcut->setText( tr2i18n( "x" ) );
    QToolTip::add( m_btnClearShortcut, tr2i18n( "Clear shortcut" ) );
}

#include "kshortcutdialog_simple.moc"
