KReport
KReportDesignerItemRectBase.cpp
50 : QGraphicsRectItem(), KReportDesignerItemBase(r, b), d(new KReportDesignerItemRectBase::Private)
63 return QRectF(KReportItemBase::scenePosition(item()->position()), KReportItemBase::sceneSize(item()->size()));
71void KReportDesignerItemRectBase::setSceneRect(const QPointF& topLeft, const QSizeF& size, SceneRectFlag update)
98 item()->setPosition(KReportItemBase::positionFromScene(QPointF(sceneRect().x(), sceneRect().y())));
134 if (sceneRect().y() - p.y() + rect().height() > 0 && sceneRect().x() - p.x() + rect().width() >= 0)
135 setSceneRect(QPointF(p.x(), p.y()), QSizeF(sceneRect().x() - p.x() + rect().width(), sceneRect().y() - p.y() + rect().height()));
139 setSceneRect(QPointF(sceneRect().x(), p.y()), QSizeF(rect().width(), sceneRect().y() - p.y() + rect().height()));
143 setSceneRect(QPointF(sceneRect().x(), p.y()), QSizeF(w, sceneRect().y() - p.y() + rect().height()));
159 setSceneRect(QPointF(p.x(), sceneRect().y()), QSizeF(sceneRect().x() - p.x() + rect().width(), h));
229 painter->fillRect(center.x() + halfW - 4 , center.y() + halfH - 4 , 5, 5, QColor(128, 128, 255));
278QVariant KReportDesignerItemRectBase::itemChange(GraphicsItemChange change, const QVariant &value)
328 item()->setPosition(item()->unit().convertToPoint(p.value().toPointF())); //TODO dont update property
330 item()->setSize(item()->unit().convertToPoint(p.value().toSizeF())); //TODO dont update property
358QRectF KReportDesignerItemRectBase::properRect(const KReportDesigner &d, qreal minWidth, qreal minHeight) const
388void KReportDesignerItemBase::updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType)
QVariant value() const
QByteArray name() const
void setListData(const QStringList &keys, const QStringList &names)
Base class for report items used within the designer GUI.
Definition KReportDesignerItemBase.h:40
void updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType)
Updates the text that is shown for the item in the report designer If itemDataSource is set then it i...
Definition KReportDesignerItemRectBase.cpp:388
Base class for rectangular report items used within the designer GUI.
Definition KReportDesignerItemRectBase.h:39
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Definition KReportDesignerItemRectBase.cpp:115
void move(const QPointF &) override
Definition KReportDesignerItemRectBase.cpp:337
The ReportDesigner is the main widget for designing a report.
Definition KReportDesigner.h:53
void changeSet(KPropertySet *set)
Sets the property set for the currently selected item.
Definition KReportDesigner.cpp:1178
qreal countSelectionHeight() const
Definition KReportDesigner.cpp:1621
qreal countSelectionWidth() const
Definition KReportDesigner.cpp:1629
static QPointF scenePosition(const QPointF &ptPos)
Helper function mapping to screen units (pixels), ptPos is in points.
Definition KReportItemBase.cpp:235
static QSizeF sceneSize(const QSizeF &ptSize)
Helper function mapping to screen units (pixels), ptSize is in points.
Definition KReportItemBase.cpp:242
void setPosition(const QPointF &ptPos)
Sets position for the element.
Definition KReportItemBase.cpp:259
static QPointF positionFromScene(const QPointF &pos)
Helper function mapping from screen units to points, pos is in pixels.
Definition KReportItemBase.cpp:269
static QSizeF sizeFromScene(const QSizeF &size)
Helper function mapping from screen units to points, size is in pixels.
Definition KReportItemBase.cpp:276
KCRASH_EXPORT void setFlags(KCrash::CrashFlags flags)
ItemPositionChange
bool isSelected() const const
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QPointF pos() const const
QGraphicsScene * scene() const const
QPointF scenePos() const const
void setCursor(const QCursor &cursor)
void setPos(const QPointF &pos)
void setSelected(bool selected)
void unsetCursor()
void update(const QRectF &rect)
qreal x() const const
qreal y() const const
virtual QRectF boundingRect() const const override
QRectF rect() const const
void setRect(const QRectF &rectangle)
qreal height() const const
void update(const QRectF &rect)
qreal width() const const
void drawRect(const QRect &rectangle)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
void setPen(Qt::PenStyle style)
void setX(qreal x)
void setY(qreal y)
qreal x() const const
qreal y() const const
QPointF center() const const
bool contains(const QPointF &point) const const
qreal height() const const
qreal width() const const
qreal x() const const
qreal y() const const
bool isEmpty() const const
SizeFDiagCursor
DotLine
QTextStream & center(QTextStream &stream)
QPointF toPointF() const const
QSizeF toSizeF() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:58 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:19:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.