MCPcopy Create free account
hub / github.com/AncientLysine/BiliLocal / LoadProxyModel

Method LoadProxyModel

src/Menu.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41{
42public:
43 explicit LoadProxyModel(QObject *parent=0):
44 QAbstractProxyModel(parent)
45 {
46 setSourceModel(Load::instance()->getModel());
47 connect(sourceModel(),&QAbstractItemModel::rowsInserted,this,&LoadProxyModel::endInsertRows);
48 connect(sourceModel(),&QAbstractItemModel::rowsAboutToBeInserted,[this](const QModelIndex &parent,int sta,int end){
49 beginInsertRows(mapFromSource(parent),sta,end);
50 });
51 connect(sourceModel(),&QAbstractItemModel::layoutAboutToBeChanged,this,&LoadProxyModel::layoutAboutToBeChanged);
52 connect(sourceModel(),&QAbstractItemModel::layoutChanged,this,&LoadProxyModel::layoutChanged);
53 }
54
55 int columnCount(const QModelIndex &) const
56 {

Callers

nothing calls this directly

Calls 1

getModelMethod · 0.80

Tested by

no test coverage detected