Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
StyledScrollArea Class Reference

A custom QScrollArea with styled background. More...

#include <scroll_area.h>

Inheritance diagram for StyledScrollArea:

Public Types

enum class  BackgroundRole { }
 Enumeration for different background roles. More...

Public Member Functions

 StyledScrollArea (QWidget *parent=nullptr)
 Constructs a StyledScrollArea with the given parent.
void setBackgroundRole (BackgroundRole role)
 Sets the background role for the scroll area.
void setCustomBackgroundColor (const QColor &color)
 Sets a custom background color for the scroll area.

Protected Member Functions

bool viewportEvent (QEvent *event) override
 Handles viewport events.

Private Member Functions

QColor backgroundColor () const
 The custom background color.

Private Attributes

QColor mCustomBackgroundColor
 The current background role.

Detailed Description

A custom QScrollArea with styled background.

Member Enumeration Documentation

◆ BackgroundRole

Enumeration for different background roles.

Enumerator
Base 

The window background role.

Button 

The base background role.

Midlight 

The button background role.

Custom 

The midlight background role.

A custom background role.

Constructor & Destructor Documentation

◆ StyledScrollArea()

StyledScrollArea::StyledScrollArea ( QWidget * parent = nullptr)

Constructs a StyledScrollArea with the given parent.

Parameters
parentThe parent widget.

Member Function Documentation

◆ backgroundColor()

QColor StyledScrollArea::backgroundColor ( ) const
private

The custom background color.

Returns the current background color based on the role.

Returns
The background color.

◆ setBackgroundRole()

void StyledScrollArea::setBackgroundRole ( BackgroundRole role)

Sets the background role for the scroll area.

Parameters
roleThe new background role.

◆ setCustomBackgroundColor()

void StyledScrollArea::setCustomBackgroundColor ( const QColor & color)

Sets a custom background color for the scroll area.

Parameters
colorThe new custom background color.

◆ viewportEvent()

bool StyledScrollArea::viewportEvent ( QEvent * event)
overrideprotected

Handles viewport events.

Parameters
eventThe event to handle.
Returns
true if the event is handled, false otherwise.

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