![]() |
KD Chart API Documentation
3.1
|
#include <kdganttgraphicsitem.h>
Public Types | |
enum | { Type = UserType + 42 } |
Public Member Functions | |
GraphicsItem (const QModelIndex &idx, QGraphicsItem *parent=nullptr, GraphicsScene *scene=nullptr) | |
GraphicsItem (QGraphicsItem *parent=nullptr, GraphicsScene *scene=nullptr) | |
~GraphicsItem () override | |
void | addEndConstraint (ConstraintGraphicsItem *) |
void | addStartConstraint (ConstraintGraphicsItem *) |
QRectF | boundingRect () const override |
QList< ConstraintGraphicsItem * > | endConstraints () const |
virtual QString | ganttToolTip () const |
const QPersistentModelIndex & | index () const |
bool | isEditable () const |
bool | isUpdating () const |
QVariant | itemChange (GraphicsItemChange, const QVariant &value) override |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override |
QRectF | rect () const |
void | removeEndConstraint (ConstraintGraphicsItem *) |
void | removeStartConstraint (ConstraintGraphicsItem *) |
GraphicsScene * | scene () const |
void | setBoundingRect (const QRectF &r) |
void | setIndex (const QPersistentModelIndex &idx) |
void | setRect (const QRectF &r) |
QList< ConstraintGraphicsItem * > | startConstraints () const |
int | type () const override |
void | updateItem (const Span &rowgeometry, const QPersistentModelIndex &idx) |
Protected Member Functions | |
void | focusInEvent (QFocusEvent *event) override |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *) override |
void | hoverMoveEvent (QGraphicsSceneHoverEvent *) override |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) override |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *) override |
void | mousePressEvent (QGraphicsSceneMouseEvent *) override |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *) override |
Definition at line 30 of file kdganttgraphicsitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 33 of file kdganttgraphicsitem.h.
|
explicit |
Definition at line 62 of file kdganttgraphicsitem.cpp.
References scene().
|
explicit |
Definition at line 70 of file kdganttgraphicsitem.cpp.
References scene().
|
override |
Definition at line 80 of file kdganttgraphicsitem.cpp.
void GraphicsItem::addEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 246 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::constraint(), KDGantt::Constraint::relationType(), and KDGantt::ConstraintGraphicsItem::setEnd().
Referenced by KDGantt::GraphicsScene::insertItem().
void GraphicsItem::addStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 238 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::constraint(), KDGantt::Constraint::relationType(), and KDGantt::ConstraintGraphicsItem::setStart().
Referenced by KDGantt::GraphicsScene::insertItem().
|
override |
Definition at line 200 of file kdganttgraphicsitem.cpp.
Referenced by paint().
|
inline |
Definition at line 81 of file kdganttgraphicsitem.h.
Referenced by KDGantt::GraphicsScene::removeItem().
|
overrideprotected |
Definition at line 350 of file kdganttgraphicsitem.cpp.
References index(), scene(), and KDGantt::GraphicsScene::selectionModel().
|
virtual |
Definition at line 195 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::GraphicsScene::itemDelegate(), scene(), and KDGantt::ItemDelegate::toolTip().
|
overrideprotected |
Definition at line 420 of file kdganttgraphicsitem.cpp.
|
overrideprotected |
Definition at line 387 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), isEditable(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemEntered(), scene(), KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_Move.
|
inline |
Definition at line 61 of file kdganttgraphicsitem.h.
Referenced by focusInEvent(), ganttToolTip(), hoverMoveEvent(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), and updateItem().
bool GraphicsItem::isEditable | ( | ) | const |
Definition at line 172 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::isReadOnly(), and scene().
Referenced by hoverMoveEvent(), itemChange(), mouseMoveEvent(), and mouseReleaseEvent().
|
inline |
Definition at line 68 of file kdganttgraphicsitem.h.
Referenced by itemChange().
|
override |
Definition at line 324 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), isUpdating(), scene(), and KDGantt::GraphicsScene::selectionModel().
|
overrideprotected |
Definition at line 508 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemDoubleClicked(), KDGantt::ItemTypeRole, scene(), KDGantt::ItemDelegate::State_None, and KDGantt::TypeSummary.
|
overrideprotected |
Definition at line 551 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), rect(), scene(), KDGantt::GraphicsScene::selectionModel(), KDGantt::GraphicsScene::setDragSource(), KDGantt::ItemDelegate::State_DragConstraint, KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_Move.
|
overrideprotected |
Definition at line 427 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemPressed(), scene(), KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_None.
|
overrideprotected |
Definition at line 453 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), KDGantt::GraphicsScene::itemClicked(), KDGantt::ItemTypeRole, scene(), KDGantt::GraphicsScene::setDragSource(), and KDGantt::TypeEvent.
|
override |
Definition at line 177 of file kdganttgraphicsitem.cpp.
References boundingRect(), index(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::ItemDelegate::paintGanttItem(), and scene().
|
inline |
Definition at line 52 of file kdganttgraphicsitem.h.
Referenced by mouseMoveEvent(), updateItem(), and KDGantt::GraphicsScene::updateItems().
void GraphicsItem::removeEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 261 of file kdganttgraphicsitem.cpp.
void GraphicsItem::removeStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 254 of file kdganttgraphicsitem.cpp.
GraphicsScene * GraphicsItem::scene | ( | ) | const |
Definition at line 145 of file kdganttgraphicsitem.cpp.
Referenced by GraphicsItem(), focusInEvent(), ganttToolTip(), hoverMoveEvent(), isEditable(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), and updateItem().
void GraphicsItem::setBoundingRect | ( | const QRectF & | r | ) |
Definition at line 165 of file kdganttgraphicsitem.cpp.
Referenced by updateItem().
void GraphicsItem::setIndex | ( | const QPersistentModelIndex & | idx | ) |
Definition at line 189 of file kdganttgraphicsitem.cpp.
Referenced by updateItem(), and KDGantt::GraphicsScene::updateRow().
void GraphicsItem::setRect | ( | const QRectF & | r | ) |
Definition at line 150 of file kdganttgraphicsitem.cpp.
Referenced by updateItem().
|
inline |
Definition at line 77 of file kdganttgraphicsitem.h.
Referenced by KDGantt::GraphicsScene::removeItem().
|
override |
Definition at line 94 of file kdganttgraphicsitem.cpp.
References Type.
void GraphicsItem::updateItem | ( | const Span & | rowgeometry, |
const QPersistentModelIndex & | idx | ||
) |
Definition at line 286 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::grid(), index(), KDGantt::ItemDelegate::itemBoundingSpan(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::ItemTypeRole, KDGantt::Span::length(), KDGantt::AbstractGrid::mapToChart(), KDGantt::AbstractRowController::maximumItemHeight(), rect(), KDGantt::GraphicsScene::rowController(), scene(), setBoundingRect(), setIndex(), setRect(), KDGantt::Span::start(), and KDGantt::TypeMulti.
Referenced by KDGantt::GraphicsScene::updateItems(), and KDGantt::GraphicsScene::updateRow().