]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.hpp
Fix some signal/slot bugs
[pulseview.git] / pv / mainwindow.hpp
index 522ab1c0478ea7d1def85a90ada942733735f182..c9a8ad2641270d6d0df83f199b88d91939a2c675 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "session.hpp"
 #include "subwindows/subwindowbase.hpp"
-#include "views/viewbase.hpp"
 
 using std::list;
 using std::map;
@@ -53,6 +52,7 @@ class MainBar;
 
 namespace view {
 class View;
+class ViewBase;
 }
 
 namespace widgets {
@@ -61,6 +61,9 @@ class DecoderMenu;
 #endif
 }
 
+using pv::views::ViewBase;
+using pv::views::ViewType;
+
 class MainWindow : public QMainWindow
 {
        Q_OBJECT
@@ -78,9 +81,9 @@ public:
 
        shared_ptr<views::ViewBase> get_active_view() const;
 
-       shared_ptr<views::ViewBase> add_view(views::ViewType type, Session &session);
+       shared_ptr<views::ViewBase> add_view(ViewType type, Session &session);
 
-       void remove_view(shared_ptr<views::ViewBase> view);
+       void remove_view(shared_ptr<ViewBase> view);
 
        shared_ptr<subwindows::SubWindowBase> add_subwindow(
                subwindows::SubWindowType type, Session &session);
@@ -113,7 +116,7 @@ private:
        virtual bool restoreState(const QByteArray &state, int version = 0);
 
 private Q_SLOTS:
-       void on_add_view(views::ViewType type, Session *session);
+       void on_add_view(ViewType type, Session *session);
 
        void on_focus_changed();
        void on_focused_session_changed(shared_ptr<Session> session);