Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

Item Class Reference

#include <item.h>

Inheritance diagram for Item:

CNItem DrawPart MechanicsItem Component FlowPart PicItem DPImage DPLine DPRectangle DPText ChassisCircular2

List of all members.

Detailed Description

David Saxton

Daniel Clarke

Definition at line 42 of file item.h.

Public Slots

virtual void moveBy (double dx, double dy)
void removeChild (Item *child)
virtual void removeItem ()


void movedBy (double dx, double dy)
void removed (Item *item)
void resized ()
void selectionChanged ()

Public Member Functions

void addChild (Item *child)
QPointArray areaPoints () const
int baseZ () const
QRect boundingRect () const
QBrush brush () const
virtual bool canResize () const
QCanvas * canvas () const
ItemList children (bool includeGrandChildren=false) const
bool collidesWith (const QCanvasItem *) const
QCanvasItemList collisions (const bool exact) const
bool contains (Item *item, bool direct=false) const
virtual bool contentChanged () const
virtual PropertycreateProperty (const QString &id, Variant::Type::Value type)
bool dataBool (const QString &id) const
QColor dataColor (const QString &id) const
double dataDouble (const QString &id) const
int dataInt (const QString &id) const
QString dataString (const QString &id) const
virtual void enterEvent ()
virtual void finishedCreation ()
QFont font () const
bool hasProperty (const QString &id) const
int height () const
void hide ()
QString id () const
virtual bool isMovable () const
bool isRaised () const
bool isSelected () const
bool isVisible () const
 Item (ItemDocument *itemDocument, bool newItem, const QString &id)
virtual ItemData itemData () const
ItemDocumentitemDocument () const
virtual void leaveEvent ()
int level () const
virtual QSize minimumSize () const
virtual bool mouseDoubleClickEvent (const EventInfo &eventInfo)
virtual bool mouseMoveEvent (const EventInfo &eventInfo)
virtual bool mousePressEvent (const EventInfo &eventInfo)
virtual bool mouseReleaseEvent (const EventInfo &eventInfo)
void move (double const x, double const y)
QString name () const
bool needRedraw () const
int offsetX () const
int offsetY () const
ItemparentItem () const
QPen pen () const
QPointArray points () const
Propertyproperty (const QString &id) const
virtual void restoreFromItemData (const ItemData &itemData)
virtual void setBrush (const QBrush &b)
virtual void setCanvas (QCanvas *)
void setChanged ()
void setNeedRedraw (const bool needRedraw)
void setParentItem (Item *parentItem)
virtual void setPen (const QPen &p)
void setPoints (QPointArray)
void setRaised (bool isRaised)
virtual void setSelected (bool yes)
void setSize (int x, int y, int w, int h, bool forceItemPoints=false)
void setSize (QRect sizeRect, bool forceItemPoints=false)
virtual void setVisible (bool yes)
void setX (double a)
void setY (double a)
void setZ (double a)
void show ()
QRect sizeRect () const
QString type () const
virtual void updateZ (int baseZ)
VariantDataMap * variantMap ()
virtual bool wheelEvent (const EventInfo &eventInfo)
int width () const
double x () const
double y () const
double z () const

Static Public Member Functions

static double getMultiplier (const QString &mag)
static double getMultiplier (double num)
static QString getNumberMag (double num)
static int getNumberPre (double num)

Protected Slots

virtual void dataChanged ()
virtual void propertyChangedInitial ()

Protected Member Functions

virtual void addToChunks ()
virtual void changeChunks ()
virtual void childAdded (Item *)
virtual void childRemoved (Item *)
void draw (QPainter &)
void drawShape (QPainter &)
void invalidate ()
bool isValid () const
virtual void itemPointsChanged ()
virtual void postResize ()
virtual bool preResize (QRect sizeRect)
virtual void removeFromChunks ()
virtual void reparented (Item *, Item *)
void setItemPoints (const QPointArray &pa, bool setSizeFromPoints=true)
void setWinding (bool)
void update ()
bool winding () const

Protected Attributes

bool b_deleted
int m_baseZ
bool m_bDoneCreation
bool m_bDynamicContent
bool m_bIsRaised
ItemList m_children
QString m_id
QPointArray m_itemPoints
QString m_name
 Name (e.g. "Resistor").
QTimer * m_pPropertyChangedTimer
 Single show timer for one a property changes.
QRect m_sizeRect
QString m_type
VariantDataMap m_variantData
double myx
double myy
double myz
QGuardedPtr< ItemDocumentp_itemDocument
GuardedItem p_parentItem
QPointArray poly
bool val


class ItemLibrary

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index