// -*- 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. */ /*! \function const Name& DisplayStyle::getName() const; * \Return The name of this DisplayStyle. */ /*! \function const std::string& DisplayStyle::getDescription() const; * \Return The long description of this DisplayStyle. */ /*! \function const DisplayStyle::HSVr& DisplayStyle::getDarkening() const; * \Return The darkening factor. */ /*! \function const Name& DisplayStyle::getGroup(const Name& key) const; * \Return The group owning the DrawingStyle of which key is \e key. */ /*! \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; * \Return The QColor associated to the DrawingStyle \e key darkened by a factor \e darkening. */ /*! \function const QPen& DisplayStyle::getPen(const Name& key, const DisplayStyle::HSVr& darkening) const; * \Return The QPen associated to the DrawingStyle \e key darkened by a factor \e darkening. */ /*! \function const QBrush& DisplayStyle::getBrush(const Name& key, const DisplayStyle::HSVr& darkening) const; * \Return The QBrush associated to the DrawingStyle \e key darkened by a factor \e darkening. */ /*! \function const float DisplayStyle::getThreshold(const Name& key) const; * \Return The display threshold associated to the DrawingStyle \e key. */ /*! \function const vector& DisplayStyle::getDrawingGroups() const; * \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. */ /*! \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(). */ /*! \function void DisplayStyle::setDescription(const std::string& description); * Sets the Display style informative text. */ /*! \function void DisplayStyle::inheritFrom(const DisplayStyle* base); * Clone the \e base DisplayStyle into the current one. Any * 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. */ /*! \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); * \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. * \param 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. */ }