From 121307b3c50d981638cbe1e33ba5410bb2b11dd1 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sat, 29 Feb 2020 22:50:21 +0100 Subject: [PATCH] Rename decoder output view to binary decoder output view --- CMakeLists.txt | 8 ++++---- pv/mainwindow.cpp | 6 +++--- .../{decoder_output => decoder_binary}/QHexView.cpp | 0 .../{decoder_output => decoder_binary}/QHexView.hpp | 6 +++--- pv/views/{decoder_output => decoder_binary}/view.cpp | 6 +++--- pv/views/{decoder_output => decoder_binary}/view.hpp | 10 +++++----- pv/views/viewbase.cpp | 2 +- pv/views/viewbase.hpp | 2 +- test/CMakeLists.txt | 8 ++++---- 9 files changed, 24 insertions(+), 24 deletions(-) rename pv/views/{decoder_output => decoder_binary}/QHexView.cpp (100%) rename pv/views/{decoder_output => decoder_binary}/QHexView.hpp (94%) rename pv/views/{decoder_output => decoder_binary}/view.cpp (99%) rename pv/views/{decoder_output => decoder_binary}/view.hpp (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5330663d..31164a9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -389,8 +389,8 @@ if(ENABLE_DECODE) pv/subwindows/decoder_selector/item.cpp pv/subwindows/decoder_selector/model.cpp pv/subwindows/decoder_selector/subwindow.cpp - pv/views/decoder_output/view.cpp - pv/views/decoder_output/QHexView.cpp + pv/views/decoder_binary/view.cpp + pv/views/decoder_binary/QHexView.cpp pv/views/trace/decodetrace.cpp pv/widgets/decodergroupbox.cpp pv/widgets/decodermenu.cpp @@ -399,8 +399,8 @@ if(ENABLE_DECODE) list(APPEND pulseview_HEADERS pv/data/decodesignal.hpp pv/subwindows/decoder_selector/subwindow.hpp - pv/views/decoder_output/view.hpp - pv/views/decoder_output/QHexView.hpp + pv/views/decoder_binary/view.hpp + pv/views/decoder_binary/QHexView.hpp pv/views/trace/decodetrace.hpp pv/widgets/decodergroupbox.hpp pv/widgets/decodermenu.hpp diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 6662180c..ea9f01af 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -52,7 +52,7 @@ #ifdef ENABLE_DECODE #include "subwindows/decoder_selector/subwindow.hpp" -#include "views/decoder_output/view.hpp" +#include "views/decoder_binary/view.hpp" #endif #include @@ -162,8 +162,8 @@ shared_ptr MainWindow::add_view(views::ViewType type, // This view will be the main view if there's no main bar yet v = make_shared(session, (main_bar ? false : true), dock_main); #ifdef ENABLE_DECODE - if (type == views::ViewTypeDecoderOutput) - v = make_shared(session, false, dock_main); + if (type == views::ViewTypeDecoderBinary) + v = make_shared(session, false, dock_main); #endif if (!v) diff --git a/pv/views/decoder_output/QHexView.cpp b/pv/views/decoder_binary/QHexView.cpp similarity index 100% rename from pv/views/decoder_output/QHexView.cpp rename to pv/views/decoder_binary/QHexView.cpp diff --git a/pv/views/decoder_output/QHexView.hpp b/pv/views/decoder_binary/QHexView.hpp similarity index 94% rename from pv/views/decoder_output/QHexView.hpp rename to pv/views/decoder_binary/QHexView.hpp index e3c182a7..c39dcb20 100644 --- a/pv/views/decoder_output/QHexView.hpp +++ b/pv/views/decoder_binary/QHexView.hpp @@ -27,8 +27,8 @@ * SOFTWARE. */ -#ifndef PULSEVIEW_PV_VIEWS_DECODEROUTPUT_QHEXVIEW_H -#define PULSEVIEW_PV_VIEWS_DECODEROUTPUT_QHEXVIEW_H +#ifndef PULSEVIEW_PV_VIEWS_DECODERBINARY_QHEXVIEW_H +#define PULSEVIEW_PV_VIEWS_DECODERBINARY_QHEXVIEW_H #include @@ -98,4 +98,4 @@ private: vector chunk_colors_; }; -#endif /* PULSEVIEW_PV_VIEWS_DECODEROUTPUT_QHEXVIEW_H */ +#endif /* PULSEVIEW_PV_VIEWS_DECODERBINARY_QHEXVIEW_H */ diff --git a/pv/views/decoder_output/view.cpp b/pv/views/decoder_binary/view.cpp similarity index 99% rename from pv/views/decoder_output/view.cpp rename to pv/views/decoder_binary/view.cpp index 0f127c87..5f55b191 100644 --- a/pv/views/decoder_output/view.cpp +++ b/pv/views/decoder_binary/view.cpp @@ -47,7 +47,7 @@ using std::shared_ptr; namespace pv { namespace views { -namespace decoder_output { +namespace decoder_binary { const char* SaveTypeNames[SaveTypeCount] = { "Binary", @@ -134,7 +134,7 @@ View::View(Session &session, bool is_main_view, QMainWindow *parent) : ViewType View::get_type() const { - return ViewTypeDecoderOutput; + return ViewTypeDecoderBinary; } void View::reset_view_state() @@ -475,6 +475,6 @@ void View::perform_delayed_view_update() } -} // namespace decoder_output +} // namespace decoder_binary } // namespace views } // namespace pv diff --git a/pv/views/decoder_output/view.hpp b/pv/views/decoder_binary/view.hpp similarity index 93% rename from pv/views/decoder_output/view.hpp rename to pv/views/decoder_binary/view.hpp index 16d35e82..c1d70b1b 100644 --- a/pv/views/decoder_output/view.hpp +++ b/pv/views/decoder_binary/view.hpp @@ -17,8 +17,8 @@ * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_VIEWS_DECODEROUTPUT_VIEW_HPP -#define PULSEVIEW_PV_VIEWS_DECODEROUTPUT_VIEW_HPP +#ifndef PULSEVIEW_PV_VIEWS_DECODERBINARY_VIEW_HPP +#define PULSEVIEW_PV_VIEWS_DECODERBINARY_VIEW_HPP #include #include @@ -36,7 +36,7 @@ class Session; namespace views { -namespace decoder_output { +namespace decoder_binary { // When adding an entry here, don't forget to update SaveTypeNames as well enum SaveType { @@ -108,8 +108,8 @@ private: bool binary_data_exists_; }; -} // namespace decoder_output +} // namespace decoder_binary } // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEWS_DECODEROUTPUT_VIEW_HPP +#endif // PULSEVIEW_PV_VIEWS_DECODERBINARY_VIEW_HPP diff --git a/pv/views/viewbase.cpp b/pv/views/viewbase.cpp index 26b4ef1f..24e4bb9a 100644 --- a/pv/views/viewbase.cpp +++ b/pv/views/viewbase.cpp @@ -36,7 +36,7 @@ namespace views { const char* ViewTypeNames[ViewTypeCount] = { "Trace View", #ifdef ENABLE_DECODE - "Decoder Output View" + "Binary Decoder Output View" #endif }; diff --git a/pv/views/viewbase.hpp b/pv/views/viewbase.hpp index 3fff28f0..585dfa0c 100644 --- a/pv/views/viewbase.hpp +++ b/pv/views/viewbase.hpp @@ -55,7 +55,7 @@ namespace views { enum ViewType { ViewTypeTrace, #ifdef ENABLE_DECODE - ViewTypeDecoderOutput, + ViewTypeDecoderBinary, #endif ViewTypeCount // Indicates how many view types there are, must always be last }; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dc874d59..e3362ac8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -174,8 +174,8 @@ if(ENABLE_DECODE) ${PROJECT_SOURCE_DIR}/pv/subwindows/decoder_selector/item.cpp ${PROJECT_SOURCE_DIR}/pv/subwindows/decoder_selector/model.cpp ${PROJECT_SOURCE_DIR}/pv/subwindows/decoder_selector/subwindow.cpp - ${PROJECT_SOURCE_DIR}/pv/views/decoder_output/view.cpp - ${PROJECT_SOURCE_DIR}/pv/views/decoder_output/QHexView.cpp + ${PROJECT_SOURCE_DIR}/pv/views/decoder_binary/view.cpp + ${PROJECT_SOURCE_DIR}/pv/views/decoder_binary/QHexView.cpp ${PROJECT_SOURCE_DIR}/pv/views/trace/decodetrace.cpp ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.cpp ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.cpp @@ -184,8 +184,8 @@ if(ENABLE_DECODE) list(APPEND pulseview_TEST_HEADERS ${PROJECT_SOURCE_DIR}/pv/data/decodesignal.hpp ${PROJECT_SOURCE_DIR}/pv/subwindows/decoder_selector/subwindow.hpp - ${PROJECT_SOURCE_DIR}/pv/views/decoder_output/view.hpp - ${PROJECT_SOURCE_DIR}/pv/views/decoder_output/QHexView.hpp + ${PROJECT_SOURCE_DIR}/pv/views/decoder_binary/view.hpp + ${PROJECT_SOURCE_DIR}/pv/views/decoder_binary/QHexView.hpp ${PROJECT_SOURCE_DIR}/pv/views/trace/decodetrace.hpp ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.hpp ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.hpp -- 2.30.2