QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
A QScrollArea subclass with improved scrolling behavior. More...
#include <qgsscrollarea.h>
Public Member Functions | |
QgsScrollArea (QWidget *parent=nullptr) | |
Constructor for QgsScrollArea. More... | |
bool | hasScrolled () const |
Returns true if a scroll recently occurred within the QScrollArea or its child viewport() More... | |
void | resetHasScrolled () |
Resets the hasScrolled() flag. More... | |
void | scrollOccurred () |
Should be called when a scroll occurs on with the QScrollArea itself or its child viewport(). More... | |
void | setVerticalOnly (bool verticalOnly) |
Sets whether the scroll area only applies vertical. More... | |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *event) override |
void | wheelEvent (QWheelEvent *event) override |
A QScrollArea subclass with improved scrolling behavior.
QgsScrollArea should be used instead of QScrollArea widgets. In most cases the use is identical, however QgsScrollArea has extra logic to avoid wheel events changing child widget values when the mouse cursor is temporarily located over a child widget during a scroll event.
All QGIS code and plugins should use QgsScrollArea in place of QScrollArea.
Definition at line 41 of file qgsscrollarea.h.
|
explicit |
Constructor for QgsScrollArea.
Definition at line 26 of file qgsscrollarea.cpp.
bool QgsScrollArea::hasScrolled | ( | ) | const |
Returns true
if a scroll recently occurred within the QScrollArea or its child viewport()
Definition at line 54 of file qgsscrollarea.cpp.
void QgsScrollArea::resetHasScrolled | ( | ) |
|
overrideprotected |
Definition at line 41 of file qgsscrollarea.cpp.
void QgsScrollArea::scrollOccurred | ( | ) |
Should be called when a scroll occurs on with the QScrollArea itself or its child viewport().
Definition at line 48 of file qgsscrollarea.cpp.
void QgsScrollArea::setVerticalOnly | ( | bool | verticalOnly | ) |
Sets whether the scroll area only applies vertical.
If set to true
, then scroll area children will resize horizontally to match the width of the scroll area widget.
Definition at line 64 of file qgsscrollarea.cpp.
|
overrideprotected |
Definition at line 34 of file qgsscrollarea.cpp.