QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
A QWidget subclass for creating widgets which float outside of the normal Qt layout system. More...
#include <qgsfloatingwidget.h>
Public Types | |
enum | AnchorPoint { TopLeft , TopMiddle , TopRight , MiddleLeft , Middle , MiddleRight , BottomLeft , BottomMiddle , BottomRight } |
Reference points for anchoring widget position. More... | |
Signals | |
void | anchorPointChanged (QgsFloatingWidget::AnchorPoint point) |
Emitted when the anchor point changes. | |
void | anchorWidgetChanged (QWidget *widget) |
Emitted when the anchor widget changes. | |
void | anchorWidgetPointChanged (QgsFloatingWidget::AnchorPoint point) |
Emitted when the anchor widget point changes. | |
Public Member Functions | |
QgsFloatingWidget (QWidget *parent=nullptr) | |
Constructor for QgsFloatingWidget. | |
AnchorPoint | anchorPoint () const |
Returns the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved. | |
QWidget * | anchorWidget () |
Returns the widget that the floating widget is "anchored" tto. | |
AnchorPoint | anchorWidgetPoint () const |
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which the floating widget should "attach" to. | |
void | setAnchorPoint (AnchorPoint point) |
Sets the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved. | |
void | setAnchorWidget (QWidget *widget) |
Sets the widget to "anchor" the floating widget to. | |
void | setAnchorWidgetPoint (AnchorPoint point) |
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which the floating widget should "attach" to. | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *e) override |
void | resizeEvent (QResizeEvent *e) override |
void | showEvent (QShowEvent *e) override |
Properties | |
AnchorPoint | anchorPoint |
QWidget * | anchorWidget |
AnchorPoint | anchorWidgetPoint |
A QWidget subclass for creating widgets which float outside of the normal Qt layout system.
Floating widgets use an "anchor widget" to determine how they are anchored within their parent widget.
Definition at line 33 of file qgsfloatingwidget.h.
Reference points for anchoring widget position.
Definition at line 42 of file qgsfloatingwidget.h.
QgsFloatingWidget::QgsFloatingWidget | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsFloatingWidget.
parent | parent widget |
Definition at line 26 of file qgsfloatingwidget.cpp.
|
inline |
Returns the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved.
Definition at line 82 of file qgsfloatingwidget.h.
|
signal |
Emitted when the anchor point changes.
QWidget * QgsFloatingWidget::anchorWidget | ( | ) |
Returns the widget that the floating widget is "anchored" tto.
The floating widget will be repositioned whenever the anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
|
signal |
Emitted when the anchor widget changes.
|
inline |
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which the floating widget should "attach" to.
The floating widget should remain fixed in the same relative position to this anchor widget whenever the widget's parent is resized or moved.
Definition at line 98 of file qgsfloatingwidget.h.
|
signal |
Emitted when the anchor widget point changes.
|
overrideprotected |
Definition at line 93 of file qgsfloatingwidget.cpp.
|
overrideprotected |
Definition at line 106 of file qgsfloatingwidget.cpp.
void QgsFloatingWidget::setAnchorPoint | ( | AnchorPoint | point | ) |
Sets the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved.
point | anchor point |
Definition at line 67 of file qgsfloatingwidget.cpp.
void QgsFloatingWidget::setAnchorWidget | ( | QWidget * | widget | ) |
Sets the widget to "anchor" the floating widget to.
The floating widget will be repositioned whenever the anchor widget moves or is resized so that it maintains the same relative position to the anchor widget.
widget | anchor widget. Both the floating widget and the anchor widget must share some common parent. |
Definition at line 37 of file qgsfloatingwidget.cpp.
void QgsFloatingWidget::setAnchorWidgetPoint | ( | AnchorPoint | point | ) |
Returns the anchor widget's anchor point, which corresponds to the point on the anchor widget which the floating widget should "attach" to.
The floating widget should remain fixed in the same relative position to this anchor widget whenever the widget's parent is resized or moved.
Definition at line 77 of file qgsfloatingwidget.cpp.
|
overrideprotected |
Definition at line 87 of file qgsfloatingwidget.cpp.
|
readwrite |
Definition at line 37 of file qgsfloatingwidget.h.
|
readwrite |
Definition at line 36 of file qgsfloatingwidget.h.
|
readwrite |
Definition at line 38 of file qgsfloatingwidget.h.