QGIS API Documentation
3.0.2-Girona (307d082)
|
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. More... | |
void | anchorWidgetChanged (QWidget *widget) |
Emitted when the anchor widget changes. More... | |
void | anchorWidgetPointChanged (QgsFloatingWidget::AnchorPoint point) |
Emitted when the anchor widget point changes. More... | |
Public Member Functions | |
QgsFloatingWidget (QWidget *parent=nullptr) | |
Constructor for QgsFloatingWidget. More... | |
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. More... | |
QWidget * | anchorWidget () |
Returns the widget that the floating widget is "anchored" tto. More... | |
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. More... | |
Q_ENUM (AnchorPoint) | |
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. More... | |
void | setAnchorWidget (QWidget *widget) |
Sets the widget to "anchor" the floating widget to. More... | |
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. More... | |
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 43 of file qgsfloatingwidget.h.
QgsFloatingWidget::QgsFloatingWidget | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsFloatingWidget.
parent | parent widget |
Definition at line 25 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 83 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 99 of file qgsfloatingwidget.h.
|
signal |
Emitted when the anchor widget point changes.
|
overrideprotected |
Definition at line 92 of file qgsfloatingwidget.cpp.
QgsFloatingWidget::Q_ENUM | ( | AnchorPoint | ) |
|
overrideprotected |
Definition at line 101 of file qgsfloatingwidget.cpp.
void QgsFloatingWidget::setAnchorPoint | ( | QgsFloatingWidget::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 66 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 36 of file qgsfloatingwidget.cpp.
void QgsFloatingWidget::setAnchorWidgetPoint | ( | QgsFloatingWidget::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 76 of file qgsfloatingwidget.cpp.
|
overrideprotected |
Definition at line 86 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.