MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / addressWidth

Method addressWidth

src/qhexedit.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int QHexEdit::addressWidth()
95{
96 qint64 size = _chunks->size();
97 int n = 1;
98 if (size > Q_INT64_C(0x100000000)){ n += 8; size /= Q_INT64_C(0x100000000);}
99 if (size > 0x10000){ n += 4; size /= 0x10000;}
100 if (size > 0x100){ n += 2; size /= 0x100;}
101 if (size > 0x10){ n += 1;}
102
103 if (n > _addressWidth)
104 return n;
105 else
106 return _addressWidth;
107}
108
109void QHexEdit::setAsciiArea(bool asciiArea)
110{

Callers 2

writeSettingsMethod · 0.80
loadMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected