Maki
Formally verfied low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
scroll_area.h
1
#pragma once
2
3
#include <QPainter>
4
#include <QPainterPath>
5
#include <QScrollArea>
6
10
class
StyledScrollArea
:
public
QScrollArea
11
{
12
Q_OBJECT
13
14
public
:
18
enum class
BackgroundRole
19
{
20
Window,
21
Base,
22
Button,
23
Midlight,
24
Custom
25
};
26
32
StyledScrollArea
(QWidget* parent =
nullptr
);
33
39
void
setBackgroundRole
(
BackgroundRole
role);
40
46
void
setCustomBackgroundColor
(
const
QColor& color);
47
48
protected
:
55
bool
viewportEvent
(QEvent* event)
override
;
56
57
private
:
58
BackgroundRole
mBackgroundRole =
BackgroundRole::Base
;
59
QColor
mCustomBackgroundColor
;
60
66
QColor
backgroundColor
()
const
;
67
};
StyledScrollArea::mCustomBackgroundColor
QColor mCustomBackgroundColor
The current background role.
Definition
scroll_area.h:59
StyledScrollArea::setCustomBackgroundColor
void setCustomBackgroundColor(const QColor &color)
Sets a custom background color for the scroll area.
Definition
scroll_area.cpp:22
StyledScrollArea::backgroundColor
QColor backgroundColor() const
The custom background color.
Definition
scroll_area.cpp:42
StyledScrollArea::StyledScrollArea
StyledScrollArea(QWidget *parent=nullptr)
Constructs a StyledScrollArea with the given parent.
Definition
scroll_area.cpp:6
StyledScrollArea::BackgroundRole
BackgroundRole
Enumeration for different background roles.
Definition
scroll_area.h:19
StyledScrollArea::BackgroundRole::Base
@ Base
The window background role.
Definition
scroll_area.h:21
StyledScrollArea::setBackgroundRole
void setBackgroundRole(BackgroundRole role)
Sets the background role for the scroll area.
Definition
scroll_area.cpp:16
StyledScrollArea::viewportEvent
bool viewportEvent(QEvent *event) override
Handles viewport events.
Definition
scroll_area.cpp:29
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research