Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
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 ()
 Get subtitle alignment.
 
void SetAlignment (Align align)
 Set the subtitle alignment.
 
HorizontalAlign GetHorizontalAlignment ()
 Get horizontal text alignment.
 
std::string GetFontName ()
 Get font name.
 
FontStyle GetFontStyle ()
 Get font style.
 
int GetFontSize ()
 Get font size.
 
UTILS::COLOR::Color GetFontColor ()
 Get font color.
 
int GetFontOpacity ()
 Get font opacity.
 
int GetBorderSize ()
 Get border size.
 
UTILS::COLOR::Color GetBorderColor ()
 Get border color.
 
int GetShadowSize ()
 Get shadow size.
 
UTILS::COLOR::Color GetShadowColor ()
 Get shadow color.
 
int GetShadowOpacity ()
 Get shadow opacity.
 
int GetBlurSize ()
 Get blur size.
 
BackgroundType GetBackgroundType ()
 Get background type.
 
UTILS::COLOR::Color GetBackgroundColor ()
 Get background color.
 
int GetBackgroundOpacity ()
 Get background opacity.
 
bool IsOverrideFonts ()
 Check if font override is enabled.
 
OverrideStyles GetOverrideStyles ()
 Get override styles.
 
float GetVerticalMarginPerc ()
 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, void *data)
 

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 ( )

Get subtitle alignment.

Returns
The alignment

◆ GetBackgroundColor()

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

Get background color.

Returns
The background color

◆ GetBackgroundOpacity()

int CSubtitlesSettings::GetBackgroundOpacity ( )

Get background opacity.

Returns
The background opacity in %

◆ GetBackgroundType()

BackgroundType CSubtitlesSettings::GetBackgroundType ( )

Get background type.

Returns
The background type

◆ GetBlurSize()

int CSubtitlesSettings::GetBlurSize ( )

Get blur size.

Returns
The blur size in %

◆ GetBorderColor()

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

Get border color.

Returns
The border color

◆ GetBorderSize()

int CSubtitlesSettings::GetBorderSize ( )

Get border size.

Returns
The border size in %

◆ GetFontColor()

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

Get font color.

Returns
The font color

◆ GetFontName()

std::string CSubtitlesSettings::GetFontName ( )

Get font name.

Returns
The font name

◆ GetFontOpacity()

int CSubtitlesSettings::GetFontOpacity ( )

Get font opacity.

Returns
The font opacity in %

◆ GetFontSize()

int CSubtitlesSettings::GetFontSize ( )

Get font size.

Returns
The font size in PX

◆ GetFontStyle()

FontStyle CSubtitlesSettings::GetFontStyle ( )

Get font style.

Returns
The font style

◆ GetHorizontalAlignment()

HorizontalAlign CSubtitlesSettings::GetHorizontalAlignment ( )

Get horizontal text alignment.

Returns
The alignment

◆ GetOverrideStyles()

OverrideStyles CSubtitlesSettings::GetOverrideStyles ( )

Get override styles.

Returns
The styles to be overriden

◆ GetShadowColor()

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

Get shadow color.

Returns
The shadow color

◆ GetShadowOpacity()

int CSubtitlesSettings::GetShadowOpacity ( )

Get shadow opacity.

Returns
The shadow opacity in %

◆ GetShadowSize()

int CSubtitlesSettings::GetShadowSize ( )

Get shadow size.

Returns
The shadow size in %

◆ GetVerticalMarginPerc()

float CSubtitlesSettings::GetVerticalMarginPerc ( )

Get the subtitle vertical margin.

Returns
The vertical margin in %

◆ IsOverrideFonts()

bool CSubtitlesSettings::IsOverrideFonts ( )

Check if font override is enabled.

Returns
True if fonts must be overriden, 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)

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,
void * data )
static

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