| 982 | } |
| 983 | |
| 984 | void QHexEdit::resizeEvent(QResizeEvent *) |
| 985 | { |
| 986 | if (_dynamicBytesPerLine) |
| 987 | { |
| 988 | int pxFixGaps = 0; |
| 989 | if (_addressArea) |
| 990 | pxFixGaps = addressWidth() * _pxCharWidth + 2 * _pxAreaMargin; |
| 991 | pxFixGaps += 2 * _pxAreaMargin; |
| 992 | if (_asciiArea) |
| 993 | pxFixGaps += 2 * _pxAreaMargin; |
| 994 | |
| 995 | // +1 because the last hex value do not have space. so it is effective one char more |
| 996 | int charWidth = (viewport()->width() - pxFixGaps ) / _pxCharWidth + 1; |
| 997 | |
| 998 | // 2 hex alfa-digits 1 space 1 ascii per byte = 4; if ascii is disabled then 3 |
| 999 | // to prevent devision by zero use the min value 1 |
| 1000 | setBytesPerLine(std::max(charWidth / (_asciiArea ? 4 : 3), 1)); |
| 1001 | } |
| 1002 | adjust(); |
| 1003 | } |
| 1004 | |
| 1005 | bool QHexEdit::focusNextPrevChild(bool next) |
| 1006 | { |
nothing calls this directly
no outgoing calls
no test coverage detected