19 #ifndef OST_SEQUENCE_VIEWER_SEQUENCE_TABLE_VIEW
20 #define OST_SEQUENCE_VIEWER_SEQUENCE_TABLE_VIEW
32 #include <QWheelEvent>
33 namespace ost {
namespace gui {
40 QTableView* GetStaticRow();
41 QTableView* GetStaticColumn();
42 QTableView* GetStaticField();
50 void MouseWheelEvent(QWheelEvent* event);
51 void CopyEvent(QKeyEvent* event);
52 void AlignmentChanged();
54 void columnCountChanged(
const QModelIndex& index,
int old_count,
int new_count);
55 void rowCountChanged(
const QModelIndex& index,
int old_count,
int new_count);
56 void resizeColumnsToContents();
57 void resizeRowsToContents();
60 virtual void mouseDoubleClickEvent(QMouseEvent* event);
61 virtual void mouseReleaseEvent(QMouseEvent* event);
62 virtual void resizeEvent(QResizeEvent* event);
63 virtual void wheelEvent(QWheelEvent* event);
64 virtual void keyPressEvent(QKeyEvent* event);
65 virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
66 void scrollTo (
const QModelIndex & index, ScrollHint hint = EnsureVisible);
69 void InitStaticColumn();
71 void InitStaticField();
72 void ResizeWidth(
int index,
int,
int size);
73 void ResizeHeight(
int index,
int,
int size);
77 std::pair<int, int> GetSimpleSelection(
int row);
78 QTableView* static_column_;
79 QTableView* static_row_;
80 QTableView* static_field_;
82 QModelIndex last_double_click_;
83 bool single_alignment_;
84 void updateStaticColumn();
85 void updateStaticRow();
86 void updateStaticField();