• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kdeui

kshortcutdialog_simple.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kshortcutdialog_simple.ui'
00005 **
00006 ** Created: 2010-02-08T15:26:25
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "kshortcutdialog_simple.h"
00012 
00013 #include <qvariant.h>
00014 #include <kpushbutton.h>
00015 #include <qlabel.h>
00016 #include <qpushbutton.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 #include "kpushbutton.h"
00021 
00022 /*
00023  *  Constructs a KShortcutDialogSimple as a child of 'parent', with the
00024  *  name 'name' and widget flags set to 'f'.
00025  */
00026 KShortcutDialogSimple::KShortcutDialogSimple( QWidget* parent, const char* name, WFlags fl )
00027     : QWidget( parent, name, fl )
00028 {
00029     if ( !name )
00030     setName( "KShortcutDialogSimple" );
00031     KShortcutDialogSimpleLayout = new QGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "KShortcutDialogSimpleLayout"); 
00032 
00033     textLabel2 = new QLabel( this, "textLabel2" );
00034 
00035     KShortcutDialogSimpleLayout->addWidget( textLabel2, 0, 0 );
00036     spacer3 = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
00037     KShortcutDialogSimpleLayout->addItem( spacer3, 1, 0 );
00038 
00039     m_txtShortcut = new KPushButton( this, "m_txtShortcut" );
00040     m_txtShortcut->setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
00041     m_txtShortcut->setCursor( QCursor( 4 ) );
00042     m_txtShortcut->setFocusPolicy( KPushButton::ClickFocus );
00043     m_txtShortcut->setAutoDefault( FALSE );
00044     m_txtShortcut->setDefault( FALSE );
00045 
00046     KShortcutDialogSimpleLayout->addWidget( m_txtShortcut, 0, 3 );
00047 
00048     m_btnClearShortcut = new QPushButton( this, "m_btnClearShortcut" );
00049     m_btnClearShortcut->setFlat( TRUE );
00050 
00051     KShortcutDialogSimpleLayout->addWidget( m_btnClearShortcut, 0, 2 );
00052     spacer2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00053     KShortcutDialogSimpleLayout->addItem( spacer2, 0, 4 );
00054     languageChange();
00055     resize( QSize(177, 36).expandedTo(minimumSizeHint()) );
00056     clearWState( WState_Polished );
00057 }
00058 
00059 /*
00060  *  Destroys the object and frees any allocated resources
00061  */
00062 KShortcutDialogSimple::~KShortcutDialogSimple()
00063 {
00064     // no need to delete child widgets, Qt does it all for us
00065 }
00066 
00067 /*
00068  *  Sets the strings of the subwidgets using the current
00069  *  language.
00070  */
00071 void KShortcutDialogSimple::languageChange()
00072 {
00073     textLabel2->setText( tr2i18n( "Shortcut:" ) );
00074     m_txtShortcut->setText( tr2i18n( "Alt+Tab" ) );
00075     m_btnClearShortcut->setText( tr2i18n( "x" ) );
00076     QToolTip::add( m_btnClearShortcut, tr2i18n( "Clear shortcut" ) );
00077 }
00078 
00079 #include "kshortcutdialog_simple.moc"

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal