2008-07-02 10:13:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
|
|
|
|
/*! \class DisplayStyle
|
|
|
|
* \brief 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*! \function DisplayStyle::DisplayStyle(const Name& name);
|
|
|
|
* Construct a DisplayStyle named \e 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function DisplayStyle::~DisplayStyle();
|
|
|
|
* The standart destructor.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const Name& DisplayStyle::getName() const;
|
|
|
|
* \Return The name of this DisplayStyle.
|
|
|
|
*/
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const std::string& DisplayStyle::getDescription() const;
|
|
|
|
* \Return The long description of this DisplayStyle.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const DisplayStyle::HSVr& DisplayStyle::getDarkening() const;
|
|
|
|
* \Return The darkening factor.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function const Name& DisplayStyle::getGroup(const Name& key) const;
|
|
|
|
* \Return The group owning the DrawingStyle of which key is \e key.
|
|
|
|
*/
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const string& DisplayStyle::getPattern(const Name& key) const;
|
|
|
|
* \Return The pattern associated to the DrawingStyle \e key.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function const QColor& DisplayStyle::getColor(const Name& key, const DisplayStyle::HSVr& darkening) const;
|
2008-07-25 07:47:08 -05:00
|
|
|
* \Return The QColor associated to the DrawingStyle \e key darkened by a factor \e darkening.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const QPen& DisplayStyle::getPen(const Name& key, const DisplayStyle::HSVr& darkening) const;
|
2008-07-25 07:47:08 -05:00
|
|
|
* \Return The QPen associated to the DrawingStyle \e key darkened by a factor \e darkening.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function const QBrush& DisplayStyle::getBrush(const Name& key, const DisplayStyle::HSVr& darkening) const;
|
2008-07-25 07:47:08 -05:00
|
|
|
* \Return The QBrush associated to the DrawingStyle \e key darkened by a factor \e darkening.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function const float DisplayStyle::getThreshold(const Name& key) const;
|
|
|
|
* \Return The display threshold associated to the DrawingStyle \e key.
|
|
|
|
*/
|
|
|
|
|
2008-11-26 03:35:07 -06:00
|
|
|
/*! \function const vector<DrawingGroup*>& DisplayStyle::getDrawingGroups() const;
|
2008-07-02 10:13:40 -05:00
|
|
|
* \Return The vector of groups.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function DrawingStyle* DisplayStyle::find(const Name& key) const;
|
|
|
|
* \Return The DrawingStyle associated with key \e key. If no DrawingStyle
|
|
|
|
* matches \e key, the \e default DrawingStyle is returned.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function QColor DisplayStyle::darken( const QColor& color, const DisplayStyle::HSVr& darkening );
|
|
|
|
* \Return The \e color with the darkening factor \c darkening applied.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function void DisplayStyle::qtAllocate();
|
|
|
|
* Triggers the allocation of Qt pens & brushes. Should not be used
|
|
|
|
* directly but only through Graphics::enable().
|
|
|
|
*/
|
2008-07-02 10:13:40 -05:00
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function void DisplayStyle::setDescription(const std::string& description);
|
|
|
|
* Sets the Display style informative text.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function void DisplayStyle::inheritFrom(const DisplayStyle* base);
|
|
|
|
* Clone the \e base DisplayStyle into the current one. Any
|
2012-11-16 06:48:38 -06:00
|
|
|
* previous settings are eraseds. The base style is \e duplicated
|
|
|
|
* into this one. Further modification of \e base after this point
|
|
|
|
* will have no effect on the current style.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \function void DisplayStyle::setDarkening(const HSVr&);
|
|
|
|
* Sets the darkening factor.
|
2008-07-02 10:13:40 -05:00
|
|
|
*/
|
|
|
|
|
2012-11-16 06:48:38 -06:00
|
|
|
/*! \function void 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);
|
2008-07-02 10:13:40 -05:00
|
|
|
* \param groupKey in which group to insert this DrawinStyle.
|
|
|
|
* \param key the DrawingStyle's name.
|
|
|
|
* \param pattern the stipple pattern (for the brush).
|
|
|
|
* \param red the red color component (for Brush & Pen).
|
|
|
|
* \param green the green color component (for Brush & Pen).
|
|
|
|
* \param blue the blue color component (for Brush & Pen).
|
|
|
|
* \param borderWidth the width of the drawing (for Pen).
|
|
|
|
* \param threshold the display threshold.
|
2012-11-16 06:48:38 -06:00
|
|
|
* \param goMatched tells if this style is used to draw a Go.
|
2008-07-02 10:13:40 -05:00
|
|
|
*
|
|
|
|
* Adds a new DrawingStyle. If any previous DrawingStyle of the same
|
|
|
|
* name was existing it is erased.
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|