]> sigrok.org Git - pulseview.git/commitdiff
Added Popup::closed signal
authorJoel Holdsworth <redacted>
Sat, 23 Nov 2013 10:40:35 +0000 (10:40 +0000)
committerJoel Holdsworth <redacted>
Sat, 30 Nov 2013 18:14:05 +0000 (18:14 +0000)
CMakeLists.txt
pv/widgets/popup.cpp
pv/widgets/popup.h
test/CMakeLists.txt

index f2159f5ec6049288b3b693c4c532236a1f7d8a64..5072c4521be4fdf80f0b7458614263335e7bf90f 100644 (file)
@@ -182,6 +182,7 @@ set(pulseview_HEADERS
        pv/widgets/colourbutton.h
        pv/widgets/colourpopup.h
        pv/widgets/decodermenu.h
+       pv/widgets/popup.h
        pv/widgets/popuptoolbutton.h
        pv/widgets/wellarray.h
 )
index 099c5499acafbb30ba119f8729879947ee45630b..9863887ed5dab9595e69f6c8ba5b1308186223dd 100644 (file)
@@ -164,6 +164,11 @@ void Popup::reposition_widget()
        move(_point + o);
 }
 
+void Popup::closeEvent(QCloseEvent*)
+{
+       closed();
+}
+
 void Popup::paintEvent(QPaintEvent*)
 {
        QPainter painter(this);
index 1da09d85eb5965401205d459ccd038ab160e1fb0..e7c867acbad82ed0b49f4ea81d29ac0b4e71d35a 100644 (file)
@@ -28,6 +28,8 @@ namespace widgets {
 
 class Popup : public QWidget
 {
+       Q_OBJECT
+
 public:
        enum Position
        {
@@ -63,6 +65,9 @@ private:
 
        void reposition_widget();
 
+private:
+       void closeEvent(QCloseEvent*);
+
        void paintEvent(QPaintEvent*);
 
        void resizeEvent(QResizeEvent*);
@@ -72,6 +77,9 @@ private:
 protected:
        void showEvent(QShowEvent *e);
 
+signals:
+       void closed();
+
 private:
        QPoint _point;
        Position _pos;
index 18deb63b9201063b4bd8bc7b1a6a83d4ef516886..f8715043555211ed727b883ab32d1a709b08f514 100644 (file)
@@ -101,6 +101,7 @@ set(pulseview_TEST_HEADERS
        ${PROJECT_SOURCE_DIR}/pv/widgets/colourbutton.h
        ${PROJECT_SOURCE_DIR}/pv/widgets/colourpopup.h
        ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.h
+       ${PROJECT_SOURCE_DIR}/pv/widgets/popup.h
        ${PROJECT_SOURCE_DIR}/pv/widgets/wellarray.h
 )