hydrogen 1.2.3
DragScroller Class Reference

Drag scroller object. More...

#include <Selection.h>

Inheritance diagram for DragScroller:

Public Slots

void timeout (void)
 

Public Member Functions

 DragScroller (QScrollArea *pScrollArea)
 
 ~DragScroller ()
 
void endDrag ()
 
void startDrag ()
 

Private Attributes

const int m_nInterval = 20
 
QScrollArea * m_pScrollArea
 
QTimer * m_pTimer
 

Detailed Description

Drag scroller object.

When attached to a QScrollArea, this will scroll the widget whenever the mouse cursor goes out of bounds.

Scrolling is timer-driven to keep a predictable and uniform scroll rate, which increases the further out of bounds the user moves the cursor.

Definition at line 127 of file Selection.h.

Constructor & Destructor Documentation

◆ DragScroller()

DragScroller ( QScrollArea * pScrollArea)
inline

Definition at line 134 of file Selection.h.

◆ ~DragScroller()

~DragScroller ( )
inline

Definition at line 139 of file Selection.h.

Member Function Documentation

◆ endDrag()

void endDrag ( )
inline

Definition at line 154 of file Selection.h.

◆ startDrag()

void startDrag ( )
inline

Definition at line 145 of file Selection.h.

◆ timeout

void timeout ( void )
inlineslot

Definition at line 159 of file Selection.h.

Field Documentation

◆ m_nInterval

const int m_nInterval = 20
private

Definition at line 131 of file Selection.h.

◆ m_pScrollArea

QScrollArea* m_pScrollArea
private

Definition at line 130 of file Selection.h.

◆ m_pTimer

QTimer* m_pTimer
private

Definition at line 129 of file Selection.h.