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 00051 class KDEUI_EXPORT KShortcutsDialog : public KDialog 00052 { 00053 Q_OBJECT 00054 00055 public: 00061 explicit KShortcutsDialog(KShortcutsEditor::ActionTypes types = KShortcutsEditor::AllActions, 00062 KShortcutsEditor::LetterShortcuts allowLetterShortcuts = KShortcutsEditor::LetterShortcutsAllowed, 00063 QWidget *parent = 0); 00064 00068 virtual ~KShortcutsDialog(); 00069 00077 void addCollection(KActionCollection *, const QString &title = QString()); 00078 00082 QList<KActionCollection*> actionCollections() const; 00083 00088 bool configure(bool saveSettings = true); 00089 00091 virtual QSize sizeHint() const; 00092 00106 static int configure( KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts = 00107 KShortcutsEditor::LetterShortcutsAllowed, QWidget* parent = 0, bool bSaveSettings = true); 00108 00109 private: 00110 Q_PRIVATE_SLOT(d, void changeShortcutScheme(const QString &)) 00111 00112 class KShortcutsDialogPrivate; 00113 friend class KShortcutsDialogPrivate; 00114 class KShortcutsDialogPrivate *const d; 00115 00116 Q_DISABLE_COPY(KShortcutsDialog) 00117 }; 00118 00119 #endif // KSHORTCUTSDIALOG_H 00120 00121 //kate: space-indent off; indent-width 4; replace-tabs off;tab-width 4;