Mapper  0.9.0
API documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OpenOrienteering::LineSymbol Class Reference

Symbol for PathObjects which displays a line along the path. More...

#include <line_symbol.h>

Inheritance diagram for OpenOrienteering::LineSymbol:
Inheritance graph
[legend]
Collaboration diagram for OpenOrienteering::LineSymbol:
Collaboration graph
[legend]

Public Types

enum  CapStyle { FlatCap = 0, RoundCap = 1, SquareCap = 2, PointedCap = 3 }
 
enum  JoinStyle { BevelJoin = 0, MiterJoin = 1, RoundJoin = 2 }
 
enum  MidSymbolPlacement { CenterOfDash = 0, CenterOfDashGroup = 1, CenterOfGap = 2, NoMidSymbols = 99 }
 Mid symbol placement on dashed lines. More...
 
- 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...
 

Public Member Functions

 LineSymbol () noexcept
 Constructs an empty line symbol. More...
 
 ~LineSymbol () 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 createSinglePathRenderables (const VirtualPath &path, bool path_closed, ObjectRenderables &output) const
 Creates the renderables for a single path (i.e. 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 MapColorguessDominantColor () const override
 Returns the dominant color of this symbol. More...
 
void replaceColors (const MapColorMap &color_map) override
 Replaces colors used by this symbol. More...
 
void scale (double factor) override
 Scales the symbol. More...
 
void ensurePointSymbols (const QString &start_name, const QString &mid_name, const QString &end_name, const QString &dash_name)
 Creates empty point symbols with the given names for undefined subsymbols. More...
 
void cleanupPointSymbols ()
 Deletes unused point symbols and sets them to nullptr again. More...
 
qreal dimensionForIcon () const override
 Returns the dimension which shall considered when scaling the icon. More...
 
qreal calculateLargestLineExtent () const override
 Returns the largest extent (half width) of the components of this line. More...
 
int getLineWidth () const
 
void setLineWidth (double width)
 
const MapColorgetColor () const
 
void setColor (const MapColor *color)
 
int getMinimumLength () const
 
void setMinimumLength (int length)
 
CapStyle getCapStyle () const
 
void setCapStyle (CapStyle style)
 
JoinStyle getJoinStyle () const
 
void setJoinStyle (JoinStyle style)
 
int startOffset () const
 
void setStartOffset (int value)
 
int endOffset () const
 
void setEndOffset (int value)
 
bool isDashed () const
 
void setDashed (bool value)
 
PointSymbolgetStartSymbol () const
 
void setStartSymbol (PointSymbol *symbol)
 
PointSymbolgetMidSymbol () const
 
void setMidSymbol (PointSymbol *symbol)
 
PointSymbolgetEndSymbol () const
 
void setEndSymbol (PointSymbol *symbol)
 
PointSymbolgetDashSymbol () const
 
void setDashSymbol (PointSymbol *symbol)
 
int getMidSymbolsPerSpot () const
 
void setMidSymbolsPerSpot (int value)
 
int getMidSymbolDistance () const
 
void setMidSymbolDistance (int value)
 
MidSymbolPlacement getMidSymbolPlacement () const
 
void setMidSymbolPlacement (MidSymbolPlacement placement)
 
bool getSuppressDashSymbolAtLineEnds () const
 
void setSuppressDashSymbolAtLineEnds (bool value)
 
bool getScaleDashSymbol () const
 
void setScaleDashSymbol (bool value)
 
int getSegmentLength () const
 
void setSegmentLength (int value)
 
int getEndLength () const
 
void setEndLength (int value)
 
bool getShowAtLeastOneSymbol () const
 
void setShowAtLeastOneSymbol (bool value)
 
int getMinimumMidSymbolCount () const
 
void setMinimumMidSymbolCount (int value)
 
int getMinimumMidSymbolCountWhenClosed () const
 
void setMinimumMidSymbolCountWhenClosed (int value)
 
int getDashLength () const
 
void setDashLength (int value)
 
int getBreakLength () const
 
void setBreakLength (int value)
 
int getDashesInGroup () const
 
void setDashesInGroup (int value)
 
int getInGroupBreakLength () const
 
void setInGroupBreakLength (int value)
 
bool getHalfOuterDashes () const
 
void setHalfOuterDashes (bool value)
 
bool hasBorder () const
 
void setHasBorder (bool value)
 
bool areBordersDifferent () const
 
LineSymbolBordergetBorder ()
 
const LineSymbolBordergetBorder () const
 
LineSymbolBordergetRightBorder ()
 
const LineSymbolBordergetRightBorder () const
 
SymbolPropertiesWidgetcreatePropertiesWidget (SymbolSettingDialog *dialog) override
 Creates a properties widget for the symbol. More...
 
- Public Member Functions inherited from OpenOrienteering::Symbol
 Symbol (Type type) noexcept
 
virtual ~Symbol ()
 
Symboloperator= (const Symbol &)=delete
 
Symboloperator= (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 PointSymbolasPoint () const
 Case to PointSymbol with type checking. More...
 
PointSymbolasPoint ()
 Case to PointSymbol with type checking. More...
 
const LineSymbolasLine () const
 Case to LineSymbol with type checking. More...
 
LineSymbolasLine ()
 Case to LineSymbol with type checking. More...
 
const AreaSymbolasArea () const
 Case to AreaSymbol with type checking. More...
 
AreaSymbolasArea ()
 Case to AreaSymbol with type checking. More...
 
const TextSymbolasText () const
 Case to TextSymbol with type checking. More...
 
TextSymbolasText ()
 Case to TextSymbol with type checking. More...
 
const CombinedSymbolasCombined () const
 Case to CombinedSymbol with type checking. More...
 
CombinedSymbolasCombined ()
 Case to CombinedSymbol with type checking. More...
 
virtual TypeCombination getContainedTypes () const
 Returns the combined bitmask of all symbol types this symbol contains. 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 bool loadingFinishedEvent (Map *map)
 Called when loading the map is finished. 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...
 
virtual bool symbolChangedEvent (const Symbol *old_symbol, const Symbol *new_symbol)
 Called when a symbol was changed, replaced, or removed. More...
 
virtual bool containsSymbol (const Symbol *symbol) const
 Returns true if the given symbol is referenced by this symbol. 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 QStringgetName () 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 QStringgetDescription () 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...
 

Static Public Member Functions

static constexpr qreal miterLimit ()
 Returns the limit for miter joins in units of the line width. 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< Symbolload (QXmlStreamReader &xml, const Map &map, SymbolDictionary &symbol_dict, int version)
 Load the symbol in xml format. More...
 
static std::unique_ptr< SymbolmakeSymbolForType (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...
 

Protected Member Functions

 LineSymbol (const LineSymbol &proto)
 
LineSymbolduplicate () 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, int version) override
 Must be overridden to load type-specific symbol properties. More...
 
PointSymbolloadPointSymbol (QXmlStreamReader &xml, const Map &map, SymbolDictionary &symbol_dict, int version)
 
bool equalsImpl (const Symbol *other, Qt::CaseSensitivity case_sensitivity) const override
 Must be overridden to compare specific attributes. More...
 
void createBorderLines (const VirtualPath &path, const SplitPathCoord &start, const SplitPathCoord &end, ObjectRenderables &output) const
 Creates the border lines' renderables for a single path (i.e. More...
 
void shiftCoordinates (const VirtualPath &path, double main_shift, MapCoordVector &out_flags, MapCoordVectorF &out_coords) const
 
void processContinuousLine (const VirtualPath &path, const SplitPathCoord &start, const SplitPathCoord &end, bool set_mid_symbols, MapCoordVector &processed_flags, MapCoordVectorF &processed_coords, ObjectRenderables &output) const
 Creates flags and coords for a continuous line segment, and adds pointed line caps and mid symbol renderables to the output. More...
 
void createPointedLineCap (const VirtualPath &path, const SplitPathCoord &start, const SplitPathCoord &end, bool is_end, ObjectRenderables &output) const
 
void processDashedLine (const VirtualPath &path, const SplitPathCoord &start, const SplitPathCoord &end, bool path_closed, MapCoordVector &out_flags, MapCoordVectorF &out_coords, ObjectRenderables &output) const
 Creates flags and coords for a single dashed path (i.e. More...
 
SplitPathCoord createDashGroups (const VirtualPath &path, bool path_closed, const SplitPathCoord &line_start, const SplitPathCoord &start, const SplitPathCoord &end, bool is_part_start, bool is_part_end, MapCoordVector &out_flags, MapCoordVectorF &out_coords, ObjectRenderables &output) const
 Creates flags and coords for a single dashed path section, and adds pointed line caps and mid symbol renderables to the output. More...
 
void createDashSymbolRenderables (const VirtualPath &path, bool path_closed, ObjectRenderables &output) const
 
void createMidSymbolRenderables (const VirtualPath &path, const SplitPathCoord &start, const SplitPathCoord &end, bool path_closed, ObjectRenderables &output) const
 Adds just the mid symbol renderables for a single solid path (i.e. More...
 
void createStartEndSymbolRenderables (const PathPartVector &path_parts, ObjectRenderables &output) const
 Adds just the start and end symbol renderables to the output. More...
 
void replaceSymbol (PointSymbol *&old_symbol, PointSymbol *replace_with, const QString &name)
 
- Protected Member Functions inherited from OpenOrienteering::Symbol
 Symbol (const Symbol &proto)
 
void setRotatable (bool value)
 Sets the rotatability state of the symbol. More...
 

Protected Attributes

LineSymbolBorder border
 
LineSymbolBorder right_border
 
PointSymbolstart_symbol
 
PointSymbolmid_symbol
 
PointSymbolend_symbol
 
PointSymboldash_symbol
 
const MapColorcolor
 
int line_width
 
int minimum_length
 
int start_offset
 
int end_offset
 
int mid_symbols_per_spot
 
int mid_symbol_distance
 
int minimum_mid_symbol_count
 
int minimum_mid_symbol_count_when_closed
 
int segment_length
 
int end_length
 
int dash_length
 
int break_length
 
int dashes_in_group
 
int in_group_break_length
 
CapStyle cap_style
 
JoinStyle join_style
 
MidSymbolPlacement mid_symbol_placement
 
bool dashed
 
bool half_outer_dashes
 
bool show_at_least_one_symbol
 
bool suppress_dash_symbol_at_ends
 
bool scale_dash_symbol
 
bool have_border_lines
 

Friends

class LineSymbolSettings
 
class PointSymbolEditorWidget
 
class OCAD8FileImport
 

Additional Inherited Members

- Static Public Attributes inherited from OpenOrienteering::Symbol
static constexpr auto number_components = 3u
 Number of components of symbol numbers. More...
 

Detailed Description

Symbol for PathObjects which displays a line along the path.

Member Enumeration Documentation

◆ CapStyle

Enumerator
FlatCap 
RoundCap 
SquareCap 
PointedCap 

◆ JoinStyle

Enumerator
BevelJoin 
MiterJoin 
RoundJoin 

◆ MidSymbolPlacement

Mid symbol placement on dashed lines.

Enumerator
CenterOfDash 

Mid symbols on every dash.

CenterOfDashGroup 

Mid symbols on the center of a dash group.

CenterOfGap 

Mid symbols on the main gap (i.e. not between dashes in a group)

NoMidSymbols 

Constructor & Destructor Documentation

◆ LineSymbol() [1/2]

OpenOrienteering::LineSymbol::LineSymbol ( )
noexcept

Constructs an empty line symbol.

◆ ~LineSymbol()

OpenOrienteering::LineSymbol::~LineSymbol ( )
override

◆ LineSymbol() [2/2]

OpenOrienteering::LineSymbol::LineSymbol ( const LineSymbol proto)
explicitprotected

Member Function Documentation

◆ areBordersDifferent()

bool OpenOrienteering::LineSymbol::areBordersDifferent ( ) const
inline

◆ calculateLargestLineExtent()

qreal OpenOrienteering::LineSymbol::calculateLargestLineExtent ( ) const
overridevirtual

Returns the largest extent (half width) of the components of this line.

Reimplemented from OpenOrienteering::Symbol.

◆ cleanupPointSymbols()

void OpenOrienteering::LineSymbol::cleanupPointSymbols ( )

Deletes unused point symbols and sets them to nullptr again.

See ensurePointSymbols().

◆ colorDeletedEvent()

void OpenOrienteering::LineSymbol::colorDeletedEvent ( const MapColor color)
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.

◆ containsColor()

bool OpenOrienteering::LineSymbol::containsColor ( const MapColor color) const
overridevirtual

Returns if the given color is used by this symbol.

Implements OpenOrienteering::Symbol.

◆ createBorderLines()

void OpenOrienteering::LineSymbol::createBorderLines ( const VirtualPath path,
const SplitPathCoord start,
const SplitPathCoord end,
ObjectRenderables output 
) const
protected

Creates the border lines' renderables for a single path (i.e.

a single part).

For the single path part represented by VirtualPath, this function takes care of all renderables for the border lines being added to the output.

◆ createDashGroups()

SplitPathCoord OpenOrienteering::LineSymbol::createDashGroups ( const VirtualPath path,
bool  path_closed,
const SplitPathCoord line_start,
const SplitPathCoord start,
const SplitPathCoord end,
bool  is_part_start,
bool  is_part_end,
MapCoordVector out_flags,
MapCoordVectorF out_coords,
ObjectRenderables output 
) const
protected

Creates flags and coords for a single dashed path section, and adds pointed line caps and mid symbol renderables to the output.

This is the main function determining the layout of dash patterns. A path section is delimited by the part start, the part end, and/or by dash points.

Note that this function does not create LineRenderables.

See also
LineSymbol::createMidSymbolRenderables

◆ createDashSymbolRenderables()

void OpenOrienteering::LineSymbol::createDashSymbolRenderables ( const VirtualPath path,
bool  path_closed,
ObjectRenderables output 
) const
protected

◆ createMidSymbolRenderables()

void OpenOrienteering::LineSymbol::createMidSymbolRenderables ( const VirtualPath path,
const SplitPathCoord start,
const SplitPathCoord end,
bool  path_closed,
ObjectRenderables output 
) const
protected

Adds just the mid symbol renderables for a single solid path (i.e.

a single part) to the output.

This is the main function determining the layout of mid symbols when the path is solid, not dashed.

Note that this function does not create LineRenderables.

See also
LineSymbol::createDashGroups

◆ createPointedLineCap()

void OpenOrienteering::LineSymbol::createPointedLineCap ( const VirtualPath path,
const SplitPathCoord start,
const SplitPathCoord end,
bool  is_end,
ObjectRenderables output 
) const
protected

◆ createPropertiesWidget()

SymbolPropertiesWidget * OpenOrienteering::LineSymbol::createPropertiesWidget ( SymbolSettingDialog dialog)
overridevirtual

Creates a properties widget for the symbol.

Implements OpenOrienteering::Symbol.

◆ createRenderables() [1/2]

void OpenOrienteering::LineSymbol::createRenderables ( const Object object,
const VirtualCoordVector coords,
ObjectRenderables output,
Symbol::RenderableOptions  options 
) const
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.

◆ createRenderables() [2/2]

void OpenOrienteering::LineSymbol::createRenderables ( const PathObject object,
const PathPartVector path_parts,
ObjectRenderables output,
Symbol::RenderableOptions  options 
) const
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.

See also
createRenderables()

Reimplemented from OpenOrienteering::Symbol.

◆ createSinglePathRenderables()

void OpenOrienteering::LineSymbol::createSinglePathRenderables ( const VirtualPath path,
bool  path_closed,
ObjectRenderables output 
) const

Creates the renderables for a single path (i.e.

a single part).

For the single path part represented by VirtualPath, this function takes care of all renderables for the main line, borders, mid symbol and dash symbol being added to the output. It does not deal with start symbols and end symbols.

◆ createStartEndSymbolRenderables()

void OpenOrienteering::LineSymbol::createStartEndSymbolRenderables ( const PathPartVector path_parts,
ObjectRenderables output 
) const
protected

Adds just the start and end symbol renderables to the output.

The start symbol is placed at the start of the first part, and the end symbols is placed at the end of the last part.

◆ dimensionForIcon()

qreal OpenOrienteering::LineSymbol::dimensionForIcon ( ) const
overridevirtual

Returns the dimension which shall considered when scaling the icon.

Reimplemented from OpenOrienteering::Symbol.

◆ duplicate()

LineSymbol * OpenOrienteering::LineSymbol::duplicate ( ) const
overrideprotectedvirtual

◆ endOffset()

int OpenOrienteering::LineSymbol::endOffset ( ) const
inline

◆ ensurePointSymbols()

void OpenOrienteering::LineSymbol::ensurePointSymbols ( const QString start_name,
const QString mid_name,
const QString end_name,
const QString dash_name 
)

Creates empty point symbols with the given names for undefined subsymbols.

After calling this method, all subsymbols are defined, i.e. not nullptr. Call cleanupPointSymbols() later to remove the empty symbols.

◆ equalsImpl()

bool OpenOrienteering::LineSymbol::equalsImpl ( const Symbol other,
Qt::CaseSensitivity  case_sensitivity 
) const
overrideprotectedvirtual

Must be overridden to compare specific attributes.

Implements OpenOrienteering::Symbol.

◆ getBorder() [1/2]

LineSymbolBorder& OpenOrienteering::LineSymbol::getBorder ( )
inline

◆ getBorder() [2/2]

const LineSymbolBorder& OpenOrienteering::LineSymbol::getBorder ( ) const
inline

◆ getBreakLength()

int OpenOrienteering::LineSymbol::getBreakLength ( ) const
inline

◆ getCapStyle()

CapStyle OpenOrienteering::LineSymbol::getCapStyle ( ) const
inline

◆ getColor()

const MapColor* OpenOrienteering::LineSymbol::getColor ( ) const
inline

◆ getDashesInGroup()

int OpenOrienteering::LineSymbol::getDashesInGroup ( ) const
inline

◆ getDashLength()

int OpenOrienteering::LineSymbol::getDashLength ( ) const
inline

◆ getDashSymbol()

PointSymbol* OpenOrienteering::LineSymbol::getDashSymbol ( ) const
inline

◆ getEndLength()

int OpenOrienteering::LineSymbol::getEndLength ( ) const
inline

◆ getEndSymbol()

PointSymbol* OpenOrienteering::LineSymbol::getEndSymbol ( ) const
inline

◆ getHalfOuterDashes()

bool OpenOrienteering::LineSymbol::getHalfOuterDashes ( ) const
inline

◆ getInGroupBreakLength()

int OpenOrienteering::LineSymbol::getInGroupBreakLength ( ) const
inline

◆ getJoinStyle()

JoinStyle OpenOrienteering::LineSymbol::getJoinStyle ( ) const
inline

◆ getLineWidth()

int OpenOrienteering::LineSymbol::getLineWidth ( ) const
inline

◆ getMidSymbol()

PointSymbol* OpenOrienteering::LineSymbol::getMidSymbol ( ) const
inline

◆ getMidSymbolDistance()

int OpenOrienteering::LineSymbol::getMidSymbolDistance ( ) const
inline

◆ getMidSymbolPlacement()

MidSymbolPlacement OpenOrienteering::LineSymbol::getMidSymbolPlacement ( ) const
inline

◆ getMidSymbolsPerSpot()

int OpenOrienteering::LineSymbol::getMidSymbolsPerSpot ( ) const
inline

◆ getMinimumLength()

int OpenOrienteering::LineSymbol::getMinimumLength ( ) const
inline

◆ getMinimumMidSymbolCount()

int OpenOrienteering::LineSymbol::getMinimumMidSymbolCount ( ) const
inline

◆ getMinimumMidSymbolCountWhenClosed()

int OpenOrienteering::LineSymbol::getMinimumMidSymbolCountWhenClosed ( ) const
inline

◆ getRightBorder() [1/2]

LineSymbolBorder& OpenOrienteering::LineSymbol::getRightBorder ( )
inline

◆ getRightBorder() [2/2]

const LineSymbolBorder& OpenOrienteering::LineSymbol::getRightBorder ( ) const
inline

◆ getScaleDashSymbol()

bool OpenOrienteering::LineSymbol::getScaleDashSymbol ( ) const
inline

◆ getSegmentLength()

int OpenOrienteering::LineSymbol::getSegmentLength ( ) const
inline

◆ getShowAtLeastOneSymbol()

bool OpenOrienteering::LineSymbol::getShowAtLeastOneSymbol ( ) const
inline

◆ getStartSymbol()

PointSymbol* OpenOrienteering::LineSymbol::getStartSymbol ( ) const
inline

◆ getSuppressDashSymbolAtLineEnds()

bool OpenOrienteering::LineSymbol::getSuppressDashSymbolAtLineEnds ( ) const
inline

◆ guessDominantColor()

const MapColor * OpenOrienteering::LineSymbol::guessDominantColor ( ) const
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.

◆ hasBorder()

bool OpenOrienteering::LineSymbol::hasBorder ( ) const
inline

◆ isDashed()

bool OpenOrienteering::LineSymbol::isDashed ( ) const
inline

◆ loadImpl()

bool OpenOrienteering::LineSymbol::loadImpl ( QXmlStreamReader xml,
const Map map,
SymbolDictionary symbol_dict,
int  version 
)
overrideprotectedvirtual

Must be overridden to load type-specific symbol properties.

See also
saveImpl()

Returns false if the current xml tag does not belong to the symbol and should be skipped, true if the element has been read completely.

Implements OpenOrienteering::Symbol.

◆ loadPointSymbol()

PointSymbol * OpenOrienteering::LineSymbol::loadPointSymbol ( QXmlStreamReader xml,
const Map map,
SymbolDictionary symbol_dict,
int  version 
)
protected

◆ miterLimit()

static constexpr qreal OpenOrienteering::LineSymbol::miterLimit ( )
inlinestatic

Returns the limit for miter joins in units of the line width.

See the Qt docs for QPainter::setMiterJoin(). TODO: Should that better be a line property? FIXME: shall be 0 for border lines.

◆ processContinuousLine()

void OpenOrienteering::LineSymbol::processContinuousLine ( const VirtualPath path,
const SplitPathCoord start,
const SplitPathCoord end,
bool  set_mid_symbols,
MapCoordVector processed_flags,
MapCoordVectorF processed_coords,
ObjectRenderables output 
) const
protected

Creates flags and coords for a continuous line segment, and adds pointed line caps and mid symbol renderables to the output.

Note that this function does not create LineRenderables.

◆ processDashedLine()

void OpenOrienteering::LineSymbol::processDashedLine ( const VirtualPath path,
const SplitPathCoord start,
const SplitPathCoord end,
bool  path_closed,
MapCoordVector out_flags,
MapCoordVectorF out_coords,
ObjectRenderables output 
) const
protected

Creates flags and coords for a single dashed path (i.e.

a single part) which may consist of multiple sections separated by dash points, and adds pointed line caps and mid symbol renderables to the output.

Note that this function does not create LineRenderables.

◆ replaceColors()

void OpenOrienteering::LineSymbol::replaceColors ( const MapColorMap color_map)
overridevirtual

Replaces colors used by this symbol.

Implements OpenOrienteering::Symbol.

◆ replaceSymbol()

void OpenOrienteering::LineSymbol::replaceSymbol ( PointSymbol *&  old_symbol,
PointSymbol replace_with,
const QString name 
)
protected

◆ saveImpl()

void OpenOrienteering::LineSymbol::saveImpl ( QXmlStreamWriter xml,
const Map map 
) const
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.

Todo:
Remove "pointed_cap_length" in Mapper 1.0

Implements OpenOrienteering::Symbol.

◆ scale()

void OpenOrienteering::LineSymbol::scale ( double  factor)
overridevirtual

Scales the symbol.

Implements OpenOrienteering::Symbol.

◆ setBreakLength()

void OpenOrienteering::LineSymbol::setBreakLength ( int  value)
inline

◆ setCapStyle()

void OpenOrienteering::LineSymbol::setCapStyle ( CapStyle  style)
inline

◆ setColor()

void OpenOrienteering::LineSymbol::setColor ( const MapColor color)
inline

◆ setDashed()

void OpenOrienteering::LineSymbol::setDashed ( bool  value)
inline

◆ setDashesInGroup()

void OpenOrienteering::LineSymbol::setDashesInGroup ( int  value)
inline

◆ setDashLength()

void OpenOrienteering::LineSymbol::setDashLength ( int  value)
inline

◆ setDashSymbol()

void OpenOrienteering::LineSymbol::setDashSymbol ( PointSymbol symbol)

◆ setEndLength()

void OpenOrienteering::LineSymbol::setEndLength ( int  value)
inline

◆ setEndOffset()

void OpenOrienteering::LineSymbol::setEndOffset ( int  value)
inline

◆ setEndSymbol()

void OpenOrienteering::LineSymbol::setEndSymbol ( PointSymbol symbol)

◆ setHalfOuterDashes()

void OpenOrienteering::LineSymbol::setHalfOuterDashes ( bool  value)
inline

◆ setHasBorder()

void OpenOrienteering::LineSymbol::setHasBorder ( bool  value)
inline

◆ setInGroupBreakLength()

void OpenOrienteering::LineSymbol::setInGroupBreakLength ( int  value)
inline

◆ setJoinStyle()

void OpenOrienteering::LineSymbol::setJoinStyle ( JoinStyle  style)
inline

◆ setLineWidth()

void OpenOrienteering::LineSymbol::setLineWidth ( double  width)
inline

◆ setMidSymbol()

void OpenOrienteering::LineSymbol::setMidSymbol ( PointSymbol symbol)

◆ setMidSymbolDistance()

void OpenOrienteering::LineSymbol::setMidSymbolDistance ( int  value)
inline

◆ setMidSymbolPlacement()

void OpenOrienteering::LineSymbol::setMidSymbolPlacement ( LineSymbol::MidSymbolPlacement  placement)

◆ setMidSymbolsPerSpot()

void OpenOrienteering::LineSymbol::setMidSymbolsPerSpot ( int  value)
inline

◆ setMinimumLength()

void OpenOrienteering::LineSymbol::setMinimumLength ( int  length)
inline

◆ setMinimumMidSymbolCount()

void OpenOrienteering::LineSymbol::setMinimumMidSymbolCount ( int  value)
inline

◆ setMinimumMidSymbolCountWhenClosed()

void OpenOrienteering::LineSymbol::setMinimumMidSymbolCountWhenClosed ( int  value)
inline

◆ setScaleDashSymbol()

void OpenOrienteering::LineSymbol::setScaleDashSymbol ( bool  value)
inline

◆ setSegmentLength()

void OpenOrienteering::LineSymbol::setSegmentLength ( int  value)
inline

◆ setShowAtLeastOneSymbol()

void OpenOrienteering::LineSymbol::setShowAtLeastOneSymbol ( bool  value)
inline

◆ setStartOffset()

void OpenOrienteering::LineSymbol::setStartOffset ( int  value)
inline

◆ setStartSymbol()

void OpenOrienteering::LineSymbol::setStartSymbol ( PointSymbol symbol)

◆ setSuppressDashSymbolAtLineEnds()

void OpenOrienteering::LineSymbol::setSuppressDashSymbolAtLineEnds ( bool  value)
inline

◆ shiftCoordinates()

void OpenOrienteering::LineSymbol::shiftCoordinates ( const VirtualPath path,
double  main_shift,
MapCoordVector out_flags,
MapCoordVectorF out_coords 
) const
protected

◆ startOffset()

int OpenOrienteering::LineSymbol::startOffset ( ) const
inline

◆ validate()

bool OpenOrienteering::LineSymbol::validate ( ) const
overridevirtual

Reimplemented from OpenOrienteering::Symbol.

Friends And Related Function Documentation

◆ LineSymbolSettings

friend class LineSymbolSettings
friend

◆ OCAD8FileImport

friend class OCAD8FileImport
friend

◆ PointSymbolEditorWidget

friend class PointSymbolEditorWidget
friend

Member Data Documentation

◆ border

LineSymbolBorder OpenOrienteering::LineSymbol::border
protected

◆ break_length

int OpenOrienteering::LineSymbol::break_length
protected

◆ cap_style

CapStyle OpenOrienteering::LineSymbol::cap_style
protected

◆ color

const MapColor* OpenOrienteering::LineSymbol::color
protected

◆ dash_length

int OpenOrienteering::LineSymbol::dash_length
protected

◆ dash_symbol

PointSymbol* OpenOrienteering::LineSymbol::dash_symbol
protected

◆ dashed

bool OpenOrienteering::LineSymbol::dashed
protected

◆ dashes_in_group

int OpenOrienteering::LineSymbol::dashes_in_group
protected

◆ end_length

int OpenOrienteering::LineSymbol::end_length
protected

◆ end_offset

int OpenOrienteering::LineSymbol::end_offset
protected

◆ end_symbol

PointSymbol* OpenOrienteering::LineSymbol::end_symbol
protected

◆ half_outer_dashes

bool OpenOrienteering::LineSymbol::half_outer_dashes
protected

◆ have_border_lines

bool OpenOrienteering::LineSymbol::have_border_lines
protected

◆ in_group_break_length

int OpenOrienteering::LineSymbol::in_group_break_length
protected

◆ join_style

JoinStyle OpenOrienteering::LineSymbol::join_style
protected

◆ line_width

int OpenOrienteering::LineSymbol::line_width
protected

◆ mid_symbol

PointSymbol* OpenOrienteering::LineSymbol::mid_symbol
protected

◆ mid_symbol_distance

int OpenOrienteering::LineSymbol::mid_symbol_distance
protected

◆ mid_symbol_placement

MidSymbolPlacement OpenOrienteering::LineSymbol::mid_symbol_placement
protected

◆ mid_symbols_per_spot

int OpenOrienteering::LineSymbol::mid_symbols_per_spot
protected

◆ minimum_length

int OpenOrienteering::LineSymbol::minimum_length
protected

◆ minimum_mid_symbol_count

int OpenOrienteering::LineSymbol::minimum_mid_symbol_count
protected

◆ minimum_mid_symbol_count_when_closed

int OpenOrienteering::LineSymbol::minimum_mid_symbol_count_when_closed
protected

◆ right_border

LineSymbolBorder OpenOrienteering::LineSymbol::right_border
protected

◆ scale_dash_symbol

bool OpenOrienteering::LineSymbol::scale_dash_symbol
protected

◆ segment_length

int OpenOrienteering::LineSymbol::segment_length
protected

◆ show_at_least_one_symbol

bool OpenOrienteering::LineSymbol::show_at_least_one_symbol
protected

◆ start_offset

int OpenOrienteering::LineSymbol::start_offset
protected

◆ start_symbol

PointSymbol* OpenOrienteering::LineSymbol::start_symbol
protected

◆ suppress_dash_symbol_at_ends

bool OpenOrienteering::LineSymbol::suppress_dash_symbol_at_ends
protected

The documentation for this class was generated from the following files: