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)
26 Pagination() =
default;
35 Pagination(
int numberOfItems,
int itemsPerPage,
int currentPage,
int pageLinks = 10);
36 virtual ~Pagination();
52 static int offset(
int itemsPerPage,
int currentPage);
57 int currentPage()
const;
67 int numberOfItems()
const;
72 bool enableFirst()
const;
77 bool enableLast()
const;