summaryrefslogtreecommitdiffstats
path: root/src/helper/remoteobjects/qifpagingmodelqtroadapter.cpp
blob: ea797508b86e9caadacd6257d8b308865698e978 (plain)
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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qifpagingmodelqtroadapter.h"

QIfPagingModelQtRoAdapter::QIfPagingModelQtRoAdapter(const QString &remoteObjectsLookupName, QIfPagingModelInterface *parent)
    : QIfPagingModelSource(parent)
    , m_remoteObjectsLookupName(remoteObjectsLookupName)
    , m_backend(parent)
{
    connect(m_backend, &QIfPagingModelInterface::supportedCapabilitiesChanged, this, &QIfPagingModelQtRoAdapter::supportedCapabilitiesChanged);
    connect(m_backend, &QIfPagingModelInterface::countChanged, this, &QIfPagingModelQtRoAdapter::countChanged);
    connect(m_backend, &QIfPagingModelInterface::dataFetched, this, &QIfPagingModelQtRoAdapter::dataFetched);
    connect(m_backend, &QIfPagingModelInterface::dataChanged, this, &QIfPagingModelQtRoAdapter::dataChanged);
}

QString QIfPagingModelQtRoAdapter::remoteObjectsLookupName() const
{
    return m_remoteObjectsLookupName;
}

void QIfPagingModelQtRoAdapter::registerInstance(const QUuid &identifier)
{
    m_backend->registerInstance(identifier);
}

void QIfPagingModelQtRoAdapter::unregisterInstance(const QUuid &identifier)
{
    m_backend->unregisterInstance(identifier);
}

void QIfPagingModelQtRoAdapter::fetchData(const QUuid &identifier, int start, int count)
{
    m_backend->fetchData(identifier, start, count);
}

#include "moc_qifpagingmodelqtroadapter.cpp"