]> sigrok.org Git - pulseview.git/blobdiff - pv/views/decoder_output/QHexView.hpp
DecoderOutputView: Allow for adaptive size constraints
[pulseview.git] / pv / views / decoder_output / QHexView.hpp
index b5fb01fb51ba6dfb7a16c17222645cd9b34cb04f..e7c255670b7b793e014ac076c735ca34866261a6 100644 (file)
@@ -56,6 +56,7 @@ public:
 
        void clear();
        void showFromOffset(size_t offset);
+       virtual QSizePolicy sizePolicy() const;
 
 protected:
        void initialize_byte_iterator(size_t offset);
@@ -84,8 +85,10 @@ private:
        size_t charWidth_, charHeight_;
        size_t selectBegin_, selectEnd_, selectInit_, cursorPos_;
 
-       size_t current_chunk_id_, current_chunk_offset_;
-       const DecodeBinaryDataChunk* current_chunk_;
+       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
+
+       vector<QColor> chunk_colors_;
 };
 
 #endif /* PULSEVIEW_PV_VIEWS_DECODEROUTPUT_QHEXVIEW_H */