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 
16 class QSortFilterProxyModel;
17 
18 namespace BALL
19 {
20  namespace VIEW
21  {
23  {
24  Q_OBJECT
25 
26  public:
28  virtual ~ShortcutTableView();
29 
30  void setFilter(const QString& filter);
31 
32  Q_SIGNALS:
34 
35  protected Q_SLOTS:
36  void editSuccess_();
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 
BALL::VIEW::ShortcutTableModel::isValid
bool isValid(const QKeySequence &seq) const
BALL::VIEW::ShortcutTableModel::setData
bool setData(const QModelIndex &index, const QVariant &data, int role=Qt::EditRole)
BALL::VIEW::ShortcutTableView::shortcutChanged
void shortcutChanged()
BALL::VIEW::ShortcutTableModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
BALL::VIEW::ShortcutTableModel::ShortcutTableModel
ShortcutTableModel(ShortcutRegistry *reg)
BALL::VIEW::ShortcutTableView
Definition: shortcutTableView.h:23
BALL::VIEW::ShortcutTableView::editSuccess_
void editSuccess_()
BALL::VIEW::ShortcutTableView::setFilter
void setFilter(const QString &filter)
BALL
Definition: constants.h:13
QWidget
QAbstractTableModel
BALL::VIEW::ShortcutTableModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
BALL::VIEW::ShortcutTableModel
Definition: shortcutTableView.h:46
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::ShortcutTableView::ShortcutTableView
ShortcutTableView(QWidget *parent)
BALL::VIEW::EditSingleShortcut
Definition: editSingleShortcut.h:38
BALL::VIEW::ShortcutTableView::~ShortcutTableView
virtual ~ShortcutTableView()
editSingleShortcut.h
BALL::VIEW::ShortcutTableModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
BALL::VIEW::ShortcutTableModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
common.h
BALL::VIEW::ShortcutTableView::onClick
void onClick(const QModelIndex &index)
QTableView
BALL::VIEW::ShortcutRegistry
Definition: shortcutRegistry.h:40
BALL::VIEW::ShortcutTableModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const