8 #include "../include/ccMouseCircle.h"
11 #include <QWheelEvent>
45 ccMouseCircle::m_owner = owner;
46 m_owner->installEventFilter(
this);
53 m_owner->removeEventFilter(
this);
96 QPoint p = m_owner->mapFromGlobal(QCursor::pos());
98 int my =
context.glH - 1 - p.y();
128 bool ccMouseCircle::eventFilter(QObject* obj, QEvent*
event) {
132 if (
event->type() == QEvent::MouseMove) {
138 if (
event->type() == QEvent::Wheel && m_allowScroll) {
139 QWheelEvent* wheelEvent =
static_cast<QWheelEvent*
>(
event);
145 m_radius -
static_cast<int>(m_radiusStep * (delta / 100.0)));
double qtCompatWheelEventDelta(const QWheelEvent *event) noexcept
cmdLineReadable * params[]
static bool Print(const char *format,...)
Prints out a formatted message in console.
virtual bool isVisible() const
Returns whether entity is visible or not.
virtual void setVisible(bool state)
Sets entity visibility.
void draw(CC_DRAW_CONTEXT &context) override
Draws entity and its children.
ccMouseCircle(ecvMainAppInterface *appInterface, QWidget *owner, QString name=QString("MouseCircle"))
virtual void setEnabled(bool state)
Sets the "enabled" property.
Main application interface (for plugins)
Standard parameters for GL displays/viewports.
#define MACRO_Draw2D(context)
#define MACRO_Foreground(context)
static Circle s_unitCircle
double vertices[Resolution][2]
static const int Resolution