Fix nonfunctional send-problem-report.
[dcpomatic.git] / src / lib / font.h
index 0dedf7e493f52071b354be8309418df1f6195a83..c165fea9fedcb30b7c5083f5c36725d99e7c5647 100644 (file)
 #ifndef DCPOMATIC_FONT_H
 #define DCPOMATIC_FONT_H
 
+#include "font_files.h"
 #include <libcxml/cxml.h>
 #include <boost/optional.hpp>
+#include <boost/signals2.hpp>
 #include <boost/filesystem.hpp>
 #include <string>
 
@@ -39,21 +41,33 @@ public:
                return _id;
        }
 
-       boost::optional<boost::filesystem::path> file () const {
-               return _file;
+       boost::optional<boost::filesystem::path> file (FontFiles::Variant variant) const {
+               return _files.get (variant);
        }
 
-       void set_file (boost::filesystem::path file) {
-               _file = file;
+       void set_file (FontFiles::Variant variant, boost::filesystem::path file) {
+               _files.set (variant, file);
+               Changed ();
        }
 
-private:       
+       FontFiles files () const {
+               return _files;
+       }
+
+       void set_files (FontFiles files) {
+               _files = files;
+               Changed ();
+       }
+
+       boost::signals2::signal<void()> Changed;
+
+private:
        /** Font ID, used to describe it in the subtitle content */
        std::string _id;
-       boost::optional<boost::filesystem::path> _file;
+       FontFiles _files;
 };
 
-bool
-operator!= (Font const & a, Font const & b);
+bool operator!= (Font const & a, Font const & b);
+bool operator== (Font const & a, Font const & b);
 
 #endif