Manage basic graphical configuration (API)
More...
Manage basic graphical configuration (API)
The Graphics class is a singleton which provides a simplificated access to graphical resources from Qt and manages graphics styles used to draw all the objects from the CellWidget.
◆ getGraphics()
Graphics * Hurricane::Graphics::getGraphics |
( |
| ) |
|
|
static |
◆ isEnabled()
bool Hurricane::Graphics::isEnabled |
( |
| ) |
|
|
static |
Returns: true if Qt has been activated.
◆ getFixedFont()
const QFont Hurricane::Graphics::getFixedFont |
( |
int |
weight = QFont::Normal , |
|
|
bool |
italic = false , |
|
|
bool |
underline = false , |
|
|
int |
scale = 0 |
|
) |
| |
|
static |
- Parameters
-
weight | the font's weight (see Qt::Weight). |
italic | select the italic variant of the font. |
underline | the font will be underlined. |
scale | added to the font's default point size. |
- Returns
- A QFont, the size of the font is guessed from the system's default.
◆ getGroup()
const Name & Hurricane::Graphics::getGroup |
( |
const Name & |
key | ) |
|
|
static |
Returns: The group owning the DrawingStyle of which key is key.
◆ getColor()
const QColor & Hurricane::Graphics::getColor |
( |
const Name & |
key, |
|
|
const DisplayStyle::HSVr & |
darkening = DisplayStyle::HSVr() |
|
) |
| |
|
static |
Returns: The QColor associated to the DrawingStyle key darkened by a factor darkening.
◆ getPen()
const QPen & Hurricane::Graphics::getPen |
( |
const Name & |
key, |
|
|
const DisplayStyle::HSVr & |
darkening = DisplayStyle::HSVr() |
|
) |
| |
|
static |
Returns: The QPen associated to the DrawingStyle key darkened by a factor darkening.
◆ getBrush()
const QBrush & Hurricane::Graphics::getBrush |
( |
const Name & |
key, |
|
|
const DisplayStyle::HSVr & |
darkening = DisplayStyle::HSVr() |
|
) |
| |
|
static |
Returns: The QBrush associated to the DrawingStyle key by a factor darkening.
◆ getPattern()
const string & Hurricane::Graphics::getPattern |
( |
const Name & |
key | ) |
|
|
static |
Returns: The pattern associated to the DrawingStyle key.
◆ getThreshold()
const float Hurricane::Graphics::getThreshold |
( |
const Name & |
key | ) |
|
|
static |
Returns: The display threshold associated to the DrawingStyle key.
◆ getDarkening()
const DisplayStyle::HSVr & Hurricane::Graphics::getDarkening |
( |
| ) |
|
|
static |
Returns: The darkening factor applied to non-selected objects.
◆ getColorScale()
const ColorScale & Hurricane::Graphics::getColorScale |
( |
ColorScale::ScaleType |
| ) |
|
|
static |
Returns: The darkening factor applied to non-selected objects.
◆ darken()
const QColor Hurricane::Graphics::darken |
( |
const QColor & |
color | ) |
|
|
static |
Returns: The QColor with the darkening factor applied.
◆ getHtmlTranslator()
const TextTranslator & Hurricane::Graphics::getHtmlTranslator |
( |
| ) |
|
|
static |
Returns: The translator applied to generate html text.
- See also
- toHtml()
◆ toHtml()
const string Hurricane::Graphics::toHtml |
( |
const string & |
| ) |
|
|
static |
Returns: A string suitable for HTML enabled devices, such as most of the Qt widgets. Special characters like '&'
are replaced by their HTML counterpart (&
;)
◆ addStyle()
const void Hurricane::Graphics::addStyle |
( |
DisplayStyle * |
displayStyle | ) |
|
|
static |
◆ setStyle()
void Hurricane::Graphics::setStyle |
( |
const Name & |
key | ) |
|
|
static |
Make the DisplayStyle whose name is key the currently used one.
◆ getStyle() [1/2]
◆ getStyle() [2/2]
◆ enable()
void Hurricane::Graphics::enable |
( |
| ) |
|
|
static |
Effectively calls Qt, allocated Pens & Brushes and so on.
The documentation for this class was generated from the following files: