|
ACF $AcfVersion:0$
|
2-dimensional scrolling widget. More...
#include <CPopupNavigator.h>
Public Slots | |
| void | enablePanning (bool on=true) |
| Sets panning mode to on (true by default). | |
Signals | |
| void | scrollHorizontal (int value) |
| void | scrollVertical (int value) |
| void | aboutToShow () |
| void | wheeled (QWheelEvent *we) |
Public Member Functions | |
| CPopupNavigator (QWidget *parent=0) | |
| Constructor. | |
| virtual | ~CPopupNavigator () |
| Destructor. | |
| void | setBackgroundPen (const QPen &pen) |
| QPen | backgroundPen () const |
| void | setBackgroundBrush (const QBrush &brush) |
| QBrush | backgroundBrush () const |
| void | setSliderPen (const QPen &pen) |
| QPen | sliderPen () const |
| void | setSliderBrush (const QBrush &brush) |
| QBrush | sliderBrush () const |
| void | setOpacity (double opacity) |
| double | opacity () const |
| void | setSliderOpacity (double opacity) |
| double | sliderOpacity () const |
| bool | isPanningEnabled () const |
| Returns true if mouse panning is enabled (default), false otherwise. | |
| void | connectSource (QAbstractScrollArea *area) |
| void | connectSource (QAbstractSlider *horizontal, QAbstractSlider *vertical) |
| void | disconnectSource () |
| void | connectButton (QToolButton *) |
| Connects to a tool button which will show this CPopupNavigator as a popup menu. | |
| void | resetSize (const QSize &size) |
| Removes background pixmap (if any) and resets the size of the navigator to size. | |
| void | resetSize (int width, int height) |
| void | setFromPixmap (const QPixmap &pixmap) |
| Sets the pixmap to be shown as the background of the navigator. | |
| virtual QSize | minimumSizeHint () const |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *) override |
| virtual bool | eventFilter (QObject *, QEvent *) override |
| virtual void | mousePressEvent (QMouseEvent *) override |
| virtual void | mouseMoveEvent (QMouseEvent *) override |
| virtual bool | event (QEvent *) override |
| virtual void | drawBackground (QPainter &p, QRect r) |
| virtual void | drawSlider (QPainter &p, QRect r) |
Properties | |
| double | opacity |
| double | sliderOpacity |
| bool | panning |
| QPen | backgroundPen |
| QBrush | backgroundBrush |
| QPen | sliderPen |
| QBrush | sliderBrush |
2-dimensional scrolling widget.
CPopupNavigator is designed 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 CPopupNavigator, attach it to the source widget (which content is to be scrolled) using one of connectSource() methods. Currently QAbstractScrollArea and QAbstractSlider descedants can be handled by CPopupNavigator.
Definition at line 41 of file CPopupNavigator.h.
|
explicit |
Constructor.
|
virtual |
Destructor.
|
signal |
|
inline |
Definition at line 63 of file CPopupNavigator.h.
|
inline |
Definition at line 60 of file CPopupNavigator.h.
| void iview::CPopupNavigator::connectButton | ( | QToolButton * | ) |
Connects to a tool button which will show this CPopupNavigator as a popup menu.
| void iview::CPopupNavigator::connectSource | ( | QAbstractScrollArea * | area | ) |
| void iview::CPopupNavigator::connectSource | ( | QAbstractSlider * | horizontal, |
| QAbstractSlider * | vertical | ||
| ) |
| void iview::CPopupNavigator::disconnectSource | ( | ) |
|
protectedvirtual |
|
protectedvirtual |
|
slot |
Sets panning mode to on (true by default).
When panning is enabled, you can move the slider by the mouse.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
inline |
Returns true if mouse panning is enabled (default), false otherwise.
Definition at line 80 of file CPopupNavigator.h.
|
inlinevirtual |
Definition at line 101 of file CPopupNavigator.h.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
inline |
Definition at line 72 of file CPopupNavigator.h.
|
overrideprotectedvirtual |
| void iview::CPopupNavigator::resetSize | ( | const QSize & | size | ) |
Removes background pixmap (if any) and resets the size of the navigator to size.
|
inline |
|
signal |
|
signal |
| void iview::CPopupNavigator::setBackgroundBrush | ( | const QBrush & | brush | ) |
| void iview::CPopupNavigator::setBackgroundPen | ( | const QPen & | pen | ) |
| void iview::CPopupNavigator::setFromPixmap | ( | const QPixmap & | pixmap | ) |
Sets the pixmap to be shown as the background of the navigator.
If not set, a default rectangle is drawn.
| void iview::CPopupNavigator::setOpacity | ( | double | opacity | ) |
| void iview::CPopupNavigator::setSliderBrush | ( | const QBrush & | brush | ) |
| void iview::CPopupNavigator::setSliderOpacity | ( | double | opacity | ) |
| void iview::CPopupNavigator::setSliderPen | ( | const QPen & | pen | ) |
|
inline |
Definition at line 69 of file CPopupNavigator.h.
|
inline |
Definition at line 75 of file CPopupNavigator.h.
|
inline |
Definition at line 66 of file CPopupNavigator.h.
|
signal |
|
readwrite |
Definition at line 49 of file CPopupNavigator.h.
|
readwrite |
Definition at line 48 of file CPopupNavigator.h.
|
readwrite |
Definition at line 45 of file CPopupNavigator.h.
|
readwrite |
Definition at line 47 of file CPopupNavigator.h.
|
readwrite |
Definition at line 51 of file CPopupNavigator.h.
|
readwrite |
Definition at line 46 of file CPopupNavigator.h.
|
readwrite |
Definition at line 50 of file CPopupNavigator.h.