X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fspl.h;h=9637f6189b77536adb3afaeba2d958daec644737;hb=b24fe6cc8a1e9a980bfd3f6df8476dfa86c3b3a2;hp=b19ef7e7a1c9f9d7e267a2aab9a9e1ad18a87b93;hpb=ed227b4fdba9b4fc7f06f6db4830219f14bad358;p=dcpomatic.git diff --git a/src/lib/spl.h b/src/lib/spl.h index b19ef7e7a..9637f6189 100644 --- a/src/lib/spl.h +++ b/src/lib/spl.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington + Copyright (C) 2018-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -23,6 +23,7 @@ #include "spl_entry.h" #include +#include class ContentStore; @@ -34,6 +35,13 @@ public: , _missing (false) {} + SPL (std::string name) + : _id (dcp::make_uuid()) + , _name (name) + , _missing (false) + {} + + void add (SPLEntry e) { _spl.push_back (e); } @@ -65,6 +73,10 @@ public: return _name; } + void set_name (std::string name) { + _name = name; + } + bool missing () const { return _missing; } @@ -77,4 +89,22 @@ private: bool _missing; }; + +class SignalSPL : public SPL +{ +public: + SignalSPL () {} + + SignalSPL (std::string name) + : SPL (name) + {} + + void set_name (std::string name) { + SPL::set_name (name); + NameChanged (); + } + + boost::signals2::signal NameChanged; +}; + #endif