34#include <NDEVR/Resource.h>
35#include <NDEVR/Vector.h>
43 class NDEVR_WIDGETS_API
SunDial :
public QWidget
86 return QSize(300, 300);
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
SunDial(QWidget *parent=nullptr)
Constructs a SunDial widget with the given parent.
fltp04 outerRadius() const
Returns the outer radius of the dial in pixels.
QColor m_knob_outer_color
The outer color of the knob gradient.
virtual void mouseMoveEvent(QMouseEvent *ev) override
Handles mouse move events to update the knob position while dragging.
fltp04 m_inner_radius
The inner radius ratio of the dial background.
QColor m_outer_color
The outer color of the background gradient.
Resource< Vector< 2, fltp04 > > location
The 2D direction resource representing the current lighting direction.
void paintEvent(QPaintEvent *paint_event) override
Paints the dial including the background gradient, knob, and decorations.
QColor m_inner_color
The inner color of the background gradient.
Vector< 2, fltp04 > knobLocation() const
Returns the current position of the dial knob in widget coordinates.
Vector< 2, fltp04 > centerPoint() const
Returns the center point of the dial in widget coordinates.
fltp04 m_knob_radius
The radius ratio of the knob relative to the widget size.
virtual void mouseReleaseEvent(QMouseEvent *) override
Handles mouse release events to stop dragging the dial knob.
void setKnobColor(QColor inner, QColor outer)
Sets the gradient colors for the dial knob.
bool m_dragging
Whether the user is currently dragging the knob.
QSize sizeHint() const override
Returns the recommended size for this dial widget.
void setBackgroundColor(QColor inner, QColor outer)
Sets the gradient colors for the dial background.
QColor m_knob_inner_color
The inner color of the knob gradient.
fltp04 knobRadius() const
Returns the radius of the dial knob in pixels, scaled to the widget size.
virtual void mousePressEvent(QMouseEvent *ev) override
Handles mouse press events to begin dragging the dial knob.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
The primary namespace for the NDEVR SDK.
constexpr t_type getMin(const t_type &left, const t_type &right)
Finds the minimum of the given arguments based on the < operator Author: Tyler Parke Date: 2017-11-05...
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...