PulseView  unreleased development snapshot
A Qt-based sigrok GUI
QHexView Class Reference

#include <QHexView.hpp>

Inheritance diagram for QHexView:
Collaboration diagram for QHexView:

Public Types

enum  Mode { ChunkedDataMode, MemoryEmulationMode }
 

Public Member Functions

 QHexView (QWidget *parent=nullptr)
 
void set_mode (Mode m)
 
void set_data (const DecodeBinaryClass *data)
 
void set_visible_sample_range (uint64_t start, uint64_t end)
 
void set_highlighted_data_sample (uint64_t sample)
 
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 Member Functions

void initialize_byte_iterator (size_t offset)
 
uint8_t get_next_byte (bool *is_new_chunk=nullptr)
 
void paintEvent (QPaintEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 

Private Member Functions

QSize getFullSize () const
 
void resetSelection ()
 
void resetSelection (int pos)
 
void setSelection (int pos)
 
void ensureVisible ()
 
void setCursorPos (int pos)
 
size_t cursorPosFromMousePos (const QPoint &position)
 

Private Attributes

Mode mode_
 
const DecodeBinaryClassdata_
 
size_t data_size_
 
size_t posAddr_
 
size_t posHex_
 
size_t posAscii_
 
size_t charWidth_
 
size_t charHeight_
 
size_t selectBegin_
 
size_t selectEnd_
 
size_t selectInit_
 
size_t cursorPos_
 
uint8_t address_digits_
 
size_t current_chunk_id_
 
size_t current_chunk_offset_
 
size_t current_offset_
 
DecodeBinaryDataChunk current_chunk_
 
uint64_t current_chunk_sample_
 
uint64_t next_chunk_sample_
 
pair< uint64_t, uint64_t > visible_range_
 
uint64_t highlighted_sample_
 
vector< QColor > chunk_colors_
 
QColor visible_range_color_
 

Detailed Description

Definition at line 42 of file QHexView.hpp.

Member Enumeration Documentation

Enumerator
ChunkedDataMode 

Displays all data chunks in succession.

MemoryEmulationMode 

Reconstructs memory contents from data chunks.

Definition at line 47 of file QHexView.hpp.

Constructor & Destructor Documentation

QHexView::QHexView ( QWidget *  parent = nullptr)

Definition at line 54 of file QHexView.cpp.

Here is the call graph for this function:

Member Function Documentation

void QHexView::clear ( )

Definition at line 135 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t QHexView::create_hex_line ( size_t  start,
size_t  end,
QString *  dest,
bool  with_offset = false,
bool  with_ascii = false 
)

Definition at line 178 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t QHexView::cursorPosFromMousePos ( const QPoint &  position)
private

Definition at line 703 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void QHexView::ensureVisible ( )
private

Definition at line 771 of file QHexView.cpp.

Here is the caller graph for this function:

unsigned int QHexView::get_bytes_per_line ( ) const

Definition at line 130 of file QHexView.cpp.

Here is the caller graph for this function:

uint8_t QHexView::get_next_byte ( bool *  is_new_chunk = nullptr)
protected

Definition at line 253 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

pair< size_t, size_t > QHexView::get_selection ( ) const

Definition at line 163 of file QHexView.cpp.

Here is the caller graph for this function:

QSize QHexView::getFullSize ( ) const
private

Definition at line 290 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::initialize_byte_iterator ( size_t  offset)
protected

Definition at line 222 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void QHexView::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 526 of file QHexView.cpp.

Here is the call graph for this function:

void QHexView::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 680 of file QHexView.cpp.

Here is the call graph for this function:

void QHexView::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 689 of file QHexView.cpp.

Here is the call graph for this function:

void QHexView::paintEvent ( QPaintEvent *  event)
protected

Definition at line 310 of file QHexView.cpp.

Here is the call graph for this function:

void QHexView::resetSelection ( )
private

Definition at line 728 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::resetSelection ( int  pos)
private

Definition at line 734 of file QHexView.cpp.

void QHexView::set_data ( const DecodeBinaryClass data)

Definition at line 94 of file QHexView.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void QHexView::set_highlighted_data_sample ( uint64_t  sample)

Definition at line 123 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::set_mode ( Mode  m)

Definition at line 86 of file QHexView.cpp.

void QHexView::set_visible_sample_range ( uint64_t  start,
uint64_t  end 
)

Definition at line 116 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::setCursorPos ( int  pos)
private

Definition at line 758 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::setSelection ( int  pos)
private

Definition at line 744 of file QHexView.cpp.

Here is the caller graph for this function:

void QHexView::showFromOffset ( size_t  offset)

Definition at line 146 of file QHexView.cpp.

Here is the call graph for this function:

QSizePolicy QHexView::sizePolicy ( ) const
virtual

Definition at line 158 of file QHexView.cpp.

Here is the caller graph for this function:

Member Data Documentation

uint8_t QHexView::address_digits_
private

Definition at line 101 of file QHexView.hpp.

size_t QHexView::charHeight_
private

Definition at line 99 of file QHexView.hpp.

size_t QHexView::charWidth_
private

Definition at line 99 of file QHexView.hpp.

vector<QColor> QHexView::chunk_colors_
private

Definition at line 110 of file QHexView.hpp.

DecodeBinaryDataChunk QHexView::current_chunk_
private

Definition at line 104 of file QHexView.hpp.

size_t QHexView::current_chunk_id_
private

Definition at line 103 of file QHexView.hpp.

size_t QHexView::current_chunk_offset_
private

Definition at line 103 of file QHexView.hpp.

uint64_t QHexView::current_chunk_sample_
private

Definition at line 105 of file QHexView.hpp.

size_t QHexView::current_offset_
private

Definition at line 103 of file QHexView.hpp.

size_t QHexView::cursorPos_
private

Definition at line 100 of file QHexView.hpp.

const DecodeBinaryClass* QHexView::data_
private

Definition at line 95 of file QHexView.hpp.

size_t QHexView::data_size_
private

Definition at line 96 of file QHexView.hpp.

uint64_t QHexView::highlighted_sample_
private

Definition at line 108 of file QHexView.hpp.

Mode QHexView::mode_
private

Definition at line 94 of file QHexView.hpp.

uint64_t QHexView::next_chunk_sample_
private

Definition at line 105 of file QHexView.hpp.

size_t QHexView::posAddr_
private

Definition at line 98 of file QHexView.hpp.

size_t QHexView::posAscii_
private

Definition at line 98 of file QHexView.hpp.

size_t QHexView::posHex_
private

Definition at line 98 of file QHexView.hpp.

size_t QHexView::selectBegin_
private

Definition at line 100 of file QHexView.hpp.

size_t QHexView::selectEnd_
private

Definition at line 100 of file QHexView.hpp.

size_t QHexView::selectInit_
private

Definition at line 100 of file QHexView.hpp.

pair<uint64_t, uint64_t> QHexView::visible_range_
private

Definition at line 107 of file QHexView.hpp.

QColor QHexView::visible_range_color_
private

Definition at line 111 of file QHexView.hpp.


The documentation for this class was generated from the following files: