28 #include <tulip/tulipconf.h>
32 class TLP_QT_SCOPE TulipFont :
public QObject {
33 static QMap<QString,int> FONT_IDS;
34 static int fontId(
const QString&);
37 Q_PROPERTY(
bool bold READ isBold WRITE setBold)
39 Q_PROPERTY(
bool italic READ isItalic WRITE setItalic)
41 Q_PROPERTY(QString fontName READ fontName WRITE setFontName)
43 Q_PROPERTY(QString fontFile READ fontFile)
45 Q_PROPERTY(
bool exists READ exists)
46 Q_PROPERTY(
int fontId READ fontId)
47 Q_PROPERTY(QString fontFamily READ fontFamily)
49 void refreshFontFile();
52 static QString tulipFontsDirectory();
53 static QStringList installedFontNames();
54 static TulipFont fromFile(
const QString&);
56 explicit TulipFont(QObject *parent = NULL);
57 explicit TulipFont(
const QString fontName, QObject *parent = NULL);
58 TulipFont(
const TulipFont&);
60 TulipFont& operator=(
const TulipFont&);
62 bool isItalic()
const;
63 QString fontName()
const;
64 QString fontFile()
const;
67 QString fontFamily()
const;
72 void setFontName(
const QString&);