14 #ifndef BERRYQTSTYLEMANAGER_H_
15 #define BERRYQTSTYLEMANAGER_H_
32 static QIcon ThemeIcon(
const QByteArray &originalSVG);
33 static QIcon ThemeIcon(
const QString &resourcePath);
38 Style GetStyle()
const override;
39 QString GetStylesheet()
const override;
40 QString GetActiveTabStylesheet()
const override;
41 QString GetTabStylesheet()
const override;
42 QString GetFont()
const override;
44 void AddStyle(
const QString& styleFileName,
45 const QString& styleName = QString())
override;
46 void AddStyles(
const QString& path)
override;
47 void RemoveStyle(
const QString& styleFileName)
override;
48 void RemoveStyles(
const QString& path = QString())
override;
50 void GetStyles(
StyleList& styles)
const override;
51 void SetStyle(
const QString& fileName)
override;
53 void GetFonts(QStringList& fontNames)
const override;
55 void SetFont(
const QString& fontName)
override;
56 void SetFontSize(
const int fontSize)
override;
57 void UpdateWorkbenchFont()
override;
59 Style GetDefaultStyle()
const override;
60 void SetDefaultStyle()
override;
62 bool Contains(
const QString& fileName)
const override;
64 bool IsA(
const std::type_info& type )
const;
65 const std::type_info& GetType()
const;
69 void AddDefaultStyle();
70 void AddDefaultFonts();
72 void ReadPreferences();
74 struct ExtStyle :
public Style
77 QString tabStylesheet;
78 QString activeTabStylesheet;
81 QStringList m_customFontNames;
82 void ReadStyleData(ExtStyle* style);
84 typedef QHash<QString, ExtStyle*> FileNameToStyleMap;
85 FileNameToStyleMap styles;
87 QString m_currentFont;
88 int m_currentFontSize;
89 ExtStyle
const* currentStyle;
90 ExtStyle* defaultStyle;