KGantt
kganttgraphicsscene.cpp
118 GraphicsItem* item = items.value( summaryHandlingModel->mapFromSource( c.startIndex() ), nullptr );
137 GraphicsItem* item = items.value( summaryHandlingModel->mapFromSource( c.startIndex() ), nullptr );
409void GraphicsScene::Private::recursiveUpdateMultiItem( const Span& span, const QModelIndex& idx )
441 for ( QModelIndex treewalkidx = sidx; treewalkidx.isValid(); treewalkidx = treewalkidx.parent() ) {
461 if ( summaryHandlingModel()->data( rowidx.parent(), ItemTypeRole ).toInt() == TypeMulti && !isExpanded ) {
488 GraphicsItem* other_item = d->items.value(summaryHandlingModel()->mapFromSource( other_idx ),nullptr);
497 GraphicsItem* other_item = d->items.value(summaryHandlingModel()->mapFromSource( other_idx ),nullptr);
527 const QSet<ConstraintGraphicsItem*> clst = QSet<ConstraintGraphicsItem*>( lst1.begin(), lst1.end() ) +
581 deleteSubtree( summaryHandlingModel()->index( i, summaryHandlingModel()->columnCount(_idx)-1, _idx ) );
613void GraphicsScene::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
617 GraphicsItem *item = findItem(idx.model() == d->summaryHandlingModel ? idx : d->summaryHandlingModel->mapFromSource(idx));
624 GraphicsItem *item = findItem(idx.model() == d->summaryHandlingModel ? idx : d->summaryHandlingModel->mapFromSource(idx));
638 } else if ( ConstraintGraphicsItem* citem = qgraphicsitem_cast<ConstraintGraphicsItem*>( item ) ) {
738void GraphicsScene::print( QPrinter* printer, qreal start, qreal end, bool drawRowLabels, bool drawColumnLabels )
755void GraphicsScene::print( QPainter* painter, const QRectF& _targetRect, bool drawRowLabels, bool drawColumnLabels )
813void GraphicsScene::doPrintScene( QPrinter *printer, QPainter *painter, const QRectF &targetRect, const PrintingContext &context )
863 QModelIndex sidx = summaryHandlingModel()->mapToSource( summaryHandlingModel()->index( 0, 0, rootIndex()) );
905 scaleFactor = printer->logicalDpiX() / views().at(0)->logicalDpiX(); // always have only one view
917 // qInfo()<<Q_FUNC_INFO<<"labels header:"<<labelsHeaderRect<<"labels:"<<labelsRect<<"scene header:"<<sceneHeaderRect<<"scene:"<<scnRect<<"scaleFactor:"<<scaleFactor;
921 // qInfo()<<Q_FUNC_INFO<<'s'<<scaleFactor<<"pages="<<((sceneWidth * scaleFactor)/targetRect.width())<<'h'<<horPages<<'v'<<vertPages<<'s'<<scnRect<<'t'<<(targetRect.size()/scaleFactor);
937 // qInfo()<<Q_FUNC_INFO<<"print labels"<<"vert page:"<<vpage<<','<<hpage<<"yPos"<<yPos<<"label x:"<<labelsOffsetX;
940 target.setWidth(std::min(target.width(), (labelsHeaderRect.width() - labelsOffsetX) * scaleFactor) );
957 // qInfo()<<Q_FUNC_INFO<<"print labels"<<"vert page:"<<vpage<<','<<hpage<<"scene rect:"<<rect<<"target:"<<target;
972 // qInfo()<<Q_FUNC_INFO<<"print labels finished"<<"vert page:"<<vpage<<"hor page:"<<hpage<<"target offset:"<<targetLabelsOffset;
980 // qInfo()<<Q_FUNC_INFO<<"print diagram"<<"page:"<<vpage<<','<<hpage<<"xPos"<<xPos<<"yPos:"<<yPos;
992 // qInfo()<<Q_FUNC_INFO<<"scene header:"<<"page:"<<vpage<<','<<hpage<<"source:"<<rect<<"target:"<<targetHeader;
1006 // qInfo()<<Q_FUNC_INFO<<"scene:"<<"page:"<<vpage<<','<<hpage<<"source:"<<rect<<"target:"<<target;
1044void GraphicsScene::drawLabelsHeader( QPainter *painter, const QRectF &sourceRect, const QRectF &targetRect )
Abstract baseclass for grids. A grid is used to convert between QModelIndex'es and gantt chart values...
Abstract baseclass for row controllers. A row controller is used by the GraphicsView to nagivate the ...
virtual Span rowGeometry(const QModelIndex &idx) const =0
A class used to represent a dependency.
QBrush noInformationBrush() const
Definition kganttdatetimegrid.cpp:385
void setNoInformationBrush(const QBrush &brush)
Definition kganttdatetimegrid.cpp:378
static QModelIndex dataIndex(const QModelIndex &idx)
Definition kganttgraphicsscene.cpp:380
void printDiagram(QPrinter *printer, const PrintingContext &context)
Definition kganttgraphicsscene.cpp:777
GraphicsItem * createItem(ItemType type) const
Definition kganttgraphicsscene.cpp:395
void print(QPrinter *printer, bool drawRowLabels=true, bool drawColumnLabels=true)
Definition kganttgraphicsscene.cpp:723
const AbstractGrid * getGrid() const
Definition kganttgraphicsscene.cpp:346
The GraphicsView class provides a model/view implementation of a gantt chart.
void setModel(QAbstractItemModel *)
Definition kganttgraphicsview.cpp:476
void setRowController(KGantt::AbstractRowController *)
Definition kganttgraphicsview.cpp:579
The PrintingContext class provides options for printing the gantt chart.
bool drawColumnLabels() const
Definition kganttprintingcontext.cpp:76
bool drawRowLabels() const
Definition kganttprintingcontext.cpp:66
void setDrawRowLabels(bool state)
Definition kganttprintingcontext.cpp:71
void setSceneRect(const QRectF &rect)
Definition kganttprintingcontext.cpp:51
void setFitting(const Fitting &value)
Definition kganttprintingcontext.cpp:61
void setDrawColumnLabels(bool state)
Definition kganttprintingcontext.cpp:81
A class representing a start point and a length.
Proxy model that supports summary gantt items.
Q_SCRIPTABLE Q_NOREPLY void start()
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
bool isValid(QStringView ifopt)
virtual int columnCount(const QModelIndex &parent) const const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
virtual QVariant data(const QModelIndex &proxyIndex, int role) const const override
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const const=0
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const=0
virtual void setSourceModel(QAbstractItemModel *sourceModel)
QDateTime currentDateTime()
QRectF boundingRect(QChar ch) const const
QVariant data(int key) const const
QPointF pos() const const
void setPos(const QPointF &pos)
void setSelected(bool selected)
void show()
NoIndex
BackgroundLayer
void addItem(QGraphicsItem *item)
virtual bool event(QEvent *event) override
virtual void helpEvent(QGraphicsSceneHelpEvent *helpEvent)
void invalidate(const QRectF &rect, SceneLayers layers)
QGraphicsItem * itemAt(const QPointF &position, const QTransform &deviceTransform) const const
void setItemIndexMethod(ItemIndexMethod method)
QList< QGraphicsItem * > items(Qt::SortOrder order) const const
void render(QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode)
sceneRect
void selectionChanged()
QStyle * style() const const
void update(const QRectF &rect)
QList< QGraphicsView * > views() const const
qreal width() const const
QPointF scenePos() const const
QPoint screenPos() const const
void setTextWidth(qreal width)
qreal textWidth() const const
QGraphicsScene * scene() const const
QModelIndexList indexes() const const
SelectionFlags
iterator begin()
iterator end()
int column() const const
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
QModelIndex parent() const const
int row() const const
Q_EMITQ_EMIT
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
T qobject_cast(QObject *object)
QPageLayout pageLayout() const const
QMargins marginsPixels(int resolution) const const
QRect paintRectPixels(int resolution) const const
int logicalDpiX() const const
void restore()
void save()
void setClipRect(const QRect &rectangle, Qt::ClipOperation operation)
void setFont(const QFont &font)
bool isValid() const const
const QAbstractItemModel * model() const const
qreal y() const const
DevicePixel
bool fullPage() const const
virtual bool newPage() override
QRectF pageRect(Unit unit) const const
int resolution() const const
void adjust(qreal dx1, qreal dy1, qreal dx2, qreal dy2)
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const const
qreal height() const const
bool isNull() const const
qreal left() const const
QRectF marginsRemoved(const QMarginsF &margins) const const
qreal right() const const
void setHeight(qreal height)
void setLeft(qreal x)
void setSize(const QSizeF &size)
void setTop(qreal y)
void setWidth(qreal width)
QSizeF size() const const
qreal top() const const
void translate(const QPointF &offset)
qreal width() const const
virtual void setData(const QVariant &value, int role)
void appendRow(QStandardItem *item)
QString fromLatin1(QByteArrayView str)
CE_Header
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
AlignCenter
DisplayRole
ControlModifier
LeftButton
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
int toInt(bool *ok) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:04:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:04:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.