9 #include <Cutelyst/cutelyst_global.h>
13 class CUTELYST_PLUGIN_UTILS_PAGINATION_EXPORT
Pagination :
public QVariantMap
16 Q_PROPERTY(
int limit READ limit CONSTANT)
17 Q_PROPERTY(
int offset READ offset CONSTANT)
18 Q_PROPERTY(
int currentPage READ currentPage CONSTANT)
19 Q_PROPERTY(
int lastPage READ lastPage CONSTANT)
20 Q_PROPERTY(
int numberOfItems READ numberOfItems CONSTANT)
21 Q_PROPERTY(
bool enableFirst READ enableFirst CONSTANT)
22 Q_PROPERTY(
bool enableLast READ enableLast CONSTANT)
23 Q_PROPERTY(QVector<int> pages READ pages CONSTANT)
33 Pagination(
int numberOfItems,
int itemsPerPage,
int currentPage,
int pageLinks = 10);
49 static int offset(
int itemsPerPage,
int currentPage);
54 int currentPage()
const;
64 int numberOfItems()
const;
69 bool enableFirst()
const;
74 bool enableLast()
const;
79 QVector<int> pages()
const;
The Cutelyst namespace holds all public Cutelyst API.