X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Fviewbase.hpp;h=af885751f170a17ea75a617a11276aa32c681568;hb=516d21289dafa7ce9b5352454a0eda31999c5efc;hp=b524c1797d0d1478ba4bd1eac36ee538a400d69a;hpb=5a20644617a727e5893cd1df3f105135c1ebdedd;p=pulseview.git diff --git a/pv/views/viewbase.hpp b/pv/views/viewbase.hpp index b524c179..af885751 100644 --- a/pv/views/viewbase.hpp +++ b/pv/views/viewbase.hpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -50,11 +51,17 @@ class Signal; namespace views { +// When adding an entry here, don't forget to update ViewTypeNames as well enum ViewType { ViewTypeTrace, - ViewTypeTabularDecode +#ifdef ENABLE_DECODE + ViewTypeDecoderOutput, +#endif + ViewTypeCount // Indicates how many view types there are, must always be last }; +extern const char* ViewTypeNames[ViewTypeCount]; + class ViewBase : public QWidget { Q_OBJECT @@ -63,7 +70,9 @@ private: static const int MaxViewAutoUpdateRate; public: - explicit ViewBase(Session &session, bool is_main_view = false, QWidget *parent = nullptr); + explicit ViewBase(Session &session, bool is_main_view = false, QMainWindow *parent = nullptr); + + virtual ViewType get_type() const = 0; /** * Resets the view to its default state after construction. It does however @@ -116,10 +125,12 @@ protected: const bool is_main_view_; - util::Timestamp ruler_shift_; util::TimeUnit time_unit_; unordered_set< shared_ptr > signalbases_; +#ifdef ENABLE_DECODE + unordered_set< shared_ptr > decode_signals_; +#endif /// The ID of the currently displayed segment uint32_t current_segment_;