Add python on edit data
This commit is contained in:
parent
bfe6367592
commit
d9246cd928
|
|
@ -66,6 +66,7 @@ HexEditDialog::HexEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::HexE
|
|||
mTypes[DataPascalWord] = FormatType { tr("Pascal WORD (Hex)"), 21 };
|
||||
mTypes[DataPascalDword] = FormatType { tr("Pascal DWORD (Hex)"), 10 };
|
||||
mTypes[DataPascalQword] = FormatType { tr("Pascal QWORD (Hex)"), 5 };
|
||||
mTypes[DataPython3Byte] = FormatType { tr("Python 3 BYTE (Hex)"), 1 };
|
||||
mTypes[DataString] = FormatType { tr("String"), 1 };
|
||||
mTypes[DataUnicodeString] = FormatType { tr("Unicode String"), 1 };
|
||||
mTypes[DataUTF8String] = FormatType { tr("UTF8 String"), 1 };
|
||||
|
|
@ -680,6 +681,18 @@ void HexEditDialog::printData(DataType type)
|
|||
}
|
||||
break;
|
||||
|
||||
case DataPython3Byte:
|
||||
{
|
||||
data += "b\"";
|
||||
for(int i = 0; i < mData.size(); i++)
|
||||
{
|
||||
byte_t ch = mData.at(i);
|
||||
data += QString().sprintf("\\x%02X", ch);
|
||||
}
|
||||
data += "\"";
|
||||
}
|
||||
break;
|
||||
|
||||
case DataHexStream:
|
||||
{
|
||||
for(int i = 0; i < mData.size(); i++)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ private:
|
|||
DataPascalWord,
|
||||
DataPascalDword,
|
||||
DataPascalQword,
|
||||
DataPython3Byte,
|
||||
DataString,
|
||||
DataUnicodeString,
|
||||
DataUTF8String,
|
||||
|
|
|
|||
Loading…
Reference in New Issue