summaryrefslogtreecommitdiff
path: root/examples/triage/fileinfo.h
diff options
context:
space:
mode:
authorJordan Wiens <github@psifertex.com>2026-01-01 12:21:22 -0500
committerJordan Wiens <github@psifertex.com>2026-01-01 12:21:22 -0500
commit37a0604d805991b85a0590279ad993a19ddee7bb (patch)
treefa8054497a4761f134ab5b537dfb0dbfc9a64f32 /examples/triage/fileinfo.h
parent2448131059638409902821451115872036230328 (diff)
add whole-file entropy calculation to triage
Diffstat (limited to 'examples/triage/fileinfo.h')
-rw-r--r--examples/triage/fileinfo.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/triage/fileinfo.h b/examples/triage/fileinfo.h
index 78ba578b..8eac3fbe 100644
--- a/examples/triage/fileinfo.h
+++ b/examples/triage/fileinfo.h
@@ -5,11 +5,16 @@
#include "uitypes.h"
#include "viewframe.h"
+class EntropyWidget;
+
class FileInfoWidget : public QWidget
{
+ Q_OBJECT
+
static constexpr std::int32_t m_maxColumns {2};
std::pair<std::int32_t, std::int32_t> m_fieldPosition {}; // row, column
QGridLayout* m_layout {};
+ QLabel* m_entropyLabel {};
void addField(const QString& name, const QVariant& value);
void addCopyableField(const QString& name, const QVariant& value);
@@ -17,5 +22,8 @@ class FileInfoWidget : public QWidget
void addHashFields(BinaryViewRef view);
public:
- FileInfoWidget(QWidget* parent, BinaryViewRef bv);
+ FileInfoWidget(QWidget* parent, BinaryViewRef bv, EntropyWidget* entropyWidget);
+
+ private Q_SLOTS:
+ void updateEntropy(double avgEntropy);
};