KDEUI
kshortcutsdialog.h
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1997 Nicolas Hadacek <hadacek@kde.org> 00003 Copyright (C) 2001,2001 Ellis Whitehead <ellis@kde.org> 00004 Copyright (C) 2006 Hamish Rodda <rodda@kde.org> 00005 Copyright (C) 2007 Roberto Raggi <roberto@kdevelop.org> 00006 Copyright (C) 2007 Andreas Hartmetz <ahartmetz@gmail.com> 00007 Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to 00021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 */ 00024 00025 00026 #ifndef KSHORTCUTSDIALOG_H 00027 #define KSHORTCUTSDIALOG_H 00028 00029 #include <kdialog.h> 00030 00031 #include "kshortcutseditor.h" 00032 00067 class KDEUI_EXPORT KShortcutsDialog : public KDialog 00068 { 00069 Q_OBJECT 00070 00071 public: 00077 explicit KShortcutsDialog(KShortcutsEditor::ActionTypes types = KShortcutsEditor::AllActions, 00078 KShortcutsEditor::LetterShortcuts allowLetterShortcuts = KShortcutsEditor::LetterShortcutsAllowed, 00079 QWidget *parent = 0); 00080 00084 virtual ~KShortcutsDialog(); 00085 00093 void addCollection(KActionCollection *, const QString &title = QString()); 00094 00098 QList<KActionCollection*> actionCollections() const; 00099 00104 bool configure(bool saveSettings = true); 00105 00107 virtual QSize sizeHint() const; 00108 00122 static int configure( KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts = 00123 KShortcutsEditor::LetterShortcutsAllowed, QWidget* parent = 0, bool bSaveSettings = true); 00124 00125 Q_SIGNALS: 00129 void saved(); 00130 00131 private: 00132 Q_PRIVATE_SLOT(d, void changeShortcutScheme(const QString &)) 00133 Q_PRIVATE_SLOT(d, void save()) 00134 Q_PRIVATE_SLOT(d, void undoChanges()) 00135 00136 class KShortcutsDialogPrivate; 00137 friend class KShortcutsDialogPrivate; 00138 class KShortcutsDialogPrivate *const d; 00139 00140 Q_DISABLE_COPY(KShortcutsDialog) 00141 }; 00142 00143 #endif // KSHORTCUTSDIALOG_H 00144 00145 //kate: space-indent off; indent-width 4; replace-tabs off;tab-width 4;