QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsUserInputWidget Class Reference

A floating widget that can be used to display widgets for user inputs. More...

#include <qgsuserinputwidget.h>

Inheritance diagram for QgsUserInputWidget:

Public Member Functions

 QgsUserInputWidget (QWidget *parent=nullptr)
 Constructor for QgsUserInputWidget.
void addUserInputWidget (QWidget *widget)
 Add a widget to be displayed in the dock.
Public Member Functions inherited from QgsFloatingWidget
 QgsFloatingWidget (QWidget *parent=nullptr)
 Constructor for QgsFloatingWidget.
AnchorPointAnchorPoint 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.
AnchorPointAnchorPoint 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 (AnchorPointAnchorPoint 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 (AnchorPointAnchorPoint 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 *event) override
Protected Member Functions inherited from QgsFloatingWidget
void paintEvent (QPaintEvent *e) override
void resizeEvent (QResizeEvent *e) override
void showEvent (QShowEvent *e) override

Additional Inherited Members

Public Types inherited from QgsFloatingWidget
enum  AnchorPoint {
  TopLeft , TopMiddle , TopRight , MiddleLeft ,
  Middle , MiddleRight , BottomLeft , BottomMiddle ,
  BottomRight
}
 Reference points for anchoring widget position. More...
Signals inherited from QgsFloatingWidget
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.
Properties inherited from QgsFloatingWidget
AnchorPointAnchorPoint anchorPoint
QWidget * anchorWidget
AnchorPointAnchorPoint anchorWidgetPoint

Detailed Description

A floating widget that can be used to display widgets for user inputs.

It can be used by map tools, plugins, etc. Several widgets can be displayed at once, they will be separated by a separator. Widgets will be either layout horizontally or vertically. The widget is automatically hidden if it contains no widget.

Definition at line 40 of file qgsuserinputwidget.h.

Constructor & Destructor Documentation

◆ QgsUserInputWidget()

QgsUserInputWidget::QgsUserInputWidget ( QWidget * parent = nullptr)

Constructor for QgsUserInputWidget.

Definition at line 22 of file qgsuserinputwidget.cpp.

Member Function Documentation

◆ addUserInputWidget()

void QgsUserInputWidget::addUserInputWidget ( QWidget * widget)

Add a widget to be displayed in the dock.

Parameters
widgetwidget to add. Ownership is not transferred.

Definition at line 54 of file qgsuserinputwidget.cpp.

◆ paintEvent()

void QgsUserInputWidget::paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 114 of file qgsuserinputwidget.cpp.


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