2020-11-12 09:38:52 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
|
|
|
class ViewInformation : public View {
|
|
|
|
public:
|
|
|
|
explicit ViewInformation(prv::Provider* &dataProvider);
|
|
|
|
~ViewInformation() override;
|
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-12 09:38:52 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
prv::Provider* &m_dataProvider;
|
|
|
|
|
2020-11-22 19:43:35 +01:00
|
|
|
bool m_dataValid = false;
|
2020-11-14 14:41:15 +01:00
|
|
|
u32 m_blockSize = 0;
|
2020-11-12 09:38:52 +01:00
|
|
|
float m_averageEntropy = 0;
|
|
|
|
float m_highestBlockEntropy = 0;
|
|
|
|
std::vector<float> m_blockEntropy;
|
|
|
|
|
|
|
|
std::array<float, 256> m_valueCounts = { 0 };
|
2020-11-22 19:43:35 +01:00
|
|
|
bool m_shouldInvalidate = false;
|
|
|
|
|
|
|
|
std::pair<u64, u64> m_analyzedRegion = { 0, 0 };
|
2020-11-12 09:38:52 +01:00
|
|
|
|
|
|
|
std::string m_fileDescription;
|
|
|
|
std::string m_mimeType;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|