Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
theme_styler.h
Go to the documentation of this file.
1
9
10#ifndef THEME_STYLER_H
11#define THEME_STYLER_H
12
13#include <QProxyStyle>
14
15class ThemeStyler : public QProxyStyle {
16 Q_OBJECT
17public:
18 ThemeStyler(QStyle *style = nullptr);
19 ThemeStyler(const QString &key);
20
21 int styleHint(StyleHint hint, const QStyleOption *option = nullptr,
22 const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override;
23
24 void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
25 QPainter *painter, const QWidget *widget = nullptr) const override;
26
27 // The object name of the underlying (native) style, e.g. "windows11",
28 // "windowsvista", "fusion", or "macos". QApplication::style() returns
29 // either this proxy or a QStyleSheetStyle wrapping it, neither of which
30 // has a useful objectName().
31 static QString baseStyleName();
32
33 static QString buttonStyleSheet(const QString &objectname, const QColor &baseColor);
34};
35
36
37#endif /* THEME_STYLER_H */