15#ifndef QGSFLOATINGWIDGET_H
16#define QGSFLOATINGWIDGET_H
23class QgsFloatingWidgetEventFilter;
38 Q_PROPERTY( QWidget *anchorWidget READ anchorWidget WRITE setAnchorWidget NOTIFY anchorWidgetChanged )
39 Q_PROPERTY(
AnchorPoint anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged )
40 Q_PROPERTY(
AnchorPoint anchorWidgetPoint READ anchorWidgetPoint WRITE setAnchorWidgetPoint NOTIFY anchorWidgetPointChanged )
70 void setAnchorWidget( QWidget *widget );
122 void showEvent( QShowEvent *e )
override;
123 void paintEvent( QPaintEvent *e )
override;
124 void resizeEvent( QResizeEvent *e )
override;
129 void onAnchorPointChanged();
132 QPointer<QWidget> mAnchorWidget;
133 QgsFloatingWidgetEventFilter *mParentEventFilter =
nullptr;
134 QgsFloatingWidgetEventFilter *mAnchorEventFilter =
nullptr;
144class QgsFloatingWidgetEventFilter :
public QObject
149 QgsFloatingWidgetEventFilter( QWidget *parent =
nullptr );
151 bool eventFilter( QObject *
object, QEvent *event )
override;
156 void anchorPointChanged();
record about vertex coordinates and index of anchor to which it is snapped