25class CUTELYST_PLUGIN_UTILS_PAGINATION_EXPORT
Pagination :
public QVariantMap
31 Q_PROPERTY(
int limit READ limit CONSTANT)
35 Q_PROPERTY(
int offset READ offset CONSTANT)
39 Q_PROPERTY(
int currentPage READ currentPage CONSTANT)
43 Q_PROPERTY(
int lastPage READ lastPage CONSTANT)
47 Q_PROPERTY(
int numberOfItems READ numberOfItems CONSTANT)
51 Q_PROPERTY(
bool enableFirst READ enableFirst CONSTANT)
55 Q_PROPERTY(
bool enableLast READ enableLast CONSTANT)
59 Q_PROPERTY(
QVector<
int> pages READ pages CONSTANT)
70 Pagination(
int numberOfItems,
int itemsPerPage,
int currentPage,
int pageLinks = 10);
80 [[nodiscard]]
int limit() const;
85 [[nodiscard]]
int offset() const;
91 [[nodiscard]] static
int offset(
int itemsPerPage,
int currentPage);
96 [[nodiscard]]
int currentPage() const;
101 [[nodiscard]]
int lastPage() const;
106 [[nodiscard]]
int numberOfItems() const;
111 bool enableFirst() const;
116 bool enableLast() const;
121 [[nodiscard]]
QVector<
int> pages() const;