]> sigrok.org Git - pulseview.git/blobdiff - pv/widgets/popup.h
Make Popup dodge the screen edge
[pulseview.git] / pv / widgets / popup.h
index 1da09d85eb5965401205d459ccd038ab160e1fb0..0bc6d0ff819642a72a10042a1ed9ee920ac636bc 100644 (file)
@@ -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,6 +67,9 @@ private:
 
        void reposition_widget();
 
+private:
+       void closeEvent(QCloseEvent*);
+
        void paintEvent(QPaintEvent*);
 
        void resizeEvent(QResizeEvent*);
@@ -72,6 +79,9 @@ private:
 protected:
        void showEvent(QShowEvent *e);
 
+signals:
+       void closed();
+
 private:
        QPoint _point;
        Position _pos;