Style

Since: BlackBerry 10.2.0

#include <bb/platform/geo/Style>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

Visual information that can be applied to a Geographic.

A Style is a collection of information determining how a Geographic is visually displayed.

A Geographic's style is separated from its data in an analogous way to how an HTML document's visual characteristics are captured in a separate Cascading Style Sheet document. As such, Styles can be inherited, they can be applied directly to an element through its ID, they can be applied to several elements through a style family or they can be applied to several elements through the element's class.

See the class-level documentation for StyleSheet for how a style is resolved at render time.

Colors in Style are defined through ARGB8888 integers. See bb::cascades::Color for how to generate color integers.


Overview

Public Functions Index

Style ()
Style (EdgeSize::Type edgeSize, EdgeStyle::Type edgeStyle, int edgeColor, int fillColor)
Style (const Style &src)
~Style ()
unsigned intedgeColor () const
EdgeSize::TypeedgeSize () const
EdgeStyle::TypeedgeStyle () const
unsigned intfillColor () const
boolisComplete () const
boolisEdgeColorInherited () const
boolisEmpty () const
boolisFillColorInherited () const
booloperator!= (const Style &rhs) const
Style &operator= (const Style &src)
booloperator== (const Style &rhs) const
voidsetEdgeColor (unsigned int newEdgeColor)
voidsetEdgeColorInherited (bool inherited)
voidsetEdgeSize (EdgeSize::Type newSize)
voidsetEdgeStyle (EdgeStyle::Type newStyle)
voidsetFillColor (unsigned int newFillColor)
voidsetFillColorInherited (bool inherited)
voidsubimpose (const Style &other)
voidsuperimpose (const Style &other)

Static Public Functions Index

Public Functions

Style ()

Creates an empty Style instance.

See also:

isEmpty()

,

isComplete()

Since:

BlackBerry 10.2.0

Style (

Creates a completed Style instance.

Parameters
edgeSize

The style's edge size.

edgeStyle

The style's edge style.

edgeColor

The style's edge color.

fillColor

The style's fill color.

See also:

isComplete()

Since:

BlackBerry 10.2.0

Style (

Copy constructor.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.2.0

~Style ()

Destructor.

Since:

BlackBerry 10.2.0

unsigned int edgeColor ()

Retrieves the style's edge color.

Note:

If isEdgeColorInherited is true, this value is undefined.

Return:

The style's edge color.

Since:

BlackBerry 10.2.0

EdgeSize::Type edgeSize ()

Retrieves the style's edge size.

Return:

The style's edge size.

Since:

BlackBerry 10.2.0

EdgeStyle::Type edgeStyle ()

Retrieves the style's edge style.

Return:

The style's edge style.

Since:

BlackBerry 10.2.0

unsigned int fillColor ()

Retrieves the style's fill color.

Note:

If isFillColorInherited is true, this value is undefined.

Return:

The style's fill color.

Since:

BlackBerry 10.2.0

bool isComplete ()

Determines if this style has all of its properties set.

Return:

true if all properties have been set, false if at least one attribute is set to "inherit".

Since:

BlackBerry 10.2.0

bool isEdgeColorInherited ()

Determines if this style's edgeColor() attribute should be used, or if its value should be inherited from other styles.

Return:

true if the edge color attribute within this instance is ignored because it is inherited from other styles, false otherwise.

Since:

BlackBerry 10.2.0

bool isEmpty ()

Determines if this style has all of its properties set to "inherit".

Return:

true if this Style has no properties set, false otherwise.

Since:

BlackBerry 10.2.0

bool isFillColorInherited ()

Determines if this style's fillColor() attribute should be used, or if its value should be inherited from other styles.

Return:

true if the fill color attribute within this instance is ignored because it is inherited from other styles, false otherwise.

Since:

BlackBerry 10.2.0

bool operator!= (

Inequality operator.

Return:

true if any property is different.

Since:

BlackBerry 10.2.0

Style & operator= (

Assignment operator.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.2.0

bool operator== (

Equality operator.

Return:

true if all properties are equal.

Since:

BlackBerry 10.2.0

void setEdgeColor (
  • unsigned intnewEdgeColor)

Sets the style's edge color.

See the class-level documentation for how colors are defined.

Note:

Setting this attribute will also set setEdgeColorInherited to false.

Parameters
newEdgeColor

The new edge color.

Since:

BlackBerry 10.2.0

void setEdgeColorInherited (
  • boolinherited)

Sets this style's edge color attribute to be inherited.

Parameters
inherited

true if the edge color is inherited, or false if the edge color is explicitly set.

Since:

BlackBerry 10.2.0

void setEdgeSize (

Sets the style's edge size.

Parameters
newSize

The new edge size.

Since:

BlackBerry 10.2.0

void setEdgeStyle (

Sets the style's edge style.

Parameters
newStyle

The new edge style.

Since:

BlackBerry 10.2.0

void setFillColor (
  • unsigned intnewFillColor)

Sets the style's fill color.

See the class-level documentation for how colors are defined.

Note:

Setting this attribute will also set setEdgeColorInherited to false.

Parameters
newFillColor

The new fill color.

Since:

BlackBerry 10.2.0

void setFillColorInherited (
  • boolinherited)

Sets this style's fill color attribute to be inherited.

Parameters
inherited

true if the fill color is inherited, or false if the fill color is explicitly set.

Since:

BlackBerry 10.2.0

void subimpose (

Subimpose the parameter's attributes under this style's attributes.

This operation modifies this instance such that all inherited attributes in this class are replaced with the attributes from the parameter. If this instance's attribute is not set to inherit, then it is unmodified.

Parameters
other

The instance of Style to subimpose on this instance.

void superimpose (

Superimpose the parameter's attributes over this style's attributes.

This operation modifies this instance such that all explicitly stated attributes in the parameter override the local attributes. If the parameter's attribute is set to "inherit", then this class's attribute is unmodified.

Parameters
other

The instance of Style to superimpose on this instance.

Static Public Functions

Style systemDefault ()

Creates a Style using the system default values for the edge and fill attributes.

Return:

A Style showing the system defaults.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus