MCPcopy Create free account
hub / github.com/YACReader/yacreader / moveCursoToGoToFlow

Method moveCursoToGoToFlow

YACReader/viewer.cpp:1198–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196}
1197
1198void Viewer::moveCursoToGoToFlow()
1199{
1200 if (Configuration::getConfiguration().getDisableShowOnMouseOver()) {
1201 return;
1202 }
1203
1204 // Move cursor to goToFlow widget on show (this avoid hide when mouse is moved)
1205 int y = goToFlow->pos().y();
1206 int x1 = goToFlow->pos().x();
1207 int x2 = x1 + goToFlow->width();
1208 QPoint cursorPos = mapFromGlobal(cursor().pos());
1209 int cursorX = cursorPos.x();
1210 int cursorY = cursorPos.y();
1211
1212 if (cursorY <= y)
1213 cursorY = y + 10;
1214 if (cursorX <= x1)
1215 cursorX = x1 + 10;
1216 if (cursorX >= x2)
1217 cursorX = x2 - 10;
1218 cursor().setPos(mapToGlobal(QPoint(cursorX, cursorY)));
1219 hideCursorTimer->stop();
1220 showCursor();
1221}
1222
1223void Viewer::rotateLeft()
1224{

Callers

nothing calls this directly

Calls 3

QPointClass · 0.85
stopMethod · 0.45

Tested by

no test coverage detected