25 #include <QtCore/QObject>
26 #include <QtCore/QString>
27 #include <QtCore/QMap>
28 #include <QtCore/QList>
29 #include <tulip/tulipconf.h>
33 class TLP_QT_SCOPE TulipFont :
public QObject {
34 static QMap<QString,int> FONT_IDS;
35 static int fontId(
const QString&);
38 Q_PROPERTY(
bool bold READ isBold WRITE setBold)
40 Q_PROPERTY(
bool italic READ isItalic WRITE setItalic)
42 Q_PROPERTY(QString fontName READ fontName WRITE setFontName)
44 Q_PROPERTY(QString fontFile READ fontFile)
46 Q_PROPERTY(
bool exists READ exists)
47 Q_PROPERTY(
int fontId READ fontId)
48 Q_PROPERTY(QString fontFamily READ fontFamily)
50 void refreshFontFile();
53 static QString tulipFontsDirectory();
54 static QStringList installedFontNames();
55 static TulipFont fromFile(
const QString&);
57 explicit TulipFont(QObject *parent = NULL);
58 explicit TulipFont(
const QString fontName, QObject *parent = NULL);
59 TulipFont(
const TulipFont&);
61 TulipFont& operator =(
const TulipFont&);
63 bool isItalic()
const;
64 QString fontName()
const;
65 QString fontFile()
const;
68 QString fontFamily()
const;
73 void setFontName(
const QString&);