Hurricane Design Viewer


Hurricane::Graphics Class Reference

Manage basic graphical configuration (API) More...

Static Public Member Functions

static GraphicsgetGraphics ()
 
static bool isEnabled ()
 
static const QFont getFixedFont (int weight=QFont::Normal, bool italic=false, bool underline=false, int scale=0)
 
static const NamegetGroup (const Name &key)
 
static QColor getColor (const Name &key, const DisplayStyle::HSVr &darkening=DisplayStyle::HSVr())
 
static QPen getPen (const Name &key, const DisplayStyle::HSVr &darkening=DisplayStyle::HSVr())
 
static QBrush getBrush (const Name &key, const DisplayStyle::HSVr &darkening=DisplayStyle::HSVr())
 
static const string & getPattern (const Name &key)
 
static float getThreshold (const Name &key)
 
static const DisplayStyle::HSVr & getDarkening ()
 
static const ColorScale & getColorScale (ColorScale::ScaleType)
 
static QColor darken (const QColor &)
 
static const TextTranslator & getHtmlTranslator ()
 
static string toHtml (const string &)
 
static void addStyle (DisplayStyle *displayStyle)
 
static void setStyle (const Name &key)
 
static DisplayStylegetStyle (const Name &key)
 
static DisplayStylegetStyle ()
 
static void enable ()
 

Detailed Description

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.

Member Function Documentation

◆ getGraphics()

static Graphics * Hurricane::Graphics::getGraphics ( )
static

Returns: The Graphics singleton.

◆ isEnabled()

static bool Hurricane::Graphics::isEnabled ( )
static

Returns: true if Qt has been activated.

◆ getFixedFont()

static const QFont Hurricane::Graphics::getFixedFont ( int weight = QFont::Normal,
bool italic = false,
bool underline = false,
int scale = 0 )
static
Parameters
weightthe font's weight (see Qt::Weight).
italicselect the italic variant of the font.
underlinethe font will be underlined.
scaleadded to the font's default point size.
Returns
A QFont, the size of the font is guessed from the system's default.

◆ getGroup()

static const Name & Hurricane::Graphics::getGroup ( const Name & key)
static

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

◆ getColor()

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

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

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

static const string & Hurricane::Graphics::getPattern ( const Name & key)
static

Returns: The pattern associated to the DrawingStyle key.

◆ getThreshold()

static float Hurricane::Graphics::getThreshold ( const Name & key)
static

Returns: The display threshold associated to the DrawingStyle key.

◆ getDarkening()

static const DisplayStyle::HSVr & Hurricane::Graphics::getDarkening ( )
static

Returns: The darkening factor applied to non-selected objects.

◆ getColorScale()

static const ColorScale & Hurricane::Graphics::getColorScale ( ColorScale::ScaleType )
static

Returns: The darkening factor applied to non-selected objects.

◆ darken()

static QColor Hurricane::Graphics::darken ( const QColor & color)
static

Returns: The QColor with the darkening factor applied.

◆ getHtmlTranslator()

static const TextTranslator & Hurricane::Graphics::getHtmlTranslator ( )
static

Returns: The translator applied to generate html text.

See also
toHtml()

◆ toHtml()

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

static void Hurricane::Graphics::addStyle ( DisplayStyle * displayStyle)
static

Adds a new DisplayStyle to the Graphics environment. The DisplayStyle contains it's name by which it can be accessed later. If any previous DisplayStyle of the same name was existing it is silently replaced.

◆ setStyle()

static void Hurricane::Graphics::setStyle ( const Name & key)
static

Make the DisplayStyle whose name is key the currently used one.

◆ getStyle() [1/2]

static DisplayStyle * Hurricane::Graphics::getStyle ( const Name & key)
static

Returns: The DisplayStyle whose name is key.

◆ getStyle() [2/2]

static DisplayStyle * Hurricane::Graphics::getStyle ( )
static

Returns: The DisplayStyle which is currently in use.

◆ enable()

static 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:


Generated by doxygen 1.13.2 on Fri Sep 27 2024 Return to top of page
Hurricane Design Viewer Copyright © 2008-2020 Sorbonne Universite All rights reserved