X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fwidgets%2Fpopup.h;h=0bc6d0ff819642a72a10042a1ed9ee920ac636bc;hp=402fc6bda3d60944f7b087c4a99034133ef69d5e;hb=8bd26d8b9c831b509ee3241ea4dac6f50c023622;hpb=6e3f046e779b939efebdfa4d9e68fe28d9beee59 diff --git a/pv/widgets/popup.h b/pv/widgets/popup.h index 402fc6bd..0bc6d0ff 100644 --- a/pv/widgets/popup.h +++ b/pv/widgets/popup.h @@ -28,6 +28,8 @@ namespace widgets { class Popup : public QWidget { + Q_OBJECT + public: enum Position { @@ -51,6 +53,8 @@ public: void set_position(const QPoint point, Position pos); private: + bool space_for_arrow() const; + QPolygon arrow_polygon() const; QRegion arrow_region() const; @@ -63,14 +67,21 @@ private: void reposition_widget(); +private: + void closeEvent(QCloseEvent*); + void paintEvent(QPaintEvent*); void resizeEvent(QResizeEvent*); - void showEvent(QShowEvent*); - void mouseReleaseEvent(QMouseEvent *e); +protected: + void showEvent(QShowEvent *e); + +signals: + void closed(); + private: QPoint _point; Position _pos;