kdgantt2
kdganttgraphicsscene.cpp
Go to the documentation of this file.
112 //qDebug()<<"GraphicsScene::Private::deleteConstraintItem startConstraints"<<item<<(void*)citem;
114 } //else qDebug()<<"GraphicsScene::Private::deleteConstraintItem"<<c.startIndex()<<"start item not found";
119 } //else qDebug()<<"GraphicsScene::Private::deleteConstraintItem"<<c.endIndex()<<"end item not found";
244 connect( cm, SIGNAL(constraintAdded(Constraint)), this, SLOT(slotConstraintAdded(Constraint)) );
245 connect( cm, SIGNAL(constraintRemoved(Constraint)), this, SLOT(slotConstraintRemoved(Constraint)) );
351 void GraphicsScene::Private::recursiveUpdateMultiItem( const Span& span, const QModelIndex& idx )
381 for ( QModelIndex treewalkidx = sidx; treewalkidx.isValid(); treewalkidx = treewalkidx.parent() ) {
401 if ( summaryHandlingModel()->data( rowidx.parent(), ItemTypeRole ).toInt() == TypeMulti && !isExpanded ) {
428 GraphicsItem* other_item = d->items.value(summaryHandlingModel()->mapFromSource( other_idx ),0);
436 GraphicsItem* other_item = d->items.value(summaryHandlingModel()->mapFromSource( other_idx ),0);
463 const QSet<ConstraintGraphicsItem*> clst = QSet<ConstraintGraphicsItem*>::fromList( item->startConstraints() ) +
519 deleteSubtree( summaryHandlingModel()->index( i, summaryHandlingModel()->columnCount(_idx)-1, _idx ) );
558 } else if ( ConstraintGraphicsItem* citem = qgraphicsitem_cast<ConstraintGraphicsItem*>( item ) ) {
637 doPrint( &painter, printer->pageRect(), sceneRect().left(), sceneRect().right(), printer, drawRowLabels );
734 QModelIndex sidx = summaryHandlingModel()->mapToSource( summaryHandlingModel()->index( 0, 0, rootIndex()) );
QObject * child(const char *objName, const char *inheritsClass, bool recursiveSearch) const
QPoint screenPos() const
virtual int rowCount(const QModelIndex &parent) const =0
Class used to render gantt items in a KDGantt::GraphicsView.
Definition: kdganttitemdelegate.h:39
QItemSelectionModel * selectionModel() const
Definition: kdganttgraphicsscene.cpp:255
static QModelIndex mainIndex(const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:301
const Constraint & constraint() const
Definition: kdganttconstraintgraphicsitem.h:52
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
void updateItem(const Span &rowgeometry, const QPersistentModelIndex &idx)
Definition: kdganttgraphicsitem.cpp:276
T * data() const
void doubleClicked(const QModelIndex &index)
QRect toRect() const
Definition: kdganttglobal.h:215
void render(QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode)
QPointF scenePos() const
void itemDoubleClicked(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:611
QGraphicsItem * itemAt(const QPointF &position) const
void removeStartConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:248
void setSelectionModel(QItemSelectionModel *selectionmodel)
Definition: kdganttgraphicsscene.cpp:249
void deleteConstraintItem(ConstraintGraphicsItem *citem)
Definition: kdganttgraphicsscene.cpp:103
void setSummaryHandlingModel(QAbstractProxyModel *)
Definition: kdganttgraphicsscene.cpp:216
QList< QGraphicsItem * > items() const
virtual bool isRowExpanded(const QModelIndex &idx) const =0
const QFont & font() const
void setConstraintModel(ConstraintModel *)
Definition: kdganttgraphicsscene.cpp:237
QStyle * style() const
Definition: kdganttglobal.h:213
void save()
QRectF sceneRect() const
void drawBackground(QPainter *painter, const QRectF &rect)
Definition: kdganttgraphicsscene.cpp:566
void resetConstraintItems()
Definition: kdganttgraphicsscene.cpp:74
static QModelIndex dataIndex(const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:318
QRectF intersected(const QRectF &rectangle) const
const QAbstractItemModel * model() const
void itemClicked(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:606
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void showText(const QPoint &pos, const QString &text, QWidget *w)
void setModel(QAbstractItemModel *)
Definition: kdganttgraphicsscene.cpp:203
virtual void helpEvent(QGraphicsSceneHelpEvent *helpEvent)
qreal width(const QString &text) const
qreal left() const
void itemEntered(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:596
void setLeft(qreal x)
Definition: kdganttgraphicsscene.h:48
int width() const
void setGrid(AbstractGrid *grid)
Definition: kdganttgraphicsscene.cpp:270
qreal bottom() const
GraphicsItem * dragSource() const
Definition: kdganttgraphicsscene.cpp:621
Definition: kdganttglobal.h:214
void setPixelSize(int pixelSize)
bool isValid() const
ConstraintModel * constraintModel() const
Definition: kdganttgraphicsscene.cpp:232
void setFont(const QFont &font)
QPointF pos() const
void updateRow(const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:370
bool isValid() const
qreal y() const
QAbstractProxyModel * summaryHandlingModel() const
Definition: kdganttgraphicsscene.cpp:211
void setRowController(AbstractRowController *rc)
Definition: kdganttgraphicsscene.cpp:260
void adjustSize()
void removeEndConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:255
Definition: kdganttglobal.h:207
Abstract baseclass for grids. A grid is used to convert between QModelIndex'es and gantt chart values...
Definition: kdganttabstractgrid.h:40
int toInt(bool *ok) const
QList< ConstraintGraphicsItem * > startConstraints() const
Definition: kdganttgraphicsitem.h:76
void setPos(const QPointF &pos)
QPointer< QAbstractProxyModel > summaryHandlingModel
Definition: kdganttgraphicsscene_p.h:67
QPointF topLeft() const
void print(QPrinter *printer, bool drawRowLabels=true)
Definition: kdganttgraphicsscene.cpp:632
int row() const
void clicked(const QModelIndex &index)
void entered(const QModelIndex &index)
virtual void setSourceModel(QAbstractItemModel *sourceModel)
void helpEvent(QGraphicsSceneHelpEvent *helpEvent)
Definition: kdganttgraphicsscene.cpp:552
void addEndConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:240
void pressed(const QModelIndex &index)
Private(GraphicsScene *)
Definition: kdganttgraphicsscene.cpp:60
void removeItem(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:451
void itemPressed(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:601
QModelIndex parent() const
void recursiveUpdateMultiItem(const Span &span, const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:351
GraphicsScene(QObject *parent=0)
Definition: kdganttgraphicsscene.cpp:160
virtual QVariant data(const QModelIndex &proxyIndex, int role) const
GraphicsItem * findItem(const QModelIndex &) const
Definition: kdganttgraphicsscene.cpp:474
iterator end()
bool blockSignals(bool block)
qreal right() const
bool isNull() const
QList< Constraint > constraints() const
Definition: kdganttconstraintmodel.cpp:163
QModelIndex child(int row, int column) const
bool newPage()
void restore()
ConstraintGraphicsItem * findConstraintItem(const Constraint &) const
Definition: kdganttgraphicsscene.cpp:524
Proxy model that supports summary gantt items.
Definition: kdganttsummaryhandlingproxymodel.h:31
void setDragSource(GraphicsItem *item)
Definition: kdganttgraphicsscene.cpp:616
ItemDelegate * itemDelegate() const
Definition: kdganttgraphicsscene.cpp:192
void deleteSubtree(const QModelIndex &)
Definition: kdganttgraphicsscene.cpp:508
QDateTime currentDateTime()
void addStartConstraint(ConstraintGraphicsItem *)
Definition: kdganttgraphicsitem.cpp:232
qreal width() const
const QAbstractItemModel * model() const
void setClipRect(const QRectF &rectangle, Qt::ClipOperation operation)
void setItemIndexMethod(ItemIndexMethod method)
QVariant data(int role) const
QStyle * style()
Definition: kdganttglobal.h:216
void setTop(qreal y)
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
virtual int columnCount(const QModelIndex &parent) const =0
void update(qreal x, qreal y, qreal w, qreal h)
Definition: kdganttglobal.h:212
QModelIndex rootIndex() const
Definition: kdganttgraphicsscene.cpp:227
void invalidate(qreal x, qreal y, qreal w, qreal h, QFlags< QGraphicsScene::SceneLayer > layers)
QSet< T > fromList(const QList< T > &list)
void setIndex(const QPersistentModelIndex &idx)
Definition: kdganttgraphicsitem.cpp:184
AbstractRowController * rowController() const
Definition: kdganttgraphicsscene.cpp:265
virtual Span rowGeometry(const QModelIndex &idx) const =0
virtual ~GraphicsScene()
Definition: kdganttgraphicsscene.cpp:166
GraphicsItem * createItem(ItemType type) const
Definition: kdganttgraphicsscene.cpp:336
QRect pageRect() const
QString fromLatin1(const char *str, int size)
qreal height() const
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const =0
ConstraintGraphicsItem * findConstraintItem(const Constraint &c) const
Definition: kdganttgraphicsscene.cpp:130
void setItemDelegate(ItemDelegate *)
Definition: kdganttgraphicsscene.cpp:185
DateTimeGrid default_grid
Definition: kdganttgraphicsscene_p.h:59
void show()
void insertItem(const QPersistentModelIndex &, GraphicsItem *)
Definition: kdganttgraphicsscene.cpp:418
QFont font() const
void addItem(QGraphicsItem *item)
void createConstraintItem(const Constraint &c)
Definition: kdganttgraphicsscene.cpp:85
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const =0
QObject * parent() const
Definition: kdganttgraphicsitem.h:42
Abstract baseclass for row controllers. A row controller is used by the GraphicsView to nagivate the ...
Definition: kdganttabstractrowcontroller.h:34
QString toString() const
QAbstractItemModel * model() const
Definition: kdganttgraphicsscene.cpp:197
void gridChanged()
iterator begin()
void setStartDateTime(const QDateTime &dt)
Definition: kdganttdatetimegrid.cpp:309
int pointSize() const
void setRootIndex(const QModelIndex &idx)
Definition: kdganttgraphicsscene.cpp:222
void clearConstraintItems()
Definition: kdganttgraphicsscene.cpp:529
QList< ConstraintGraphicsItem * > endConstraints() const
Definition: kdganttgraphicsitem.h:77
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.