]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.h
Factored out DecoderMenu
[pulseview.git] / pv / mainwindow.h
index d34db1bffaa6d4a4a53acf88f9b1d39617b2afdf..ce09284d7af565879083e560ddca5506f1799377 100644 (file)
@@ -26,7 +26,6 @@
 #include <boost/weak_ptr.hpp>
 
 #include <QMainWindow>
-#include <QSignalMapper>
 
 #include "sigsession.h"
 
@@ -51,6 +50,10 @@ namespace view {
 class View;
 }
 
+namespace widgets {
+class DecoderMenu;
+}
+
 class MainWindow : public QMainWindow
 {
        Q_OBJECT
@@ -75,7 +78,6 @@ private:
                struct sr_dev_inst *selected_device = NULL);
 
        static gint decoder_name_cmp(gconstpointer a, gconstpointer b);
-       void setup_add_decoders(QMenu *parent);
 
 private slots:
        void load_file(QString file_name);
@@ -97,9 +99,7 @@ private slots:
 
        void on_actionAbout_triggered();
 
-       void device_selected();
-
-       void add_decoder(QObject *action);
+       void add_decoder(srd_decoder *decoder);
 
        void run_stop();
 
@@ -124,8 +124,7 @@ private:
        QAction *_action_view_show_cursors;
 
        QMenu *_menu_decoders;
-       QMenu *_menu_decoders_add;
-       QSignalMapper _decoders_add_mapper;
+       pv::widgets::DecoderMenu *_menu_decoders_add;
 
        QMenu *_menu_help;
        QAction *_action_about;