34#include <NDEVR/INIInterface.h>
35#include <NDEVR/RGBColor.h>
36#include <QPropertyAnimation>
48 class NDEVRProxyStyle;
84 int pixelMetric(PixelMetric metric,
const QStyleOption *option =
nullptr,
const QWidget *widget =
nullptr)
const override;
85 virtual void drawPrimitive(PrimitiveElement pe,
const QStyleOption *opt, QPainter *p,
const QWidget *w =
nullptr)
const override;
86 void drawControl(ControlElement element,
const QStyleOption *opt, QPainter *painter,
const QWidget *widget)
const override;
87 void drawComplexControl(ComplexControl control,
const QStyleOptionComplex *option, QPainter *painter,
const QWidget *widget =
nullptr)
const override;
88 void drawArrow(Qt::ArrowType type, QPainter *painter,
const QStyleOption *option,
const QRect &rect,
const QColor &color)
const;
89 void drawItemText(QPainter *painter,
const QRect &rect,
int flags,
const QPalette &pal,
bool enabled,
90 const QString &text, QPalette::ColorRole textRole = QPalette::NoRole)
const override;
91 virtual void drawItemPixmap(QPainter *painter,
const QRect &rect,
int alignment,
const QPixmap &pixmap)
const override;
92 QRect
subElementRect(SubElement element,
const QStyleOption *option,
const QWidget *widget)
const override;
93 QRect
subControlRect(ComplexControl cc,
const QStyleOptionComplex *opt, SubControl sc,
const QWidget *widget)
const override;
94 QRect
itemTextRect(
const QFontMetrics &fm,
const QRect &r,
int flags,
bool enabled,
const QString &text)
const override;
95 QRect
itemPixmapRect(
const QRect &r,
int flags,
const QPixmap &pixmap)
const override;
96 QSize
sizeFromContents(ContentsType type,
const QStyleOption *option,
const QSize &size,
const QWidget *widget)
const override;
97 int styleHint(StyleHint stylehint,
const QStyleOption *opt =
nullptr,
98 const QWidget *widget =
nullptr, QStyleHintReturn* returnData =
nullptr)
const override;
102 QIcon
standardIcon(StandardPixmap standardIcon,
const QStyleOption* option =
nullptr,
const QWidget* widget =
nullptr)
const override;
139 RGBColor theme_colors[NDEVRLightingTheme::e_num_of_themes][QPalette::NColorRoles];
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:64
Contains methods for easily reading and writing to an INI file including.
Definition INIInterface.h:45
Responsible for setting up the core style of the application including size of various widgets and co...
Definition NDEVRTheme.h:75
TimeSpan resizeAnimationTime() const
virtual void getINI(INIFactory &factory) override
TimeSpan fadeInAnimationTime() const
QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const override
QStyle * m_native_theme
Definition NDEVRTheme.h:144
void setLightingThemeAnimated(NDEVRLightingTheme theme)
TimeSpan fadeOutAnimationTime() const
QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const override
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget=nullptr) const override
NDEVRProxyStyle(QStyle *style)
QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
fltp08 m_touch_text_scale_vert
Definition NDEVRTheme.h:148
TimeSpan paletteAnimationTime() const
void drawArrow(Qt::ArrowType type, QPainter *painter, const QStyleOption *option, const QRect &rect, const QColor &color) const
NDEVRLightingTheme theme() const
Definition NDEVRTheme.h:115
QPalette interpolatedThemePalette(NDEVRLightingTheme start, NDEVRLightingTheme end, fltp04 percent) const
fltp08 m_touch_ui_scale_horz
Definition NDEVRTheme.h:145
static NDEVRProxyStyle * s_global_style
Definition NDEVRTheme.h:135
NDEVRLightingTheme oldTheme() const
bool m_touch_use_rounded_buttons
Definition NDEVRTheme.h:152
fltp08 baseUIScale() const
void updateIconOverrideTheme()
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const override
NDEVRLightingTheme m_old_theme
Definition NDEVRTheme.h:142
void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const override
NDEVRProxyStyle(const File &ini_file)
static String ColorThemeIcon(NDEVRLightingTheme theme)
NDEVRLightingTheme m_theme
Definition NDEVRTheme.h:143
fltp08 m_resolution_pixel_metric
Definition NDEVRTheme.h:151
fltp08 m_desktop_text_scale
Definition NDEVRTheme.h:150
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
void updateResolutionPixelMetric()
static QFont OriginalFont()
int styleHint(StyleHint stylehint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
void setLightingThemeAnimated(NDEVRLightingTheme start, NDEVRLightingTheme end, fltp04 percent)
static NDEVRProxyStyle * GlobalStyle()
void drawRoundedButtonBackground(const QStyleOption *opt, QPainter *p, int radius=Constant< int >::Max) const
int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
void setToDefaultColors()
bool usingRoundedButtons() const
fltp08 m_desktop_ui_scale
Definition NDEVRTheme.h:147
QPalette themePalette(NDEVRLightingTheme theme) const
RGBColor disabledColor(NDEVRLightingTheme theme) const
void setLightingTheme(NDEVRLightingTheme theme, bool force_update=false, bool save_settings=true)
virtual QPalette standardPalette() const override
fltp04 themeTransitionPercent()
fltp08 desktopFontScale()
bool isGlobalStyle() const
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *painter, const QWidget *widget) const override
void setUseRoundedButtons(bool use_rounded_buttons)
fltp04 m_theme_transition_percent
Definition NDEVRTheme.h:141
fltp08 baseTextScale() const
void polish(QWidget *widget) override
void lightingThemeChangedSignal(NDEVRLightingTheme theme)
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const override
fltp08 m_touch_ui_scale_vert
Definition NDEVRTheme.h:146
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const override
fltp08 m_touch_text_scale_horz
Definition NDEVRTheme.h:149
virtual void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const override
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
The core String class for the software.
Definition String.h:47
Logic for reading or writing to a string or a user friendly, TranslatedString.
Definition StringStream.h:118
An animation that slowly changes the color over the entire UI.
Definition NDEVRTheme.h:53
ThemeChanger(NDEVRLightingTheme start, NDEVRLightingTheme end, NDEVRProxyStyle *style)
NDEVRProxyStyle * style
Definition NDEVRTheme.h:63
NDEVRLightingTheme end
Definition NDEVRTheme.h:62
void setPercent(float percent)
QPropertyAnimation * m_animation
Definition NDEVRTheme.h:66
NDEVRLightingTheme start
Definition NDEVRTheme.h:61
float percent
Definition NDEVRTheme.h:55
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:125
NDEVRLightingTheme
Definition NDEVRTheme.h:43
@ e_dark_theme
Definition NDEVRTheme.h:44
@ e_num_of_themes
Definition NDEVRTheme.h:46
@ e_light_theme
Definition NDEVRTheme.h:45
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230