Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
StyledFrame Class Reference
Inheritance diagram for StyledFrame:
NodeActionRow NotificationWidget maki::LongNotificationWidget

Public Member Functions

 StyledFrame (QWidget *parent=nullptr)
 Constructs a StyledFrame with the given parent.
void setBackgroundRole (BackgroundRole role)
 Sets the background role of the frame.
void setBorderRole (BorderRole role)
 Sets the border role of the frame.
void setCustomBackgroundColor (const QColor &color)
 Sets a custom background color for the frame.
void setCustomBorderColor (const QColor &color)
 Sets a custom border color for the frame.
void setBorderWidth (int width)
 Sets the width of the border.
void setRadius (qreal radius)
 Sets the radius for rounded corners.

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Handles the paint event to draw the styled frame.

Private Member Functions

QColor backgroundColor () const
 Radius for rounded corners.
QColor borderColor () const
 Returns the current border color based on the role.

Private Attributes

BorderRole mBorderRole = BorderRole::Mid
 Current background role.
QColor mCustomBackgroundColor
 Current border role.
QColor mCustomBorderColor
 Custom background color.
int mBorderWidth = 1
 Custom border color.
qreal mRadius = 0.0
 Width of the border.

Constructor & Destructor Documentation

◆ StyledFrame()

StyledFrame::StyledFrame ( QWidget * parent = nullptr)

Constructs a StyledFrame with the given parent.

Parameters
parentThe parent widget.

Member Function Documentation

◆ backgroundColor()

QColor StyledFrame::backgroundColor ( ) const
private

Radius for rounded corners.

Returns the current background color based on the role.

Returns
The background color.

◆ borderColor()

QColor StyledFrame::borderColor ( ) const
private

Returns the current border color based on the role.

Returns
The border color.

◆ paintEvent()

void StyledFrame::paintEvent ( QPaintEvent * event)
overrideprotected

Handles the paint event to draw the styled frame.

Parameters
eventThe paint event.

◆ setBackgroundRole()

void StyledFrame::setBackgroundRole ( BackgroundRole role)

Sets the background role of the frame.

Parameters
roleThe new background role.

◆ setBorderRole()

void StyledFrame::setBorderRole ( BorderRole role)

Sets the border role of the frame.

Parameters
roleThe new border role.

◆ setBorderWidth()

void StyledFrame::setBorderWidth ( int width)

Sets the width of the border.

Parameters
widthThe new border width.

◆ setCustomBackgroundColor()

void StyledFrame::setCustomBackgroundColor ( const QColor & color)

Sets a custom background color for the frame.

Parameters
colorThe new custom background color.

◆ setCustomBorderColor()

void StyledFrame::setCustomBorderColor ( const QColor & color)

Sets a custom border color for the frame.

Parameters
colorThe new custom border color.

◆ setRadius()

void StyledFrame::setRadius ( qreal radius)

Sets the radius for rounded corners.

Parameters
radiusThe new radius value.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/frame.h
  • /__w/maki/maki/app/widgets/frame.cpp