|
Maki
Formally verfied low-code orchestration
|
A custom QScrollArea with styled background. More...
#include <scroll_area.h>
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. | |
A custom QScrollArea with styled background.
|
strong |
| StyledScrollArea::StyledScrollArea | ( | QWidget * | parent = nullptr | ) |
Constructs a StyledScrollArea with the given parent.
| parent | The parent widget. |
|
private |
The custom background color.
Returns the current background color based on the role.
| void StyledScrollArea::setBackgroundRole | ( | BackgroundRole | role | ) |
Sets the background role for the scroll area.
| role | The new background role. |
| void StyledScrollArea::setCustomBackgroundColor | ( | const QColor & | color | ) |
Sets a custom background color for the scroll area.
| color | The new custom background color. |
|
overrideprotected |
Handles viewport events.
| event | The event to handle. |