Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtGui/qfontdatabase.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QFONTDATABASE_H
0005 #define QFONTDATABASE_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtGui/qwindowdefs.h>
0009 #include <QtCore/qstring.h>
0010 #include <QtGui/qfont.h>
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 
0015 struct QFontDef;
0016 class QFontEngine;
0017 
0018 class Q_GUI_EXPORT QFontDatabase
0019 {
0020     Q_GADGET
0021 public:
0022     enum WritingSystem {
0023         Any,
0024 
0025         Latin,
0026         Greek,
0027         Cyrillic,
0028         Armenian,
0029         Hebrew,
0030         Arabic,
0031         Syriac,
0032         Thaana,
0033         Devanagari,
0034         Bengali,
0035         Gurmukhi,
0036         Gujarati,
0037         Oriya,
0038         Tamil,
0039         Telugu,
0040         Kannada,
0041         Malayalam,
0042         Sinhala,
0043         Thai,
0044         Lao,
0045         Tibetan,
0046         Myanmar,
0047         Georgian,
0048         Khmer,
0049         SimplifiedChinese,
0050         TraditionalChinese,
0051         Japanese,
0052         Korean,
0053         Vietnamese,
0054 
0055         Symbol,
0056         Other = Symbol,
0057 
0058         Ogham,
0059         Runic,
0060         Nko,
0061 
0062         WritingSystemsCount
0063     };
0064     Q_ENUM(WritingSystem)
0065 
0066     enum SystemFont {
0067         GeneralFont,
0068         FixedFont,
0069         TitleFont,
0070         SmallestReadableFont
0071     };
0072     Q_ENUM(SystemFont)
0073 
0074     static QList<int> standardSizes();
0075 
0076 #if QT_DEPRECATED_SINCE(6, 0) && !defined(QT_BUILD_GUI_LIB)
0077     QT_DEPRECATED_VERSION_X_6_0("Call the static functions instead") explicit QFontDatabase() = default;
0078 #else
0079     QFontDatabase() = delete;
0080 #endif
0081 
0082     static QList<WritingSystem> writingSystems();
0083     static QList<WritingSystem> writingSystems(const QString &family);
0084 
0085     static QStringList families(WritingSystem writingSystem = Any);
0086     static QStringList styles(const QString &family);
0087     static QList<int> pointSizes(const QString &family, const QString &style = QString());
0088     static QList<int> smoothSizes(const QString &family, const QString &style);
0089     static QString styleString(const QFont &font);
0090     static QString styleString(const QFontInfo &fontInfo);
0091 
0092     static QFont font(const QString &family, const QString &style, int pointSize);
0093 
0094     static bool isBitmapScalable(const QString &family, const QString &style = QString());
0095     static bool isSmoothlyScalable(const QString &family, const QString &style = QString());
0096     static bool isScalable(const QString &family, const QString &style = QString());
0097     static bool isFixedPitch(const QString &family, const QString &style = QString());
0098 
0099     static bool italic(const QString &family, const QString &style);
0100     static bool bold(const QString &family, const QString &style);
0101     static int weight(const QString &family, const QString &style);
0102 
0103     static bool hasFamily(const QString &family);
0104     static bool isPrivateFamily(const QString &family);
0105 
0106     static QString writingSystemName(WritingSystem writingSystem);
0107     static QString writingSystemSample(WritingSystem writingSystem);
0108 
0109     static int addApplicationFont(const QString &fileName);
0110     static int addApplicationFontFromData(const QByteArray &fontData);
0111     static QStringList applicationFontFamilies(int id);
0112     static bool removeApplicationFont(int id);
0113     static bool removeAllApplicationFonts();
0114 
0115     static QFont systemFont(SystemFont type);
0116 };
0117 
0118 QT_END_NAMESPACE
0119 
0120 #endif // QFONTDATABASE_H