Loading...
Searching...
No Matches
Inheritance diagram for score::Skin:

Classes

struct  color_map
 

Public Types

enum  Part { Colours = 1 , Fonts = 2 , Everything = Colours | Fonts }
 Which halves of a skin file to apply.
 

Public Member Functions

void load (const QJsonObject &style, int parts=Everything)
 
QJsonObject toJson () const
 
std::vector< std::pair< const char *, QFont * > > fonts () noexcept
 
const Brush * fromString (const QString &s) const
 
Brush * fromString (const QString &s)
 
QString toString (const Brush *) const
 
QVector< QPair< QColor, QString > > getColors () const
 
QVector< QPair< QColor, QString > > getDefaultPaletteColors () const
 
void changed ()
 

Static Public Member Functions

static Skin & instance () noexcept
 
static bool exists () noexcept
 
static QJsonObject merged (const QJsonObject &base, const QJsonObject &over)
 
static const std::vector< std::pair< const char *, QPalette::ColorRole > > & paletteRoles () noexcept
 

Public Attributes

QFont ApplicationFont
 Applying this to the QApplication is setupApplicationFont()'s job.
 
QFont SansFont
 
QFont MonoFont
 
QFont MonoFontSmall
 
QFont SansFontSmall
 
QFont Bold10Pt
 
QFont Bold12Pt
 
QFont Medium7Pt
 
QFont Medium8Pt
 
QFont Medium10Pt
 
QFont Medium12Pt
 
QFont TitleFont
 
QFont SectionTitleFont
 
QFont TimecodeFont
 
QFont RulerFont
 
QFont CodeFont
 Script and shader editors.
 
Brush Dark
 
Brush HalfDark
 
Brush DarkGray
 
Brush Gray
 
Brush LightGray
 
Brush HalfLight
 
Brush Light
 
Brush Emphasis1
 
Brush Emphasis2
 
Brush Emphasis3
 
Brush Emphasis4
 
Brush Emphasis5
 
Brush Base1
 
Brush Base2
 
Brush Base3
 
Brush Base4
 
Brush Base5
 
Brush Warn1
 
Brush Warn2
 
Brush Warn3
 
Brush Background1
 
Brush Background2
 
Brush Transparent1
 
Brush Transparent2
 
Brush Transparent3
 
Brush Smooth1
 
Brush Smooth2
 
Brush Smooth3
 
Brush Tender1
 
Brush Tender2
 
Brush Tender3
 
Brush Cable1
 
Brush Cable2
 
Brush Cable3
 
Brush Cable4
 
Brush Cable5
 
Brush SelectedCable1
 
Brush SelectedCable2
 
Brush SelectedCable3
 
Brush SelectedCable4
 
Brush SelectedCable5
 
Brush Port1
 
Brush Port2
 
Brush Port3
 
Brush Port4
 
Brush Port5
 
Brush Pulse1
 
Brush Pulse2
 
Brush Waveform1
 The sound waveform: the peak envelope and the RMS body inside it.
 
Brush Waveform2
 
QPalette WidgetPalette
 
const QPen TransparentPen
 
const QBrush TransparentBrush
 
const QPen NoPen
 
const QBrush NoBrush
 
QBrush TextBrush
 
QPen TextItemPen
 
QBrush SliderBrush
 
QPen SliderPen
 
QBrush SliderInteriorBrush
 
QPen SliderLine
 
QPen SliderTextPen
 
QFont SliderFont
 
QCursor CursorPointer
 
QCursor CursorOpenHand
 
QCursor CursorClosedHand
 
QCursor CursorPointingHand
 
QCursor CursorMagnifier
 
QCursor CursorMove
 
QCursor CursorScaleH
 
QCursor CursorScaleV
 
QCursor CursorScaleFDiag
 
QCursor CursorSpin
 
QCursor CursorPlayFromHere
 
QCursor CursorCreationMode
 
int PulseIndex {}
 
int LoadIndex {}
 

Member Function Documentation

◆ exists()

bool score::Skin::exists ( )
staticnoexcept

Whether instance() has already been built, and so is safe to call. It needs the application context, which does not exist while the main window is being constructed.

◆ fonts()

std::vector< std::pair< const char *, QFont * > > score::Skin::fonts ( )
noexcept

Every font a skin may name, keyed as in the file. Single list so load, save, the defaults and the editor cannot drift apart; the editor writes through these pointers and emits changed().

◆ merged()

QJsonObject score::Skin::merged ( const QJsonObject &  base,
const QJsonObject &  over 
)
static

over layered on base, objects merged recursively: a key the overlay names wins, anything it leaves out comes from the base.

◆ paletteRoles()

const std::vector< std::pair< const char *, QPalette::ColorRole > > & score::Skin::paletteRoles ( )
staticnoexcept

Every QPalette role a skin may name, keyed as in the file. Same shape as fonts(): one list for load, save and the editor.

◆ toJson()

QJsonObject score::Skin::toJson ( ) const

In the form load() reads back: anything added here needs a load() counterpart.

Member Data Documentation

◆ Port1

Brush score::Skin::Port1

Port and cable types: audio, data, midi, texture, geometry. One set, so a skin names them together and the distinctness check covers all five.

◆ RulerFont

QFont score::Skin::RulerFont

Timeline ruler numbers. Separate role: the smallest text score draws, so a pixel font has to land on its grid to stay legible.

◆ SectionTitleFont

QFont score::Skin::SectionTitleFont

Inspector page heading. Separate role: a pixel font can be neither emboldened nor resized freely without Qt faking it.

◆ TimecodeFont

QFont score::Skin::TimecodeFont

Transport time readout. Separate role: the one large piece of text, so a pixel-font skin needs it on its own grid.

◆ WidgetPalette

QPalette score::Skin::WidgetPalette

The widget palette. Separate from the Brush roles above, which only reach the graphics scene: this is what the Qt widgets are drawn from, and without it a skin can only restyle half the application.

Only the roles a skin names are set; the rest keep whatever the style computed, which is how Qt derives a sane Disabled group.


The documentation for this class was generated from the following files: