KGantt
kganttgraphicsitem.cpp
108 opt.displayPosition = m_endConstraints.size()<m_startConstraints.size()?StyleOptionGanttItem::Left:StyleOptionGanttItem::Right;
119 case StyleOptionGanttItem::Right: opt.displayAlignment = Qt::AlignRight|Qt::AlignVCenter; break;
140 qDebug() << "GraphicsItem::setRect("<<r<<"), txt="<<m_index.model()->data( m_index, Qt::DisplayRole ).toString();
141 if ( m_index.model()->data( m_index, Qt::DisplayRole ).toString() == QLatin1String("Code Freeze" ) ) {
161 return !scene()->isReadOnly() && m_index.isValid() && m_index.model()->flags( m_index ) & Qt::ItemIsEditable;
305 //scene()->setSceneRect( scene()->sceneRect().united( mapToScene( boundingRect() ).boundingRect() ) );
369 ItemDelegate::InteractionState istate = scene()->itemDelegate()->interactionStateFor( event->pos(), opt, index() );
442 GraphicsItem* other = qgraphicsitem_cast<GraphicsItem*>( scene()->itemAt( event->scenePos(), QTransform() ) );
454 view->addConstraint( scene()->summaryHandlingModel()->mapToSource( scene()->dragSource()->index() ),
465 view->addConstraint( scene()->summaryHandlingModel()->mapToSource( scene()->dragSource()->index() ),
494 const int typ = static_cast<ItemType>( index().model()->data( index(), ItemTypeRole ).toInt() );
496 ItemDelegate::InteractionState istate = scene()->itemDelegate()->interactionStateFor( event->pos(), opt, index() );
539 //qDebug() << "GraphicsItem::mouseMoveEvent("<<event<<"), m_istate="<< static_cast<ItemDelegate::InteractionState>( m_istate );
Abstract baseclass for grids. A grid is used to convert between QModelIndex'es and gantt chart values...
virtual Span mapToChart(const QModelIndex &idx) const =0
const AbstractGrid * getGrid() const
Definition kganttgraphicsscene.cpp:346
The GraphicsView class provides a model/view implementation of a gantt chart.
virtual void addConstraint(const QModelIndex &from, const QModelIndex &to, Qt::KeyboardModifiers modifiers)
Definition kganttgraphicsview.cpp:636
virtual QString toolTip(const QModelIndex &idx) const
Definition kganttitemdelegate.cpp:133
virtual Span itemBoundingSpan(const StyleOptionGanttItem &opt, const QModelIndex &idx) const
Definition kganttitemdelegate.cpp:148
virtual InteractionState interactionStateFor(const QPointF &pos, const StyleOptionGanttItem &opt, const QModelIndex &idx) const
Definition kganttitemdelegate.cpp:181
virtual void paintGanttItem(QPainter *p, const StyleOptionGanttItem &opt, const QModelIndex &idx)
Definition kganttitemdelegate.cpp:215
A class representing a start point and a length.
QStyleOption subclass for gantt items.
Definition kganttstyleoptionganttitem.h:20
Position displayPosition
Definition kganttstyleoptionganttitem.h:30
QRectF boundingRect
Definition kganttstyleoptionganttitem.h:28
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
@ TextPositionRole
The position of the text label on the item. The type of this value is KGantt::StyleOptionGanttItem::P...
Definition kganttglobal.h:219
bool isValid(QStringView ifopt)
QCA_EXPORT void init()
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual Qt::ItemFlags flags(const QModelIndex &index) const const
void setHandlesChildEvents(bool enabled)
DeviceCoordinateCache
ItemPositionChange
ItemIsMovable
GraphicsItemFlags flags() const const
bool hasFocus() const const
void hide()
bool isEnabled() const const
bool isSelected() const const
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
QPainterPath mapToScene(const QPainterPath &path) const const
QPointF pos() const const
void prepareGeometryChange()
T qgraphicsitem_cast(QGraphicsItem *item)
QGraphicsScene * scene() const const
QPointF scenePos() const const
void setAcceptHoverEvents(bool enabled)
void setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
void setCursor(const QCursor &cursor)
void setFlags(GraphicsItemFlags flags)
void setPos(const QPointF &pos)
void setZValue(qreal z)
void unsetCursor()
void update(const QRectF &rect)
qreal x() const const
qreal y() const const
QLineF line() const const
void setLine(const QLineF &line)
void setPen(const QPen &pen)
void addItem(QGraphicsItem *item)
void update(const QRectF &rect)
QPalette palette()
QPointF p1() const const
void push_back(parameter_type value)
QRectF boundingRect() const const
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
bool isNull() const const
void setY(qreal y)
qreal x() const const
qreal y() const const
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const const
bool contains(const QPointF &point) const const
qreal height() const const
qreal left() const const
qreal right() const const
void setHeight(qreal height)
void setRight(qreal x)
void setWidth(qreal width)
void setY(qreal y)
qreal top() const const
qreal width() const const
State_Enabled
typedef Alignment
SizeHorCursor
DisplayRole
ItemIsEditable
DashLine
QTextStream & center(QTextStream &stream)
QVariant fromValue(T &&value)
bool isValid() const const
int toInt(bool *ok) const const
QPointF toPointF() const const
QString toString() const const
palette
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.