NDEVR
API Documentation
SelectionHighlightBar

Provides a highlighted animation for selecting docked tabs using the NDEVR API Widget Docking system. More...

Public Member Functions

 SelectionHighlightBar (QWidget *parent=nullptr)
 Constructs a SelectionHighlightBar with the given parent widget.
double animationPercent () const
 Returns the current animation progress as a percentage from 0.0 to 1.0.
Bounds< 1, int > currentBounds () const
 Returns the current interpolated bounds of the highlight bar.
void moveHighlight (const Bounds< 1, int > &bounds)
 Moves the highlight bar to the given 1D bounds with an animated transition.
void moveHighlight (QWidget *widget)
 Moves the highlight bar to cover the given widget with an animated transition.
void setAnimationPercent (double animation_percent)
 Sets the current animation progress percentage.
void setVertical (bool vertical)
 Sets whether the highlight bar is oriented vertically or horizontally.
QSize sizeHint () const override
 Returns the recommended size for this highlight bar widget.

Protected Member Functions

void paintEvent (QPaintEvent *) override
 Paints the highlight bar at the current interpolated position.

Detailed Description

Provides a highlighted animation for selecting docked tabs using the NDEVR API Widget Docking system.


Definition at line 48 of file SelectionHighlightBar.h.

Constructor & Destructor Documentation

◆ SelectionHighlightBar()

SelectionHighlightBar::SelectionHighlightBar ( QWidget * parent = nullptr)

Constructs a SelectionHighlightBar with the given parent widget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ animationPercent()

double SelectionHighlightBar::animationPercent ( ) const

Returns the current animation progress as a percentage from 0.0 to 1.0.

Returns
The animation percentage.

◆ currentBounds()

Bounds< 1, int > SelectionHighlightBar::currentBounds ( ) const

Returns the current interpolated bounds of the highlight bar.

Returns
The current 1D bounds.

◆ moveHighlight() [1/2]

void SelectionHighlightBar::moveHighlight ( const Bounds< 1, int > & bounds)

Moves the highlight bar to the given 1D bounds with an animated transition.

Parameters
[in]boundsThe target bounds for the highlight bar.

◆ moveHighlight() [2/2]

void SelectionHighlightBar::moveHighlight ( QWidget * widget)

Moves the highlight bar to cover the given widget with an animated transition.

Parameters
[in]widgetThe widget to highlight.

◆ setAnimationPercent()

void SelectionHighlightBar::setAnimationPercent ( double animation_percent)

Sets the current animation progress percentage.

Parameters
[in]animation_percentThe animation percentage from 0.0 to 1.0.

◆ setVertical()

void SelectionHighlightBar::setVertical ( bool vertical)

Sets whether the highlight bar is oriented vertically or horizontally.

Parameters
[in]verticalTrue for vertical orientation, false for horizontal.

◆ sizeHint()

QSize SelectionHighlightBar::sizeHint ( ) const
override

Returns the recommended size for this highlight bar widget.

Returns
The size hint.

The documentation for this class was generated from the following file: