Mercurial > hg > svgui
comparison layer/Layer.h @ 1406:a18e78b9c78b fix-static-analysis
Use override throughout
| author | Chris Cannam |
|---|---|
| date | Mon, 26 Nov 2018 13:52:27 +0000 |
| parents | c39f2d439d59 |
| children | 05d614f6e46d |
comparison
equal
deleted
inserted
replaced
| 1405:4c359c2b220c | 1406:a18e78b9c78b |
|---|---|
| 116 } | 116 } |
| 117 virtual bool hasLightBackground() const { | 117 virtual bool hasLightBackground() const { |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| 120 | 120 |
| 121 virtual QString getPropertyContainerIconName() const; | 121 QString getPropertyContainerIconName() const override; |
| 122 | 122 |
| 123 virtual QString getPropertyContainerName() const { | 123 QString getPropertyContainerName() const override { |
| 124 if (m_presentationName != "") return m_presentationName; | 124 if (m_presentationName != "") return m_presentationName; |
| 125 else return objectName(); | 125 else return objectName(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 virtual void setPresentationName(QString name); | 128 virtual void setPresentationName(QString name); |
| 364 * refers to) into XML for file output. This class implements the | 364 * refers to) into XML for file output. This class implements the |
| 365 * basic name/type/model-id output; subclasses will typically call | 365 * basic name/type/model-id output; subclasses will typically call |
| 366 * this superclass implementation with extra attributes describing | 366 * this superclass implementation with extra attributes describing |
| 367 * their particular properties. | 367 * their particular properties. |
| 368 */ | 368 */ |
| 369 virtual void toXml(QTextStream &stream, QString indent = "", | 369 void toXml(QTextStream &stream, QString indent = "", |
| 370 QString extraAttributes = "") const; | 370 QString extraAttributes = "") const override; |
| 371 | 371 |
| 372 /** | 372 /** |
| 373 * Set the particular properties of a layer (those specific to the | 373 * Set the particular properties of a layer (those specific to the |
| 374 * subclass) from a set of XML attributes. This is the effective | 374 * subclass) from a set of XML attributes. This is the effective |
| 375 * inverse of the toXml method. | 375 * inverse of the toXml method. |
| 410 * Return whether the layer is dormant (i.e. hidden) in the given | 410 * Return whether the layer is dormant (i.e. hidden) in the given |
| 411 * view. | 411 * view. |
| 412 */ | 412 */ |
| 413 virtual bool isLayerDormant(const LayerGeometryProvider *v) const; | 413 virtual bool isLayerDormant(const LayerGeometryProvider *v) const; |
| 414 | 414 |
| 415 virtual PlayParameters *getPlayParameters(); | 415 PlayParameters *getPlayParameters() override; |
| 416 | 416 |
| 417 /** | 417 /** |
| 418 * True if this layer will need to place text labels when it is | 418 * True if this layer will need to place text labels when it is |
| 419 * painted. The view will take into account how many layers are | 419 * painted. The view will take into account how many layers are |
| 420 * requesting this, and will provide a distinct y-coord to each | 420 * requesting this, and will provide a distinct y-coord to each |
| 591 { | 591 { |
| 592 public: | 592 public: |
| 593 AddMeasurementRectCommand(Layer *layer, MeasureRect rect) : | 593 AddMeasurementRectCommand(Layer *layer, MeasureRect rect) : |
| 594 m_layer(layer), m_rect(rect) { } | 594 m_layer(layer), m_rect(rect) { } |
| 595 | 595 |
| 596 virtual QString getName() const; | 596 QString getName() const override; |
| 597 virtual void execute(); | 597 void execute() override; |
| 598 virtual void unexecute(); | 598 void unexecute() override; |
| 599 | 599 |
| 600 private: | 600 private: |
| 601 Layer *m_layer; | 601 Layer *m_layer; |
| 602 MeasureRect m_rect; | 602 MeasureRect m_rect; |
| 603 }; | 603 }; |
| 606 { | 606 { |
| 607 public: | 607 public: |
| 608 DeleteMeasurementRectCommand(Layer *layer, MeasureRect rect) : | 608 DeleteMeasurementRectCommand(Layer *layer, MeasureRect rect) : |
| 609 m_layer(layer), m_rect(rect) { } | 609 m_layer(layer), m_rect(rect) { } |
| 610 | 610 |
| 611 virtual QString getName() const; | 611 QString getName() const override; |
| 612 virtual void execute(); | 612 void execute() override; |
| 613 virtual void unexecute(); | 613 void unexecute() override; |
| 614 | 614 |
| 615 private: | 615 private: |
| 616 Layer *m_layer; | 616 Layer *m_layer; |
| 617 MeasureRect m_rect; | 617 MeasureRect m_rect; |
| 618 }; | 618 }; |
