X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcolour_conversion.h;h=90405f2829df0659f84c4f455425493306846af0;hb=a0eff2446835a2a29d751a4810fe182c486a2eb6;hp=9f07e095698086a7691eaf8498d8992a8fa2c7e2;hpb=fcfaa5e1de1e166508793d71ed53edcb145656da;p=dcpomatic.git diff --git a/src/lib/colour_conversion.h b/src/lib/colour_conversion.h index 9f07e0956..90405f282 100644 --- a/src/lib/colour_conversion.h +++ b/src/lib/colour_conversion.h @@ -1,19 +1,20 @@ /* Copyright (C) 2013 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ @@ -27,7 +28,6 @@ #include #include -#include namespace xmlpp { class Node; @@ -39,6 +39,7 @@ public: ColourConversion (); ColourConversion (dcp::ColourConversion); ColourConversion (cxml::NodePtr, int version); + virtual ~ColourConversion () {} virtual void as_xml (xmlpp::Node *) const; std::string identifier () const; @@ -52,13 +53,24 @@ class PresetColourConversion { public: PresetColourConversion (); - PresetColourConversion (std::string, dcp::ColourConversion); + PresetColourConversion (std::string n, std::string i, dcp::ColourConversion); PresetColourConversion (cxml::NodePtr node, int version); - void as_xml (xmlpp::Node *) const; - ColourConversion conversion; std::string name; + /** an internal short (non-internationalised) name for this preset */ + std::string id; + + static std::vector all () { + return _presets; + } + + static PresetColourConversion from_id (std::string id); + + static void setup_colour_conversion_presets (); + +private: + static std::vector _presets; }; bool operator== (ColourConversion const &, ColourConversion const &);