# Hurricane Design Viewer

Public Member Functions | Static Public Member Functions | List of all members
Hurricane::DisplayStyle Class Reference

A complete set of DrawinStyles to uses with the CellWidget. More...

## Public Member Functions
| DisplayStyle (const Name &name)
| ~DisplayStyle ()
const Name & | getName () const
const std::string & | getDescription () const
const HSVr & | getDarkening () const
const Name & | getGroup (const Name &key) const
const std::string & | getPattern (const Name &key) const
QColor | getColor (const Name &key, const HSVr &) const
QPen | getPen (const Name &key, const HSVr &) const
QBrush | getBrush (const Name &key, const HSVr &) const
float | getThreshold (const Name &key) const
const std::vector< DrawingGroup * > & | getDrawingGroups () const
DrawingStyle | find (const Name &key) const
void | qtAllocate ()
void | setDescription (const std::string &description)
void | inheritFrom (const DisplayStyle *base)
void | setDarkening (const HSVr &)
void | addDrawingStyle (const Name &groupKey, const Name &key, const std::string &pattern, int red, int green, int blue, int borderWidth, float threshold, bool goMatched=true)

## Static Public Member Functions
static QColor | darken (const QColor &color, const DisplayStyle::HSVr &darkening)

## Detailed Description

A complete set of DrawinStyles to uses with the CellWidget.

For a synthetic explanation, have a look to :

Except in configuration parsers that have to builds them DisplayStyles shoudn't be manipulated directly but used through the Graphics methods.

## Constructor & Destructor Documentation

## ◆ DisplayStyle()

Hurricane::DisplayStyle::DisplayStyle | ( | const Name & | name | ) |

Construct a DisplayStyle named name. The DisplayStyle is populated with a minimal sets of DrawingStyles which allows it to be used straight (in CellWidget) but to the cost of very ugly rendering.

## ◆ ~DisplayStyle()

Hurricane::DisplayStyle::~DisplayStyle | ( |  | ) |

The standart destructor.

## Member Function Documentation

## ◆ darken()

QColor Hurricane::DisplayStyle::darken | ( | const QColor & | color,
|  | const DisplayStyle::HSVr & | darkening
| ) |  |
| static

Returns: The color with the darkening factor `darkening` applied.

## ◆ getName()

const Name & Hurricane::DisplayStyle::getName | ( |  | ) | const
| inline

Returns: The name of this DisplayStyle.

## ◆ getDescription()

const std::string & Hurricane::DisplayStyle::getDescription | ( |  | ) | const
| inline

Returns: The long description of this DisplayStyle.

## ◆ getDarkening()

const DisplayStyle::HSVr & Hurricane::DisplayStyle::getDarkening | ( |  | ) | const
| inline

Returns: The darkening factor.

## ◆ getGroup()

const Name & Hurricane::DisplayStyle::getGroup | ( | const Name & | key | ) | const

Returns: The group owning the DrawingStyle of which key is key.

## ◆ getPattern()

const string & Hurricane::DisplayStyle::getPattern | ( | const Name & | key | ) | const

Returns: The pattern associated to the DrawingStyle key.

## ◆ getColor()

const QColor & Hurricane::DisplayStyle::getColor | ( | const Name & | key,
|  | const HSVr & | darkening
| ) |  | const

Returns: The QColor associated to the DrawingStyle key darkened by a factor darkening.

## ◆ getPen()

const QPen & Hurricane::DisplayStyle::getPen | ( | const Name & | key,
|  | const HSVr & | darkening
| ) |  | const

Returns: The QPen associated to the DrawingStyle key darkened by a factor darkening.

## ◆ getBrush()

const QBrush & Hurricane::DisplayStyle::getBrush | ( | const Name & | key,
|  | const HSVr & | darkening
| ) |  | const

Returns: The QBrush associated to the DrawingStyle key darkened by a factor darkening.

## ◆ getThreshold()

const float Hurricane::DisplayStyle::getThreshold | ( | const Name & | key | ) | const

Returns: The display threshold associated to the DrawingStyle key.

## ◆ getDrawingGroups()

const vector< DrawingGroup * > & Hurricane::DisplayStyle::getDrawingGroups | ( |  | ) | const
| inline

Returns: The vector of groups.

## ◆ find()

DrawingStyle * Hurricane::DisplayStyle::find | ( | const Name & | key | ) | const

Returns: The DrawingStyle associated with key key. If no DrawingStyle matches key, the default DrawingStyle is returned.

## ◆ qtAllocate()

void Hurricane::DisplayStyle::qtAllocate | ( |  | ) |

Triggers the allocation of Qt pens & brushes. Should not be used directly but only through Graphics::enable().

## ◆ setDescription()

void Hurricane::DisplayStyle::setDescription | ( | const std::string & | description | ) |
| inline

Sets the Display style informative text.

## ◆ inheritFrom()

void Hurricane::DisplayStyle::inheritFrom | ( | const DisplayStyle * | base | ) |

Clone the base DisplayStyle into the current one. Any previous settings are eraseds. The base style is duplicated into this one. Further modification of base after this point will have no effect on the current style.

## ◆ setDarkening()

void Hurricane::DisplayStyle::setDarkening | ( | const HSVr & |  | ) |

Sets the darkening factor.

## ◆ addDrawingStyle()

void Hurricane::DisplayStyle::addDrawingStyle | ( | const Name & | groupKey,
|  | const Name & | key,
|  | const std::string & | pattern,
|  | int | red,
|  | int | green,
|  | int | blue,
|  | int | borderWidth,
|  | float | threshold,
|  | bool | goMatched = `true`
| ) |  |

Parameters

  groupKey | in which group to insert this DrawinStyle.
  key | the DrawingStyle's name.
  pattern | the stipple pattern (for the brush).
  red | the red color component (for Brush & Pen).
  green | the green color component (for Brush & Pen).
  blue | the blue color component (for Brush & Pen).
  borderWidth | the width of the drawing (for Pen).
  threshold | the display threshold.
  goMatched | tells if this style is used to draw a Go.

Adds a new DrawingStyle. If any previous DrawingStyle of the same name was existing it is erased.

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

- DisplayStyle.h
- DisplayStyle.dox

Generated by doxygen 1.8.14 on Sun Mar 8 2020 | Return to top of page

Hurricane Design Viewer | Copyright © 2008-2016 UPMC All rights reserved