hydrogen 1.1.1
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 startDrag ()
 
void endDrag ()
 

Private Attributes

QTimer * m_pTimer
 
QScrollArea * m_pScrollArea
 
const int m_nInterval = 20
 

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.

Constructor & Destructor Documentation

◆ DragScroller()

DragScroller ( QScrollArea *  pScrollArea)
inline

◆ ~DragScroller()

~DragScroller ( )
inline

Member Function Documentation

◆ endDrag()

void endDrag ( )
inline

◆ startDrag()

void startDrag ( )
inline

◆ timeout

void timeout ( void  )
inlineslot

Field Documentation

◆ m_nInterval

const int m_nInterval = 20
private

◆ m_pScrollArea

QScrollArea* m_pScrollArea
private

◆ m_pTimer

QTimer* m_pTimer
private