Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
KODI::SUBTITLES::CSubtitlesSettings Class Reference

#include <SubtitlesSettings.h>

Inheritance diagram for KODI::SUBTITLES::CSubtitlesSettings:
ISettingCallback Observable

Public Member Functions

 CSubtitlesSettings (const std::shared_ptr< CSettings > &settings)
 
 ~CSubtitlesSettings () override
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed.
 
Align GetAlignment () const
 Get subtitle alignment.
 
void SetAlignment (Align align) const
 Set the subtitle alignment.
 
HorizontalAlign GetHorizontalAlignment () const
 Get horizontal text alignment.
 
std::string GetFontName () const
 Get font name.
 
FontStyle GetFontStyle () const
 Get font style.
 
int GetFontSize () const
 Get font size.
 
UTILS::COLOR::Color GetFontColor () const
 Get font color.
 
int GetFontOpacity () const
 Get font opacity.
 
int GetBorderSize () const
 Get border size.
 
UTILS::COLOR::Color GetBorderColor () const
 Get border color.
 
int GetShadowSize () const
 Get shadow size.
 
UTILS::COLOR::Color GetShadowColor () const
 Get shadow color.
 
int GetShadowOpacity () const
 Get shadow opacity.
 
int GetBlurSize () const
 Get blur size.
 
int GetLineSpacing () const
 Get line spacing.
 
BackgroundType GetBackgroundType () const
 Get background type.
 
UTILS::COLOR::Color GetBackgroundColor () const
 Get background color.
 
int GetBackgroundOpacity () const
 Get background opacity.
 
bool IsOverrideFonts () const
 Check if font override is enabled.
 
OverrideStyles GetOverrideStyles () const
 Get override styles.
 
float GetVerticalMarginPerc () const
 Get the subtitle vertical margin.
 
- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting is being changed.
 
virtual void OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated.
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated.
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed.
 
- Public Member Functions inherited from Observable
 Observable ()=default
 
virtual ~Observable ()=default
 
Observableoperator= (const Observable &observable)
 
virtual void RegisterObserver (Observer *obs)
 Register an observer.
 
virtual void UnregisterObserver (Observer *obs)
 Unregister an observer.
 
virtual void NotifyObservers (const ObservableMessage message=ObservableMessageNone)
 Send a message to all observers when m_bObservableChanged is true.
 
virtual void SetChanged (bool bSetTo=true)
 Mark an observable changed.
 
virtual bool IsObserving (const Observer &obs) const
 Check whether this observable is being observed by an observer.
 

Static Public Member Functions

static void SettingOptionsSubtitleFontsFiller (const std::shared_ptr< const CSetting > &setting, std::vector< StringSettingOption > &list, std::string &current)
 

Additional Inherited Members

- Protected Member Functions inherited from Observable
void SendMessage (const ObservableMessage message)
 Send a message to all observer when m_bObservableChanged is true.
 
- Protected Attributes inherited from Observable
std::atomic< boolm_bObservableChanged {false}
 
std::vector< Observer * > m_observers
 
CCriticalSection m_obsCritSection
 

Constructor & Destructor Documentation

◆ CSubtitlesSettings()

CSubtitlesSettings::CSubtitlesSettings ( const std::shared_ptr< CSettings > & settings)
explicit

◆ ~CSubtitlesSettings()

CSubtitlesSettings::~CSubtitlesSettings ( )
override

Member Function Documentation

◆ GetAlignment()

Align CSubtitlesSettings::GetAlignment ( ) const

Get subtitle alignment.

Returns
The alignment

◆ GetBackgroundColor()

UTILS::COLOR::Color CSubtitlesSettings::GetBackgroundColor ( ) const

Get background color.

Returns
The background color

◆ GetBackgroundOpacity()

int CSubtitlesSettings::GetBackgroundOpacity ( ) const

Get background opacity.

Returns
The background opacity in %

◆ GetBackgroundType()

BackgroundType CSubtitlesSettings::GetBackgroundType ( ) const

Get background type.

Returns
The background type

◆ GetBlurSize()

int CSubtitlesSettings::GetBlurSize ( ) const

Get blur size.

Returns
The blur size in %

◆ GetBorderColor()

UTILS::COLOR::Color CSubtitlesSettings::GetBorderColor ( ) const

Get border color.

Returns
The border color

◆ GetBorderSize()

int CSubtitlesSettings::GetBorderSize ( ) const

Get border size.

Returns
The border size in %

◆ GetFontColor()

UTILS::COLOR::Color CSubtitlesSettings::GetFontColor ( ) const

Get font color.

Returns
The font color

◆ GetFontName()

std::string CSubtitlesSettings::GetFontName ( ) const

Get font name.

Returns
The font name

◆ GetFontOpacity()

int CSubtitlesSettings::GetFontOpacity ( ) const

Get font opacity.

Returns
The font opacity in %

◆ GetFontSize()

int CSubtitlesSettings::GetFontSize ( ) const

Get font size.

Returns
The font size in PX

◆ GetFontStyle()

FontStyle CSubtitlesSettings::GetFontStyle ( ) const

Get font style.

Returns
The font style

◆ GetHorizontalAlignment()

HorizontalAlign CSubtitlesSettings::GetHorizontalAlignment ( ) const

Get horizontal text alignment.

Returns
The alignment

◆ GetLineSpacing()

int CSubtitlesSettings::GetLineSpacing ( ) const

Get line spacing.

Returns
The line spacing

◆ GetOverrideStyles()

OverrideStyles CSubtitlesSettings::GetOverrideStyles ( ) const

Get override styles.

Returns
The styles to be overridden

◆ GetShadowColor()

UTILS::COLOR::Color CSubtitlesSettings::GetShadowColor ( ) const

Get shadow color.

Returns
The shadow color

◆ GetShadowOpacity()

int CSubtitlesSettings::GetShadowOpacity ( ) const

Get shadow opacity.

Returns
The shadow opacity in %

◆ GetShadowSize()

int CSubtitlesSettings::GetShadowSize ( ) const

Get shadow size.

Returns
The shadow size in %

◆ GetVerticalMarginPerc()

float CSubtitlesSettings::GetVerticalMarginPerc ( ) const

Get the subtitle vertical margin.

Returns
The vertical margin in %

◆ IsOverrideFonts()

bool CSubtitlesSettings::IsOverrideFonts ( ) const

Check if font override is enabled.

Returns
True if fonts must be overridden, otherwise false

◆ OnSettingChanged()

void CSubtitlesSettings::OnSettingChanged ( const std::shared_ptr< const CSetting > & setting)
overridevirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed

Reimplemented from ISettingCallback.

◆ SetAlignment()

void CSubtitlesSettings::SetAlignment ( Align align) const

Set the subtitle alignment.

Parameters
alignThe alignment

◆ SettingOptionsSubtitleFontsFiller()

void CSubtitlesSettings::SettingOptionsSubtitleFontsFiller ( const std::shared_ptr< const CSetting > & setting,
std::vector< StringSettingOption > & list,
std::string & current )
static

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