Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
void OpenBKZ::on_graphicsView_rubberBandChanged(const QRect &viewportRect, const QPointF &fromScenePoint, const QPointF &toScenePoint){
/**
* fromScenePoint.y() & fromScenePoint.x() are zero upon release,
* I.E when the user has finished their highlighting.
*/
if(fromScenePoint.y() != 0 && toScenePoint.y() != 0){
this->start = toScenePoint.y();
this->end = fromScenePoint.y();
return;
}
if(this->start/(this->fontsize + 3) == this->end/(this->fontsize + 3))
searchWord();
else
saveHighlightedSection();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment