kdgantt2
kdganttgraphicsitem.cpp
Go to the documentation of this file.
117 opt.displayPosition = m_endConstraints.size()<m_startConstraints.size()?StyleOptionGanttItem::Left:StyleOptionGanttItem::Right;
128 case StyleOptionGanttItem::Right: opt.displayAlignment = Qt::AlignRight|Qt::AlignVCenter; break;
148 qDebug() << "GraphicsItem::setRect("<<r<<"), txt="<<m_index.model()->data( m_index, Qt::DisplayRole ).toString();
149 if ( m_index.model()->data( m_index, Qt::DisplayRole ).toString() == QLatin1String("Code Freeze" ) ) {
309 //scene()->setSceneRect( scene()->sceneRect().united( mapToScene( boundingRect() ).boundingRect() ) );
381 ItemDelegate::InteractionState istate = scene()->itemDelegate()->interactionStateFor( event->pos(), opt, index() );
443 GraphicsItem* other = qgraphicsitem_cast<GraphicsItem*>( scene()->itemAt( event->scenePos() ) );
448 view->addConstraint( scene()->summaryHandlingModel()->mapToSource( scene()->dragSource()->index() ),
477 ItemDelegate::InteractionState istate = scene()->itemDelegate()->interactionStateFor( event->pos(), opt, index() );
520 //qDebug() << "GraphicsItem::mouseMoveEvent("<<event<<"), m_istate="<< static_cast<ItemDelegate::InteractionState>( m_istate );
qreal x() const
qreal y() const
QItemSelectionModel * selectionModel() const
Definition: kdganttgraphicsscene.cpp:255
Position displayPosition
Definition: kdganttstyleoptionganttitem.h:46
void mousePressEvent(QGraphicsSceneMouseEvent *)
Definition: kdganttgraphicsitem.cpp:416
void updateItem(const Span &rowgeometry, const QPersistentModelIndex &idx)
Definition: kdganttgraphicsitem.cpp:276
QPointF toPointF() const
GraphicsItem(QGraphicsItem *parent=0, GraphicsScene *scene=0)
Definition: kdganttgraphicsitem.cpp:70
void setBoundingRect(const QRectF &r)
Definition: kdganttgraphicsitem.cpp:160
QLineF line() const
Qt::KeyboardModifiers modifiers() const
void itemDoubleClicked(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:611
QGraphicsItem * itemAt(const QPointF &position) const
void removeStartConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:248
void setStart(const QPointF &start)
Definition: kdganttconstraintgraphicsitem.cpp:104
void push_back(const T &value)
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
The GraphicsView class provides a model/view implementation of a gantt chart.
Definition: kdganttgraphicsview.h:44
void setRight(qreal x)
void setHandlesChildEvents(bool enabled)
virtual int maximumItemHeight() const =0
const QPersistentModelIndex & index() const
Definition: kdganttgraphicsitem.h:66
Definition: kdganttglobal.h:204
void setEnd(const QPointF &end)
Definition: kdganttconstraintgraphicsitem.cpp:111
qreal top() const
QPointF scenePos() const
void hide()
const QAbstractItemModel * model() const
void itemClicked(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:606
QGraphicsScene * scene() const
void hoverMoveEvent(QGraphicsSceneHoverEvent *)
Definition: kdganttgraphicsitem.cpp:377
typedef Alignment
QString tr(const char *sourceText, const char *disambiguation, int n)
virtual bool mapFromChart(const Span &span, const QModelIndex &idx, const QList< Constraint > &constraints=QList< Constraint >()) const =0
qreal left() const
void update(const QRectF &rect)
void itemEntered(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:596
bool isNull() const
Definition: kdganttgraphicsscene.h:48
void setHeight(qreal height)
virtual InteractionState interactionStateFor(const QPointF &pos, const StyleOptionGanttItem &opt, const QModelIndex &idx) const
Definition: kdganttitemdelegate.cpp:200
void setCursor(const QCursor &cursor)
virtual Span itemBoundingSpan(const StyleOptionGanttItem &opt, const QModelIndex &idx) const
Definition: kdganttitemdelegate.cpp:163
QPointF pos() const
QRectF boundingRect() const
Definition: kdganttgraphicsitem.cpp:208
void hoverLeaveEvent(QGraphicsSceneHoverEvent *)
Definition: kdganttgraphicsitem.cpp:409
ConstraintModel * constraintModel() const
Definition: kdganttgraphicsscene.cpp:232
QPointF pos() const
void updateRow(const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:370
bool isValid() const
qreal x() const
qreal y() const
QAbstractProxyModel * summaryHandlingModel() const
Definition: kdganttgraphicsscene.cpp:211
void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
Definition: kdganttgraphicsitem.cpp:434
QPointF p1() const
void removeEndConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:255
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *)
Definition: kdganttgraphicsitem.cpp:474
Definition: kdganttglobal.h:207
int toInt(bool *ok) const
bool isSelected() const
void setPos(const QPointF &pos)
void focusInEvent(QFocusEvent *event)
Definition: kdganttgraphicsitem.cpp:339
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
void setLine(const QLineF &line)
QVariant data(int role) const
void addEndConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:240
virtual QVariant data(const QModelIndex &index, int role) const =0
GraphicsItemFlags flags() const
void itemPressed(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:601
void prepareGeometryChange()
Definition: kdganttglobal.h:205
void setPen(const QPen &pen)
qreal right() const
void mouseMoveEvent(QGraphicsSceneMouseEvent *)
Definition: kdganttgraphicsitem.cpp:515
virtual Span mapToChart(const QModelIndex &idx) const =0
void setDragSource(GraphicsItem *item)
Definition: kdganttgraphicsscene.cpp:616
bool isEnabled() const
ItemDelegate * itemDelegate() const
Definition: kdganttgraphicsscene.cpp:192
void addStartConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:232
QPointF mapToScene(const QPointF &point) const
qreal width() const
Definition: kdganttglobal.h:209
void setAcceptsHoverEvents(bool enabled)
virtual QString ganttToolTip() const
Definition: kdganttgraphicsitem.cpp:190
void setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
virtual void addConstraint(const QModelIndex &from, const QModelIndex &to, Qt::KeyboardModifiers modifiers)
Definition: kdganttgraphicsview.cpp:552
Definition: kdganttglobal.h:216
void setWidth(qreal width)
void setY(qreal y)
void setFlags(QFlags< QGraphicsItem::GraphicsItemFlag > flags)
void update(qreal x, qreal y, qreal w, qreal h)
void setIndex(const QPersistentModelIndex &idx)
Definition: kdganttgraphicsitem.cpp:184
AbstractRowController * rowController() const
Definition: kdganttgraphicsscene.cpp:265
bool hasFocus() const
bool toBool() const
bool isValid() const
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: kdganttgraphicsitem.cpp:172
QStyleOption subclass for gantt items.
Definition: kdganttstyleoptionganttitem.h:36
qreal height() const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void setCurrentIndex(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
bool contains(const QPointF &point) const
void setY(qreal y)
QPointF pos() const
void addItem(QGraphicsItem *item)
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const =0
virtual void paintGanttItem(QPainter *p, const StyleOptionGanttItem &opt, const QModelIndex &idx)
Definition: kdganttitemdelegate.cpp:225
QVariant itemChange(GraphicsItemChange, const QVariant &value)
Definition: kdganttgraphicsitem.cpp:313
Definition: kdganttgraphicsitem.h:42
void unsetCursor()
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
void setZValue(qreal z)
QPointF scenePos() const
QRectF boundingRect
Definition: kdganttstyleoptionganttitem.h:44
bool isNull() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.