New feature: Color Labels (issue 684) and porting rank and inTrash to pp3

This commit is contained in:
Michael Ezra
2011-05-29 08:23:09 -04:00
parent a64a6d1b2c
commit 81f0135ec5
30 changed files with 434 additions and 120 deletions

View File

@@ -254,6 +254,10 @@ void ProcParams::setDefaults () {
exif.clear ();
iptc.clear ();
rank = 0;
colorlabel = 0;
inTrash = false;
ppVersion = PPVERSION;
}
@@ -265,6 +269,10 @@ int ProcParams::save (Glib::ustring fname) const {
keyFile.set_string ("Version", "AppVersion", APPVERSION);
keyFile.set_integer ("Version", "Version", PPVERSION);
keyFile.set_integer ("General", "Rank", rank);
keyFile.set_integer ("General", "ColorLabel", colorlabel);
keyFile.set_boolean ("General", "InTrash", inTrash);
// save tonecurve:
keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp);
keyFile.set_double ("Exposure", "Clip", toneCurve.clip);
@@ -535,6 +543,12 @@ if (keyFile.has_group ("Version")) {
if (keyFile.has_key ("Version", "Version")) ppVersion = keyFile.get_integer ("Version", "Version");
}
if (keyFile.has_group ("General")) {
if (keyFile.has_key ("General", "Rank")) rank = keyFile.get_integer ("General", "Rank");
if (keyFile.has_key ("General", "ColorLabel")) colorlabel = keyFile.get_integer ("General", "ColorLabel");
if (keyFile.has_key ("General", "InTrash")) inTrash = keyFile.get_boolean ("General", "InTrash");
}
if (keyFile.has_group ("Exposure")) {
if (keyFile.has_key ("Exposure", "Auto")) toneCurve.autoexp = keyFile.get_boolean ("Exposure", "Auto");
if (keyFile.has_key ("Exposure", "Clip")) toneCurve.clip = keyFile.get_double ("Exposure", "Clip");

View File

@@ -466,6 +466,9 @@ class ProcParams {
HSVEqualizerParams hsvequalizer; ///< hsv equalizer parameters
std::vector<ExifPair> exif; ///< List of modifications appplied on the exif tags of the input image
std::vector<IPTCPair> iptc; ///< The IPTC tags and values to be saved to the output image
char rank; ///< Custom image quality ranking
char colorlabel; ///< Custom color label
bool inTrash; ///< Marks deleted image
Glib::ustring appVersion; ///< Version of the application that generated the parameters
int ppVersion; ///< Version of the PP file from which the parameters have been read