20 #ifndef SHORTCUTSDIALOG_HPP 21 #define SHORTCUTSDIALOG_HPP 23 #include <QKeySequence> 24 #include <QModelIndex> 25 #include <QSortFilterProxyModel> 27 #include "StelDialog.hpp" 30 class Ui_shortcutsDialogForm;
33 class QStandardItemModel;
48 bool filterAcceptsRow(
int source_row,
49 const QModelIndex &source_parent)
const;
63 void drawCollisions();
67 void resetCollisions();
72 bool prefixMatchKeySequence(
const QKeySequence &ks1,
const QKeySequence &ks2);
74 QList<QStandardItem*> findCollidingItems(QKeySequence ks);
81 void switchToEditors(
const QModelIndex& index);
84 void updateShortcutsItem(
class StelAction* action, QStandardItem* shortcutItem = NULL);
85 void restoreDefaultShortcuts();
86 void updateTreeData();
90 virtual void createDialogContent();
94 static bool itemIsEditable(QStandardItem *item);
104 QStandardItem* updateGroup(
const QString& group);
107 QStandardItem* findItemByData(QVariant value,
int role,
int column = 0);
113 QList<QStandardItem*> collisionItems;
115 Ui_shortcutsDialogForm *ui;
117 QStandardItemModel* mainModel;
121 void setModelHeader();
124 #endif // SHORTCUTSDIALOG_HPP Specialised GUI control for entering keyboard shortcut combinations.
Custom filter class for filtering tree sub-items.
Base class for all the GUI windows in Stellarium.
Wrapper around an argumentless QObject slot or a bool Q_PROPERTY with WRITE method, allowing the slot to be called/property to be toggled using this action object.
Manager for StelAction instances. Allows registration of new actions, and finding an existing one by ...