2020-11-11 00:13:09 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-05-30 16:36:46 +02:00
|
|
|
#include <hex/api/content_registry.hpp>
|
|
|
|
|
2022-02-01 18:09:40 +01:00
|
|
|
#include <hex/ui/view.hpp>
|
2020-11-11 00:13:09 +01:00
|
|
|
|
2021-12-07 22:47:41 +01:00
|
|
|
namespace hex::plugin::builtin {
|
2020-11-11 00:13:09 +01:00
|
|
|
|
|
|
|
class ViewHashes : public View {
|
|
|
|
public:
|
2020-12-27 15:39:06 +01:00
|
|
|
explicit ViewHashes();
|
2020-11-11 09:28:44 +01:00
|
|
|
~ViewHashes() override;
|
2020-11-11 00:13:09 +01:00
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
2020-11-11 00:13:09 +01:00
|
|
|
|
2023-01-18 14:30:56 +01:00
|
|
|
private:
|
2023-04-17 16:18:48 +02:00
|
|
|
bool importHashes(prv::Provider *provider, const nlohmann::json &json);
|
|
|
|
bool exportHashes(prv::Provider *provider, nlohmann::json &json);
|
2023-01-18 14:30:56 +01:00
|
|
|
|
2020-11-11 00:13:09 +01:00
|
|
|
private:
|
2022-05-30 16:36:46 +02:00
|
|
|
ContentRegistry::Hashes::Hash *m_selectedHash = nullptr;
|
|
|
|
std::string m_newHashName;
|
2023-04-17 16:18:48 +02:00
|
|
|
|
|
|
|
PerProvider<std::vector<ContentRegistry::Hashes::Hash::Function>> m_hashFunctions;
|
|
|
|
|
2020-11-11 00:13:09 +01:00
|
|
|
};
|
|
|
|
|
2021-10-26 17:21:48 +02:00
|
|
|
}
|