hydrogen 1.2.6
Skin Class Reference

Skin support. More...

#include <Skin.h>

Public Types

enum class  Stacked {
  None , Off , OffNext , On ,
  OnNext
}
 

Static Public Member Functions

static void drawListBackground (QPainter *p, QRect rect, QColor background, bool bHovered)
 Draws the background of a row in both the pattern list of the SongEditor and the instrument list in the PatternEditor using p.
 
static void drawPlayhead (QPainter *p, int x, int y, bool bHovered=false)
 
static void drawStackedIndicator (QPainter *p, int x, int y, Skin::Stacked stacked)
 
static QString getGlobalStyleSheet ()
 Top-level stylesheet for Hydrogen.
 
static QString getImagePath ()
 
static int getPlayheadShaftOffset ()
 
static QString getSvgImagePath ()
 
static QColor makeTextColorInactive (QColor color)
 If a widget is marked inactive the value of its text color are reduced by this factor.
 
static QColor makeWidgetColorInactive (QColor color)
 If a widget is marked inactive the value of its background color are reduced by this factor.
 
static void setPalette (QApplication *pQApp)
 Function used to update the global palette of the QApplication.
 
static void setPlayheadPen (QPainter *p, bool bHovered=false)
 

Static Public Attributes

static constexpr int nPlayheadHeight = 8
 
static constexpr int nPlayheadWidth = 11
 

Detailed Description

Skin support.

Definition at line 33 of file Skin.h.

Member Enumeration Documentation

◆ Stacked

enum class Stacked
strong
Enumerator
None 
Off 
OffNext 
On 
OnNext 

Definition at line 84 of file Skin.h.

Member Function Documentation

◆ drawListBackground()

void drawListBackground ( QPainter * p,
QRect rect,
QColor background,
bool bHovered )
static

Draws the background of a row in both the pattern list of the SongEditor and the instrument list in the PatternEditor using p.

Parameters
pPainter used in the calling QPaintEvent routine.
rectBoundary that encloses element (one row).
backgroundColor used.
bHoveredWhether the element is currently hovered by mouse.

Definition at line 144 of file Skin.cpp.

◆ drawPlayhead()

void drawPlayhead ( QPainter * p,
int x,
int y,
bool bHovered = false )
static

Definition at line 203 of file Skin.cpp.

◆ drawStackedIndicator()

void drawStackedIndicator ( QPainter * p,
int x,
int y,
Skin::Stacked stacked )
static

Definition at line 223 of file Skin.cpp.

◆ getGlobalStyleSheet()

QString getGlobalStyleSheet ( )
static

Top-level stylesheet for Hydrogen.

This one affects all widgets within Hydrogen (including
popups, file browser etc) and will get the most recent color
values from the #H2Core::Preferences.

\return String version of the stylesheet.

Definition at line 28 of file Skin.cpp.

◆ getImagePath()

static QString getImagePath ( )
inlinestatic

Definition at line 36 of file Skin.h.

◆ getPlayheadShaftOffset()

static int getPlayheadShaftOffset ( )
inlinestatic

Definition at line 79 of file Skin.h.

◆ getSvgImagePath()

static QString getSvgImagePath ( )
inlinestatic

Definition at line 40 of file Skin.h.

◆ makeTextColorInactive()

QColor makeTextColorInactive ( QColor color)
static

If a widget is marked inactive the value of its text color are reduced by this factor.

Definition at line 176 of file Skin.cpp.

◆ makeWidgetColorInactive()

QColor makeWidgetColorInactive ( QColor color)
static

If a widget is marked inactive the value of its background color are reduced by this factor.

Definition at line 167 of file Skin.cpp.

◆ setPalette()

void setPalette ( QApplication * pQApp)
static

Function used to update the global palette of the QApplication.

It will get the most recent color values from the H2Core::Preferences.

Definition at line 106 of file Skin.cpp.

◆ setPlayheadPen()

void setPlayheadPen ( QPainter * p,
bool bHovered = false )
static

Definition at line 190 of file Skin.cpp.

Field Documentation

◆ nPlayheadHeight

int nPlayheadHeight = 8
staticconstexpr

Definition at line 78 of file Skin.h.

◆ nPlayheadWidth

int nPlayheadWidth = 11
staticconstexpr

Definition at line 77 of file Skin.h.