21 #include <QVariantMap>
22 #include <Cutelyst/cutelyst_global.h>
26 class CUTELYST_PLUGIN_UTILS_PAGINATION_EXPORT
Pagination :
public QVariantMap
29 Q_PROPERTY(
int limit READ limit CONSTANT)
30 Q_PROPERTY(
int offset READ offset CONSTANT)
31 Q_PROPERTY(
int currentPage READ currentPage CONSTANT)
32 Q_PROPERTY(
int lastPage READ lastPage CONSTANT)
33 Q_PROPERTY(
int numberOfItems READ numberOfItems CONSTANT)
34 Q_PROPERTY(
bool enableFirst READ enableFirst CONSTANT)
35 Q_PROPERTY(
bool enableLast READ enableLast CONSTANT)
46 Pagination(
int numberOfItems,
int itemsPerPage,
int currentPage,
int pageLinks = 10);
62 static int offset(
int itemsPerPage,
int currentPage);
67 int currentPage()
const;
77 int numberOfItems()
const;
82 bool enableFirst()
const;
87 bool enableLast()
const;
98 #endif // PAGINATION_H