• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kglobalaccel.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
00003     Copyright (C) 2006 Hamish Rodda <rodda@kde.org>
00004     Copyright (C) 2007 Andreas Hartmetz <ahartmetz@gmail.com>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef _KGLOBALACCEL_H_
00023 #define _KGLOBALACCEL_H_
00024 
00025 #include "kdeui_export.h"
00026 #include "kaction.h"
00027 #include "kglobalshortcutinfo.h"
00028 
00029 #include <QtCore/QObject>
00030 
00031 class QWidget;
00032 class KShortcut;
00033 class KComponentData;
00034 
00045 class KDEUI_EXPORT KGlobalAccel : public QObject
00046 {
00047     Q_OBJECT
00048 
00049 public:
00050 
00054     enum actionIdFields
00055     {
00056         ComponentUnique = 0,        
00057         ActionUnique = 1,           
00058         ComponentFriendly = 2,      
00059         ActionFriendly = 3          
00060     };
00061 
00065     static KGlobalAccel *self();
00066 
00073     static void stealShortcutSystemwide(const QKeySequence &seq);
00074 
00088     static void activateGlobalShortcutContext(
00089             const QString &contextUnique,
00090             const QString &contextFriendly,
00091             const KComponentData &component = KGlobal::mainComponent());
00092 
00115     static bool cleanComponent(const QString &componentUnique);
00116 
00117 
00124     static bool isComponentActive(const QString &componentName);
00125 
00135     static QList<KGlobalShortcutInfo> getGlobalShortcutsByKey(const QKeySequence &seq);
00136 
00145     static bool isGlobalShortcutAvailable(
00146             const QKeySequence &seq,
00147             const QString &component = QString());
00148 
00158     static bool promptStealShortcutSystemwide(
00159             QWidget *parent,
00160             const QList<KGlobalShortcutInfo> &shortcuts,
00161             const QKeySequence &seq);
00162 
00168     KDE_DEPRECATED bool isEnabled() const;
00169 
00175     KDE_DEPRECATED void setEnabled(bool enabled);
00176 
00193     KDE_DEPRECATED void overrideMainComponentData(const KComponentData &componentData);
00194 
00201     KDE_DEPRECATED QList<QStringList> allMainComponents();
00202 
00208     KDE_DEPRECATED QList<QStringList> allActionsForComponent(const QStringList &actionId);
00209 
00215     KDE_DEPRECATED static QStringList findActionNameSystemwide(const QKeySequence &seq);
00216 
00222     KDE_DEPRECATED static bool promptStealShortcutSystemwide(QWidget *parent, const QStringList &actionIdentifier, const QKeySequence &seq);
00223 
00224 private:
00225 
00226     friend class KAction;
00227 
00229     KGlobalAccel();
00230 
00232     ~KGlobalAccel();
00233 
00234     class KGlobalAccelPrivate *const d;
00235 
00236     Q_PRIVATE_SLOT(d, void _k_invokeAction(const QStringList&,qlonglong))
00237     Q_PRIVATE_SLOT(d, void _k_shortcutGotChanged(const QStringList&, const QList<int>&))
00238     Q_PRIVATE_SLOT(d, void _k_serviceOwnerChanged(const QString&, const QString&, const QString&))
00239 };
00240 
00241 #endif // _KGLOBALACCEL_H_

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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