15#ifndef QGSFLOATINGWIDGET_H
16#define QGSFLOATINGWIDGET_H
23class QgsFloatingWidgetEventFilter;
36 Q_PROPERTY( QWidget *anchorWidget READ anchorWidget WRITE setAnchorWidget NOTIFY anchorWidgetChanged )
37 Q_PROPERTY(
AnchorPoint anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged )
38 Q_PROPERTY(
AnchorPoint anchorWidgetPoint READ anchorWidgetPoint WRITE setAnchorWidgetPoint NOTIFY anchorWidgetPointChanged )
68 void setAnchorWidget( QWidget *widget );
120 void showEvent( QShowEvent *e )
override;
121 void paintEvent( QPaintEvent *e )
override;
122 void resizeEvent( QResizeEvent *e )
override;
127 void onAnchorPointChanged();
130 QPointer<QWidget> mAnchorWidget;
131 QgsFloatingWidgetEventFilter *mParentEventFilter =
nullptr;
132 QgsFloatingWidgetEventFilter *mAnchorEventFilter =
nullptr;
142class QgsFloatingWidgetEventFilter :
public QObject
147 QgsFloatingWidgetEventFilter( QWidget *parent =
nullptr );
149 bool eventFilter( QObject *
object, QEvent *event )
override;
154 void anchorPointChanged();
record about vertex coordinates and index of anchor to which it is snapped