KD Chart API Documentation 3.1
|
Class used to render gantt items in a KDGantt::GraphicsView. More...
#include <KDGanttItemDelegate>
Public Types | |
enum | InteractionState { State_None = 0 , State_Move , State_ExtendLeft , State_ExtendRight , State_DragConstraint } |
This enum is used for communication between the view and the delegate about user interaction with gantt items. More... | |
Public Types inherited from QAbstractItemDelegate | |
enum | EndEditHint |
Class used to render gantt items in a KDGantt::GraphicsView.
Definition at line 25 of file kdganttitemdelegate.h.
This enum is used for communication between the view and the delegate about user interaction with gantt items.
Enumerator | |
---|---|
State_None | |
State_Move | |
State_ExtendLeft | |
State_ExtendRight | |
State_DragConstraint |
Definition at line 30 of file kdganttitemdelegate.h.
Constructor.
Creates an ItemDelegate with parent parent
Definition at line 112 of file kdganttitemdelegate.cpp.
|
override |
Destructor.
Definition at line 119 of file kdganttitemdelegate.cpp.
|
virtual |
Definition at line 411 of file kdganttitemdelegate.cpp.
References KDGantt::Constraint::FinishFinish, finishFinishArrow(), finishFinishLine(), KDGantt::Constraint::FinishStart, finishStartArrow(), finishStartLine(), PW, QObject::qobject_cast(), KDGantt::Constraint::relationType(), KDGantt::Constraint::StartFinish, startFinishArrow(), startFinishLine(), KDGantt::Constraint::StartStart, startStartArrow(), and startStartLine().
Referenced by KDGantt::ConstraintGraphicsItem::boundingRect().
Definition at line 141 of file kdganttitemdelegate.cpp.
References d.
Referenced by paintGanttItem().
Definition at line 161 of file kdganttitemdelegate.cpp.
References d.
Referenced by paintGanttItem().
|
protected |
Definition at line 537 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintFinishFinishConstraint().
|
protected |
Definition at line 515 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintFinishFinishConstraint().
|
protected |
Definition at line 491 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintFinishStartConstraint().
|
protected |
Definition at line 469 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintFinishStartConstraint().
|
virtual |
Override to implement new items or interactions.
Definition at line 235 of file kdganttitemdelegate.cpp.
References QRectF::contains(), QRectF::height(), Qt::ItemIsEditable, KDGantt::ItemTypeRole, QRectF::left(), QObject::qobject_cast(), QRectF::right(), State_ExtendLeft, State_ExtendRight, State_Move, State_None, QRectF::topLeft(), KDGantt::TypeEvent, KDGantt::TypeNone, KDGantt::TypeSummary, QRectF::width(), and QPointF::x().
Referenced by KDGantt::GraphicsItem::hoverMoveEvent(), KDGantt::GraphicsItem::mouseDoubleClickEvent(), and KDGantt::GraphicsItem::mousePressEvent().
|
virtual |
Override this to implement new itemtypes or to change the look of the existing ones.
Definition at line 194 of file kdganttitemdelegate.cpp.
References KDGantt::StyleOptionGanttItem::Center, QString::data(), Qt::DisplayRole, QRectF::height(), KDGantt::StyleOptionGanttItem::Hidden, KDGantt::ItemTypeRole, KDGantt::StyleOptionGanttItem::Left, QRectF::left(), QObject::qobject_cast(), KDGantt::StyleOptionGanttItem::Right, QRectF::top(), KDGantt::TypeEvent, and QRectF::width().
Referenced by KDGantt::GraphicsItem::updateItem().
|
virtual |
Paints the constraint between points start and end using painter and opt.
Definition at line 436 of file kdganttitemdelegate.cpp.
References KDGantt::Constraint::FinishFinish, KDGantt::Constraint::FinishStart, paintFinishFinishConstraint(), paintFinishStartConstraint(), paintStartFinishConstraint(), paintStartStartConstraint(), QObject::qobject_cast(), KDGantt::Constraint::relationType(), KDGantt::Constraint::StartFinish, and KDGantt::Constraint::StartStart.
Referenced by KDGantt::ConstraintGraphicsItem::paint().
|
protected |
Definition at line 502 of file kdganttitemdelegate.cpp.
References QPen::color(), d, QPainter::drawPolygon(), QPainter::drawPolyline(), finishFinishArrow(), finishFinishLine(), QObject::qobject_cast(), QPainter::setBrush(), and QPainter::setPen().
Referenced by paintConstraintItem().
|
protected |
Definition at line 456 of file kdganttitemdelegate.cpp.
References QPen::color(), d, QPainter::drawPolygon(), QPainter::drawPolyline(), finishStartArrow(), finishStartLine(), QObject::qobject_cast(), QPainter::setBrush(), and QPainter::setPen().
Referenced by paintConstraintItem().
|
virtual |
Paints the gantt item idx using painter and opt.
Definition at line 274 of file kdganttitemdelegate.cpp.
References QRectF::adjusted(), Qt::AlignCenter, Qt::AlignLeft, Qt::Alignment, Qt::AlignRight, Qt::AlignVCenter, Qt::black, KDGantt::StyleOptionGanttItem::Center, QPainterPath::closeSubpath(), QPen::color(), defaultBrush(), defaultPen(), QPainter::drawPath(), QPainter::drawRect(), QPainter::drawText(), QPainter::fillRect(), QRectF::height(), KDGantt::StyleOptionGanttItem::Hidden, QRectF::isValid(), KDGantt::ItemTypeRole, KDGantt::StyleOptionGanttItem::Left, QRectF::left(), QPainterPath::lineTo(), QPainterPath::moveTo(), Qt::NoBrush, QPainter::pen(), QObject::qobject_cast(), QPainterPath::quadTo(), Qt::red, QPainter::restore(), KDGantt::StyleOptionGanttItem::Right, QRectF::right(), QPainter::save(), QPainter::setBrush(), QPainter::setBrushOrigin(), QRectF::setHeight(), QPainter::setPen(), QPen::setWidth(), QRectF::setY(), QStyle::State_Selected, KDGantt::TaskCompletionRole, QRectF::top(), QRectF::topLeft(), QRectF::topRight(), QPainter::translate(), QRectF::translate(), QRectF::translated(), KDGantt::TypeEvent, KDGantt::TypeSummary, KDGantt::TypeTask, QRectF::width(), QPen::width(), QRectF::x(), and QRectF::y().
Referenced by KDGantt::GraphicsItem::paint().
|
protected |
Definition at line 593 of file kdganttitemdelegate.cpp.
References QPen::color(), d, QPainter::drawPolygon(), QPainter::drawPolyline(), QObject::qobject_cast(), QPainter::setBrush(), QPainter::setPen(), startFinishArrow(), and startFinishLine().
Referenced by paintConstraintItem().
|
protected |
Definition at line 548 of file kdganttitemdelegate.cpp.
References QPen::color(), d, QPainter::drawPolygon(), QPainter::drawPolyline(), QObject::qobject_cast(), QPainter::setBrush(), QPainter::setPen(), startStartArrow(), and startStartLine().
Referenced by paintConstraintItem().
Sets the default brush used for items of type type to brush.
The default brush is used in the case when the model does not provide an explicit brush.
Definition at line 132 of file kdganttitemdelegate.cpp.
References d.
Sets the default pen used for items of type type to pen.
The default pen is used in the case when the model does not provide an explicit pen.
Definition at line 152 of file kdganttitemdelegate.cpp.
References d.
|
protected |
Definition at line 630 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintStartFinishConstraint().
|
protected |
Definition at line 606 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintStartFinishConstraint().
|
protected |
Definition at line 582 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintStartStartConstraint().
|
protected |
Definition at line 561 of file kdganttitemdelegate.cpp.
References QObject::qobject_cast(), TURN, QPointF::x(), and QPointF::y().
Referenced by constraintBoundingRect(), and paintStartStartConstraint().
|
virtual |
Definition at line 168 of file kdganttitemdelegate.cpp.
References QString::arg(), QAbstractItemModel::data(), Qt::DisplayRole, KDGantt::EndTimeRole, QString::isNull(), QObject::qobject_cast(), KDGantt::StartTimeRole, Qt::ToolTipRole, QVariant::toString(), and QObject::tr().
Referenced by KDGantt::GraphicsItem::ganttToolTip().