14 #ifndef BERRYQTSTYLEMANAGER_H_
15 #define BERRYQTSTYLEMANAGER_H_
35 static QIcon ThemeIcon(
const QByteArray &originalSVG);
36 static QIcon ThemeIcon(
const QString &resourcePath);
41 Style GetStyle()
const override;
42 QString GetStylesheet()
const override;
43 QString GetActiveTabStylesheet()
const override;
44 QString GetTabStylesheet()
const override;
45 QString GetFont()
const override;
47 void AddStyle(
const QString& styleFileName,
48 const QString& styleName = QString())
override;
49 void AddStyles(
const QString& path)
override;
50 void RemoveStyle(
const QString& styleFileName)
override;
51 void RemoveStyles(
const QString& path = QString())
override;
53 void GetStyles(
StyleList& styles)
const override;
54 void SetStyle(
const QString& fileName)
override;
56 void GetFonts(QStringList& fontNames)
const override;
58 void SetFont(
const QString& fontName)
override;
59 void SetFontSize(
int fontSize)
override;
60 void UpdateWorkbenchFont()
override;
62 Style GetDefaultStyle()
const override;
63 void SetDefaultStyle()
override;
65 bool Contains(
const QString& fileName)
const override;
67 bool IsA(
const std::type_info& type )
const;
68 const std::type_info& GetType()
const;
72 void AddDefaultStyle();
73 void AddDefaultFonts();
74 void AddFontFamilies();
75 void UpdateWorkbenchStyleSheet()
const;
77 void ReadPreferences();
79 struct ExtStyle :
public Style
82 QString tabStylesheet;
83 QString activeTabStylesheet;
86 QStringList m_customFontNames;
87 void ReadStyleData(ExtStyle* style);
89 typedef QHash<QString, ExtStyle*> FileNameToStyleMap;
90 FileNameToStyleMap styles;
92 QString m_currentFont;
93 int m_currentFontSize;
94 ExtStyle
const* currentStyle;
95 ExtStyle* defaultStyle;