Adjust trace view namespace
authorSoeren Apel <soeren@apelpie.net>
Sat, 10 Jun 2017 13:37:45 +0000 (15:37 +0200)
committerSoeren Apel <soeren@apelpie.net>
Sat, 10 Jun 2017 13:37:45 +0000 (15:37 +0200)
pv/mainwindow.cpp
pv/session.cpp
pv/toolbars/mainbar.cpp
pv/toolbars/mainbar.hpp
pv/views/trace/standardbar.cpp
pv/views/trace/standardbar.hpp
test/view/ruler.cpp

index e925bd63e8d8ee06a070debc1b7e013ea17211af..a11d5286dd049c67627359e6aaeb196b7d0f5009 100644 (file)
@@ -152,7 +152,7 @@ shared_ptr<views::ViewBase> 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<views::TraceView::View>(session,
+               v = make_shared<views::trace::View>(session,
                        (main_bar ? false : true), dock_main);
 
        if (!v)
@@ -180,8 +180,8 @@ shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title,
                SLOT(trigger_event(util::Timestamp)));
 
        if (type == views::ViewTypeTrace) {
-               views::TraceView::View *tv =
-                       qobject_cast<views::TraceView::View*>(v.get());
+               views::trace::View *tv =
+                       qobject_cast<views::trace::View*>(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());
@@ -799,8 +799,8 @@ void MainWindow::on_settingViewColouredBg_changed(const QVariant new_value)
                shared_ptr<views::ViewBase> viewbase = entry.second;
 
                // Only trace views have this setting
-               views::TraceView::View* view =
-                               qobject_cast<views::TraceView::View*>(viewbase.get());
+               views::trace::View* view =
+                               qobject_cast<views::trace::View*>(viewbase.get());
                if (view)
                        view->enable_coloured_bg(state);
        }
@@ -814,8 +814,8 @@ void MainWindow::on_settingViewShowSamplingPoints_changed(const QVariant new_val
                shared_ptr<views::ViewBase> viewbase = entry.second;
 
                // Only trace views have this setting
-               views::TraceView::View* view =
-                               qobject_cast<views::TraceView::View*>(viewbase.get());
+               views::trace::View* view =
+                               qobject_cast<views::trace::View*>(viewbase.get());
                if (view)
                        view->enable_show_sampling_points(state);
        }
@@ -829,8 +829,8 @@ void MainWindow::on_settingViewShowAnalogMinorGrid_changed(const QVariant new_va
                shared_ptr<views::ViewBase> viewbase = entry.second;
 
                // Only trace views have this setting
-               views::TraceView::View* view =
-                               qobject_cast<views::TraceView::View*>(viewbase.get());
+               views::trace::View* view =
+                               qobject_cast<views::trace::View*>(viewbase.get());
                if (view)
                        view->enable_show_analog_minor_grid(state);
        }
index 66d80f1a4bde58b649cc571d1194431824f6f516..aa528d191fe6750958bd2cbf8491fe8bb35383d0 100644 (file)
@@ -734,22 +734,22 @@ void Session::update_signals()
 
        // Make the signals list
        for (shared_ptr<views::ViewBase> viewbase : views_) {
-               views::TraceView::View *trace_view =
-                       qobject_cast<views::TraceView::View*>(viewbase.get());
+               views::trace::View *trace_view =
+                       qobject_cast<views::trace::View*>(viewbase.get());
 
                if (trace_view) {
-                       unordered_set< shared_ptr<views::TraceView::Signal> >
+                       unordered_set< shared_ptr<views::trace::Signal> >
                                prev_sigs(trace_view->signals());
                        trace_view->clear_signals();
 
                        for (auto channel : sr_dev->channels()) {
                                shared_ptr<data::SignalBase> signalbase;
-                               shared_ptr<views::TraceView::Signal> signal;
+                               shared_ptr<views::trace::Signal> signal;
 
                                // Find the channel in the old signals
                                const auto iter = find_if(
                                        prev_sigs.cbegin(), prev_sigs.cend(),
-                                       [&](const shared_ptr<views::TraceView::Signal> &s) {
+                                       [&](const shared_ptr<views::trace::Signal> &s) {
                                                return s->base()->channel() == channel;
                                        });
                                if (iter != prev_sigs.end()) {
@@ -777,8 +777,8 @@ void Session::update_signals()
                                                                signalbase.get(), SLOT(on_capture_state_changed(int)));
                                                }
 
-                                               signal = shared_ptr<views::TraceView::Signal>(
-                                                       new views::TraceView::LogicSignal(*this,
+                                               signal = shared_ptr<views::trace::Signal>(
+                                                       new views::trace::LogicSignal(*this,
                                                                device_, signalbase));
                                                trace_view->add_signal(signal);
                                                break;
@@ -798,8 +798,8 @@ void Session::update_signals()
                                                                signalbase.get(), SLOT(on_capture_state_changed(int)));
                                                }
 
-                                               signal = shared_ptr<views::TraceView::Signal>(
-                                                       new views::TraceView::AnalogSignal(
+                                               signal = shared_ptr<views::trace::Signal>(
+                                                       new views::trace::AnalogSignal(
                                                                *this, signalbase));
                                                trace_view->add_signal(signal);
                                                break;
index 76cd8ea17632d689a675d1d089d26549e30a0028..22ed3988cfb72ccfb824390c03d1b4354b8dd4ed 100644 (file)
@@ -87,7 +87,7 @@ const char *MainBar::SettingOpenDirectory = "MainWindow/OpenDirectory";
 const char *MainBar::SettingSaveDirectory = "MainWindow/SaveDirectory";
 
 MainBar::MainBar(Session &session, QWidget *parent,
-               pv::views::TraceView::View *view) :
+               pv::views::trace::View *view) :
        StandardBar(session, parent, view, false),
        action_new_view_(new QAction(this)),
        action_open_(new QAction(this)),
@@ -595,8 +595,8 @@ void MainBar::export_file(shared_ptr<OutputFormat> format, bool selection_only)
 
        // Selection only? Verify that the cursors are active and fetch their values
        if (selection_only) {
-               views::TraceView::View *trace_view =
-                       qobject_cast<views::TraceView::View*>(session_.main_view().get());
+               views::trace::View *trace_view =
+                       qobject_cast<views::trace::View*>(session_.main_view().get());
 
                if (!trace_view->cursors()->enabled()) {
                        show_session_error(tr("Missing Cursors"), tr("You need to set the " \
index fd4d94b8d82d57a07fc3da9f92f1c2f46d1b2127..810cab27919f3cca59ed450710ec9701d1bb8e17 100644 (file)
@@ -56,7 +56,7 @@ class MainWindow;
 class Session;
 
 namespace views {
-namespace TraceView {
+namespace trace {
 class View;
 }
 }
@@ -86,7 +86,7 @@ private:
 
 public:
        MainBar(Session &session, QWidget *parent,
-               pv::views::TraceView::View *view);
+               pv::views::trace::View *view);
 
        void update_device_list();
 
index fa02d1677d7cad4de0473571ddb20058d4bcc9c1..bc2c3ba8a3cb9380710eb7462d51663a9987eca8 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <pv/mainwindow.hpp>
 
-using pv::views::TraceView::View;
+using pv::views::trace::View;
 
 namespace pv {
 namespace views {
index 7a76a639289aebf70c4a15a8b8bdb49485a52c11..09c7907f3da3f4fc5fdb55bfa548267bd0fbce28 100644 (file)
@@ -36,7 +36,7 @@ class Session;
 
 namespace views {
 
-namespace TraceView {
+namespace trace {
 class View;
 }
 
@@ -48,7 +48,7 @@ class StandardBar : public QToolBar
 
 public:
        StandardBar(Session &session, QWidget *parent,
-               TraceView::View *view, bool add_default_widgets = true);
+               trace::View *view, bool add_default_widgets = true);
 
        Session &session() const;
 
@@ -62,7 +62,7 @@ protected:
        virtual void add_toolbar_widgets();
 
        Session &session_;
-       TraceView::View *view_;
+       trace::View *view_;
 
        QAction *const action_view_zoom_in_;
        QAction *const action_view_zoom_out_;
index 9287975cae82cd6243fa26c9605258c9a66a836c..37ba9c8673e6db327977ac6caba48c3872862c1d 100644 (file)
@@ -23,7 +23,7 @@
 #include "pv/views/trace/ruler.hpp"
 #include "test/test.hpp"
 
-using namespace pv::views::TraceView;
+using namespace pv::views::trace;
 
 namespace {
        QString format(const pv::util::Timestamp& t)