| 48 | } |
| 49 | |
| 50 | static bool fromString(const std::string& str, Orientation& orientation) { |
| 51 | if (str == "Portrait") { |
| 52 | orientation = Orientation::Portrait; |
| 53 | return true; |
| 54 | } else if (str == "Landscape") { |
| 55 | orientation = Orientation::Landscape; |
| 56 | return true; |
| 57 | } else if (str == "PortraitFlipped") { |
| 58 | orientation = Orientation::PortraitFlipped; |
| 59 | return true; |
| 60 | } else if (str == "LandscapeFlipped") { |
| 61 | orientation = Orientation::LandscapeFlipped; |
| 62 | return true; |
| 63 | } else { |
| 64 | return false; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | static std::string toString(ScreensaverType type) { |
| 69 | switch (type) { |