27 #include <tulip/tulipconf.h> 31 class TLP_QT_SCOPE TulipFont :
public QObject {
32 static QMap<QString, int> FONT_IDS;
33 static int fontId(
const QString &);
36 Q_PROPERTY(
bool bold READ isBold WRITE setBold)
38 Q_PROPERTY(
bool italic READ isItalic WRITE setItalic)
40 Q_PROPERTY(QString fontName READ fontName WRITE setFontName)
42 Q_PROPERTY(QString fontFile READ fontFile)
44 Q_PROPERTY(
bool exists READ exists)
45 Q_PROPERTY(
int fontId READ fontId)
46 Q_PROPERTY(QString fontFamily READ fontFamily)
48 void refreshFontFile();
51 static QString tulipFontsDirectory();
52 static QStringList installedFontNames();
53 static TulipFont fromFile(
const QString &);
55 explicit TulipFont(QObject *parent =
nullptr);
56 explicit TulipFont(
const QString fontName, QObject *parent =
nullptr);
57 TulipFont(
const TulipFont &);
59 TulipFont &operator=(
const TulipFont &);
61 bool isItalic()
const;
62 QString fontName()
const;
63 QString fontFile()
const;
66 QString fontFamily()
const;
71 void setFontName(
const QString &);