1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-26 21:57:45 +00:00
novus/parts/hex/hexpart.cpp

19 lines
No EOL
414 B
C++

// 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);
}
#include "moc_hexpart.cpp"