QSint Library  0.2.2
Public Slots | Public Member Functions | List of all members
QSint::ScrollPanner Class Reference

2-dimensional scrolling widget. More...

#include <scrollpanner.h>

Inherits QWidget.

Public Slots

void enablePanning (bool on=true)
 

Public Member Functions

 ScrollPanner (QWidget *parent=0)
 
virtual ~ScrollPanner ()
 
bool isPanningEnabled () const
 

Detailed Description

2-dimensional scrolling widget.

Since
0.2
ScrollPanner.png
An example of ScrollPanner

ScrollPanner is intended for scrolling in both direction (horizontal and vertical) at the same time. Main frame represents the scrollable area, and the slider inside the frame corresponds to the visible part.

Slider is draggable within the frame (panning mode on). This behavior is enabled by default. If you want to disable the panning, use enablePanning(false).

To use ScrollPanner, attach it to the source widget (which content intended to be scrolled) using one of connectSource() methods. Currently QAbstractScrollArea and QAbstractSlider descedants can be handled by ScrollPanner.

// a QGraphicsView is a descedant of the QAbstractScrollArea
QGraphicsView *myView;
...
// create ScrollPanner and connect it to the QGraphicsView
QSint::ScrollPanner *myPanner = new ScrollPanner(this);
myPanner->connectSource(myView);

Constructor & Destructor Documentation

QSint::ScrollPanner::ScrollPanner ( QWidget *  parent = 0)
explicit

Constructor

QSint::ScrollPanner::~ScrollPanner ( )
virtual

Destructor

Member Function Documentation

void QSint::ScrollPanner::enablePanning ( bool  on = true)
slot

Sets panning mode to on (true by default). When panning is enabled, you can move the slider by the mouse.

bool QSint::ScrollPanner::isPanningEnabled ( ) const
inline

Returns true if mouse panning is enabled (default), false otherwise.

See Also
enablePanning()

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

© Sintegrial Technologies 2011-2014
http://www.sintegrial.com