Class SectionDrawingArea¶
Defined in File sectiondrawingarea.h
Class Documentation¶
-
class
SectionDrawingArea
: public QFrame¶ -
Public Functions
-
SectionDrawingArea
(QWidget *parent, Section §ion, uint8_t section_id)¶
-
~SectionDrawingArea
()¶
-
void
draw_frame
(FrameType type)¶ Draws a frame around the widget. Whether the Section is active determines the color of the frame.
- Parameters
type
: They type of Section and whether it’s active or inactive.
-
Section &
get_section
() const¶ Returns the underlying Section.
- Return
Section rendered by this DrawingArea.
Protected Functions
-
void
mouseMoveEvent
(QMouseEvent *event)¶ Handles mouse clicks. When Canvas is enabled, users can draw onto the Section using the mouse. Left-click activates and right-click deactiviates.
- Parameters
event
: Event parameters.
-
void
mousePressEvent
(QMouseEvent *event)¶ Triggers a mouse move event on mouse press.
- Parameters
event
: Event parameters.
-
void
paintEvent
(QPaintEvent *event)¶ Handles drawing the Section.
- Parameters
event
: Event parameters.
-
void
resizeEvent
(QResizeEvent *event)¶ Handles resizing the widget. On each resize, the widget recalculates the optimal size of each Pixel so that the entire Section fits. It also centers the Section.
- Parameters
event
: Event parameters.
Protected Attributes
-
Section &
section_
¶
-