Turn Options::ScopeType into a scoped enum :)
Also remove global `using ...` from header file.
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
using ScopeType = Options::ScopeType;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
using namespace rtengine;
|
||||
|
||||
using ScopeType = Options::ScopeType;
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
@@ -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<int>& waveformBlue,
|
||||
const array2D<int>& 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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user