Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/kxftconfig.h
Show All 21 Lines | |||||
22 | 22 | | |||
23 | #include <config-workspace.h> | 23 | #include <config-workspace.h> | ||
24 | 24 | | |||
25 | #ifdef HAVE_FONTCONFIG | 25 | #ifdef HAVE_FONTCONFIG | ||
26 | 26 | | |||
27 | #include <time.h> | 27 | #include <time.h> | ||
28 | 28 | | |||
29 | #include <QDomDocument> | 29 | #include <QDomDocument> | ||
30 | #include <QStringList> | ||||
30 | 31 | | |||
31 | class KXftConfig | 32 | class KXftConfig | ||
32 | { | 33 | { | ||
33 | public: | 34 | public: | ||
34 | 35 | | |||
35 | struct Item { | 36 | struct Item { | ||
36 | Item(QDomNode &n) : node(n), toBeRemoved(false) {} | 37 | Item(QDomNode &n) : node(n), toBeRemoved(false) {} | ||
37 | Item() : toBeRemoved(false) {} | 38 | Item() : toBeRemoved(false) {} | ||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 144 | public: | |||
163 | static QString description(SubPixel::Type t); | 164 | static QString description(SubPixel::Type t); | ||
164 | static const char *toStr(SubPixel::Type t); | 165 | static const char *toStr(SubPixel::Type t); | ||
165 | static QString description(Hint::Style s); | 166 | static QString description(Hint::Style s); | ||
166 | static const char *toStr(Hint::Style s); | 167 | static const char *toStr(Hint::Style s); | ||
167 | bool aliasingEnabled(); | 168 | bool aliasingEnabled(); | ||
168 | 169 | | |||
169 | private: | 170 | private: | ||
170 | 171 | | |||
172 | bool parseConfigFile(const QString& filename); | ||||
171 | void readContents(); | 173 | void readContents(); | ||
172 | void applySubPixelType(); | 174 | void applySubPixelType(); | ||
173 | void applyHintStyle(); | 175 | void applyHintStyle(); | ||
174 | void applyAntiAliasing(); | 176 | void applyAntiAliasing(); | ||
175 | void setHinting(bool set); | 177 | void setHinting(bool set); | ||
176 | void applyHinting(); | 178 | void applyHinting(); | ||
177 | void applyExcludeRange(bool pixel); | 179 | void applyExcludeRange(bool pixel); | ||
180 | QString getConfigFile(); | ||||
178 | 181 | | |||
179 | private: | 182 | private: | ||
180 | 183 | | |||
184 | QStringList m_globalFiles; | ||||
185 | | ||||
181 | SubPixel m_subPixel; | 186 | SubPixel m_subPixel; | ||
182 | Exclude m_excludeRange, | 187 | Exclude m_excludeRange, | ||
183 | m_excludePixelRange; | 188 | m_excludePixelRange; | ||
184 | Hint m_hint; | 189 | Hint m_hint; | ||
185 | Hinting m_hinting; | 190 | Hinting m_hinting; | ||
186 | AntiAliasing m_antiAliasing; | 191 | AntiAliasing m_antiAliasing; | ||
187 | QDomDocument m_doc; | 192 | QDomDocument m_doc; | ||
188 | QString m_file; | 193 | QString m_file; | ||
189 | bool m_madeChanges; | 194 | bool m_madeChanges; | ||
190 | time_t m_time; | 195 | time_t m_time; | ||
191 | }; | 196 | }; | ||
192 | 197 | | |||
193 | #endif | 198 | #endif | ||
194 | 199 | | |||
195 | #endif | 200 | #endif |