kig
object_drawer.cc
Go to the documentation of this file.
46 bool ObjectDrawer::contains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv ) const
154 ObjectDrawer::ObjectDrawer( const QColor& color, int width, bool shown, Qt::PenStyle style, int pointStyle, const QFont& f )
155 : mcolor( color ), mshown( shown ), mwidth( width ), mstyle( style ), mpointstyle( pointStyle ), mfont( f )
160 : mcolor( Qt::blue ), mshown( true ), mwidth( -1 ), mstyle( Qt::SolidLine ), mpointstyle( 0 ), mfont( QFont() )
ObjectDrawer * getCopyShown(bool s) const
returns a new ObjectDrawer that is identical to this one, except that the shown state is set to s ...
Definition: object_drawer.cc:62
QString pointStyleToString() const
return pointStyle transformed in a string
Definition: object_drawer.cc:184
bool shown() const
returns whether the object this ObjectDrawer is responsible for will be drawn or not.
Definition: object_drawer.cc:52
ObjectDrawer * getCopyStyle(Qt::PenStyle s) const
returns a new ObjectDrawer that is identical to this one, except that the PenStyle state is set to s ...
Definition: object_drawer.cc:98
bool inRect(const ObjectImp &imp, const Rect &r, const KigWidget &w) const
returns whether the object imp is in the rectangle r .
Definition: object_drawer.cc:164
void draw(const ObjectImp &imp, KigPainter &p, bool selected) const
Draw the object imp on kigpainter p .
Definition: object_drawer.cc:29
ObjectDrawer()
Construct a new ObjectDrawer with a default color ( Qt::blue ), width ( -1 ), shown state ( true )...
Definition: object_drawer.cc:159
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
void setWidth(int c)
setting this to -1 means to use the default width for the object being drawn.
Definition: kigpainter.cpp:232
ObjectDrawer * getCopyPointStyle(int p) const
returns a new ObjectDrawer that is identical to this one, except that the pointStyle state is set to ...
Definition: object_drawer.cc:110
ObjectDrawer * getCopyColor(const QColor &c) const
returns a new ObjectDrawer that is identical to this one, except that the color is set to c ...
Definition: object_drawer.cc:74
bool contains(const ObjectImp &imp, const Coordinate &pt, const KigWidget &w, bool nv=false) const
returns whether the object imp contains coordinate p .
Definition: object_drawer.cc:46
virtual bool inRect(const Rect &r, int width, const KigWidget &si) const =0
static int pointStyleFromString(const QString &style)
Note that this returns a valid point style in every case, even if the given style string is unknown...
Definition: object_drawer.cc:169
A class holding some information about how a certain object is drawn on the window.
Definition: object_drawer.h:47
static Qt::PenStyle styleFromString(const QString &style)
Note that this returns a valid style in every case, even if the given style string is unknown...
Definition: object_drawer.cc:200
virtual void draw(KigPainter &p) const =0
virtual bool contains(const Coordinate &p, int width, const KigWidget &si) const =0
QColor color() const
returns the color that the object will be drawn in
Definition: object_drawer.cc:57
ObjectDrawer * getCopyFont(const QFont &f) const
returns a new ObjectDrawer that is identical to this one, except that the font state is set to f ...
Definition: object_drawer.cc:122
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
Qt::PenStyle style() const
return PenStyle for all objects except points
Definition: object_drawer.cc:139
ObjectDrawer * getCopyWidth(int w) const
returns a new ObjectDrawer that is identical to this one, except that the width is set to w ...
Definition: object_drawer.cc:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.