Merge pull request #5617 from Beep6581/devirtualize

devirtualize method calls by declaring classes and methods final
This commit is contained in:
Ingo Weyrich 2020-02-07 17:06:30 +01:00 committed by GitHub
commit aae22fcc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 116 additions and 116 deletions

View File

@ -21,7 +21,7 @@ struct camera_const_levels {
int levels[4]; int levels[4];
}; };
class CameraConst class CameraConst final
{ {
private: private:
std::string make_model; std::string make_model;
@ -63,7 +63,7 @@ public:
void update_globalGreenEquilibration(bool other); void update_globalGreenEquilibration(bool other);
}; };
class CameraConstantsStore class CameraConstantsStore final
{ {
private: private:
std::map<std::string, CameraConst *> mCameraConstants; std::map<std::string, CameraConst *> mCameraConstants;

View File

@ -23,7 +23,7 @@
namespace rtengine namespace rtengine
{ {
class CieImage : class CieImage final :
public NonCopyable public NonCopyable
{ {
private: private:

View File

@ -456,7 +456,7 @@ public:
virtual bool isIdentity () const = 0; virtual bool isIdentity () const = 0;
}; };
class DiagonalCurve : public Curve class DiagonalCurve final : public Curve
{ {
protected: protected:
@ -478,7 +478,7 @@ public:
}; };
}; };
class FlatCurve : public Curve, public rtengine::NonCopyable class FlatCurve final : public Curve, public rtengine::NonCopyable
{ {
private: private:

View File

@ -32,7 +32,7 @@ using namespace procparams;
class ImProcCoordinator; class ImProcCoordinator;
class Crop : public DetailedCrop, public PipetteBuffer class Crop final : public DetailedCrop, public PipetteBuffer
{ {
protected: protected:

View File

@ -31,7 +31,7 @@ namespace rtengine
{ {
class RawImage; class RawImage;
class dfInfo class dfInfo final
{ {
public: public:
@ -74,7 +74,7 @@ protected:
void updateRawImage(); void updateRawImage();
}; };
class DFManager class DFManager final
{ {
public: public:
void init(const Glib::ustring &pathname); void init(const Glib::ustring &pathname);

View File

@ -29,7 +29,7 @@ namespace rtengine
{ {
class RawImage; class RawImage;
class ffInfo class ffInfo final
{ {
public: public:
@ -71,7 +71,7 @@ protected:
void updateRawImage(); void updateRawImage();
}; };
class FFManager class FFManager final
{ {
public: public:
void init(const Glib::ustring &pathname); void init(const Glib::ustring &pathname);

View File

@ -39,7 +39,7 @@ namespace procparams
typedef const double(*TMatrix)[3]; typedef const double(*TMatrix)[3];
class ProfileContent class ProfileContent final
{ {
public: public:
ProfileContent(); ProfileContent();
@ -54,7 +54,7 @@ private:
std::string data; std::string data;
}; };
class ICCStore class ICCStore final
{ {
public: public:
enum class ProfileType { enum class ProfileType {

View File

@ -664,7 +664,7 @@ public:
/* If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed /* If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed
* Can be safely used to reallocate an existing image */ * Can be safely used to reallocate an existing image */
void allocate (int W, int H) override void allocate (int W, int H) final
{ {
if (W == width && H == height) { if (W == width && H == height) {
@ -752,7 +752,7 @@ public:
} }
} }
void rotate (int deg) override void rotate (int deg) final
{ {
if (deg == 90) { if (deg == 90) {
@ -879,7 +879,7 @@ public:
} }
} }
void hflip () override void hflip () final
{ {
int width2 = width / 2; int width2 = width / 2;
@ -911,7 +911,7 @@ public:
#endif #endif
} }
void vflip () override void vflip () final
{ {
int height2 = height / 2; int height2 = height / 2;
@ -995,7 +995,7 @@ public:
} }
} }
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const final
{ {
histogram.clear(); histogram.clear();
avg_r = avg_g = avg_b = 0.; avg_r = avg_g = avg_b = 0.;
@ -1334,7 +1334,7 @@ public:
* If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed * If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed
* Can be safely used to reallocate an existing image or to free up it's memory with "allocate (0,0);" * Can be safely used to reallocate an existing image or to free up it's memory with "allocate (0,0);"
*/ */
void allocate (int W, int H) override void allocate (int W, int H) final
{ {
if (W == width && H == height) { if (W == width && H == height) {
@ -1388,7 +1388,7 @@ public:
memcpy (dest->data, data, 3 * width * height * sizeof(T)); memcpy (dest->data, data, 3 * width * height * sizeof(T));
} }
void rotate (int deg) override void rotate (int deg) final
{ {
if (deg == 90) { if (deg == 90) {
@ -1522,7 +1522,7 @@ public:
} }
} }
void hflip () override void hflip () final
{ {
int width2 = width / 2; int width2 = width / 2;
@ -1558,7 +1558,7 @@ public:
} }
} }
void vflip () override void vflip () final
{ {
AlignedBuffer<T> lBuffer(3 * width); AlignedBuffer<T> lBuffer(3 * width);
@ -1625,7 +1625,7 @@ public:
} }
} }
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const final
{ {
histogram.clear(); histogram.clear();
avg_r = avg_g = avg_b = 0.; avg_r = avg_g = avg_b = 0.;

View File

@ -29,7 +29,7 @@ namespace rtengine
class Image8; class Image8;
class Imagefloat; class Imagefloat;
class Image16 : public IImage16, public ImageIO class Image16 final : public IImage16, public ImageIO
{ {
public: public:

View File

@ -27,7 +27,7 @@ namespace rtengine
{ {
class Imagefloat; class Imagefloat;
class Image8 : public IImage8, public ImageIO class Image8 final : public IImage8, public ImageIO
{ {
public: public:

View File

@ -44,7 +44,7 @@ class TagDirectory;
namespace rtengine namespace rtengine
{ {
class FrameData class FrameData final
{ {
protected: protected:
@ -101,7 +101,7 @@ public:
int getRating () const; int getRating () const;
}; };
class FramesData : public FramesMetaData { class FramesData final : public FramesMetaData {
private: private:
// frame's root IFD, can be a file root IFD or a SUB-IFD // frame's root IFD, can be a file root IFD or a SUB-IFD
std::vector<std::unique_ptr<FrameData>> frames; std::vector<std::unique_ptr<FrameData>> frames;

View File

@ -34,7 +34,7 @@ class LabImage;
/* /*
* Image type used by most tools; expected range: [0.0 ; 65535.0] * Image type used by most tools; expected range: [0.0 ; 65535.0]
*/ */
class Imagefloat : public IImagefloat, public ImageIO class Imagefloat final : public IImagefloat, public ImageIO
{ {
public: public:

View File

@ -142,11 +142,11 @@ public:
virtual void setProgressListener (ProgressListener* pl) {} virtual void setProgressListener (ProgressListener* pl) {}
void increaseRef () override void increaseRef () final
{ {
references++; references++;
} }
void decreaseRef () override void decreaseRef () final
{ {
references--; references--;
@ -174,15 +174,15 @@ public:
return dirpyrdenoiseExpComp; return dirpyrdenoiseExpComp;
} }
// functions inherited from the InitialImage interface // functions inherited from the InitialImage interface
Glib::ustring getFileName () override Glib::ustring getFileName () final
{ {
return fileName; return fileName;
} }
cmsHPROFILE getEmbeddedProfile () override cmsHPROFILE getEmbeddedProfile () final
{ {
return embProfile; return embProfile;
} }
const FramesMetaData* getMetaData () override const FramesMetaData* getMetaData () final
{ {
return idata; return idata;
} }

View File

@ -54,7 +54,7 @@ class Crop;
* but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object, * but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object,
* while detail windows are framed Crop objects. * while detail windows are framed Crop objects.
*/ */
class ImProcCoordinator : public StagedImageProcessor class ImProcCoordinator final : public StagedImageProcessor
{ {
friend class Crop; friend class Crop;

View File

@ -23,7 +23,7 @@
namespace rtengine namespace rtengine
{ {
class LabImage class LabImage final
{ {
private: private:
void allocLab(size_t w, size_t h); void allocLab(size_t w, size_t h);

View File

@ -24,7 +24,7 @@
namespace rtengine namespace rtengine
{ {
class ProcessingJobImpl : public ProcessingJob class ProcessingJobImpl final : public ProcessingJob
{ {
public: public:

View File

@ -37,7 +37,7 @@ class DiagonalCurve;
class RetinextransmissionCurve; class RetinextransmissionCurve;
class RetinexgaintransmissionCurve; class RetinexgaintransmissionCurve;
class RawImageSource : public ImageSource class RawImageSource final : public ImageSource
{ {
private: private:
static DiagonalCurve *phaseOneIccCurve; static DiagonalCurve *phaseOneIccCurve;

View File

@ -696,7 +696,7 @@ public:
}; };
PAColorSpaceInterpreter paColorSpaceInterpreter; PAColorSpaceInterpreter paColorSpaceInterpreter;
class PALensTypeInterpreter : public IntLensInterpreter< int > class PALensTypeInterpreter final: public IntLensInterpreter< int >
{ {
public: public:
PALensTypeInterpreter () PALensTypeInterpreter ()

View File

@ -163,14 +163,14 @@ public:
// Try to get the Tag in the current directory and in subdirectories // Try to get the Tag in the current directory and in subdirectories
// if lookUpward = true, it will scan the parents TagDirectory up to the root one, // if lookUpward = true, it will scan the parents TagDirectory up to the root one,
// but w/o looking into their subdirs // but w/o looking into their subdirs
virtual Tag* findTag (const char* name, bool lookUpward = false) const; Tag* findTag (const char* name, bool lookUpward = false) const;
// Find a all Tags with the given name by scanning the whole tag tree // Find a all Tags with the given name by scanning the whole tag tree
std::vector<const Tag*> findTags (const char* name); std::vector<const Tag*> findTags (const char* name);
// Find a all Tags with the given ID by scanning the whole tag tree // Find a all Tags with the given ID by scanning the whole tag tree
std::vector<const Tag*> findTags (int ID); std::vector<const Tag*> findTags (int ID);
// Try to get the Tag in the current directory and in parent directories // Try to get the Tag in the current directory and in parent directories
// (won't look into subdirs) // (won't look into subdirs)
virtual Tag* findTagUpward (const char* name) const; Tag* findTagUpward (const char* name) const;
bool getXMPTagValue (const char* name, char* value) const; bool getXMPTagValue (const char* name, char* value) const;
void keepTag (int ID); void keepTag (int ID);
@ -191,10 +191,10 @@ public:
virtual TagDirectory* clone (TagDirectory* parent) const; virtual TagDirectory* clone (TagDirectory* parent) const;
void applyChange (const std::string &field, const Glib::ustring &value); void applyChange (const std::string &field, const Glib::ustring &value);
virtual void printAll (unsigned int level = 0) const; // reentrant debug function, keep level=0 on first call ! void printAll (unsigned int level = 0) const; // reentrant debug function, keep level=0 on first call !
virtual bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams, bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams,
const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = nullptr, Glib::ustring tagDirName = "") const; const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = nullptr, Glib::ustring tagDirName = "") const;
virtual void sort (); void sort ();
}; };
// a table of tags: id are offset from beginning and not identifiers // a table of tags: id are offset from beginning and not identifiers

View File

@ -541,7 +541,7 @@ public:
}; };
SAAntiBlurInterpreter saAntiBlurInterpreter; SAAntiBlurInterpreter saAntiBlurInterpreter;
class SALensIDInterpreter : public IntLensInterpreter<int> class SALensIDInterpreter final : public IntLensInterpreter<int>
{ {
public: public:
SALensIDInterpreter () SALensIDInterpreter ()
@ -1015,7 +1015,7 @@ public:
}; };
SALensIDInterpreter saLensIDInterpreter; SALensIDInterpreter saLensIDInterpreter;
class SALensID2Interpreter : public IntLensInterpreter< int > class SALensID2Interpreter final : public IntLensInterpreter< int >
{ {
public: public:
SALensID2Interpreter () SALensID2Interpreter ()

View File

@ -33,7 +33,7 @@ public:
typedef double(*double2double_fun)(double val); typedef double(*double2double_fun)(double val);
class Adjuster : public Gtk::Grid class Adjuster final : public Gtk::Grid
{ {
protected: protected:

View File

@ -50,7 +50,7 @@ struct BatchQueueEntryIdleHelper {
int pending; int pending;
}; };
class BatchQueueEntry : public ThumbBrowserEntryBase, public BQEntryUpdateListener, public rtengine::NonCopyable class BatchQueueEntry final : public ThumbBrowserEntryBase, public BQEntryUpdateListener, public rtengine::NonCopyable
{ {
guint8* opreview; guint8* opreview;

View File

@ -28,7 +28,7 @@
class FilePanel; class FilePanel;
class Thumbnail; class Thumbnail;
class BatchToolPanelCoordinator : class BatchToolPanelCoordinator final :
public ToolPanelCoordinator, public ToolPanelCoordinator,
public FileSelectionChangeListener, public FileSelectionChangeListener,
public BatchPParamsChangeListener, public BatchPParamsChangeListener,

View File

@ -30,7 +30,7 @@
* the bar itself, i.e. use render_background (depending on its Gtk::Style) * the bar itself, i.e. use render_background (depending on its Gtk::Style)
* *
*/ */
class ColoredBar : private BackBuffer, public ColorCaller class ColoredBar final : private BackBuffer, public ColorCaller
{ {
private: private:

View File

@ -69,7 +69,7 @@ public:
* *
* The position of the Axis in the vector will be used in the communication between the Adjuster and the Provider to identify the Axis * The position of the Axis in the vector will be used in the communication between the Adjuster and the Provider to identify the Axis
*/ */
class CoordinateAdjuster : public Gtk::FlowBox class CoordinateAdjuster final : public Gtk::FlowBox
{ {
public: public:

View File

@ -54,7 +54,7 @@ public:
}; };
class ImageArea; class ImageArea;
class CropWindow : public LWButtonListener, public CropDisplayHandler, public EditCoordSystem, public ObjectMOBuffer, public rtengine::NonCopyable class CropWindow final : public LWButtonListener, public CropDisplayHandler, public EditCoordSystem, public ObjectMOBuffer, public rtengine::NonCopyable
{ {
static bool initialized; static bool initialized;

View File

@ -27,7 +27,7 @@
class DiagonalCurveEditor; class DiagonalCurveEditor;
class MyDiagonalCurve; class MyDiagonalCurve;
class DiagonalCurveEditorSubGroup : class DiagonalCurveEditorSubGroup final :
public CurveEditorSubGroup, public CurveEditorSubGroup,
public SHCListener, public SHCListener,
public AdjusterListener, public AdjusterListener,

View File

@ -129,19 +129,19 @@ public:
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys. @param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected. If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
@return true if the preview has to be redrawn, false otherwise */ @return true if the preview has to be redrawn, false otherwise */
virtual bool pick1 (bool picked); bool pick1 (bool picked);
/** @brief Triggered when the user is releasing mouse button 2 while in action==ES_ACTION_PICKING mode /** @brief Triggered when the user is releasing mouse button 2 while in action==ES_ACTION_PICKING mode
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys. @param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected. If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
@return true if the preview has to be redrawn, false otherwise */ @return true if the preview has to be redrawn, false otherwise */
virtual bool pick2 (bool picked); bool pick2 (bool picked);
/** @brief Triggered when the user is releasing mouse button 3 while in action==ES_ACTION_PICKING mode /** @brief Triggered when the user is releasing mouse button 3 while in action==ES_ACTION_PICKING mode
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys. @param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected. If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
@return true if the preview has to be redrawn, false otherwise */ @return true if the preview has to be redrawn, false otherwise */
virtual bool pick3 (bool picked); bool pick3 (bool picked);
/** @brief Get the geometry to be shown to the user */ /** @brief Get the geometry to be shown to the user */
const std::vector<Geometry*>& getVisibleGeometry (); const std::vector<Geometry*>& getVisibleGeometry ();

View File

@ -25,7 +25,7 @@
#include "toolpanel.h" #include "toolpanel.h"
#include "../rtexif/rtexif.h" #include "../rtexif/rtexif.h"
class ExifPanel : class ExifPanel final :
public Gtk::VBox, public Gtk::VBox,
public ToolPanel public ToolPanel
{ {

View File

@ -56,7 +56,7 @@ public:
/* /*
* Class handling actions common to all thumbnails of the file browser * Class handling actions common to all thumbnails of the file browser
*/ */
class FileBrowser : public ThumbBrowserBase, class FileBrowser final : public ThumbBrowserBase,
public LWButtonListener, public LWButtonListener,
public ExportPanelListener, public ExportPanelListener,
public ProfileStoreListener, public ProfileStoreListener,

View File

@ -43,7 +43,7 @@ struct FileBrowserEntryIdleHelper {
}; };
class FileThumbnailButtonSet; class FileThumbnailButtonSet;
class FileBrowserEntry : public ThumbBrowserEntryBase, class FileBrowserEntry final : public ThumbBrowserEntryBase,
public ThumbnailListener, public ThumbnailListener,
public ThumbImageUpdateListener, public ThumbImageUpdateListener,
public rtengine::NonCopyable public rtengine::NonCopyable

View File

@ -43,7 +43,7 @@ class ToolBar;
* - handling the thumbnail toolbar, * - handling the thumbnail toolbar,
* - monitoring the directory (for any change) * - monitoring the directory (for any change)
*/ */
class FileCatalog : public Gtk::VBox, class FileCatalog final : public Gtk::VBox,
public PreviewLoaderListener, public PreviewLoaderListener,
public FilterPanelListener, public FilterPanelListener,
public FileBrowserListener, public FileBrowserListener,

View File

@ -27,7 +27,7 @@
class FlatCurveEditor; class FlatCurveEditor;
class MyFlatCurve; class MyFlatCurve;
class FlatCurveEditorSubGroup: class FlatCurveEditorSubGroup final :
public CurveEditorSubGroup, public CurveEditorSubGroup,
public rtengine::NonCopyable public rtengine::NonCopyable
{ {

View File

@ -92,7 +92,7 @@ private:
* } * }
* </code> * </code>
*/ */
class GThreadLock class GThreadLock final
{ {
public: public:
GThreadLock() GThreadLock()
@ -110,7 +110,7 @@ public:
* *
* Will relock on destruction. * Will relock on destruction.
*/ */
class GThreadUnLock class GThreadUnLock final
{ {
public: public:
GThreadUnLock() GThreadUnLock()
@ -125,7 +125,7 @@ public:
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
class ConnectionBlocker class ConnectionBlocker final
{ {
public: public:
explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr), wasBlocked(false) explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr), wasBlocked(false)
@ -152,7 +152,7 @@ private:
/** /**
* @brief Glue box to control visibility of the MyExpender's content ; also handle the frame around it * @brief Glue box to control visibility of the MyExpender's content ; also handle the frame around it
*/ */
class ExpanderBox: public Gtk::EventBox class ExpanderBox final : public Gtk::EventBox
{ {
private: private:
Gtk::Container *pC; Gtk::Container *pC;
@ -185,7 +185,7 @@ public:
* *
* Warning: once you've instantiated this class with a text label or a widget label, you won't be able to revert to the other solution. * Warning: once you've instantiated this class with a text label or a widget label, you won't be able to revert to the other solution.
*/ */
class MyExpander : public Gtk::VBox class MyExpander final : public Gtk::VBox
{ {
public: public:
typedef sigc::signal<void> type_signal_enabled_toggled; typedef sigc::signal<void> type_signal_enabled_toggled;
@ -295,7 +295,7 @@ public:
/** /**
* @brief subclass of Gtk::ScrolledWindow in order to handle the scrollwheel * @brief subclass of Gtk::ScrolledWindow in order to handle the scrollwheel
*/ */
class MyScrolledWindow : public Gtk::ScrolledWindow class MyScrolledWindow final : public Gtk::ScrolledWindow
{ {
bool on_scroll_event (GdkEventScroll* event) override; bool on_scroll_event (GdkEventScroll* event) override;
@ -310,7 +310,7 @@ public:
/** /**
* @brief subclass of Gtk::ScrolledWindow in order to handle the large toolbars (wider than available space) * @brief subclass of Gtk::ScrolledWindow in order to handle the large toolbars (wider than available space)
*/ */
class MyScrolledToolbar : public Gtk::ScrolledWindow class MyScrolledToolbar final : public Gtk::ScrolledWindow
{ {
bool on_scroll_event (GdkEventScroll* event) override; bool on_scroll_event (GdkEventScroll* event) override;
@ -340,7 +340,7 @@ public:
/** /**
* @brief subclass of Gtk::ComboBoxText in order to handle the scrollwheel * @brief subclass of Gtk::ComboBoxText in order to handle the scrollwheel
*/ */
class MyComboBoxText : public Gtk::ComboBoxText class MyComboBoxText final : public Gtk::ComboBoxText
{ {
int naturalWidth, minimumWidth; int naturalWidth, minimumWidth;
sigc::connection myConnection; sigc::connection myConnection;
@ -360,7 +360,7 @@ public:
/** /**
* @brief subclass of Gtk::SpinButton in order to handle the scrollwheel * @brief subclass of Gtk::SpinButton in order to handle the scrollwheel
*/ */
class MySpinButton : public Gtk::SpinButton class MySpinButton final : public Gtk::SpinButton
{ {
protected: protected:
@ -375,7 +375,7 @@ public:
/** /**
* @brief subclass of Gtk::HScale in order to handle the scrollwheel * @brief subclass of Gtk::HScale in order to handle the scrollwheel
*/ */
class MyHScale : public Gtk::HScale class MyHScale final : public Gtk::HScale
{ {
bool on_scroll_event (GdkEventScroll* event) override; bool on_scroll_event (GdkEventScroll* event) override;
@ -385,7 +385,7 @@ class MyHScale : public Gtk::HScale
/** /**
* @brief subclass of Gtk::FileChooserButton in order to handle the scrollwheel * @brief subclass of Gtk::FileChooserButton in order to handle the scrollwheel
*/ */
class MyFileChooserButton: public Gtk::Button { class MyFileChooserButton final : public Gtk::Button {
private: private:
void show_chooser(); void show_chooser();
@ -473,14 +473,14 @@ typedef enum RTNav {
/** /**
* @brief Handle the switch between text and image to be displayed in the HBox (to be used in a button/toolpanel) * @brief Handle the switch between text and image to be displayed in the HBox (to be used in a button/toolpanel)
*/ */
class TextOrIcon : public Gtk::HBox class TextOrIcon final : public Gtk::HBox
{ {
public: public:
TextOrIcon (const Glib::ustring &filename, const Glib::ustring &labelTx, const Glib::ustring &tooltipTx); TextOrIcon (const Glib::ustring &filename, const Glib::ustring &labelTx, const Glib::ustring &tooltipTx);
}; };
class MyImageMenuItem : public Gtk::MenuItem class MyImageMenuItem final : public Gtk::MenuItem
{ {
private: private:
Gtk::Grid *box; Gtk::Grid *box;
@ -493,7 +493,7 @@ public:
const Gtk::Label* getLabel () const; const Gtk::Label* getLabel () const;
}; };
class MyProgressBar : public Gtk::ProgressBar class MyProgressBar final : public Gtk::ProgressBar
{ {
private: private:
int w; int w;
@ -512,7 +512,7 @@ public:
/** /**
* @brief Define a gradient milestone * @brief Define a gradient milestone
*/ */
class GradientMilestone class GradientMilestone final
{ {
public: public:
double position; double position;

View File

@ -53,7 +53,7 @@ public:
double log (double vsize, double val); double log (double vsize, double val);
}; };
class HistogramRGBArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable class HistogramRGBArea final : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable
{ {
private: private:
typedef const double (*TMatrix)[3]; typedef const double (*TMatrix)[3];
@ -116,7 +116,7 @@ public:
virtual void toggleButtonMode() = 0; virtual void toggleButtonMode() = 0;
}; };
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable class HistogramArea final : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable
{ {
public: public:
typedef sigc::signal<void, double> type_signal_factor_changed; typedef sigc::signal<void, double> type_signal_factor_changed;
@ -174,7 +174,7 @@ private:
void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override; void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override;
}; };
class HistogramPanel : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable class HistogramPanel final : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable
{ {
protected: protected:

View File

@ -27,7 +27,7 @@
class RTWindow; class RTWindow;
class ICCProfileCreator : public Gtk::Dialog, public AdjusterListener class ICCProfileCreator final : public Gtk::Dialog, public AdjusterListener
{ {
private: private:

View File

@ -34,7 +34,7 @@
class ImageAreaPanel; class ImageAreaPanel;
class ImageArea : class ImageArea final :
public Gtk::DrawingArea, public Gtk::DrawingArea,
public CropWindowListener, public CropWindowListener,
public EditDataProvider, public EditDataProvider,

View File

@ -22,7 +22,7 @@
class ImageArea; class ImageArea;
class ImageAreaPanel : class ImageAreaPanel final :
public Gtk::VBox public Gtk::VBox
{ {

View File

@ -40,7 +40,7 @@ public:
//~InspectorBuffer(); //~InspectorBuffer();
}; };
class Inspector : public Gtk::DrawingArea class Inspector final : public Gtk::DrawingArea
{ {
private: private:

View File

@ -25,7 +25,7 @@
#include "guiutils.h" #include "guiutils.h"
#include "toolpanel.h" #include "toolpanel.h"
class IPTCPanel : class IPTCPanel final :
public Gtk::VBox, public Gtk::VBox,
public ToolPanel public ToolPanel
{ {

View File

@ -33,7 +33,7 @@ public:
virtual void switchPickerVisibility(bool isVisible) = 0; virtual void switchPickerVisibility(bool isVisible) = 0;
}; };
class LockableColorPicker : BackBuffer class LockableColorPicker final : BackBuffer
{ {
public: public:
enum class Size { enum class Size {

View File

@ -41,7 +41,7 @@ public:
std::vector<double> x, y; // in case of parametric curves the curve parameters are stored in vector x. In other cases these vectors store the coordinates of the bullets. std::vector<double> x, y; // in case of parametric curves the curve parameters are stored in vector x. In other cases these vectors store the coordinates of the bullets.
}; };
class MyDiagonalCurve : public MyCurve class MyDiagonalCurve final : public MyCurve
{ {
private: private:
IdleRegister idle_register; IdleRegister idle_register;

View File

@ -66,7 +66,7 @@ public:
double centerY; double centerY;
}; };
class MyFlatCurve : public MyCurve class MyFlatCurve final : public MyCurve
{ {
protected: protected:

View File

@ -25,7 +25,7 @@
class PreviewWindow; class PreviewWindow;
class Navigator : class Navigator final :
public Gtk::Frame, public Gtk::Frame,
public PointerMotionListener public PointerMotionListener
{ {

View File

@ -34,7 +34,7 @@ class ProcParams;
struct ParamsEdited; struct ParamsEdited;
class PartialPasteDlg : public Gtk::Dialog class PartialPasteDlg final : public Gtk::Dialog
{ {
public: public:

View File

@ -24,7 +24,7 @@
#include "popupcommon.h" #include "popupcommon.h"
class PopUpButton : class PopUpButton final :
public Gtk::Button, public Gtk::Button,
public PopUpCommon public PopUpCommon
{ {

View File

@ -29,7 +29,7 @@
class RTWindow; class RTWindow;
class Splash; class Splash;
class Preferences : class Preferences final :
public Gtk::Dialog, public Gtk::Dialog,
public ProfileStoreListener public ProfileStoreListener
{ {

View File

@ -44,7 +44,7 @@ struct PreviewHandlerIdleHelper {
int pending; int pending;
}; };
class PreviewHandler : public rtengine::PreviewImageListener, public rtengine::NonCopyable class PreviewHandler final : public rtengine::PreviewImageListener, public rtengine::NonCopyable
{ {
private: private:
friend int setImageUI (void* data); friend int setImageUI (void* data);

View File

@ -49,7 +49,7 @@ class PartialProfile;
} }
class RTImage; class RTImage;
class ProfilePanel : class ProfilePanel final :
public Gtk::Grid, public Gtk::Grid,
public PParamsChangeListener, public PParamsChangeListener,
public ProfileStoreListener, public ProfileStoreListener,

View File

@ -28,7 +28,7 @@
#undef THREAD_PRIORITY_NORMAL #undef THREAD_PRIORITY_NORMAL
class PLDBridge : class PLDBridge final :
public rtengine::ProgressListener public rtengine::ProgressListener
{ {
public: public:

View File

@ -26,7 +26,7 @@
class CacheImageData; class CacheImageData;
class RenameDialog : class RenameDialog final :
public Gtk::Dialog public Gtk::Dialog
{ {

View File

@ -25,7 +25,7 @@
/** /**
* @brief A derived class of Gtk::Image in order to handle theme-related icon sets. * @brief A derived class of Gtk::Image in order to handle theme-related icon sets.
*/ */
class RTImage : public Gtk::Image, public RTScalable class RTImage final : public Gtk::Image, public RTScalable
{ {
static double dpiBack; // used to keep track of master dpi change static double dpiBack; // used to keep track of master dpi change
static int scaleBack; // used to keep track of master scale change static int scaleBack; // used to keep track of master scale change

View File

@ -35,7 +35,7 @@ class BatchQueuePanel;
class EditorPanel; class EditorPanel;
class FilePanel; class FilePanel;
class PLDBridge; class PLDBridge;
class RTWindow : class RTWindow final :
public Gtk::Window, public Gtk::Window,
public rtengine::ProgressListener, public rtengine::ProgressListener,
public rtengine::NonCopyable public rtengine::NonCopyable

View File

@ -22,7 +22,7 @@
#include "saveformatpanel.h" #include "saveformatpanel.h"
class SaveAsDialog : class SaveAsDialog final :
public Gtk::Dialog, public Gtk::Dialog,
public FormatChangeListener public FormatChangeListener
{ {

View File

@ -29,7 +29,7 @@ public:
virtual void shcChanged() = 0; virtual void shcChanged() = 0;
}; };
class SHCSelector : public Gtk::DrawingArea, BackBuffer class SHCSelector final : public Gtk::DrawingArea, BackBuffer
{ {
protected: protected:

View File

@ -20,7 +20,7 @@
#include <gtkmm.h> #include <gtkmm.h>
class SplashImage : class SplashImage final :
public Gtk::DrawingArea public Gtk::DrawingArea
{ {
@ -39,7 +39,7 @@ public:
}; };
//class Splash : public Gtk::Window { //class Splash : public Gtk::Window {
class Splash : public Gtk::Dialog class Splash final : public Gtk::Dialog
{ {
private: private:

View File

@ -113,10 +113,10 @@ protected:
void updateBackBuffer(); void updateBackBuffer();
Gtk::SizeRequestMode get_request_mode_vfunc () const override; Gtk::SizeRequestMode get_request_mode_vfunc () const override;
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override; void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const final;
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override; void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const final;
void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const override; void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const final;
void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override; void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const final;
void on_realize () override; void on_realize () override;
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override; bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
bool on_button_press_event (GdkEventButton* event) override; bool on_button_press_event (GdkEventButton* event) override;

View File

@ -60,10 +60,10 @@ class ThumbBrowserBase :
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override; bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
Gtk::SizeRequestMode get_request_mode_vfunc () const override; Gtk::SizeRequestMode get_request_mode_vfunc () const override;
void get_preferred_height_vfunc (int &minimum_height, int &natural_height) const override; void get_preferred_height_vfunc (int &minimum_height, int &natural_height) const final;
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override; void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const final;
void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const override; void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const final;
void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override; void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const final;
bool on_button_press_event (GdkEventButton* event) override; bool on_button_press_event (GdkEventButton* event) override;
bool on_button_release_event (GdkEventButton* event) override; bool on_button_release_event (GdkEventButton* event) override;

View File

@ -143,7 +143,7 @@ public:
this->batchMode = batchMode; this->batchMode = batchMode;
} }
virtual Glib::ustring getToolName () { Glib::ustring getToolName () {
return toolName; return toolName;
} }
}; };
@ -164,11 +164,11 @@ public:
FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11 = false, bool useEnabled = false); FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11 = false, bool useEnabled = false);
MyExpander* getExpander() override MyExpander* getExpander() final
{ {
return exp; return exp;
} }
void setExpanded (bool expanded) override void setExpanded (bool expanded) final
{ {
if (exp) { if (exp) {
exp->set_expanded( expanded ); exp->set_expanded( expanded );
@ -186,7 +186,7 @@ public:
exp->show(); exp->show();
} }
} }
bool getExpanded () override bool getExpanded () final
{ {
if (exp) { if (exp) {
return exp->get_expanded(); return exp->get_expanded();
@ -194,11 +194,11 @@ public:
return false; return false;
} }
void setParent (Gtk::Box* parent) override void setParent (Gtk::Box* parent) final
{ {
parentContainer = parent; parentContainer = parent;
} }
Gtk::Box* getParent () override Gtk::Box* getParent () final
{ {
return parentContainer; return parentContainer;
} }

View File

@ -314,11 +314,11 @@ public:
// imageareatoollistener interface // imageareatoollistener interface
void spotWBselected(int x, int y, Thumbnail* thm = nullptr) override; void spotWBselected(int x, int y, Thumbnail* thm = nullptr) override;
void sharpMaskSelected(bool sharpMask) override; void sharpMaskSelected(bool sharpMask) override final;
int getSpotWBRectSize() const override; int getSpotWBRectSize() const override;
void cropSelectionReady() override; void cropSelectionReady() override;
void rotateSelectionReady(double rotate_deg, Thumbnail* thm = nullptr) override; void rotateSelectionReady(double rotate_deg, Thumbnail* thm = nullptr) override;
ToolBar* getToolBar() const override; ToolBar* getToolBar() const final;
CropGUIListener* startCropEditing(Thumbnail* thm = nullptr) override; CropGUIListener* startCropEditing(Thumbnail* thm = nullptr) override;
void updateTPVScrollbar (bool hide); void updateTPVScrollbar (bool hide);
@ -326,7 +326,7 @@ public:
// ToolBarListener interface // ToolBarListener interface
void toolSelected (ToolMode tool) override; void toolSelected (ToolMode tool) override;
void editModeSwitchedOff () override; void editModeSwitchedOff () final;
void setEditProvider (EditDataProvider *provider); void setEditProvider (EditDataProvider *provider);