LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IWkFontsSettable Class Referenceabstract

Interface to aid WebKit-like-view-containing tabs to expose the view fonts configuration to the user. More...

#include "iwkfontssettable.h"

Public Types

enum  FontFamily {
  FontFamily::StandardFont,
  FontFamily::FixedFont,
  FontFamily::SerifFont,
  FontFamily::SansSerifFont,
  FontFamily::CursiveFont,
  FontFamily::FantasyFont
}
 Enumeration for possible font families. More...
 
enum  FontSize {
  FontSize::MinimumFontSize,
  FontSize::MinimumLogicalFontSize,
  FontSize::DefaultFontSize,
  FontSize::DefaultFixedFontSize
}
 Enumeration for possible font sizes. More...
 

Public Member Functions

virtual QObject * GetQObject ()=0
 Returns this tab as a QObject. More...
 
virtual void SetFontFamily (FontFamily family, const QFont &font)=0
 Sets the font for the given font family. More...
 
virtual void SetFontSize (FontSize type, int size)=0
 Sets the size for the given font size type. More...
 

Protected Member Functions

virtual ~IWkFontsSettable ()=default
 

Detailed Description

Interface to aid WebKit-like-view-containing tabs to expose the view fonts configuration to the user.

The tabs implementing this interface should just be registered with an instance of LC::Util::WkFontsWidget, which will take care of the rest.

See also
ITabWidget

Definition at line 24 of file iwkfontssettable.h.

Member Enumeration Documentation

◆ FontFamily

Enumeration for possible font families.

Enumerator
StandardFont 
FixedFont 
SerifFont 
SansSerifFont 
CursiveFont 
FantasyFont 

Definition at line 32 of file iwkfontssettable.h.

◆ FontSize

Enumeration for possible font sizes.

Enumerator
MinimumFontSize 
MinimumLogicalFontSize 
DefaultFontSize 
DefaultFixedFontSize 

Definition at line 44 of file iwkfontssettable.h.

Constructor & Destructor Documentation

◆ ~IWkFontsSettable()

virtual IWkFontsSettable::~IWkFontsSettable ( )
protectedvirtualdefault

Member Function Documentation

◆ GetQObject()

virtual QObject* IWkFontsSettable::GetQObject ( )
pure virtual

Returns this tab as a QObject.

Returns
This tab as a QObject.

◆ SetFontFamily()

virtual void IWkFontsSettable::SetFontFamily ( FontFamily  family,
const QFont &  font 
)
pure virtual

Sets the font for the given font family.

See also QWebSettings::setFontFamily().

Parameters
[in]familyThe font family to change.
[in]fontThe font to set for the font family.

◆ SetFontSize()

virtual void IWkFontsSettable::SetFontSize ( FontSize  type,
int  size 
)
pure virtual

Sets the size for the given font size type.

See also QWebSettings::setFontSize().

Parameters
[in]typeThe font type to change.
[in]sizeThe font size to set.

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