kdecore Library API Documentation

kglobalaccel.cpp

00001 #include "kglobalaccel.h" 00002 #ifdef Q_WS_X11 00003 #include "kglobalaccel_x11.h" 00004 #else 00005 #include "kglobalaccel_emb.h" 00006 #endif 00007 00008 #include <qstring.h> 00009 #include "kaccelbase.h" 00010 #include <kdebug.h> 00011 #include <kshortcut.h> 00012 #include <klocale.h> 00013 00014 //---------------------------------------------------- 00015 00016 KGlobalAccel::KGlobalAccel( QObject* pParent, const char* psName ) 00017 : QObject( pParent, psName ) 00018 { 00019 kdDebug(125) << "KGlobalAccel(): this = " << this << endl; 00020 d = new KGlobalAccelPrivate(); 00021 } 00022 00023 KGlobalAccel::~KGlobalAccel() 00024 { 00025 kdDebug(125) << "~KGlobalAccel(): this = " << this << endl; 00026 delete d; 00027 } 00028 00029 /* 00030 void KGlobalAccel::clear() 00031 { d->clearActions(); } 00032 */ 00033 KAccelActions& KGlobalAccel::actions() 00034 { return d->actions(); } 00035 00036 const KAccelActions& KGlobalAccel::actions() const 00037 { return d->actions(); } 00038 00039 bool KGlobalAccel::isEnabled() 00040 { return ((KAccelBase*)d)->isEnabled(); } 00041 00042 void KGlobalAccel::setEnabled( bool bEnabled ) 00043 { d->setEnabled( bEnabled ); } 00044 00045 KAccelAction* KGlobalAccel::insert( const QString& sAction, const QString& sDesc, const QString& sHelp, 00046 const KShortcut& cutDef3, const KShortcut& cutDef4, 00047 const QObject* pObjSlot, const char* psMethodSlot, 00048 bool bConfigurable, bool bEnabled ) 00049 { 00050 return d->insert( sAction, sDesc, sHelp, 00051 cutDef3, cutDef4, 00052 pObjSlot, psMethodSlot, 00053 bConfigurable, bEnabled ); 00054 } 00055 00056 KAccelAction* KGlobalAccel::insert( const QString& sName, const QString& sDesc ) 00057 { return d->insert( sName, sDesc ); } 00058 bool KGlobalAccel::updateConnections() 00059 { return d->updateConnections(); } 00060 00061 bool KGlobalAccel::remove( const QString& sAction ) 00062 { return d->remove( sAction ); } 00063 00064 const KShortcut& KGlobalAccel::shortcut( const QString& sAction ) const 00065 { 00066 const KAccelAction* pAction = d->actions().actionPtr( sAction ); 00067 return (pAction) ? pAction->shortcut() : KShortcut::null(); 00068 } 00069 00070 bool KGlobalAccel::setShortcut( const QString& sAction, const KShortcut& cut ) 00071 { return d->setShortcut( sAction, cut ); } 00072 bool KGlobalAccel::setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot ) 00073 { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } 00074 00075 const QString& KGlobalAccel::configGroup() const 00076 { return d->configGroup(); } 00077 // for kdemultimedia/kmix 00078 void KGlobalAccel::setConfigGroup( const QString& s ) 00079 { d->setConfigGroup( s ); } 00080 00081 bool KGlobalAccel::readSettings( KConfigBase* pConfig ) 00082 { d->readSettings( pConfig ); return true; } 00083 bool KGlobalAccel::writeSettings( KConfigBase* pConfig ) const 00084 { d->writeSettings( pConfig ); return true; } 00085 bool KGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const 00086 { 00087 d->setConfigGlobal( bGlobal ); 00088 d->writeSettings( pConfig ); 00089 return true; 00090 } 00091 00092 bool KGlobalAccel::useFourModifierKeys() 00093 { return KAccelAction::useFourModifierKeys(); } 00094 00095 void KGlobalAccel::virtual_hook( int, void* ) 00096 { /*BASE::virtual_hook( id, data );*/ } 00097 00098 #include "kglobalaccel.moc"
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:14:00 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003