ORE Studio 0.0.4
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
PaginationWidget Class Reference

Widget providing pagination controls for data tables. More...

#include <PaginationWidget.hpp>

Inherits QWidget.

Collaboration diagram for PaginationWidget:
Collaboration graph

Signals

void page_size_changed (std::uint32_t page_size)
 Emitted when user changes the page size selection.
 
void load_all_requested ()
 Emitted when user requests to load all remaining data.
 
void page_requested (std::uint32_t offset, std::uint32_t limit)
 Emitted when user requests to navigate to a specific page.
 

Public Member Functions

 PaginationWidget (QWidget *parent=nullptr)
 
void update_state (std::uint32_t loaded_count, std::uint32_t total_count)
 Update the pagination display with current state.
 
std::uint32_t page_size () const
 Get the selected page size.
 
void set_load_all_enabled (bool enabled)
 Enable or disable the Load All button.
 
std::uint32_t current_page () const
 Get the current page number (0-based).
 
std::uint32_t total_pages () const
 Get the total number of pages.
 
std::uint32_t current_offset () const
 Calculate the offset for the current page.
 

Detailed Description

Widget providing pagination controls for data tables.

Displays record count information and navigation buttons for paginated data views. Emits signals when user requests page changes.

Member Function Documentation

◆ update_state()

void update_state ( std::uint32_t  loaded_count,
std::uint32_t  total_count 
)

Update the pagination display with current state.

Parameters
loaded_countNumber of records currently loaded
total_countTotal number of records available

◆ page_size()

std::uint32_t page_size ( ) const

Get the selected page size.

Returns
The number of records per page

◆ set_load_all_enabled()

void set_load_all_enabled ( bool  enabled)

Enable or disable the Load All button.

Parameters
enabledWhether to enable the button

◆ page_size_changed

void page_size_changed ( std::uint32_t  page_size)
signal

Emitted when user changes the page size selection.

Parameters
page_sizeThe new page size

◆ page_requested

void page_requested ( std::uint32_t  offset,
std::uint32_t  limit 
)
signal

Emitted when user requests to navigate to a specific page.

Parameters
offsetThe offset (number of records to skip)
limitThe page size (number of records to fetch)