kig
object_holder.cc
Go to the documentation of this file.
virtual bool isFreelyTranslatable() const
Returns whether this ObjectCalcer can be translated at any position in the coordinate plane...
Definition: object_calcer.cc:265
bool inherits(const ObjectImpType *t) const
Returns true if this ObjectImp inherits the ObjectImp type represented by t.
Definition: object_imp.cc:279
const ObjectImp * imp() const
Returns the ObjectImp of this ObjectCalcer.
Definition: object_calcer.cc:65
virtual Coordinate moveReferencePoint() const
In order to support simultaneously moving objects that are in different locations, we need for each object a location that it is assumed to be at, at the moment the moving starts.
Definition: object_calcer.cc:270
virtual void move(const Coordinate &to, const KigDocument &doc)
This is the method that does the real moving work.
Definition: object_calcer.cc:276
bool isFreelyTranslatable() const
This call is simply forwarded to the ObjectCalcer.
Definition: object_holder.cc:123
This is an ObjectCalcer that keeps an ObjectImp, and never calculates a new one.
Definition: object_calcer.h:232
bool shown() const
returns whether the object this ObjectDrawer is responsible for will be drawn or not.
Definition: object_drawer.cc:52
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
const ObjectConstCalcer * nameCalcer() const
Definition: object_holder.cc:63
const QString name() const
returns a null QString if no name is set.
Definition: object_holder.cc:140
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
void calc(const KigDocument &)
Make our ObjectCalcer recalculate its ObjectImp.
Definition: object_holder.cc:73
virtual const ObjectImpType * type() const =0
Returns the lowermost ObjectImpType that this object is an instantiation of.
void setDrawer(ObjectDrawer *d)
Set the ObjectDrawer of this ObjectHolder to d , the old ObjectDrawer is deleted. ...
Definition: object_holder.cc:68
const char * selectStatement() const
Returns a translatable string of the form "Select this %1".
Definition: object_imp.cc:245
An ObjectCalcer is an object that represents an algorithm for calculating an ObjectImp from other Obj...
Definition: object_calcer.h:66
bool isEmpty() const
bool canMove() const
This call is simply forwarded to the ObjectCalcer.
Definition: object_holder.cc:118
virtual void calc(const KigDocument &)=0
Makes the ObjectCalcer recalculate its ObjectImp from its parents.
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
void setNameCalcer(ObjectConstCalcer *namecalcer)
Setting the namecalcer is only allowed if previously none was set.
Definition: object_holder.cc:151
QString selectStatement() const
Return a statement saying something like "select this segment" or "select segment ab" depending on wh...
Definition: object_holder.cc:157
bool contains(const Coordinate &p, const KigWidget &w, bool nv=false) const
Returns whether this object contains the point p .
Definition: object_holder.cc:83
A class holding some information about how a certain object is drawn on the window.
Definition: object_drawer.h:47
void draw(KigPainter &p, bool selected) const
Draw this object on the given KigPainter.
Definition: object_holder.cc:78
const Coordinate moveReferencePoint() const
This call is simply forwarded to the ObjectCalcer.
Definition: object_holder.cc:108
ObjectDrawer * switchDrawer(ObjectDrawer *d)
Set the ObjectDrawer of this ObjectHolder to d , the old ObjectDrawer is not deleted, but returned.
Definition: object_holder.cc:128
virtual bool canMove() const
Returns whether this ObjectCalcer supports moving.
Definition: object_calcer.cc:260
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
static const ObjectImpType * stype()
Returns the ObjectImpType representing the StringImp type.
Definition: bogus_imp.cc:220
ObjectHolder(ObjectCalcer *calcer, ObjectDrawer *drawer, ObjectConstCalcer *namecalcer)
Construct a new ObjectHolder with a given ObjectCalcer and ObjectDrawer, with a given name calcer...
Definition: object_holder.cc:31
virtual const ObjectImp * imp() const =0
Returns the ObjectImp of this ObjectCalcer.
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
void move(const Coordinate &to, const KigDocument &)
This call is simply forwarded to the ObjectCalcer.
Definition: object_holder.cc:113
bool inRect(const Rect &r, const KigWidget &w) const
Returns whether this object is in the rectangle r .
Definition: object_holder.cc:88
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.