• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • 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 class OrgKdeKglobalaccelComponentInterface;
00035 
00046 class KDEUI_EXPORT KGlobalAccel : public QObject
00047 {
00048     Q_OBJECT
00049 
00050 public:
00051 
00055     enum actionIdFields
00056     {
00057         ComponentUnique = 0,        
00058         ActionUnique = 1,           
00059         ComponentFriendly = 2,      
00060         ActionFriendly = 3          
00061     };
00062 
00066     static KGlobalAccel *self();
00067 
00074     static void stealShortcutSystemwide(const QKeySequence &seq);
00075 
00089     static void activateGlobalShortcutContext(
00090             const QString &contextUnique,
00091             const QString &contextFriendly,
00092             const KComponentData &component = KGlobal::mainComponent());
00093 
00116     static bool cleanComponent(const QString &componentUnique);
00117 
00118 
00125     static bool isComponentActive(const QString &componentName);
00126 
00136     static QList<KGlobalShortcutInfo> getGlobalShortcutsByKey(const QKeySequence &seq);
00137 
00146     static bool isGlobalShortcutAvailable(
00147             const QKeySequence &seq,
00148             const QString &component = QString());
00149 
00159     static bool promptStealShortcutSystemwide(
00160             QWidget *parent,
00161             const QList<KGlobalShortcutInfo> &shortcuts,
00162             const QKeySequence &seq);
00163 
00169 #ifndef KDE_NO_DEPRECATED
00170     KDE_DEPRECATED bool isEnabled() const;
00171 #endif
00172 
00178 #ifndef KDE_NO_DEPRECATED
00179     KDE_DEPRECATED void setEnabled(bool enabled);
00180 #endif
00181 
00198 #ifndef KDE_NO_DEPRECATED
00199     KDE_DEPRECATED void overrideMainComponentData(const KComponentData &componentData);
00200 #endif
00201 
00208 #ifndef KDE_NO_DEPRECATED
00209     KDE_DEPRECATED QList<QStringList> allMainComponents();
00210 #endif
00211 
00217 #ifndef KDE_NO_DEPRECATED
00218     KDE_DEPRECATED QList<QStringList> allActionsForComponent(const QStringList &actionId);
00219 #endif
00220 
00226 #ifndef KDE_NO_DEPRECATED
00227     KDE_DEPRECATED static QStringList findActionNameSystemwide(const QKeySequence &seq);
00228 #endif
00229 
00235 #ifndef KDE_NO_DEPRECATED
00236     KDE_DEPRECATED static bool promptStealShortcutSystemwide(QWidget *parent, const QStringList &actionIdentifier, const QKeySequence &seq);
00237 #endif
00238 
00239 private:
00240 
00241     friend class KAction;
00242 
00244     KGlobalAccel();
00245 
00247     ~KGlobalAccel();
00248 
00250     OrgKdeKglobalaccelComponentInterface* getComponent(const QString &componentUnique);
00251 
00252     class KGlobalAccelPrivate *const d;
00253 
00254     Q_PRIVATE_SLOT(d, void _k_invokeAction(const QString &, const QString &, qlonglong))
00255     Q_PRIVATE_SLOT(d, void _k_shortcutGotChanged(const QStringList&, const QList<int>&))
00256     Q_PRIVATE_SLOT(d, void _k_serviceOwnerChanged(const QString&, const QString&, const QString&))
00257 };
00258 
00259 #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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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