Repository navigation
Expand file tree
/
Copy pathAbstractItemModel.nimpl
More file actions
67 lines (61 loc) · 2.64 KB
/
Copy pathAbstractItemModel.nimpl
File metadata and controls
67 lines (61 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
module AbstractItemModel;
import Object;
import Enums;
import ModelIndex;
import PersistentModelIndex;
namedbits SignalMask extends Object.SignalMask {
ColumnsAboutToBeInserted,
ColumnsAboutToBeMoved,
ColumnsAboutToBeRemoved,
ColumnsInserted,
ColumnsMoved,
ColumnsRemoved,
DataChanged,
HeaderDataChanged,
LayoutAboutToBeChanged,
LayoutChanged,
ModelAboutToBeReset,
ModelReset,
RowsAboutToBeInserted,
RowsAboutToBeMoved,
RowsAboutToBeRemoved,
RowsInserted,
RowsMoved,
RowsRemoved
}
enum LayoutChangeHint
{
NoLayoutChangeHint,
VerticalSortHint,
HorizontalSortHint
}
interface SignalHandler {
// Object:
void destroyed(Object.Handle obj);
void objectNameChanged(string objectName);
// AbstractItemModel:
void columnsAboutToBeInserted(ModelIndex.Handle parent, int first, int last);
void columnsAboutToBeMoved(ModelIndex.Handle sourceParent, int sourceStart, int sourceEnd, ModelIndex.Handle destinationParent, int destinationColumn);
void columnsAboutToBeRemoved(ModelIndex.Handle parent, int first, int last);
void columnsInserted(ModelIndex.Handle parent, int first, int last);
void columnsMoved(ModelIndex.Handle sourceParent, int sourceStart, int sourceEnd, ModelIndex.Handle destinationParent, int destinationColumn);
void columnsRemoved(ModelIndex.Handle parent, int first, int last);
void dataChanged(ModelIndex.Handle topLeft, ModelIndex.Handle bottomRight, Array<ItemDataRole> roles);
void headerDataChanged(Orientation orientation, int first, int last);
void layoutAboutToBeChanged(Array<PersistentModelIndex.Handle> parents, LayoutChangeHint hint);
void layoutChanged(Array<PersistentModelIndex.Handle> parents, LayoutChangeHint hint);
void modelAboutToBeReset();
void modelReset();
void rowsAboutToBeInserted(ModelIndex.Handle parent, int start, int end);
void rowsAboutToBeMoved(ModelIndex.Handle sourceParent, int sourceStart, int sourceEnd, ModelIndex.Handle destinationParent, int destinationRow);
void rowsAboutToBeRemoved(ModelIndex.Handle parent, int first, int last);
void rowsInserted(ModelIndex.Handle parent, int first, int last);
void rowsMoved(ModelIndex.Handle sourceParent, int sourceStart, int sourceEnd, ModelIndex.Handle destinationParent, int destinationRow);
void rowsRemoved(ModelIndex.Handle parent, int first, int last);
}
@nodispose // for now since we have no way of creating them
opaque Handle extends Object.Handle {
// overloads of a single method:
ModelIndex.OwnedHandle index(int row, int column);
ModelIndex.OwnedHandle index(int row, int column, ModelIndex.Deferred parent);
}