1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-27 22:27:46 +00:00
novus/parts/hex/hexpart.cpp

18 lines
387 B
C++
Raw Normal View History

2023-10-12 20:18:11 -04:00
// SPDX-FileCopyrightText: 2014 Dax89
// SPDX-License-Identifier: MIT
#include "hexpart.h"
#include "document/buffer/qmemoryrefbuffer.h"
HexPart::HexPart(QWidget *parent)
: QHexView(parent)
{
}
void HexPart::loadFile(physis_Buffer buffer)
{
setDocument(QHexDocument::fromMemory<QMemoryRefBuffer>(reinterpret_cast<char *>(buffer.data), buffer.size));
setReadOnly(true);
}