• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

marble/src

GeoDataColorStyle Class Reference

#include <GeoDataColorStyle.h>

Inheritance diagram for GeoDataColorStyle:

Inheritance graph
[legend]

List of all members.


Detailed Description

an abstract base class for various style classes

A GeoDataColorStyle is an abstract class that is the base class for a number of different style classes. It provides settings for specifying the color and color mode of the extended style classes. A GeoDataColorStyle should never be instantiated directly.

The color contains RGBA, (Red, Green, Blue, Alpha). Color and opacity (alpha) values have a range of 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. For example, if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following: 7fff0000, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

The color mode can either be normal (no effect) or random. A value of random applies a random linear scale to the base color as follows.

To achieve a truly random selection of colors, specify a base color of white (ffffffff). If you specify a single color component (for example, a value of ff0000ff for red), random color values for that one component (red) will be selected. In this case, the values would range from 00 (black) to ff (full red). If you specify values for two or for all three color components, a random linear scale is applied to each color component, with results ranging from black to the maximum values specified for each component. The opacity of a color comes from the alpha component of color and is never randomized.

See also:
GeoDataIconStyle

GeoDataLabelStyle

Definition at line 56 of file GeoDataColorStyle.h.


Public Types

enum  ColorMode { Normal, Random }

Public Member Functions

void setColor (const QColor &value)
QColor color () const
void setColorMode (const ColorMode &colorMode)
ColorMode colorMode () const
virtual void pack (QDataStream &stream) const
virtual void unpack (QDataStream &stream)

Protected Member Functions

 GeoDataColorStyle ()

Protected Attributes

QColor m_color
ColorMode m_colorMode

Member Enumeration Documentation

enum GeoDataColorStyle::ColorMode

The color mode.

Enumerator:
Normal 
Random 

Definition at line 68 of file GeoDataColorStyle.h.


Constructor & Destructor Documentation

GeoDataColorStyle::GeoDataColorStyle (  )  [protected]

Definition at line 14 of file GeoDataColorStyle.cpp.


Member Function Documentation

void GeoDataColorStyle::setColor ( const QColor &  value  ) 

Set a new color.

Parameters:
value the new color value

Definition at line 20 of file GeoDataColorStyle.cpp.

QColor GeoDataColorStyle::color (  )  const

Return the color component.

Definition at line 25 of file GeoDataColorStyle.cpp.

void GeoDataColorStyle::setColorMode ( const ColorMode &  colorMode  ) 

Set a new color mode.

Parameters:
colorMode the new color mode value

Definition at line 30 of file GeoDataColorStyle.cpp.

GeoDataColorStyle::ColorMode GeoDataColorStyle::colorMode (  )  const

Return the color mode.

Definition at line 35 of file GeoDataColorStyle.cpp.

void GeoDataColorStyle::pack ( QDataStream &  stream  )  const [virtual]

Serialize the style to a stream.

Parameters:
stream the stream

Reimplemented from GeoDataObject.

Reimplemented in GeoDataIconStyle, and GeoDataLabelStyle.

Definition at line 40 of file GeoDataColorStyle.cpp.

void GeoDataColorStyle::unpack ( QDataStream &  stream  )  [virtual]

Unserialize the style from a stream.

Parameters:
stream the stream

Reimplemented from GeoDataObject.

Reimplemented in GeoDataIconStyle, and GeoDataLabelStyle.

Definition at line 49 of file GeoDataColorStyle.cpp.


Member Data Documentation

QColor GeoDataColorStyle::m_color [protected]

stores the current color

Definition at line 94 of file GeoDataColorStyle.h.

ColorMode GeoDataColorStyle::m_colorMode [protected]

stores the current color mode

Definition at line 96 of file GeoDataColorStyle.h.


The documentation for this class was generated from the following files:
  • GeoDataColorStyle.h
  • GeoDataColorStyle.cpp

marble/src

Skip menu "marble/src"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal