X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Fdecoder_output%2FQHexView.hpp;h=71b06cdd71ff3a84d8b6f72e485b152fe9d9a839;hb=b6d0bcb839f63ca1aeb78f9f86aeb6cac84ad193;hp=fca3c7efa798a4e95f8f9c388464516a0bcd142a;hpb=cbf428c209788f1c0860cc7a1247a279379db303;p=pulseview.git diff --git a/pv/views/decoder_output/QHexView.hpp b/pv/views/decoder_output/QHexView.hpp index fca3c7ef..71b06cdd 100644 --- a/pv/views/decoder_output/QHexView.hpp +++ b/pv/views/decoder_output/QHexView.hpp @@ -34,6 +34,7 @@ #include +using std::pair; using std::size_t; using pv::data::DecodeBinaryClass; using pv::data::DecodeBinaryDataChunk; @@ -51,11 +52,18 @@ public: public: QHexView(QWidget *parent = 0); - void setMode(Mode m); - void setData(const DecodeBinaryClass* data); + void set_mode(Mode m); + void set_data(const DecodeBinaryClass* data); + unsigned int get_bytes_per_line() const; void clear(); void showFromOffset(size_t offset); + virtual QSizePolicy sizePolicy() const; + + pair get_selection() const; + + size_t create_hex_line(size_t start, size_t end, QString* dest, + bool with_offset=false, bool with_ascii=false); protected: void initialize_byte_iterator(size_t offset); @@ -85,7 +93,7 @@ private: size_t selectBegin_, selectEnd_, selectInit_, cursorPos_; size_t current_chunk_id_, current_chunk_offset_, current_offset_; - const DecodeBinaryDataChunk* current_chunk_; + DecodeBinaryDataChunk current_chunk_; // Cache locally so that we're not messed up when the vector is re-allocating its data vector chunk_colors_; };