Scrolling
PipsPager
Dot-style pagination for moving through a small set of pages.
Example

Usage
PipsPager integrated with FlipView
The pager and FlipView keep their selected page indexes synchronized.
#include <FluentQt/Scrolling.h>
using namespace fluent::scrolling;
auto* flipView = new FlipView(this);
flipView->setShowPageIndicator(false);
for (QWidget* page : pages)
flipView->addPage(page);
auto* pager = new PipsPager(this);
pager->setNumberOfPages(flipView->pageCount());
pager->setMaxVisiblePips(5);
connect(pager, &PipsPager::selectedPageIndexChanged,
flipView, &FlipView::setCurrentIndex);
connect(flipView, &FlipView::currentIndexChanged,
pager, &PipsPager::setSelectedPageIndex);import fluentqt
flip_view = fluentqt.FlipView()
flip_view.setShowPageIndicator(False)
for page in pages:
flip_view.addOwnedPage(page)
pager = fluentqt.PipsPager()
pager.setNumberOfPages(flip_view.pageCount())
pager.setMaxVisiblePips(5)
pager.selectedPageIndexChanged.connect(flip_view.setCurrentIndex)
flip_view.currentIndexChanged.connect(pager.setSelectedPageIndex)API
DeclarationNo matching API members.
fluent::scrolling::PipsPager
Inherits QWidget · FluentElement · QMLPlus
Fluent page indicator with selectable pips and navigation buttons.
Constructors
Properties
int numberOfPagesTotal number of pages represented by the pager.
ReadnumberOfPages()WritesetNumberOfPages()NotifynumberOfPagesChanged()int selectedPageIndexCurrently selected page index.
ReadselectedPageIndex()WritesetSelectedPageIndex()NotifyselectedPageIndexChanged()int maxVisiblePipsMaximum number of page pips visible at once.
ReadmaxVisiblePips()WritesetMaxVisiblePips()NotifymaxVisiblePipsChanged()Qt::Orientation orientationPrimary layout or motion orientation.
Readorientation()WritesetOrientation()NotifyorientationChanged()PipsPagerButtonVisibility previousButtonVisibilityVisibility mode for the previous-page button.
ReadpreviousButtonVisibility()WritesetPreviousButtonVisibility()NotifypreviousButtonVisibilityChanged()PipsPagerButtonVisibility nextButtonVisibilityVisibility mode for the next-page button.
ReadnextButtonVisibility()WritesetNextButtonVisibility()NotifynextButtonVisibilityChanged()int pipCellSizeLayout cell size reserved for each pip.
ReadpipCellSize()WritesetPipCellSize()NotifypipCellSizeChanged()int inactivePipDiameterDiameter used by inactive pips.
ReadinactivePipDiameter()WritesetInactivePipDiameter()NotifyinactivePipDiameterChanged()int selectedPipDiameterDiameter used by the selected pip.
ReadselectedPipDiameter()WritesetSelectedPipDiameter()NotifyselectedPipDiameterChanged()bool selectionAnimationEnabledWhether pip selection animation is enabled.
ReadselectionAnimationEnabled()WritesetSelectionAnimationEnabled()NotifyselectionAnimationEnabledChanged()int selectionAnimationDurationDuration of pip selection animation in milliseconds.
ReadselectionAnimationDuration()WritesetSelectionAnimationDuration()NotifyselectionAnimationDurationChanged()qreal selectedVisualOffsetShiboken maps every Q_PROPERTY to a Python constructor keyword. These two properties remain in the real Qt meta-object for C++ compatibility, but are implementation-only in the Python API.
ReadselectedVisualOffset()WritesetSelectedVisualOffset()qreal visibleWindowOffsetOffset of the visible pip window.
ReadvisibleWindowOffset()WritesetVisibleWindowOffset()
Methods
int numberOfPages() constTotal number of pages represented by the pager.
void setNumberOfPages(int pages)Total number of pages represented by the pager.
int selectedPageIndex() constCurrently selected page index.
void setSelectedPageIndex(int index)Currently selected page index.
int maxVisiblePips() constMaximum number of page pips visible at once.
void setMaxVisiblePips(int count)Maximum number of page pips visible at once.
Qt::Orientation orientation() constPrimary layout or motion orientation.
void setOrientation(Qt::Orientation orientation)Primary layout or motion orientation.
PipsPagerButtonVisibility previousButtonVisibility() constVisibility mode for the previous-page button.
void setPreviousButtonVisibility(PipsPagerButtonVisibility visibility)Visibility mode for the previous-page button.
PipsPagerButtonVisibility nextButtonVisibility() constVisibility mode for the next-page button.
void setNextButtonVisibility(PipsPagerButtonVisibility visibility)Visibility mode for the next-page button.
int pipCellSize() constLayout cell size reserved for each pip.
void setPipCellSize(int size)Layout cell size reserved for each pip.
int inactivePipDiameter() constDiameter used by inactive pips.
void setInactivePipDiameter(int diameter)Diameter used by inactive pips.
int selectedPipDiameter() constDiameter used by the selected pip.
void setSelectedPipDiameter(int diameter)Diameter used by the selected pip.
bool selectionAnimationEnabled() constWhether pip selection animation is enabled.
void setSelectionAnimationEnabled(bool enabled)Whether pip selection animation is enabled.
int selectionAnimationDuration() constDuration of pip selection animation in milliseconds.
void setSelectionAnimationDuration(int durationMs)Duration of pip selection animation in milliseconds.
Signals
void numberOfPagesChanged(int pages)Total number of pages represented by the pager.
void selectedPageIndexChanged(int index)Currently selected page index.
void maxVisiblePipsChanged(int count)Maximum number of page pips visible at once.
void orientationChanged(Qt::Orientation orientation)Primary layout or motion orientation.
void previousButtonVisibilityChanged(PipsPagerButtonVisibility visibility)Visibility mode for the previous-page button.
void nextButtonVisibilityChanged(PipsPagerButtonVisibility visibility)Visibility mode for the next-page button.
void pipCellSizeChanged(int size)Layout cell size reserved for each pip.
void inactivePipDiameterChanged(int diameter)Diameter used by inactive pips.
void selectedPipDiameterChanged(int diameter)Diameter used by the selected pip.
void selectionAnimationEnabledChanged(bool enabled)Whether pip selection animation is enabled.
void selectionAnimationDurationChanged(int durationMs)Duration of pip selection animation in milliseconds.
Enumerations
enum class PipsPagerButtonVisibilityCollapsedVisibleVisibleOnPointerOver
Destructors
Subclass interfaces
Methods
Inherited from fluent::FluentElement
Methods
static void setTheme(Theme theme)Updates the global theme and notifies active FluentElement instances.
static void setThemeDeferred(Theme theme)Schedules a visible-first batched theme refresh without blocking the current interaction.
static Theme currentTheme()Returns the currently active global theme.
static bool themeUsesDarkAppearance(Theme theme)Returns whether a theme uses dark-backed chrome and material tokens.
static void refreshTheme()Re-broadcasts the current theme to repaint after a design-token change.
static int themeGeneration()Monotonic counter bumped on every theme change, for staleness checks.
Theme effectiveTheme() constResolves the theme used by this element, honoring an inherited QWidget override.
bool effectiveThemeUsesDarkAppearance() constReturns whether this element's effective theme uses dark-backed chrome.
bool setThemeOverrides(const QJsonObject& overrides)Component-facing token accessors.
QJsonObject themeOverrides() constReturns this element's authored overrides.
void clearThemeOverrides()Restores all token fields to global theme defaults.
const Colors& themeColorsRef() constNon-copying access to the active color set (for hot paint paths).
Material::AcrylicToken themeAcrylic() constMaterial, elevation, and adaptive layout tokens.
QColor themeBackdrop(bool active) constWindow-chrome backdrop color for the given activation state.
virtual void onThemeUpdated()Called after the global theme changes.
Enumerations
enum ThemeGlobal visual theme used when resolving design tokens.
Light = 0Dark = 1HighContrast = 2
Types and aliases
struct ColorsDesign token snapshots returned to components.
Inherited from fluent::QMLPlus
Methods
AnchorLayout::Anchors* anchors()Returns mutable anchors for the QWidget host.
void setState(const QString& name)Applies a named state, or clears state when name is empty.
void addState(const QMLState& state)Registers or replaces a named state definition.
void evaluateStates()Reevaluates conditions; the first registered true condition wins.
QMLPlusRuntime* runtime()Returns the lazy host-owned state observation object.
void setAnchors(const AnchorLayout::Anchors& anchors)Replaces all host anchors and invalidates the parent layout.
void resetAnchors()Clears all host anchors and invalidates the parent layout.
void bind(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction dir = PropertyBinder::OneWay)Binds a source property to a property on the QWidget host.
BindingHandle bindManaged(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction direction = PropertyBinder::OneWay, BindingOptions options = {})Installs a managed direct binding on this QWidget host.
BindingHandle bindComputed(const char* targetProp, const QVector<BindingDependency>& dependencies, std::function<QVariant()> evaluate, BindingOptions options = {})Installs an explicit-dependency C++ expression on this QWidget host.
void addTransition(const StateTransition& transition)Registers a state transition in precedence order.
void setBehavior(const char* propertyName, const PropertyAnimation& animation)Sets the default animation for this host's managed property writes.
void clearBehavior(const char* propertyName)Removes the default animation for future managed writes.
bool writeProperty(const char* propertyName, const QVariant& value)Writes a host property through Behavior without removing its binding.
All inherited Qt members:QWidget