2020-11-12 08:38:52 +00: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:
|
2020-12-27 14:39:06 +00:00
|
|
|
explicit ViewInformation();
|
2020-11-12 08:38:52 +00:00
|
|
|
~ViewInformation() override;
|
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-12 08:38:52 +00:00
|
|
|
|
|
|
|
private:
|
2020-11-22 18:43:35 +00:00
|
|
|
bool m_dataValid = false;
|
2020-11-14 13:41:15 +00:00
|
|
|
u32 m_blockSize = 0;
|
2020-11-12 08:38:52 +00:00
|
|
|
float m_averageEntropy = 0;
|
|
|
|
float m_highestBlockEntropy = 0;
|
|
|
|
std::vector<float> m_blockEntropy;
|
|
|
|
|
|
|
|
std::array<float, 256> m_valueCounts = { 0 };
|
2020-11-22 18:43:35 +00:00
|
|
|
bool m_shouldInvalidate = false;
|
|
|
|
|
|
|
|
std::pair<u64, u64> m_analyzedRegion = { 0, 0 };
|
2020-11-12 08:38:52 +00:00
|
|
|
|
|
|
|
std::string m_fileDescription;
|
|
|
|
std::string m_mimeType;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|