X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Fviewbase.hpp;h=73d7a179c5a4e78fa446b1ec8a040fed98e6820b;hb=8e168b23846653c087e46b6a63feffac48512ddb;hp=3d43ca9a12bc6d3277f92ee7805da0e851f1584f;hpb=a24412db987328f80cf32d8299d82b72a441c239;p=pulseview.git diff --git a/pv/views/viewbase.hpp b/pv/views/viewbase.hpp index 3d43ca9a..73d7a179 100644 --- a/pv/views/viewbase.hpp +++ b/pv/views/viewbase.hpp @@ -38,7 +38,7 @@ #endif using std::shared_ptr; -using std::unordered_set; +using std::vector; namespace pv { @@ -55,7 +55,8 @@ namespace views { enum ViewType { ViewTypeTrace, #ifdef ENABLE_DECODE - ViewTypeDecoderOutput, + ViewTypeDecoderBinary, + ViewTypeTabularDecoder, #endif ViewTypeCount // Indicates how many view types there are, must always be last }; @@ -66,12 +67,15 @@ class ViewBase : public QWidget { Q_OBJECT -private: +public: static const int MaxViewAutoUpdateRate; public: explicit ViewBase(Session &session, bool is_main_view = false, QMainWindow *parent = nullptr); + virtual ViewType get_type() const = 0; + bool is_main_view() const; + /** * Resets the view to its default state after construction. It does however * not reset the signal bases or any other connections with the session. @@ -86,7 +90,7 @@ public: /** * Returns the signal bases contained in this view. */ - unordered_set< shared_ptr > signalbases() const; + vector< shared_ptr > signalbases() const; virtual void clear_signalbases(); @@ -101,9 +105,10 @@ public: #endif virtual void save_settings(QSettings &settings) const; - virtual void restore_settings(QSettings &settings); + virtual void focus_on_range(uint64_t start_sample, uint64_t end_sample); + public Q_SLOTS: virtual void trigger_event(int segment_id, util::Timestamp location); virtual void signals_changed(); @@ -125,7 +130,10 @@ protected: util::TimeUnit time_unit_; - unordered_set< shared_ptr > signalbases_; + vector< shared_ptr > signalbases_; +#ifdef ENABLE_DECODE + vector< shared_ptr > decode_signals_; +#endif /// The ID of the currently displayed segment uint32_t current_segment_;