import QtQuick import Weave.Controls import Weave.Templates as T T.PaginationFooter { id: footer implicitWidth: implicitContentWidth implicitHeight: implicitContentHeight contentItem: TableLayoutRow { leftMargin: Theme.component.table.footer.paddingLeft topMargin: Theme.component.table.footer.paddingTop rightMargin: Theme.component.table.footer.paddingRight bottomMargin: Theme.component.table.footer.paddingBottom verticalItemAlignment: TableLayout.AlignVCenter Text { TableLayout.horizontalFillMode: TableLayout.Preferred font.family: Theme.component.table.fontFamily font.pixelSize: Theme.component.table.fontSize font.weight: Theme.component.table.fontWeight color: Theme.component.table.textColor horizontalAlignment: Text.AlignRight text: qsTr("Rows per page:") } Dropdown { T.TableLayout.minimumWidth: Theme.component.table.footer.dropdown.minWidth T.TableLayout.leftMargin: Theme.component.table.footer.dropdown.marginLeft T.TableLayout.topMargin: Theme.component.table.footer.dropdown.marginTop T.TableLayout.rightMargin: Theme.component.table.footer.dropdown.marginRight T.TableLayout.bottomMargin: Theme.component.table.footer.dropdown.marginBottom textRole: "modelData" valueRole: "modelData" model: footer.pageSizes currentIndex: footer.pageSizes.indexOf(footer.pageSize) displayCheckmarks: false onActivated: footer.pageSize = currentValue } Text { font.family: Theme.component.table.fontFamily font.pixelSize: Theme.component.table.fontSize font.weight: Theme.component.table.fontWeight color: Theme.component.table.textColor text: qsTr("%1-%2 of %3") .arg(Math.min(footer.minimumIndex + 1, footer.itemCount)) .arg(Math.min(footer.maximumIndex, footer.itemCount)) .arg(footer.itemCount) } TableLayoutRow { leftMargin: Theme.component.table.footer.actionsContainer.marginLeft topMargin: Theme.component.table.footer.actionsContainer.marginTop rightMargin: Theme.component.table.footer.actionsContainer.marginRight bottomMargin: Theme.component.table.footer.actionsContainer.marginBottom IconButton { icon.name: "caret-left" icon.width: Theme.component.table.fixedIcon.width icon.height: Theme.component.table.fixedIcon.height enabled: footer.currentPage > 0 onClicked: footer.previous() } IconButton { icon.name: "caret-right" icon.width: Theme.component.table.fixedIcon.width icon.height: Theme.component.table.fixedIcon.height enabled: footer.currentPage + 1 < footer.pageCount onClicked: footer.next() } } } background: Rectangle { id: backgroundItem color: Theme.component.table.footer.backgroundColor Rectangle { width: backgroundItem.width height: Theme.component.table.footer.borderTopWidth color: Theme.component.table.footer.borderTopColor } } }