#include <YACSWidgets.hxx>
|
| QModelIndex | moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers) |
| |
| bool | event (QEvent *e) |
| |
Definition at line 30 of file YACSWidgets.hxx.
◆ YTableView()
| YTableView::YTableView |
( |
QWidget * |
parent = 0 | ) |
|
◆ event()
| bool YTableView::event |
( |
QEvent * |
e | ) |
|
|
protected |
Definition at line 34 of file YACSWidgets.cxx.
35{
36 if (e->type() == QEvent::ShortcutOverride)
37 {
38 e->accept();
39 return true;
40 }
41 return QTableView::event(e);
42}
◆ moveCursor()
| QModelIndex YTableView::moveCursor |
( |
CursorAction |
cursorAction, |
|
|
Qt::KeyboardModifiers |
modifiers |
|
) |
| |
|
protected |
Definition at line 44 of file YACSWidgets.cxx.
45{
46 QModelIndex ix = currentIndex();
47
48 if (!ix.isValid())
49 return QTableView::moveCursor(cursorAction, modifiers);
50
51 if(cursorAction==QAbstractItemView::MoveNext || cursorAction==QAbstractItemView::MovePrevious)
52 {
53 int row=ix.row();
54 QModelIndex parent=ix.parent();
55 int rowCount=model()->rowCount(parent);
56
57 while(1)
58 {
59 if(cursorAction==QAbstractItemView::MoveNext)
60 {
61 row=row+1;
62 if(row >= rowCount)
63 row=0;
64 }
65 else
66 {
67 row=row-1;
68 if(row < 0)
69 row=rowCount -1;
70 }
71 if(!isRowHidden(row))
72 break;
73 }
74 return model()->index(row, ix.column(), parent);
75 }
76 return QTableView::moveCursor(cursorAction, modifiers);
77}
The documentation for this class was generated from the following files: