BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <QtGui/QTableView>
13 #include <QtGui/QItemDelegate>
14 #include <QtGui/QPushButton>
15 
16 class QSortFilterProxyModel;
17 
18 namespace BALL
19 {
20  namespace VIEW
21  {
23  {
24  Q_OBJECT
25 
26  public:
27  ShortcutTableView(QWidget* parent);
28  virtual ~ShortcutTableView();
29 
30  void setFilter(const QString& filter);
31 
32  signals:
33  void shortcutChanged();
34 
35  protected slots:
36  void editSuccess_();
37 
38  protected slots:
39  void onClick(const QModelIndex& index);
40 
41  private:
42  QSortFilterProxyModel* proxy_model_;
43  EditSingleShortcut* editor_;
44  int edited_row_;
45  };
46 
48  {
49  Q_OBJECT
50 
51  public:
53  int rowCount(const QModelIndex& parent = QModelIndex()) const;
54  int columnCount(const QModelIndex& parent = QModelIndex()) const;
55 
56  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
57  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
58  Qt::ItemFlags flags(const QModelIndex& index) const;
59  bool isValid(const QKeySequence& seq) const;
60  bool setData(const QModelIndex& index, const QVariant& data, int role = Qt::EditRole);
61  private:
62  ShortcutRegistry* registry_;
63  };
64 
65  }
66 }
67 
68 #endif //BALL_VIEW_WIDGETS_SHORTCUTTABLEVIEW_H
69 
Qt::ItemFlags flags(const QModelIndex &index) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
bool setData(const QModelIndex &index, const QVariant &data, int role=Qt::EditRole)
ShortcutTableModel(ShortcutRegistry *reg)
bool isValid(const QKeySequence &seq) const