NDEVR
API Documentation
TouchScrollManager

Provides behavior for flicking and other scroll behavior common to the NDEVR API. More...

Static Public Member Functions

static void Run (QWidget *widget)
 Enables touch-scroll behavior on the given widget.

Protected Member Functions

 TouchScrollManager (QWidget *widget)
 Constructs a TouchScrollManager for the given widget.
void onQScrollerStateChangedSlot (QScroller::State newState)
 Slot invoked when the QScroller state changes, used to manage selection during scrolling.
void setTouchScroll (bool setup_for_touch)
 Enables or disables touch-based scrolling on the managed widget.
void setup ()
 Configures touch scroll settings based on the current widget mode.

Protected Attributes

bool m_actual_auto_scroll = false
 The original auto-scroll setting before touch scroll override.
Qt::FocusPolicy m_actual_focus_policy = Qt::NoFocus
 The original focus policy before touch scroll override.
QAbstractItemView::SelectionMode m_actual_selection_mode = QAbstractItemView::NoSelection
 The original selection mode before touch scroll override.
QTimer * m_scroll_timer
 Timer used to delay restoring selection after scrolling.
QWidget * m_target
 The target viewport widget that receives scroll events.
QWidget * m_widget
 The widget being managed for touch scrolling.

Detailed Description

Provides behavior for flicking and other scroll behavior common to the NDEVR API.


Definition at line 42 of file TouchScrollManager.h.

Constructor & Destructor Documentation

◆ TouchScrollManager()

TouchScrollManager::TouchScrollManager ( QWidget * widget)
protected

Constructs a TouchScrollManager for the given widget.

Parameters
[in]widgetThe widget to manage touch scrolling for.

Member Function Documentation

◆ onQScrollerStateChangedSlot()

void TouchScrollManager::onQScrollerStateChangedSlot ( QScroller::State newState)
protected

Slot invoked when the QScroller state changes, used to manage selection during scrolling.

Parameters
[in]newStateThe new scroller state.

◆ Run()

void TouchScrollManager::Run ( QWidget * widget)
static

Enables touch-scroll behavior on the given widget.

Parameters
[in]widgetThe widget to apply touch scrolling to.

◆ setTouchScroll()

void TouchScrollManager::setTouchScroll ( bool setup_for_touch)
protected

Enables or disables touch-based scrolling on the managed widget.

Parameters
[in]setup_for_touchWhether to enable touch scroll behavior.

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