15 #ifndef QGSFLOATINGWIDGET_H
16 #define QGSFLOATINGWIDGET_H
22 class 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 )
69 void setAnchorWidget( QWidget *widget );
121 void showEvent( QShowEvent *e )
override;
122 void paintEvent( QPaintEvent *e )
override;
123 void resizeEvent( QResizeEvent *e )
override;
128 void onAnchorPointChanged();
132 QWidget *mAnchorWidget =
nullptr;
133 QgsFloatingWidgetEventFilter *mParentEventFilter =
nullptr;
134 QgsFloatingWidgetEventFilter *mAnchorEventFilter =
nullptr;
145 class QgsFloatingWidgetEventFilter:
public QObject
151 QgsFloatingWidgetEventFilter( QWidget *parent =
nullptr );
153 bool eventFilter( QObject *
object, QEvent *event )
override;
158 void anchorPointChanged();
166 #endif // QGSFLOATINGWIDGET_H