LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
iwkfontssettable.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QtPlugin>
12
13
class
QFont;
14
24
class
Q_DECL_EXPORT
IWkFontsSettable
25
{
26
protected
:
27
virtual
~IWkFontsSettable
() =
default
;
28
public
:
32
enum class
FontFamily
33
{
34
StandardFont,
35
FixedFont,
36
SerifFont,
37
SansSerifFont,
38
CursiveFont,
39
FantasyFont
40
};
41
44
enum class
FontSize
45
{
46
MinimumFontSize,
47
MinimumLogicalFontSize,
48
DefaultFontSize,
49
DefaultFixedFontSize
50
};
51
56
virtual
QObject*
GetQObject
() = 0;
57
65
virtual
void
SetFontFamily
(
FontFamily
family,
const
QFont& font) = 0;
66
74
virtual
void
SetFontSize
(
FontSize
type,
int
size) = 0;
75
};
76
77
inline
uint
qHash
(
IWkFontsSettable::FontFamily
f)
78
{
79
return
static_cast<
uint
>
(f);
80
}
81
82
inline
uint
qHash
(
IWkFontsSettable::FontSize
f)
83
{
84
return
static_cast<
uint
>
(f);
85
}
86
87
Q_DECLARE_INTERFACE (
IWkFontsSettable
,
"org.LeechCraft.IWkFontsSettable/1.0"
)
IWkFontsSettable
Interface to aid WebKit-like-view-containing tabs to expose the view fonts configuration to the user.
Definition
iwkfontssettable.h:25
IWkFontsSettable::SetFontSize
virtual void SetFontSize(FontSize type, int size)=0
Sets the size for the given font size type.
IWkFontsSettable::GetQObject
virtual QObject * GetQObject()=0
Returns this tab as a QObject.
IWkFontsSettable::FontFamily
FontFamily
Enumeration for possible font families.
Definition
iwkfontssettable.h:33
IWkFontsSettable::SetFontFamily
virtual void SetFontFamily(FontFamily family, const QFont &font)=0
Sets the font for the given font family.
IWkFontsSettable::FontSize
FontSize
Enumeration for possible font sizes.
Definition
iwkfontssettable.h:45
IWkFontsSettable::~IWkFontsSettable
virtual ~IWkFontsSettable()=default
qHash
uint qHash(IWkFontsSettable::FontFamily f)
Definition
iwkfontssettable.h:77
src
interfaces
iwkfontssettable.h
Generated by
1.17.0