]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.cpp
Added missing includes and defintions
[pulseview.git] / pv / mainwindow.cpp
index ba232e25d0cb5afae12d5bb3f80a09f6b2fe3714..f7b8612054ff058997a8cd0f2cd3f75b8310f5a0 100644 (file)
@@ -40,7 +40,6 @@
 #include "dialogs/about.h"
 #include "dialogs/connect.h"
 #include "dialogs/decoder.h"
-#include "toolbars/contextbar.h"
 #include "toolbars/samplingbar.h"
 #include "view/view.h"
 
@@ -98,8 +97,6 @@ void MainWindow::setup_ui()
        setCentralWidget(_central_widget);
 
        _view = new pv::view::View(_session, this);
-       connect(_view, SIGNAL(selection_changed()), this,
-               SLOT(view_selection_changed()));
 
        _vertical_layout->addWidget(_view);
 
@@ -217,21 +214,15 @@ void MainWindow::setup_ui()
        addToolBar(_toolbar);
 
        // Setup the sampling bar
-       _sampling_bar = new toolbars::SamplingBar(this);
+       _sampling_bar = new toolbars::SamplingBar(_session, this);
 
        // Populate the device list and select the initially selected device
        update_device_list();
 
-       connect(_sampling_bar, SIGNAL(device_selected()), this,
-               SLOT(device_selected()));
        connect(_sampling_bar, SIGNAL(run_stop()), this,
                SLOT(run_stop()));
        addToolBar(_sampling_bar);
 
-       // Setup the context bar
-       _context_bar = new toolbars::ContextBar(this);
-       addToolBar(_context_bar);
-
        // Set the title
        setWindowTitle(QApplication::translate("MainWindow", "PulseView", 0,
                QApplication::UnicodeUTF8));
@@ -377,11 +368,6 @@ void MainWindow::on_actionAbout_triggered()
        dlg.exec();
 }
 
-void MainWindow::device_selected()
-{
-       _session.set_device(_sampling_bar->get_selected_device());
-}
-
 void MainWindow::add_decoder(QObject *action)
 {
        assert(action);
@@ -425,13 +411,4 @@ void MainWindow::capture_state_changed(int state)
        _sampling_bar->set_capture_state((pv::SigSession::capture_state)state);
 }
 
-void MainWindow::view_selection_changed()
-{
-       assert(_context_bar);
-
-       const list<weak_ptr<pv::view::SelectableItem> > items(
-               _view->selected_items());
-       _context_bar->set_selected_items(items);
-}
-
 } // namespace pv