mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Cleanup: use override specifier everywhere, and enable gcc warning to check for it.
This commit is contained in:
@@ -69,7 +69,7 @@ class DataViewer : public SetView {
|
||||
void setCard(const CardP& card, bool refresh = false);
|
||||
|
||||
/// Clear data
|
||||
virtual void onChangeSet();
|
||||
void onChangeSet() override;
|
||||
|
||||
// --------------------------------------------------- : The viewers
|
||||
private:
|
||||
@@ -88,7 +88,7 @@ protected:
|
||||
virtual ValueViewerP makeViewer(const StyleP&);
|
||||
|
||||
/// Update the viewers and forward actions
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
void onAction(const Action&, bool undone) override;
|
||||
|
||||
/// Notification that the total image has changed
|
||||
virtual void onChange() {}
|
||||
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
inline SolidFillSymbolFilter(const Color& fill_color, const Color& border_color)
|
||||
: fill_color(fill_color), border_color(border_color)
|
||||
{}
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
private:
|
||||
Color fill_color, border_color;
|
||||
DECLARE_REFLECTION_OVERRIDE();
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
LinearGradientSymbolFilter(const Color& fill_color_1, const Color& border_color_1, const Color& fill_color_2, const Color& border_color_2
|
||||
,double center_x, double center_y, double end_x, double end_y);
|
||||
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
|
||||
/// return time on the gradient, used by GradientSymbolFilter::color
|
||||
inline double t(double x, double y) const;
|
||||
@@ -117,9 +117,9 @@ public:
|
||||
: GradientSymbolFilter(fill_color_1, border_color_1, fill_color_2, border_color_2)
|
||||
{}
|
||||
|
||||
virtual Color color(double x, double y, SymbolSet point) const;
|
||||
virtual String fillType() const;
|
||||
virtual bool operator == (const SymbolFilter& that) const;
|
||||
Color color(double x, double y, SymbolSet point) const override;
|
||||
String fillType() const override;
|
||||
bool operator == (const SymbolFilter& that) const override;
|
||||
|
||||
/// return time on the gradient, used by GradientSymbolFilter::color
|
||||
inline double t(double x, double y) const;
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
void drawEditingHints(DC& dc);
|
||||
|
||||
void onAction(const Action&, bool) {}
|
||||
void onAction(const Action&, bool) override {}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -19,9 +19,9 @@ class ChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Choice) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onStyleChange(int);
|
||||
bool prepare(RotatedDC& dc) override;
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onStyleChange(int) override;
|
||||
};
|
||||
|
||||
bool prepare_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& style, const String& value);
|
||||
|
||||
@@ -21,7 +21,7 @@ class ColorValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Color) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual bool containsPoint(const RealPoint& p) const;
|
||||
void draw(RotatedDC& dc) override;
|
||||
bool containsPoint(const RealPoint& p) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ class ImageValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Image) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onValueChange();
|
||||
virtual void onStyleChange(int);
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onValueChange() override;
|
||||
void onStyleChange(int) override;
|
||||
|
||||
private:
|
||||
Bitmap bitmap; ///< Cached bitmap
|
||||
|
||||
@@ -19,7 +19,7 @@ class InfoValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Info) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
void draw(RotatedDC& dc) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class MultipleChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(MultipleChoice) : ValueViewer(parent,style), item_height(0) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onStyleChange(int);
|
||||
bool prepare(RotatedDC& dc) override;
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onStyleChange(int) override;
|
||||
protected:
|
||||
double item_height; ///< Height of a single item, or 0 if non uniform
|
||||
private:
|
||||
|
||||
@@ -19,7 +19,7 @@ class PackageChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(PackageChoice) : ValueViewer(parent,style) { initItems(); }
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
void draw(RotatedDC& dc) override;
|
||||
|
||||
struct Item{
|
||||
String package_name;
|
||||
|
||||
@@ -19,8 +19,8 @@ class SymbolValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Symbol) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
void onValueChange();
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onValueChange() override;
|
||||
|
||||
protected:
|
||||
vector<Bitmap> symbols; ///< Cached images
|
||||
|
||||
@@ -20,12 +20,12 @@ class TextValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(Text) : ValueViewer(parent,style) {}
|
||||
|
||||
virtual bool prepare(RotatedDC& dc);
|
||||
virtual void draw(RotatedDC& dc);
|
||||
virtual void onValueChange();
|
||||
virtual void onStyleChange(int);
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
virtual double getStretch() const;
|
||||
bool prepare(RotatedDC& dc) override;
|
||||
void draw(RotatedDC& dc) override;
|
||||
void onValueChange() override;
|
||||
void onStyleChange(int) override;
|
||||
void onAction(const Action&, bool undone) override;
|
||||
double getStretch() const override;
|
||||
|
||||
protected:
|
||||
TextViewer v;
|
||||
|
||||
@@ -63,12 +63,12 @@ public:
|
||||
virtual void onValueChange() {}
|
||||
/// Called when a (scripted) property of the associated style has changed
|
||||
/** Default: redraws the viewer if needed */
|
||||
virtual void onStyleChange(int changes);
|
||||
void onStyleChange(int changes) override;
|
||||
/// Called when an action is performed on the associated value
|
||||
virtual void onAction(const Action&, bool undone) { onValueChange(); }
|
||||
|
||||
/// Convert this viewer to an editor, if possible
|
||||
virtual ValueEditor* getEditor() { return 0; }
|
||||
virtual ValueEditor* getEditor() { return nullptr; }
|
||||
|
||||
DataViewer& viewer; ///< Our parent object
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user