MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / EntropyWidget

Method EntropyWidget

examples/triage/entropy.cpp:57–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57EntropyWidget::EntropyWidget(QWidget* parent, TriageView* view, BinaryViewRef data) : QWidget(parent)
58{
59 m_view = view;
60 m_data = data;
61 m_rawData = data->GetFile()->GetViewOfType("Raw");
62
63 m_blockSize = (size_t)((m_rawData->GetLength() / 4096) + 1);
64 if (m_blockSize < 1024)
65 m_blockSize = 1024;
66 m_width = (int)(m_rawData->GetLength() / (uint64_t)m_blockSize);
67 m_image = QImage(m_width, 1, QImage::Format_ARGB32);
68 m_image.fill(QColor(0, 0, 0, 0));
69 m_thread = new EntropyThread(m_rawData, m_blockSize, &m_image);
70
71 QTimer* timer = new QTimer();
72 connect(timer, &QTimer::timeout, this, &EntropyWidget::timerExpired);
73 timer->setInterval(100);
74 timer->setSingleShot(false);
75 timer->start();
76
77 setMinimumHeight(UIContext::getScaledWindowSize(32, 32).height());
78}
79
80
81EntropyWidget::~EntropyWidget()

Callers 1

__init__Method · 0.80

Calls 6

connectFunction · 0.85
GetViewOfTypeMethod · 0.80
GetFileMethod · 0.45
GetLengthMethod · 0.45
startMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected