8#include <Cutelyst/cutelyst_global.h>
14class CUTELYST_PLUGIN_UTILS_PAGINATION_EXPORT
Pagination :
public QVariantMap
17 Q_PROPERTY(
int limit READ limit CONSTANT)
18 Q_PROPERTY(
int offset READ offset CONSTANT)
19 Q_PROPERTY(
int currentPage READ currentPage CONSTANT)
20 Q_PROPERTY(
int lastPage READ lastPage CONSTANT)
21 Q_PROPERTY(
int numberOfItems READ numberOfItems CONSTANT)
22 Q_PROPERTY(
bool enableFirst READ enableFirst CONSTANT)
23 Q_PROPERTY(
bool enableLast READ enableLast CONSTANT)
24 Q_PROPERTY(QVector<int> pages READ pages CONSTANT)
35 Pagination(
int numberOfItems,
int itemsPerPage,
int currentPage,
int pageLinks = 10);
41 [[nodiscard]]
int limit()
const;
46 [[nodiscard]]
int offset()
const;
52 [[nodiscard]]
static int offset(
int itemsPerPage,
int currentPage);
57 [[nodiscard]]
int currentPage()
const;
62 [[nodiscard]]
int lastPage()
const;
67 [[nodiscard]]
int numberOfItems()
const;
72 bool enableFirst()
const;
77 bool enableLast()
const;
82 [[nodiscard]] QVector<int> pages()
const;
The Cutelyst namespace holds all public Cutelyst API.