#include <pv/data/decodesignal.hpp>
+using std::pair;
using std::size_t;
using pv::data::DecodeBinaryClass;
using pv::data::DecodeBinaryDataChunk;
};
public:
- QHexView(QWidget *parent = 0);
+ QHexView(QWidget *parent = nullptr);
- 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<size_t, size_t> 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);
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<QColor> chunk_colors_;
};