dynamic profile: merge "make" and "model" into "camera", and allow to use regexps

This commit is contained in:
Alberto Griggio
2017-03-03 09:11:37 +01:00
parent 7d1bebf341
commit 6ae57cd556
5 changed files with 64 additions and 78 deletions

View File

@@ -38,16 +38,13 @@ public:
}
};
template <class T>
struct Optional {
T value;
Glib::ustring value;
bool enabled;
explicit Optional(T v=T(), bool e=false): value(v), enabled(e) {}
explicit Optional(const Glib::ustring v="", bool e=false):
value(v), enabled(e) {}
bool operator()(const T &val) const
{
return !enabled || value == val;
}
bool operator()(const Glib::ustring &val) const;
};
DynamicProfileEntry();
@@ -60,9 +57,8 @@ public:
Range<double> focallen;
Range<double> shutterspeed;
Range<double> expcomp;
Optional<Glib::ustring> make;
Optional<Glib::ustring> model;
Optional<Glib::ustring> lens;
Optional camera;
Optional lens;
Glib::ustring profilepath;
};