Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fontsaasettings.h
Show All 29 Lines | 28 | { | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | Q_PROPERTY(bool exclude READ exclude WRITE setExclude NOTIFY excludeChanged) | 31 | Q_PROPERTY(bool exclude READ exclude WRITE setExclude NOTIFY excludeChanged) | ||
32 | Q_PROPERTY(int excludeFrom READ excludeFrom WRITE setExcludeFrom NOTIFY excludeFromChanged) | 32 | Q_PROPERTY(int excludeFrom READ excludeFrom WRITE setExcludeFrom NOTIFY excludeFromChanged) | ||
33 | Q_PROPERTY(int excludeTo READ excludeTo WRITE setExcludeTo NOTIFY excludeToChanged) | 33 | Q_PROPERTY(int excludeTo READ excludeTo WRITE setExcludeTo NOTIFY excludeToChanged) | ||
34 | Q_PROPERTY(bool antiAliasing READ antiAliasing WRITE setAntiAliasing NOTIFY antiAliasingChanged) | 34 | Q_PROPERTY(bool antiAliasing READ antiAliasing WRITE setAntiAliasing NOTIFY antiAliasingChanged) | ||
35 | Q_PROPERTY(int dpi READ dpi WRITE setDpi NOTIFY dpiChanged) | 35 | Q_PROPERTY(int dpi READ dpi WRITE setDpi NOTIFY dpiChanged) | ||
36 | Q_PROPERTY(KXftConfig::SubPixel::Type subPixel READ subPixel WRITE setSubPixel NOTIFY subPixelChanged) | 36 | Q_PROPERTY(KXftConfig::SubPixel::Type subPixel READ subPixel WRITE setSubPixel NOTIFY subPixelChanged) | ||
37 | Q_PROPERTY(KXftConfig::Hint::Style hinting READ hinting WRITE setHinting NOTIFY hintingChanged) | 37 | Q_PROPERTY(KXftConfig::Hint::Style hinting READ hinting WRITE setHinting NOTIFY hintingChanged) | ||
38 | Q_PROPERTY(bool isImmutable READ isImmutable CONSTANT) | ||||
38 | 39 | | |||
39 | public: | 40 | public: | ||
40 | FontsAASettings(QObject *parent = nullptr); | 41 | FontsAASettings(QObject *parent = nullptr); | ||
41 | 42 | | |||
42 | bool exclude() const; | 43 | bool exclude() const; | ||
43 | int excludeFrom() const; | 44 | int excludeFrom() const; | ||
44 | int excludeTo() const; | 45 | int excludeTo() const; | ||
45 | bool antiAliasing() const; | 46 | bool antiAliasing() const; | ||
46 | int dpi() const; | 47 | int dpi() const; | ||
47 | KXftConfig::SubPixel::Type subPixel() const; | 48 | KXftConfig::SubPixel::Type subPixel() const; | ||
48 | KXftConfig::Hint::Style hinting() const; | 49 | KXftConfig::Hint::Style hinting() const; | ||
50 | bool isImmutable() const; | ||||
49 | 51 | | |||
50 | void setExclude(bool exclude); | 52 | void setExclude(bool exclude); | ||
51 | void setExcludeFrom(int excludeFrom); | 53 | void setExcludeFrom(int excludeFrom); | ||
52 | void setExcludeTo(int excludeTo); | 54 | void setExcludeTo(int excludeTo); | ||
53 | void setAntiAliasing(bool antiAliasing); | 55 | void setAntiAliasing(bool antiAliasing); | ||
54 | void setDpi(int dpi); | 56 | void setDpi(int dpi); | ||
55 | void setSubPixel(KXftConfig::SubPixel::Type subPixel); | 57 | void setSubPixel(KXftConfig::SubPixel::Type subPixel); | ||
56 | void setHinting(KXftConfig::Hint::Style hinting); | 58 | void setHinting(KXftConfig::Hint::Style hinting); | ||
57 | 59 | | |||
58 | signals: | 60 | signals: | ||
59 | void excludeChanged(); | 61 | void excludeChanged(); | ||
60 | void excludeFromChanged(); | 62 | void excludeFromChanged(); | ||
61 | void excludeToChanged(); | 63 | void excludeToChanged(); | ||
62 | void antiAliasingChanged(); | 64 | void antiAliasingChanged(); | ||
63 | void dpiChanged(); | 65 | void dpiChanged(); | ||
64 | void subPixelChanged(); | 66 | void subPixelChanged(); | ||
65 | void hintingChanged(); | 67 | void hintingChanged(); | ||
66 | void aliasingChangeApplied(); | 68 | void aliasingChangeApplied(); | ||
67 | 69 | | |||
68 | private: | 70 | private: | ||
69 | FontAASettingsStore *m_fontAASettingsStore; | 71 | FontAASettingsStore *m_fontAASettingsStore; | ||
72 | bool m_isImmutable = false; | ||||
70 | bool usrSave() override; | 73 | bool usrSave() override; | ||
71 | 74 | | |||
72 | using NotifySignalType = void (FontsAASettings::*)(); | 75 | using NotifySignalType = void (FontsAASettings::*)(); | ||
73 | void addItemInternal(const QByteArray &propertyName, const QVariant &defaultValue, NotifySignalType notifySignal); | 76 | void addItemInternal(const QByteArray &propertyName, const QVariant &defaultValue, NotifySignalType notifySignal); | ||
74 | }; | 77 | }; | ||
75 | 78 | | |||
76 | #endif | 79 | #endif |