KD Chart 2
[rev.2.7]
|
#include <kdganttgraphicsitem.h>
Public Types | |
enum | { Type = UserType + 42 } |
Public Member Functions | |
void | addEndConstraint (ConstraintGraphicsItem *) |
void | addStartConstraint (ConstraintGraphicsItem *) |
QRectF | boundingRect () const override |
QList< ConstraintGraphicsItem * > | endConstraints () const |
virtual QString | ganttToolTip () const |
GraphicsItem (QGraphicsItem *parent=0, GraphicsScene *scene=0) | |
GraphicsItem (const QModelIndex &idx, QGraphicsItem *parent=0, GraphicsScene *scene=0) | |
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=0) 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) |
~GraphicsItem () override | |
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 42 of file kdganttgraphicsitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 44 of file kdganttgraphicsitem.h.
|
explicit |
Definition at line 69 of file kdganttgraphicsitem.cpp.
Referenced by GraphicsItem().
|
explicit |
Definition at line 75 of file kdganttgraphicsitem.cpp.
References GraphicsItem(), and scene().
|
override |
Definition at line 101 of file kdganttgraphicsitem.cpp.
void GraphicsItem::addEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 264 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::setEnd().
Referenced by KDGantt::GraphicsScene::insertItem(), and isUpdating().
void GraphicsItem::addStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 256 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::setStart().
Referenced by KDGantt::GraphicsScene::insertItem(), and isUpdating().
|
override |
Definition at line 218 of file kdganttgraphicsitem.cpp.
References KDGantt::Constraint::FinishFinish, index(), KDGantt::ItemDelegate::itemBoundingSpan(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::Span::length(), scene(), setBoundingRect(), KDGantt::Span::start(), KDGantt::Constraint::StartFinish, and KDGantt::Constraint::StartStart.
Referenced by endConstraints(), mouseDoubleClickEvent(), mouseReleaseEvent(), paint(), and type().
QList<ConstraintGraphicsItem*> KDGantt::GraphicsItem::endConstraints | ( | ) | const |
Definition at line 77 of file kdganttgraphicsitem.h.
References boundingRect(), focusInEvent(), hoverLeaveEvent(), hoverMoveEvent(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and paint().
Referenced by KDGantt::GraphicsScene::removeItem().
|
overrideprotected |
Definition at line 364 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::constraintModel(), KDGantt::GraphicsScene::grid(), index(), isEditable(), KDGantt::AbstractGrid::mapFromChart(), rect(), scene(), KDGantt::GraphicsScene::selectionModel(), and KDGantt::GraphicsScene::updateRow().
Referenced by endConstraints().
|
virtual |
Definition at line 213 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::GraphicsScene::itemDelegate(), scene(), and KDGantt::ItemDelegate::toolTip().
Referenced by rect().
|
overrideprotected |
Definition at line 433 of file kdganttgraphicsitem.cpp.
Referenced by endConstraints().
|
overrideprotected |
Definition at line 401 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.
Referenced by endConstraints().
const QPersistentModelIndex& KDGantt::GraphicsItem::index | ( | ) | const |
Definition at line 66 of file kdganttgraphicsitem.h.
References isEditable(), and setIndex().
Referenced by boundingRect(), focusInEvent(), ganttToolTip(), hoverMoveEvent(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), and updateItem().
bool GraphicsItem::isEditable | ( | ) | const |
Definition at line 190 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::isReadOnly(), and scene().
Referenced by focusInEvent(), hoverMoveEvent(), index(), itemChange(), mouseMoveEvent(), and mouseReleaseEvent().
bool KDGantt::GraphicsItem::isUpdating | ( | ) | const |
Definition at line 70 of file kdganttgraphicsitem.h.
References addEndConstraint(), addStartConstraint(), removeEndConstraint(), and removeStartConstraint().
Referenced by itemChange().
|
override |
Definition at line 338 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), isUpdating(), scene(), and KDGantt::GraphicsScene::selectionModel().
Referenced by endConstraints().
|
overrideprotected |
Definition at line 526 of file kdganttgraphicsitem.cpp.
References boundingRect(), index(), KDGantt::ItemDelegate::interactionStateFor(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemDoubleClicked(), KDGantt::ItemTypeRole, rect(), scene(), setBoundingRect(), setRect(), KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, KDGantt::ItemDelegate::State_Move, KDGantt::ItemDelegate::State_None, and KDGantt::TypeSummary.
Referenced by endConstraints().
|
overrideprotected |
Definition at line 568 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.
Referenced by endConstraints().
|
overrideprotected |
Definition at line 440 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.
Referenced by endConstraints().
|
overrideprotected |
Definition at line 466 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsView::addConstraint(), boundingRect(), KDGantt::GraphicsScene::dragSource(), index(), isEditable(), KDGantt::GraphicsScene::itemClicked(), KDGantt::ItemTypeRole, rect(), scene(), KDGantt::GraphicsScene::setDragSource(), and KDGantt::TypeEvent.
Referenced by endConstraints().
|
override |
Definition at line 195 of file kdganttgraphicsitem.cpp.
References boundingRect(), index(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::ItemDelegate::paintGanttItem(), and scene().
Referenced by endConstraints().
QRectF KDGantt::GraphicsItem::rect | ( | ) | const |
Definition at line 60 of file kdganttgraphicsitem.h.
References ganttToolTip(), setBoundingRect(), and setRect().
Referenced by focusInEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mouseReleaseEvent(), type(), updateItem(), and KDGantt::GraphicsScene::updateItems().
void GraphicsItem::removeEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 279 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::constraint(), KDGantt::Constraint::relationType(), KDGantt::ConstraintGraphicsItem::setEnd(), and KDGantt::ConstraintGraphicsItem::setStart().
Referenced by isUpdating().
void GraphicsItem::removeStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 272 of file kdganttgraphicsitem.cpp.
Referenced by isUpdating().
GraphicsScene * GraphicsItem::scene | ( | ) | const |
Definition at line 163 of file kdganttgraphicsitem.cpp.
Referenced by boundingRect(), focusInEvent(), ganttToolTip(), GraphicsItem(), hoverMoveEvent(), isEditable(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), type(), and updateItem().
void GraphicsItem::setBoundingRect | ( | const QRectF & | r | ) |
Definition at line 183 of file kdganttgraphicsitem.cpp.
Referenced by boundingRect(), mouseDoubleClickEvent(), rect(), and updateItem().
void GraphicsItem::setIndex | ( | const QPersistentModelIndex & | idx | ) |
Definition at line 207 of file kdganttgraphicsitem.cpp.
Referenced by KDGantt::GraphicsScene::createItem(), index(), updateItem(), and KDGantt::GraphicsScene::updateRow().
void GraphicsItem::setRect | ( | const QRectF & | r | ) |
Definition at line 168 of file kdganttgraphicsitem.cpp.
Referenced by mouseDoubleClickEvent(), rect(), and updateItem().
QList<ConstraintGraphicsItem*> KDGantt::GraphicsItem::startConstraints | ( | ) | const |
Definition at line 76 of file kdganttgraphicsitem.h.
Referenced by KDGantt::GraphicsScene::removeItem().
|
override |
Definition at line 121 of file kdganttgraphicsitem.cpp.
References KDGantt::StyleOptionGanttItem::boundingRect, boundingRect(), KDGantt::StyleOptionGanttItem::Center, KDGantt::StyleOptionGanttItem::displayPosition, KDGantt::StyleOptionGanttItem::grid, KDGantt::GraphicsScene::grid(), KDGantt::StyleOptionGanttItem::Hidden, KDGantt::StyleOptionGanttItem::itemRect, KDGantt::StyleOptionGanttItem::Left, rect(), KDGantt::StyleOptionGanttItem::Right, scene(), KDGantt::StyleOptionGanttItem::text, KDGantt::TextPositionRole, and Type.
void GraphicsItem::updateItem | ( | const Span & | rowgeometry, |
const QPersistentModelIndex & | idx | ||
) |
Definition at line 300 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::createItem(), KDGantt::GraphicsScene::updateItems(), and KDGantt::GraphicsScene::updateRow().