OSDN Git Service

Version 0.5
[fontmanager/fontmanager.git] / fontinfo.h
index c7d20b0..1ad4335 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
 #include <QStringList>
 #include <QFontInfo>
 
+class FontConfigManager;
 class FontsConfigProperties;
 
 class FontInfo : public QObject
 {
     Q_OBJECT
+    Q_PROPERTY(QString fileName READ fileName NOTIFY fontPathChanged)
     Q_PROPERTY(QString fontPath READ fontPath WRITE setFontPath NOTIFY fontPathChanged)
     Q_PROPERTY(QStringList families READ families NOTIFY fontPathChanged)
 public:
-    explicit FontInfo(QObject *parent = 0);
-    explicit FontInfo(const QString &fontPath, QObject *parent = 0);
+    explicit FontInfo(const QString &fontPath, FontConfigManager *fontConfig, QObject *parent = 0);
     ~FontInfo();
 
+    QString fileName() const;
+
     QString fontPath() const;
-    void setFontPath(const QString &fontPath);
+    void setFontPath(const QString &fontPath, FontConfigManager *fontConfig = 0);
 
     QStringList families() const;