X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Fdecoder_binary%2FQHexView.hpp;fp=pv%2Fviews%2Fdecoder_binary%2FQHexView.hpp;h=4ba995e30148e44ed479adb01fe46dd14e4f18be;hp=5f46ba1cae72078a76ed1cbb49fd79719fa75475;hb=978dbc9a3e3c4bf8b42f00a269d04d0dca62b1a5;hpb=cf0109112932ac762f0fcfb254036fcfcec2f5b2 diff --git a/pv/views/decoder_binary/QHexView.hpp b/pv/views/decoder_binary/QHexView.hpp index 5f46ba1c..4ba995e3 100644 --- a/pv/views/decoder_binary/QHexView.hpp +++ b/pv/views/decoder_binary/QHexView.hpp @@ -54,6 +54,13 @@ public: void set_mode(Mode m); void set_data(const DecodeBinaryClass* data); + + /* Sets range of samples that are visible in the main view */ + void set_visible_sample_range(uint64_t start, uint64_t end); + + /* Sets sample whose associated data we should highlight */ + void set_highlighted_data_sample(uint64_t sample); + unsigned int get_bytes_per_line() const; void clear(); @@ -67,7 +74,7 @@ public: protected: void initialize_byte_iterator(size_t offset); - uint8_t get_next_byte(bool* is_next_chunk = nullptr); + uint8_t get_next_byte(bool* is_new_chunk = nullptr); void paintEvent(QPaintEvent *event); void keyPressEvent(QKeyEvent *event); @@ -95,8 +102,13 @@ private: size_t current_chunk_id_, current_chunk_offset_, current_offset_; DecodeBinaryDataChunk current_chunk_; // Cache locally so that we're not messed up when the vector is re-allocating its data + uint64_t current_chunk_sample_, next_chunk_sample_; + + pair visible_range_; + uint64_t highlighted_sample_; vector chunk_colors_; + QColor visible_range_color_; }; #endif // PULSEVIEW_PV_VIEWS_DECODER_BINARY_QHEXVIEW_HPP