X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=a11d5286dd049c67627359e6aaeb196b7d0f5009;hb=f23c46921d031dba4c96062164cc9f3ca3c4809c;hp=786d07e28987d1fe7af3943447eb4ddd492687fa;hpb=3ed18835d80218df744ec539946c2660fe5de812;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 786d07e2..a11d5286 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -45,7 +45,7 @@ #include "globalsettings.hpp" #include "toolbars/mainbar.hpp" #include "util.hpp" -#include "view/view.hpp" +#include "views/trace/view.hpp" #include "views/trace/standardbar.hpp" #include @@ -89,6 +89,9 @@ MainWindow::MainWindow(DeviceManager &device_manager, QWidget *parent) : GlobalSettings::register_change_handler(GlobalSettings::Key_View_ShowAnalogMinorGrid, bind(&MainWindow::on_settingViewShowAnalogMinorGrid_changed, this, _1)); + GlobalSettings settings; + settings.set_defaults_where_needed(); + setup_ui(); restore_ui_settings(); } @@ -149,7 +152,7 @@ shared_ptr MainWindow::add_view(const QString &title, if (type == views::ViewTypeTrace) // This view will be the main view if there's no main bar yet - v = make_shared(session, + v = make_shared(session, (main_bar ? false : true), dock_main); if (!v) @@ -177,8 +180,8 @@ shared_ptr MainWindow::add_view(const QString &title, SLOT(trigger_event(util::Timestamp))); if (type == views::ViewTypeTrace) { - views::TraceView::View *tv = - qobject_cast(v.get()); + views::trace::View *tv = + qobject_cast(v.get()); tv->enable_coloured_bg(settings.value(GlobalSettings::Key_View_ColouredBG).toBool()); tv->enable_show_sampling_points(settings.value(GlobalSettings::Key_View_ShowSamplingPoints).toBool()); @@ -796,8 +799,8 @@ void MainWindow::on_settingViewColouredBg_changed(const QVariant new_value) shared_ptr viewbase = entry.second; // Only trace views have this setting - views::TraceView::View* view = - qobject_cast(viewbase.get()); + views::trace::View* view = + qobject_cast(viewbase.get()); if (view) view->enable_coloured_bg(state); } @@ -811,8 +814,8 @@ void MainWindow::on_settingViewShowSamplingPoints_changed(const QVariant new_val shared_ptr viewbase = entry.second; // Only trace views have this setting - views::TraceView::View* view = - qobject_cast(viewbase.get()); + views::trace::View* view = + qobject_cast(viewbase.get()); if (view) view->enable_show_sampling_points(state); } @@ -826,8 +829,8 @@ void MainWindow::on_settingViewShowAnalogMinorGrid_changed(const QVariant new_va shared_ptr viewbase = entry.second; // Only trace views have this setting - views::TraceView::View* view = - qobject_cast(viewbase.get()); + views::trace::View* view = + qobject_cast(viewbase.get()); if (view) view->enable_show_analog_minor_grid(state); }