diff --git a/src/nimqml/private/dotherside.nim b/src/nimqml/private/dotherside.nim index 428f87b..d9721dd 100644 --- a/src/nimqml/private/dotherside.nim +++ b/src/nimqml/private/dotherside.nim @@ -279,6 +279,10 @@ proc dos_qabstractitemmodel_beginRemoveRows(model: DosQAbstractItemModel, first: cint, last: cint) {.cdecl, dynlib: dynLibName, importc.} proc dos_qabstractitemmodel_endRemoveRows(model: DosQAbstractItemModel) {.cdecl, dynlib: dynLibName, importc.} +proc dos_qabstractitemmodel_beginMoveRows(model: DosQAbstractItemModel, + sourceParentIndex: DosQModelIndex, sourceFirst: cint, sourceLast: cint, + destParentIndex: DosQModelIndex, destinationChild: cint) {.cdecl, dynlib: dynLibName, importc.} +proc dos_qabstractitemmodel_endMoveRows(model: DosQAbstractItemModel) {.cdecl, dynlib: dynLibName, importc.} proc dos_qabstractitemmodel_beginInsertColumns(model: DosQAbstractItemModel, parentIndex: DosQModelIndex, first: cint, diff --git a/src/nimqml/private/qabstractitemmodel.nim b/src/nimqml/private/qabstractitemmodel.nim index f61f3ab..9ac759f 100644 --- a/src/nimqml/private/qabstractitemmodel.nim +++ b/src/nimqml/private/qabstractitemmodel.nim @@ -195,6 +195,16 @@ proc endRemoveRows*(self: QAbstractItemModel) = debugMsg("QAbstractItemModel", "endRemoveRows") dos_qabstractitemmodel_endRemoveRows(self.vptr.DosQAbstractItemModel) +proc beginMoveRows*(self: QAbstractItemModel, sourceParentIndex: QModelIndex, sourceFirst: int, sourceLast: int, destParentIndex: QModelIndex, destinationChild: int) = + ## Notify the view that the model is about to move rows + debugMsg("QAbstractItemModel", "beginMoveRows") + dos_qabstractitemmodel_beginMoveRows(self.vptr.DosQAbstractItemModel, sourceParentIndex.vptr, sourceFirst.cint, sourceLast.cint, destParentIndex.vptr, destinationChild.cint) + +proc endMoveRows*(self: QAbstractItemModel) = + ## Notify the view that the rows have been moved + debugMsg("QAbstractItemModel", "endMoveRows") + dos_qabstractitemmodel_endMoveRows(self.vptr.DosQAbstractItemModel) + proc beginInsertColumns*(self: QAbstractItemModel, parentIndex: QModelIndex, first: int, last: int) = ## Notify the view that the model is about to inserting the given number of columns debugMsg("QAbstractItemModel", "beginInsertColumns")