MNE-CPP  beta 1.0
rawview.h
1 #ifndef RAWVIEW_H
2 #define RAWVIEW_H
3 
4 #include <QAbstractItemView>
5 
6 class RawView : public QAbstractItemView
7 {
8  Q_OBJECT
9 
10 public:
11  RawView(QWidget *parent = 0);
12 
13  QRect visualRect(const QModelIndex &index) const;
14  void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible); //
15  QModelIndex indexAt(const QPoint &point) const; //
16 
17 protected slots:
18  void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
19 // void rowsInserted(const QModelIndex &parent, int start, int end);
20 // void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
21 
22 protected:
23 // bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event);
24  QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
25 
26  int horizontalOffset() const;
27  int verticalOffset() const;
28 
29  bool isIndexHidden(const QModelIndex &index) const;
30 
31  void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command);
32 
33  void mousePressEvent(QMouseEvent *event);
34 
35  void mouseMoveEvent(QMouseEvent *event);
36  void mouseReleaseEvent(QMouseEvent *event);
37 
38  void paintEvent(QPaintEvent *event);
39  void resizeEvent(QResizeEvent *event);
40  void scrollContentsBy(int dx, int dy);
41 
42  QRegion visualRegionForSelection(const QItemSelection &selection) const;
43 
44 private:
45  QRect itemRect(const QModelIndex &item) const;
46  QRegion itemRegion(const QModelIndex &index) const;
47  int rows(const QModelIndex &index = QModelIndex()) const;
48  void updateGeometries();
49 
50  int margin;
51  int totalSize;
52  int validItems;
53  double totalValue;
54  QPoint origin;
55 };
56 
57 #endif // RAWVIEW_H
Definition: rawview.h:6