Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/lib/FcEngine.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 65 | TChar(const QRect &r=QRect(), quint32 u=0) | |||
---|---|---|---|---|---|
66 | : QRect(r), ucs4(u) { } | 66 | : QRect(r), ucs4(u) { } | ||
67 | 67 | | |||
68 | quint32 ucs4; | 68 | quint32 ucs4; | ||
69 | }; | 69 | }; | ||
70 | 70 | | |||
71 | static CFcEngine * instance(); | 71 | static CFcEngine * instance(); | ||
72 | 72 | | |||
73 | CFcEngine(bool init=true); | 73 | CFcEngine(bool init=true); | ||
74 | ~CFcEngine(); | 74 | virtual ~CFcEngine(); | ||
75 | 75 | | |||
76 | void readConfig(KConfig &cfg); | 76 | void readConfig(KConfig &cfg); | ||
77 | void writeConfig(KConfig &cfg); | 77 | void writeConfig(KConfig &cfg); | ||
78 | static void setDirty() { theirFcDirty=true; } | 78 | static void setDirty() { theirFcDirty=true; } | ||
79 | QImage drawPreview(const QString &name, quint32 style, int faceNo, const QColor &txt, const QColor &bgnd, | 79 | QImage drawPreview(const QString &name, quint32 style, int faceNo, const QColor &txt, const QColor &bgnd, | ||
80 | int h); | 80 | int h); | ||
81 | QImage draw(const QString &name, quint32 style, int faceNo, const QColor &txt, const QColor &bgnd, int fSize, const QString &text); | ||||
81 | QImage draw(const QString &name, quint32 style, int faceNo, const QColor &txt, const QColor &bgnd, | 82 | QImage draw(const QString &name, quint32 style, int faceNo, const QColor &txt, const QColor &bgnd, | ||
82 | int w, int h, bool thumb, const QList<TRange> &range=QList<TRange>(), QList<TChar> *chars=NULL); | 83 | int w, int h, bool thumb, const QList<TRange> &range=QList<TRange>(), QList<TChar> *chars=NULL); | ||
83 | int getNumIndexes() { return itsIndexCount; } // Only valid after draw has been called! | 84 | int getNumIndexes() { return itsIndexCount; } // Only valid after draw has been called! | ||
84 | static QFont getQFont(const QString &family, quint32 style, int size); | 85 | static QFont getQFont(const QString &family, quint32 style, int size); | ||
85 | const QVector<int> & sizes() const { return itsSizes; } | 86 | const QVector<int> & sizes() const { return itsSizes; } | ||
86 | bool atMin() const { return 0==itsSizes.size() || 0==itsAlphaSizeIndex; } | 87 | bool atMin() const { return 0==itsSizes.size() || 0==itsAlphaSizeIndex; } | ||
87 | bool atMax() const { return 0==itsSizes.size() || itsSizes.size()-1==itsAlphaSizeIndex; } | 88 | bool atMax() const { return 0==itsSizes.size() || itsSizes.size()-1==itsAlphaSizeIndex; } | ||
88 | void zoomIn() { if(!atMax()) itsAlphaSizeIndex++; } | 89 | void zoomIn() { if(!atMax()) itsAlphaSizeIndex++; } | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |