LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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 
78 {
79  return static_cast<uint> (f);
80 }
81 
83 {
84  return static_cast<uint> (f);
85 }
86 
87 Q_DECLARE_INTERFACE (IWkFontsSettable, "org.LeechCraft.IWkFontsSettable/1.0")
IWkFontsSettable::FontSize
FontSize
Enumeration for possible font sizes.
Definition: iwkfontssettable.h:44
IWkFontsSettable::FontFamily
FontFamily
Enumeration for possible font families.
Definition: iwkfontssettable.h:32
IWkFontsSettable
Interface to aid WebKit-like-view-containing tabs to expose the view fonts configuration to the user.
Definition: iwkfontssettable.h:24
qHash
uint qHash(IWkFontsSettable::FontFamily f)
Definition: iwkfontssettable.h:77
LC::Util::oral::sph::f
constexpr detail::ExprTree< detail::ExprType::LeafStaticPlaceholder, detail::MemberPtrs< Ptr > > f
Definition: oral.h:952