diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 205cf2bf2..ab7aa873d 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -48,6 +48,8 @@ using namespace rtengine::procparams; +using ScopeType = Options::ScopeType; + namespace { diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index abfcb0a8f..a277ffd3a 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -151,7 +151,7 @@ public: bool updateWaveform(void) const override; // HistogramPanelListener - void scopeTypeChanged(ScopeType new_type) override; + void scopeTypeChanged(Options::ScopeType new_type) override; // event handlers void info_toggled (); @@ -286,5 +286,5 @@ private: IdleRegister idle_register; rtengine::HistogramObservable* histogram_observable; - ScopeType histogram_scope_type; + Options::ScopeType histogram_scope_type; }; diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 23d443aea..41605d638 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -29,6 +29,7 @@ using namespace rtengine; +using ScopeType = Options::ScopeType; // // diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 980a56f4f..4417e2373 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -37,8 +37,6 @@ class HistogramArea; -using ScopeType = Options::ScopeType; - struct HistogramAreaIdleHelper { HistogramArea* harea; bool destroyed; @@ -175,7 +173,7 @@ protected: bool valid; int drawMode; DrawModeListener *myDrawModeListener; - ScopeType scopeType; + Options::ScopeType scopeType; int oldwidth, oldheight; /// Intensity of waveform and vectorscope trace. float trace_brightness; @@ -217,7 +215,7 @@ public: const array2D& waveformBlue, const array2D& waveformLuma ); - void updateOptions (bool r, bool g, bool b, bool l, bool c, int mode, ScopeType type, bool pointer); + void updateOptions (bool r, bool g, bool b, bool l, bool c, int mode, Options::ScopeType type, bool pointer); bool updatePending(); void on_realize() override; bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override; @@ -241,7 +239,7 @@ private: class HistogramPanelListener { public: - virtual void scopeTypeChanged(ScopeType new_type) = 0; + virtual void scopeTypeChanged(Options::ScopeType new_type) = 0; }; class HistogramPanel final : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable diff --git a/rtgui/options.cc b/rtgui/options.cc index 06726452e..d71fcc57d 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2266,7 +2266,7 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_boolean("GUI", "HistogramBar", histogramBar); keyFile.set_integer("GUI", "HistogramHeight", histogramHeight); keyFile.set_integer("GUI", "HistogramDrawMode", histogramDrawMode); - keyFile.set_integer("GUI", "HistogramScopeType", histogramScopeType); + keyFile.set_integer("GUI", "HistogramScopeType", rtengine::toUnderlying(histogramScopeType)); keyFile.set_boolean("GUI", "HistogramShowScopeButtons", histogramShowScopeButtons); keyFile.set_integer("GUI", "NavigatorRGBUnit", (int)navRGBUnit); keyFile.set_integer("GUI", "NavigatorHSVUnit", (int)navHSVUnit); diff --git a/rtgui/options.h b/rtgui/options.h index 4bc4ccc42..e64c31ad1 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -168,13 +168,22 @@ private: const Glib::ustring& entryName, Glib::ustring& destination); public: - enum class NavigatorUnit { PERCENT, R0_255, R0_1, _COUNT }; + + enum class ScopeType { + NONE = -1, + HISTOGRAM, + HISTOGRAM_RAW, + VECTORSCOPE_HC, + VECTORSCOPE_HS, + WAVEFORM + }; + bool savesParamsAtExit; SaveFormat saveFormat, saveFormatBatch; Glib::ustring savePathTemplate; @@ -306,15 +315,6 @@ public: double sndLngEditProcDoneSecs; // Minimum processing time seconds till the sound is played bool sndEnable; - enum ScopeType - { - HISTOGRAM = 0, - HISTOGRAM_RAW = 1, - VECTORSCOPE_HC = 2, - VECTORSCOPE_HS = 3, - WAVEFORM = 4, - NONE = -1 - }; int histogramPosition; // 0=disabled, 1=left pane, 2=right pane bool histogramRed, histogramGreen, histogramBlue; bool histogramLuma, histogramChroma;