BALL 1.5.0
shortcutTableView.h
Go to the documentation of this file.
1#ifndef BALL_VIEW_WIDGETS_SHORTCUTTABLEVIEW_H
2#define BALL_VIEW_WIDGETS_SHORTCUTTABLEVIEW_H
3
4#ifndef BALL_VIEW_KERNEL_COMMON_H
6#endif
7
8#ifndef BALL_VIEW_DIALOGS_EDITSINGLESHORTCUT_H
10#endif
11
12#include <QtWidgets/QTableView>
13#include <QtWidgets/QItemDelegate>
14#include <QtWidgets/QPushButton>
15
16class QSortFilterProxyModel;
17
18namespace BALL
19{
20 namespace VIEW
21 {
23 {
24 Q_OBJECT
25
26 public:
29
30 void setFilter(const QString& filter);
31
32 Q_SIGNALS:
34
35 protected Q_SLOTS:
37 void onClick(const QModelIndex& index);
38
39 private:
40 QSortFilterProxyModel* proxy_model_;
41 EditSingleShortcut* editor_;
42 int edited_row_;
43 };
44
46 {
47 Q_OBJECT
48
49 public:
51 int rowCount(const QModelIndex& parent = QModelIndex()) const;
52 int columnCount(const QModelIndex& parent = QModelIndex()) const;
53
54 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
55 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
56 Qt::ItemFlags flags(const QModelIndex& index) const;
57 bool isValid(const QKeySequence& seq) const;
58 bool setData(const QModelIndex& index, const QVariant& data, int role = Qt::EditRole);
59 private:
60 ShortcutRegistry* registry_;
61 };
62
63 }
64}
65
66#endif //BALL_VIEW_WIDGETS_SHORTCUTTABLEVIEW_H
67
Definition: constants.h:13
void onClick(const QModelIndex &index)
void setFilter(const QString &filter)
ShortcutTableView(QWidget *parent)
int rowCount(const QModelIndex &parent=QModelIndex()) const
Qt::ItemFlags flags(const QModelIndex &index) const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool setData(const QModelIndex &index, const QVariant &data, int role=Qt::EditRole)
ShortcutTableModel(ShortcutRegistry *reg)
bool isValid(const QKeySequence &seq) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52