void GUI::SlideBar::handleEvent(const sf::Event &event) { if (event.type==sf::Event::MouseButtonPressed){ if (contains(event.mouseButton.x, event.mouseButton.y)){ mouseAt(event.mouseButton.x, event.mouseButton.y); mMouseClickHolded = true; } } else if (mMouseClickHolded && event.type==sf::Event::MouseMoved){ mouseAt(event.mouseMove.x, event.mouseMove.y); } else if (mMouseClickHolded && event.type==sf::Event::MouseButtonReleased){ mMouseClickHolded = false; } }
void TVHBox::mouseMoveEvent(QMouseEvent *e) { if (hasMouseTracking()) emit mouseAt(e->pos()); }