Hurricane Design Viewer


Hurricane::DisplayStyle Class Reference

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

Public Member Functions

 DisplayStyle (const Name &name)
 ~DisplayStyle ()
const NamegetName () const
const std::string & getDescription () const
const HSVr & getDarkening () const
const NamegetGroup (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.

Referenced by inheritFrom().

◆ ~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 std::string & Hurricane::DisplayStyle::getPattern ( const Name & key) const

Returns: The pattern associated to the DrawingStyle key.

◆ getColor()

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()

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()

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()

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

Returns: The display threshold associated to the DrawingStyle key.

◆ getDrawingGroups()

const std::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.

References DisplayStyle().

◆ 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
groupKeyin which group to insert this DrawinStyle.
keythe DrawingStyle's name.
patternthe stipple pattern (for the brush).
redthe red color component (for Brush & Pen).
greenthe green color component (for Brush & Pen).
bluethe blue color component (for Brush & Pen).
borderWidththe width of the drawing (for Pen).
thresholdthe display threshold.
goMatchedtells 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:


Generated by doxygen 1.16.1 on Return to top of page
Hurricane Design Viewer Copyright © 2008-2020 Sorbonne Universite All rights reserved