1 #ifndef IMPORTMIDI_VIEW_H 2 #define IMPORTMIDI_VIEW_H 11 : QStyledItemDelegate(parent)
26 void paint(QPainter *painter,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const 28 this->QStyledItemDelegate::paint(painter, option, index);
32 painter->setPen(option.palette.foreground().color());
33 painter->drawLine(option.rect.bottomLeft(), option.rect.bottomRight());
38 painter->setPen(option.palette.foreground().color());
40 const int x = option.rect.right() - 1;
41 painter->drawLine(x, option.rect.top(), x, option.rect.bottom());
59 void setModel(QAbstractItemModel *model);
61 void setFrozenRowCount(
int count);
62 void setFrozenColCount(
int count);
65 void restoreHHeaderState(
const QByteArray &data);
66 void restoreVHeaderState(
const QByteArray &data);
67 void setHHeaderResizeMode(QHeaderView::ResizeMode mode);
68 void setVHeaderDefaultSectionSize(
int size);
73 void resizeEvent(QResizeEvent *event);
74 bool viewportEvent(QEvent *event);
75 void wheelEvent(QWheelEvent *event);
78 void currentChanged(
const QModelIndex &,
const QModelIndex &);
80 void updateMainViewSectionWidth(
int,
int,
int);
81 void updateMainViewSectionHeight(
int,
int,
int);
82 void updateFrozenSectionWidth(
int,
int,
int);
83 void updateFrozenSectionHeight(
int,
int,
int);
84 void onHSectionMove(
int,
int,
int);
85 void onVSectionMove(
int,
int,
int);
88 void initHorizontalView();
89 void initVerticalView();
90 void initCornerView();
92 void initConnections();
93 void setupEditTriggers();
94 void updateFrozenTableGeometry();
96 void keepVisible(
const QModelIndex &previous,
const QModelIndex ¤t);
98 int frozenRowHeight();
101 int frozenVTableWidth();
102 int frozenHTableHeight();
104 void updateFocus(
int currentRow,
int currentColumn);
115 #endif // IMPORTMIDI_VIEW_H void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: importmidi_view.h:26
QTableView * _frozenVTableView
Definition: importmidi_view.h:107
SeparatorDelegate * _delegate
Definition: importmidi_view.h:109
SeparatorDelegate(QObject *parent=0)
Definition: importmidi_view.h:10
int _frozenColCount
Definition: importmidi_view.h:111
int _frozenColIndex
Definition: importmidi_view.h:47
int _frozenRowIndex
Definition: importmidi_view.h:46
int _frozenRowCount
Definition: importmidi_view.h:110
Definition: importmidi_view.h:7
QTableView * _frozenCornerTableView
Definition: importmidi_view.h:108
void setFrozenRowIndex(int index)
Definition: importmidi_view.h:16
Definition: importmidi_view.h:51
QTableView * _frozenHTableView
Definition: importmidi_view.h:106
void setFrozenColIndex(int index)
Definition: importmidi_view.h:21