yacreader/shortcuts_management/actions_shortcuts_model.h
Luis Ángel San Martín 50c8eca7c4 added shortcuts management support
TODO: integrate it in YACReader
TODO: add icons for groups
TODO: add conflicts detection
TODO: fix any shortcut used in keyPressEvent
TODO: choose new default shortcuts (F5 update, F11 fullscreen, etc...)
2014-07-17 22:30:03 +02:00

39 lines
1005 B
C++

#ifndef ACTIONS_SHORTCUTS_MODEL_H
#define ACTIONS_SHORTCUTS_MODEL_H
#include <QAbstractItemModel>
class QAction;
class ActionsShortcutsModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit ActionsShortcutsModel(QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
bool setData(const QModelIndex &index, const QVariant &value, int role);
QModelIndex parent(const QModelIndex &index) const;
void addActions(const QList<QAction *> actions);
Qt::ItemFlags flags(const QModelIndex &index) const;
enum Columns {
ICON = 0,
NAME,
KEYS
};
signals:
public slots:
protected:
QList<QAction *> actions;
};
#endif // ACTIONS_SHORTCUTS_MODEL_H