![]() |
Mapper
0.9.0
API documentation
|
Symbol which draw text along a path. More...
#include <line_text_symbol.h>


Public Member Functions | |
| LineTextSymbol () | |
| ~LineTextSymbol () override | |
| bool | validate () const override |
| void | createRenderables (const Object *object, const VirtualCoordVector &coords, ObjectRenderables &output, Symbol::RenderableOptions options) const override |
| Creates renderables for a generic object. More... | |
| void | createRenderables (const PathObject *object, const PathPartVector &path_parts, ObjectRenderables &output, Symbol::RenderableOptions options) const override |
| Creates renderables for a path object. More... | |
| void | colorDeletedEvent (const MapColor *color) override |
| Called when a color is removed from the map. More... | |
| bool | containsColor (const MapColor *color) const override |
| Returns if the given color is used by this symbol. More... | |
| const MapColor * | guessDominantColor () const override |
| Returns the dominant color of this symbol. More... | |
| void | replaceColors (const MapColorMap &color_map) override |
| Replaces colors used by this symbol. More... | |
| bool | symbolChangedEvent (const Symbol *old_symbol, const Symbol *new_symbol) override |
| Called when a symbol was changed, replaced, or removed. More... | |
| bool | containsSymbol (const Symbol *symbol) const override |
| Returns true if the given symbol is referenced by this symbol. More... | |
| void | scale (double factor) override |
| Scales the symbol. More... | |
| TypeCombination | getContainedTypes () const override |
| Returns the combined bitmask of all symbol types this symbol contains. More... | |
| bool | loadingFinishedEvent (Map *map) override |
| Called when loading the map is finished. More... | |
| qreal | dimensionForIcon () const override |
| Returns the dimension which shall considered when scaling the icon. More... | |
| qreal | calculateLargestLineExtent () const override |
| Returns the largest extent of all primitive lines which are part of the symbol. More... | |
| SymbolPropertiesWidget * | createPropertiesWidget (SymbolSettingDialog *dialog) override |
| Creates a properties widget for the symbol. More... | |
Public Member Functions inherited from OpenOrienteering::Symbol | |
| Symbol (Type type) noexcept | |
| virtual | ~Symbol () |
| Symbol & | operator= (const Symbol &)=delete |
| Symbol & | operator= (Symbol &&)=delete |
| bool | equals (const Symbol *other, Qt::CaseSensitivity case_sensitivity=Qt::CaseSensitive) const |
| Checks for equality to the other symbol. More... | |
| bool | stateEquals (const Symbol *other) const |
| Checks protected/hidden state for equality to the other symbol. More... | |
| Type | getType () const |
| Returns the type of the symbol. More... | |
| const PointSymbol * | asPoint () const |
| Case to PointSymbol with type checking. More... | |
| PointSymbol * | asPoint () |
| Case to PointSymbol with type checking. More... | |
| const LineSymbol * | asLine () const |
| Case to LineSymbol with type checking. More... | |
| LineSymbol * | asLine () |
| Case to LineSymbol with type checking. More... | |
| const AreaSymbol * | asArea () const |
| Case to AreaSymbol with type checking. More... | |
| AreaSymbol * | asArea () |
| Case to AreaSymbol with type checking. More... | |
| const TextSymbol * | asText () const |
| Case to TextSymbol with type checking. More... | |
| TextSymbol * | asText () |
| Case to TextSymbol with type checking. More... | |
| const CombinedSymbol * | asCombined () const |
| Case to CombinedSymbol with type checking. More... | |
| CombinedSymbol * | asCombined () |
| Case to CombinedSymbol with type checking. More... | |
| bool | isTypeCompatibleTo (const Object *object) const |
| Checks if the symbol can be applied to the given object. More... | |
| bool | numberEquals (const Symbol *other) const |
| Returns if the symbol numbers are exactly equal. More... | |
| bool | numberEqualsRelaxed (const Symbol *other) const |
| Returns if the symbol numbers are equal, ignoring trailing zeros. More... | |
| void | save (QXmlStreamWriter &xml, const Map &map) const |
| Saves the symbol in xml format. More... | |
| virtual void | createBaselineRenderables (const PathObject *object, const PathPartVector &path_parts, ObjectRenderables &output, const MapColor *color) const |
| Creates baseline renderables for a path object. More... | |
| QImage | getCustomIcon () const |
| Returns the custom symbol icon. More... | |
| void | setCustomIcon (const QImage &image) |
| Sets a custom symbol icon. More... | |
| QImage | getIcon (const Map *map) const |
| Returns the symbol's icon. More... | |
| QImage | createIcon (const Map &map, int side_length, bool antialiasing=true, qreal zoom=0) const |
| Creates a symbol icon with the given side length (pixels). More... | |
| void | resetIcon () |
| Clear the symbol's cached icon. More... | |
| const QString & | getName () const |
| Returns the symbol name. More... | |
| QString | getPlainTextName () const |
| Returns the symbol name with all HTML markup stripped. More... | |
| void | setName (const QString &new_name) |
| Sets the symbol name. More... | |
| QString | getNumberAsString () const |
| Returns the symbol number as string. More... | |
| int | getNumberComponent (int i) const |
| Returns the i-th component of the symbol number as int. More... | |
| void | setNumberComponent (int i, int new_number) |
| Sets the i-th component of the symbol number. More... | |
| const QString & | getDescription () const |
| Returns the symbol description. More... | |
| void | setDescription (const QString &new_description) |
| Sets the symbol description. More... | |
| bool | isHelperSymbol () const |
| Returns if this is a helper symbol (which is not printed in the final map). More... | |
| void | setIsHelperSymbol (bool value) |
| Sets if this is a helper symbol, see isHelperSymbol(). More... | |
| bool | isHidden () const |
| Returns if this symbol is hidden. More... | |
| void | setHidden (bool value) |
| Sets the hidden state of this symbol. More... | |
| bool | isProtected () const |
| Returns if this symbol is protected. More... | |
| void | setProtected (bool value) |
| Sets the protected state of this symbol. More... | |
| bool | isRotatable () const |
| Returns if objects with this symbol can be rotated in arbitrary directions. More... | |
Protected Member Functions | |
| LineTextSymbol (const LineTextSymbol &proto) | |
| LineTextSymbol * | duplicate () const override |
| void | saveImpl (QXmlStreamWriter &xml, const Map &map) const override |
| Must be overridden to save type-specific symbol properties. More... | |
| bool | loadImpl (QXmlStreamReader &xml, const Map &map, SymbolDictionary &symbol_dict) override |
| bool | equalsImpl (const Symbol *other, Qt::CaseSensitivity case_sensitivity) const override |
| Must be overridden to compare specific attributes. More... | |
Protected Member Functions inherited from OpenOrienteering::Symbol | |
| Symbol (const Symbol &proto) | |
| void | setRotatable (bool value) |
| Sets the rotatability state of the symbol. More... | |
| virtual bool | loadImpl (QXmlStreamReader &xml, const Map &map, SymbolDictionary &symbol_dict, int version)=0 |
| Must be overridden to load type-specific symbol properties. More... | |
Friends | |
| class | LineTextSymbolSettings |
| class | PointSymbolEditorWidget |
| class | OCAD8FileImport |
Additional Inherited Members | |
Public Types inherited from OpenOrienteering::Symbol | |
| enum | Type { Point = 1, Line = 2, Area = 4, Text = 8, Combined = 16, NoSymbol = 0, AllSymbols = Point | Line | Area | Text | Combined } |
| Enumeration of all possible symbol types. More... | |
| enum | RenderableOption { RenderBaselines = 1 << 0, RenderAreasHatched = 1 << 1, RenderNormal = 0 } |
| RenderableOptions denominate variations in painting symbols. More... | |
Static Public Member Functions inherited from OpenOrienteering::Symbol | |
| template<class S > | |
| static std::unique_ptr< S > | duplicate (const S &s) |
| Duplicates a symbol. More... | |
| static std::unique_ptr< Symbol > | load (QXmlStreamReader &xml, const Map &map, SymbolDictionary &symbol_dict, int version) |
| Load the symbol in xml format. More... | |
| static std::unique_ptr< Symbol > | makeSymbolForType (Type type) |
| Returns a newly created symbol of the given type. More... | |
| static bool | areTypesCompatible (Type a, Type b) |
| Returns if the symbol types can be applied to the same object types. More... | |
| static TypeCombination | getCompatibleTypes (Type type) |
| Returns a bitmask of all types which can be applied to the same objects as the given type. More... | |
| static bool | lessByNumber (const Symbol *s1, const Symbol *s2) |
| Compares two symbols by number. More... | |
| static bool | lessByColorPriority (const Symbol *s1, const Symbol *s2) |
| Compares two symbols by the dominant colors' priorities. More... | |
Static Public Attributes inherited from OpenOrienteering::Symbol | |
| static constexpr auto | number_components = 3u |
| Number of components of symbol numbers. More... | |
Symbol which draw text along a path.
| OpenOrienteering::LineTextSymbol::LineTextSymbol | ( | ) |
|
overridedefault |
|
explicitprotected |
|
overridevirtual |
Returns the largest extent of all primitive lines which are part of the symbol.
Effectively, this is the half line width.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Called when a color is removed from the map.
Symbols need to remove all references to the given color when this event occurs.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Returns if the given color is used by this symbol.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Returns true if the given symbol is referenced by this symbol.
A symbol does not contain itself, so it must return true when the given symbol is identical to the symbol this function is being called for.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Creates a properties widget for the symbol.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Creates renderables for a generic object.
This will create the renderables according to the object's properties and the given coordinates.
Implementations must use the coordinates (coords) instead of the object's coordinates.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Creates renderables for a path object.
This will create the renderables according to the object's properties and the coordinates given by the path_parts. This allows the immediate use of precalculated meta-information on paths.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Returns the dimension which shall considered when scaling the icon.
Reimplemented from OpenOrienteering::Symbol.
|
overrideprotectedvirtual |
Implements OpenOrienteering::Symbol.
|
overrideprotectedvirtual |
Must be overridden to compare specific attributes.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Returns the combined bitmask of all symbol types this symbol contains.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Returns the dominant color of this symbol.
If it is not possible to efficiently determine this color exactly, an appropriate heuristic should be used.
Implements OpenOrienteering::Symbol.
|
overrideprotected |
Called when loading the map is finished.
This event handler can be overridden in order to do tasks that need to access other symbols or map objects.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Replaces colors used by this symbol.
Implements OpenOrienteering::Symbol.
|
overrideprotectedvirtual |
Must be overridden to save type-specific symbol properties.
The map pointer can be used to get persistent indices to any pointers on map data.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Scales the symbol.
Implements OpenOrienteering::Symbol.
|
overridevirtual |
Called when a symbol was changed, replaced, or removed.
Symbol need top update or remove references to the given old_symbol. If new_symbol is nullptr, the symbol is about to be deleted.
Returns true if this symbol contained the deleted symbol.
Reimplemented from OpenOrienteering::Symbol.
|
overridevirtual |
Reimplemented from OpenOrienteering::Symbol.
|
friend |
|
friend |
|
friend |
1.8.13