Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | |||||
72 | public: | 72 | public: | ||
73 | enum AASetting { AAEnabled, AASystem, AADisabled }; | 73 | enum AASetting { AAEnabled, AASystem, AADisabled }; | ||
74 | #if defined(HAVE_FONTCONFIG) && HAVE_X11 | 74 | #if defined(HAVE_FONTCONFIG) && HAVE_X11 | ||
75 | FontAASettings(QObject *parent); | 75 | FontAASettings(QObject *parent); | ||
76 | 76 | | |||
77 | bool save(KXftConfig::AntiAliasing::State aaState); | 77 | bool save(KXftConfig::AntiAliasing::State aaState); | ||
78 | void load(); | 78 | void load(); | ||
79 | void defaults(); | 79 | void defaults(); | ||
80 | void setAntiAliasingState(KXftConfig::AntiAliasing::State aaState); | | |||
81 | QAbstractItemModel* subPixelOptionsModel() { return m_subPixelOptionsModel; } | 80 | QAbstractItemModel* subPixelOptionsModel() { return m_subPixelOptionsModel; } | ||
82 | QAbstractItemModel* hintingOptionsModel() { return m_hintingOptionsModel; } | 81 | QAbstractItemModel* hintingOptionsModel() { return m_hintingOptionsModel; } | ||
83 | 82 | | |||
84 | void setExclude(bool exclude); | 83 | void setExclude(bool exclude); | ||
85 | bool exclude() const; | 84 | bool exclude() const; | ||
86 | 85 | | |||
87 | void setExcludeTo(int excludeTo); | 86 | void setExcludeTo(int excludeTo); | ||
88 | int excludeTo() const; | 87 | int excludeTo() const; | ||
Show All 14 Lines | |||||
103 | int subPixelCurrentIndex(); | 102 | int subPixelCurrentIndex(); | ||
104 | void setSubPixelCurrentIndex(int idx); | 103 | void setSubPixelCurrentIndex(int idx); | ||
105 | void setSubPixel(int idx); | 104 | void setSubPixel(int idx); | ||
106 | int hintingCurrentIndex(); | 105 | int hintingCurrentIndex(); | ||
107 | void setHintingCurrentIndex(int idx); | 106 | void setHintingCurrentIndex(int idx); | ||
108 | void setHinting(int idx); | 107 | void setHinting(int idx); | ||
109 | 108 | | |||
110 | bool needsSave() const; | 109 | bool needsSave() const; | ||
110 | bool isDefaults() const; | ||||
111 | 111 | | |||
112 | #endif | 112 | #endif | ||
113 | 113 | | |||
114 | Q_SIGNALS: | 114 | Q_SIGNALS: | ||
115 | void excludeChanged(); | 115 | void excludeChanged(); | ||
116 | void excludeToChanged(); | 116 | void excludeToChanged(); | ||
117 | void excludeFromChanged(); | 117 | void excludeFromChanged(); | ||
118 | void antiAliasingChanged(); | 118 | void antiAliasingChanged(); | ||
Show All 34 Lines | 151 | public Q_SLOTS: | |||
153 | void save() override; | 153 | void save() override; | ||
154 | void defaults() override; | 154 | void defaults() override; | ||
155 | Q_INVOKABLE void adjustAllFonts(); | 155 | Q_INVOKABLE void adjustAllFonts(); | ||
156 | 156 | | |||
157 | Q_SIGNALS: | 157 | Q_SIGNALS: | ||
158 | void fontsHaveChanged(); | 158 | void fontsHaveChanged(); | ||
159 | 159 | | |||
160 | private: | 160 | private: | ||
161 | bool isSaveNeeded() const override ; | 161 | bool isSaveNeeded() const override; | ||
162 | bool isDefaults() const override; | ||||
162 | QFont applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiffFlags); | 163 | QFont applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiffFlags); | ||
163 | void setNearestExistingFonts(); | 164 | void setNearestExistingFonts(); | ||
164 | 165 | | |||
165 | FontsSettings *m_settings; | 166 | FontsSettings *m_settings; | ||
166 | 167 | | |||
167 | FontAASettings *m_fontAASettings; | 168 | FontAASettings *m_fontAASettings; | ||
168 | }; | 169 | }; | ||
169 | 170 | | |||
170 | #endif | 171 | #endif | ||
171 | 172 | |