Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
shortcutspage.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17#ifndef SHORTCUTSPAGE_H
18#define SHORTCUTSPAGE_H
19
20#include <QWidget>
21#include <QModelIndex>
22#include <QKeySequence>
23#include <QSettings>
24
25class QTreeView;
26class QStandardItem;
27class QStandardItemModel;
28class QLabel;
29class QLineEdit;
30class PreferenceManager;
31
32namespace Ui
33{
34 class ShortcutsPage;
35}
36
37class ShortcutsPage : public QWidget
38{
39 Q_OBJECT
40public:
41 explicit ShortcutsPage(QWidget* parent = nullptr);
42
43 void setManager( PreferenceManager* p ) { mManager = p; }
44 ~ShortcutsPage() override;
45
46private slots:
47 void tableItemClicked(const QModelIndex&);
48 void keyCapLineEditTextChanged();
49 void saveShortcutsButtonClicked();
50 void loadShortcutsButtonClicked();
51 void restoreShortcutsButtonClicked();
52 void clearButtonClicked();
53
54private:
55 bool isKeySequenceExist(const QSettings&, QString, QKeySequence);
56 void removeDuplicateKeySequence(QSettings*, QKeySequence);
57 void treeModelLoadShortcutsSetting();
58
59 QStandardItemModel* m_treeModel = nullptr;
60 QModelIndex m_currentItemIndex;
61
62 Ui::ShortcutsPage* ui = nullptr;
63
64 PreferenceManager* mManager = nullptr;
65};
66
67#endif // SHORTCUTSPAGE_H
PreferenceManager
Definition: preferencemanager.h:28
ShortcutsPage
Definition: shortcutspage.h:38
QKeySequence
QLabel
QLineEdit
QModelIndex
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QSettings
QStandardItem
QStandardItemModel
QString
QTreeView
QWidget
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39