KXmlGui

kshortcutsdialog.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1997 Nicolas Hadacek <[email protected]>
4  SPDX-FileCopyrightText: 2001, 2001 Ellis Whitehead <[email protected]>
5  SPDX-FileCopyrightText: 2006 Hamish Rodda <[email protected]>
6  SPDX-FileCopyrightText: 2007 Roberto Raggi <[email protected]>
7  SPDX-FileCopyrightText: 2007 Andreas Hartmetz <[email protected]>
8  SPDX-FileCopyrightText: 2008 Michael Jansen <[email protected]>
9 
10  SPDX-License-Identifier: LGPL-2.0-or-later
11 */
12 
13 #ifndef KSHORTCUTSDIALOG_H
14 #define KSHORTCUTSDIALOG_H
15 
16 #include <kxmlgui_export.h>
17 
18 #include <QDialog>
19 
20 #include "kshortcutseditor.h"
21 
59 class KXMLGUI_EXPORT KShortcutsDialog : public QDialog
60 {
61  Q_OBJECT
62 
63 public:
71  QWidget *parent = nullptr);
72 
76  ~KShortcutsDialog() override;
77 
85  void addCollection(KActionCollection *, const QString &title = QString());
86 
90  QList<KActionCollection *> actionCollections() const;
91 
96  bool configure(bool saveSettings = true);
97 
99  QSize sizeHint() const override;
100 
114  static int configure(KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts =
115  KShortcutsEditor::LetterShortcutsAllowed, QWidget *parent = nullptr, bool bSaveSettings = true);
116 
122  void importConfiguration(const QString &path);
123 
129  void exportConfiguration(const QString &path) const;
130 
131 public Q_SLOTS:
135  void accept() override;
136 
137 Q_SIGNALS:
141  void saved();
142 
143 private:
144  Q_PRIVATE_SLOT(d, void changeShortcutScheme(const QString &))
145  Q_PRIVATE_SLOT(d, void undoChanges())
146  Q_PRIVATE_SLOT(d, void toggleDetails())
147 
148  class KShortcutsDialogPrivate;
149  friend class KShortcutsDialogPrivate;
150  class KShortcutsDialogPrivate *const d;
151 
153 };
154 
155 #endif // KSHORTCUTSDIALOG_H
156 
A container for a set of QAction objects.
virtual QSize sizeHint() const const override
virtual void accept()
Letter shortcuts are allowed.
Q_DISABLE_COPY(Class)
Dialog for configuration of KActionCollection and KGlobalAccel.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 22:53:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.