#pragma once
#include <QtCore/QItemSelectionModel>
#include "signal.h"
inline bool QItemSelectionModel_hasSelection(QItemSelectionModel *sm) {
return sm->hasSelection();
}
inline void QItemSelectionModel_onSelectionChanged(QItemSelectionModel *sm,
uint64_t ctx) {
QObject::connect(sm, &QItemSelectionModel::selectionChanged,
[ctx](const QItemSelection &, const QItemSelection &) {
if (g_hasVoidTrampoline) g_voidTrampoline(ctx);
});
}
inline void QItemSelectionModel_onCurrentChanged(QItemSelectionModel *sm,
uint64_t ctx) {
QObject::connect(sm, &QItemSelectionModel::currentChanged,
[ctx](const QModelIndex &, const QModelIndex &) {
if (g_hasVoidTrampoline) g_voidTrampoline(ctx);
});
}