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

Method setSelection

src/qhexedit.cpp:1041–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039}
1040
1041void QHexEdit::setSelection(qint64 pos)
1042{
1043 pos = pos / 2;
1044 if (pos < 0)
1045 pos = 0;
1046 if (pos > _chunks->size())
1047 pos = _chunks->size();
1048
1049 if (pos > _bSelectionBegin)
1050 {
1051 _bSelectionEnd = pos;
1052 }
1053 else
1054 {
1055 _bSelectionBegin = pos;
1056 }
1057 _colorManager->selection().setRange(_bSelectionBegin, _bSelectionEnd);
1058}
1059
1060qint64 QHexEdit::getSelectionBegin()
1061{

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
setRangeMethod · 0.80

Tested by

no test coverage detected