Improved the documentation

This commit is contained in:
Filippo Cucchetto 2016-07-10 01:24:53 +02:00
parent 544990386a
commit fcdb2ce98f
2 changed files with 62 additions and 30 deletions

View File

@ -382,6 +382,16 @@ DOS_API void DOS_CALL dos_qmetaobject_delete(DosQMetaObject *vptr);
DOS_API DosQMetaObject *DOS_CALL dos_qabstractlistmodel_qmetaobject();
/// \brief Create a new QAbstractListModel
/// \param metaObject The QMetaObject for this QAbstractListModel
/// \param dObjectCallback The callback for handling the properties read/write and slots execution
/// \param rowCountCallback The callback for handling the QAbstractListModel::rowCount() execution
/// \param columnCountCallback The callback for handling the QAbstractListModel::columnCount() execution
/// \param dataCallback The callback for handling the QAbstractListModel::data() execution
/// \param setDataCallback The callback for handling the QAbstractListModel::setData() execution
/// \param roleNamesCallback The callback for handling the QAbstractListModel::roleNames() execution
/// \param flagsCallback The callback for handling the QAbstractListModel::flags() execution
/// \param headedDataCallback The callback for handling the QAbstractListModel::headerData() execution
DOS_API DosQAbstractListModel *DOS_CALL dos_qabstractlistmodel_create(void *callbackObject,
DosQMetaObject *metaObject,
DObjectCallback dObjectCallback,
@ -392,12 +402,38 @@ DOS_API DosQAbstractListModel *DOS_CALL dos_qabstractlistmodel_create(void *call
RoleNamesCallback roleNamesCallback,
FlagsCallback flagsCallback,
HeaderDataCallback headerDataCallback);
/// \brief Calls the QAbstractListModel::beginInsertRows() function
/// \param vptr The QAbstractListModel
/// \param parent The parent QModelIndex
/// \param first The first row in the range
/// \param last The last row in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
DOS_API void DOS_CALL dos_qabstractlistmodel_beginInsertRows(DosQAbstractListModel *vptr, DosQModelIndex *parent, int first, int last);
DOS_API void DOS_CALL dos_qabstractlistmodel_endInsertRows (DosQAbstractListModel *vptr);
/// \brief Calls the QAbstractListModel::endInsertRows() function
/// \param vptr The QAbstractListModel
DOS_API void DOS_CALL dos_qabstractlistmodel_endInsertRows(DosQAbstractListModel *vptr);
/// \brief Calls the QAbstractListModel::beginRemovetRows() function
/// \param vptr The QAbstractListModel
/// \param parent The parent QModelIndex
/// \param first The first column in the range
/// \param last The last column in the range
/// \note The \p parent QModelIndex is owned by the caller thus it will not be deleted
DOS_API void DOS_CALL dos_qabstractlistmodel_beginRemoveRows(DosQAbstractListModel *vptr, DosQModelIndex *parent, int first, int last);
DOS_API void DOS_CALL dos_qabstractlistmodel_endRemoveRows (DosQAbstractListModel *vptr);
/// \brief Calls the QAbstractListModel::endRemoveRows() function
/// \param vptr The QAbstractListModel
DOS_API void DOS_CALL dos_qabstractlistmodel_endRemoveRows(DosQAbstractListModel *vptr);
/// \brief Calls the QAbstractListModel::beginResetModel() function
/// \param vptr The QAbstractListModel
DOS_API void DOS_CALL dos_qabstractlistmodel_beginResetModel(DosQAbstractListModel *vptr);
DOS_API void DOS_CALL dos_qabstractlistmodel_endResetModel (DosQAbstractListModel *vptr);
/// \brief Calls the QAbstractListModel::endResetModel() function
/// \param vptr The QAbstractListModel
DOS_API void DOS_CALL dos_qabstractlistmodel_endResetModel(DosQAbstractListModel *vptr);
/// \brief Emit the dataChanged signal
/// \param vptr The DosQAbstractListModel pointer

View File

@ -34,7 +34,7 @@ typedef void DosQAbstractListModel;
/// A pointer to a QQmlApplicationEngine
typedef void DosQQmlApplicationEngine;
/// pA pointer to a QQuickView
/// A pointer to a QQuickView
typedef void DosQQuickView;
/// A pointer to a QQmlContext
@ -52,52 +52,48 @@ typedef void DosQMetaObject;
/// A pointer to a QObject
typedef void DosQObject;
/// Called when a slot should be executed
/**
* \param self The pointer to the QObject in the binded language
* \param slotName The slotName as DosQVariant. It should not be deleted
* \param argc The number of arguments
* \param argv An array of DosQVariant pointers. They should not be deleted
*/
/// Called when a property is readed/written or a slot should be executed
/// \param self The pointer of QObject in the binded language
/// \param slotName The slotName as DosQVariant
/// \param argc The number of arguments
/// \param argv An array of DosQVariant pointers
/// \note The \p slotName is owned by the framework thus it \b shouldn't be deleted
/// \note The \p argv array is owned by the library thus it \b shouldn't be deleted
typedef void (DOS_CALL *DObjectCallback)(void *self, DosQVariant *slotName, int argc, DosQVariant **argv);
/// Called when the QAbstractListModel::rowCount method must be executed
/**
* \param self The pointer to the QAbstractListModel in the binded language
* \param index The parent DosQModelIndex. It should not be deleted
* \param result The rowCount result. This must be deferenced and filled from the binded language. It should not be deleted
*/
/// \param self The pointer of the QAbstractListModel in the binded language
/// \param index The parent DosQModelIndex
/// \param[out] result The rowCount result. This must be deferenced and filled from the binded language
/// \note The \p parent QModelIndex is owned by the DOtherSide library thus it \b shouldn't be deleted
/// \note The \p result arg is an out parameter so it should be deleted
typedef void (DOS_CALL *RowCountCallback)(void *self, const DosQModelIndex *parent, int *result);
/// Called when the QAbstractListModel::columnCount method must be executed
/**
* \param self The pointer to the QAbstractListModel in the binded language
* \param index The parent DosQModelIndex. It should not be deleted
* \param result The rowCount result. This must be deferenced and filled from the binded language. It should not be deleted
*/
/// \param self The pointer to the QAbstractListModel in the binded language
/// \param index The parent DosQModelIndex
/// \param[out] result The rowCount result. This must be deferenced and filled from the binded language
/// \note The \p parent QModelIndex is owned by the DOtherSide library thus it \b shouldn't be deleted
/// \note The \p result arg is an out parameter so it should be deleted
typedef void (DOS_CALL *ColumnCountCallback)(void *self, const DosQModelIndex *parent, int *result);
/// Called when the QAbstractListModel::data method must be executed
/**
* \param self The pointer to the QAbstractListModel in the binded language
* \param index The DosQModelIndex to which we request the data. It should not be deleted
* \param result The DosQVariant result. This must be deferenced and filled from the binded language.
* It should not be deleted. See dos_qvariant_assign or other DosQVariant setters
*/
/// \param self The pointer to the QAbstractListModel in the binded language
/// \param index The DosQModelIndex to which we request the data
/// \param[out] result The DosQVariant result. This must be deferenced and filled from the binded language.
/// \note The \p index QModelIndex is owned by the DOtherSide library thus it \b shouldn't be deleted
/// \note The \p result arg is an out parameter so it should be deleted
typedef void (DOS_CALL *DataCallback)(void *self, const DosQModelIndex *index, int role, DosQVariant *result);
/// Called when the QAbstractListModel::setData method must be executed
typedef void (DOS_CALL *SetDataCallback)(void *self, const DosQModelIndex *index, const DosQVariant *value, int role, bool *result);
/// Called when the QAbstractListModel::roleNames method must be executed
typedef void (DOS_CALL *RoleNamesCallback)(void *self, DosQHashIntQByteArray *result);
/// Called when the QAbstractListModel::flags method must be called
typedef void (DOS_CALL *FlagsCallback)(void *self, const DosQModelIndex *index, int *result);
/// Called when the QAbstractListModel::headerData method must be called
typedef void (DOS_CALL *HeaderDataCallback)(void *self, int section, int orientation, int role, DosQVariant *result);