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) |
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.
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.
Hurricane::DisplayStyle::~DisplayStyle | ( | ) |
The standart destructor.
|
static |
Returns: The color with the darkening factor darkening
applied.
|
inline |
Returns: The name of this DisplayStyle.
|
inline |
Returns: The long description of this DisplayStyle.
|
inline |
Returns: The darkening factor.
Returns: The group owning the DrawingStyle of which key is key.
const string & Hurricane::DisplayStyle::getPattern | ( | const Name & | key | ) | const |
Returns: The pattern associated to the DrawingStyle key.
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.
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.
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.
const float Hurricane::DisplayStyle::getThreshold | ( | const Name & | key | ) | const |
Returns: The display threshold associated to the DrawingStyle key.
|
inline |
Returns: The vector of groups.
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.
void Hurricane::DisplayStyle::qtAllocate | ( | ) |
Triggers the allocation of Qt pens & brushes. Should not be used directly but only through Graphics::enable().
|
inline |
Sets the Display style informative text.
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.
void Hurricane::DisplayStyle::setDarkening | ( | const HSVr & | ) |
Sets the darkening factor.
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 |
||
) |
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.
Generated by doxygen 1.9.1 on Thu Aug 11 2022 | Return to top of page |
Hurricane Design Viewer | Copyright © 2008-2020 Sorbonne Universite All rights reserved |