Mercurial > hg > svgui
comparison layer/Layer.h @ 1414:fa986b91d77f
Merge from branch fix-static-analysis
author | Chris Cannam |
---|---|
date | Wed, 09 Jan 2019 15:24:51 +0000 |
parents | 05d614f6e46d |
children | af824022bffd |
comparison
equal
deleted
inserted
replaced
1413:0930a27ebea2 | 1414:fa986b91d77f |
---|---|
11 published by the Free Software Foundation; either version 2 of the | 11 published by the Free Software Foundation; either version 2 of the |
12 License, or (at your option) any later version. See the file | 12 License, or (at your option) any later version. See the file |
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #ifndef _LAYER_H_ | 16 #ifndef SV_LAYER_H |
17 #define _LAYER_H_ | 17 #define SV_LAYER_H |
18 | 18 |
19 #include "base/PropertyContainer.h" | 19 #include "base/PropertyContainer.h" |
20 #include "base/XmlExportable.h" | 20 #include "base/XmlExportable.h" |
21 #include "base/Selection.h" | 21 #include "base/Selection.h" |
22 | 22 |
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 }; |