KReport
KReportDesignerItemLabel.cpp
57KReportDesignerItemLabel::KReportDesignerItemLabel(KReportDesigner* d, QGraphicsScene * scene, const QPointF &pos)
68KReportDesignerItemLabel::KReportDesignerItemLabel(const QDomNode & element, KReportDesigner * d, QGraphicsScene * s)
72 setSceneRect(KReportItemBase::scenePosition(item()->position()), KReportItemBase::sceneSize(item()->size()));
91 return QFontMetricsF(font()).boundingRect(QRectF(x(), y(), 0, 0), textFlags(), m_text->value().toString());
94void KReportDesignerItemLabel::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
118 if ((Qt::PenStyle)m_lineStyle->value().toInt() == Qt::NoPen || m_lineWeight->value().toInt() <= 0) {
121 painter->setPen(QPen(m_lineColor->value().value<QColor>(), m_lineWeight->value().toInt(), (Qt::PenStyle)m_lineStyle->value().toInt()));
Subclass of QGraphicsTextItem which simply forces its boundingRect to be the same as its parent.
Definition KReportBoundedTextItem.h:35
void setBackgroudOpacity(qreal opacity)
Sets background opacity, 0..1.0.
Definition KReportBoundedTextItem.cpp:79
QVariant value() const
bool setValue(const QVariant &value, ValueOptions options=ValueOptions())
QByteArray name() const
Base class for rectangular report items used within the designer GUI.
Definition KReportDesignerItemRectBase.h:39
The ReportDesigner is the main widget for designing a report.
Definition KReportDesigner.h:53
void setModified(bool modified)
Sets the modified status, defaulting to true for modified.
Definition KReportDesigner.cpp:776
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
KOSM_EXPORT const char * typeName(Type type)
QCA_EXPORT void init()
void setAlphaF(float alpha)
QDomElement createElement(const QString &tagName)
void setAttribute(const QString &name, const QString &value)
QDomNode firstChild() const const
QRectF boundingRect(QChar ch) const const
ItemIsFocusable
bool isVisible() const const
virtual void keyReleaseEvent(QKeyEvent *event)
QGraphicsScene * scene() const const
void setFlag(GraphicsItemFlag flag, bool enabled)
void setFocus(Qt::FocusReason focusReason)
void setVisible(bool visible)
void setZValue(qreal z)
void update(const QRectF &rect)
qreal x() const const
qreal y() const const
QRectF rect() const const
void addItem(QGraphicsItem *item)
void setDefaultTextColor(const QColor &col)
void setDocument(QTextDocument *document)
void setFont(const QFont &font)
void setPlainText(const QString &text)
textCursor
QString toPlainText() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool event(QEvent *e)
QObject * parent() const const
void drawRect(const QRect &rectangle)
void drawText(const QPoint &position, const QString &text)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
const QFont & font() const const
const QPen & pen() const const
void setBackgroundMode(Qt::BGMode mode)
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
TransparentMode
Key_F2
PenStyle
Document
void select(SelectionType selection)
void setDocumentMargin(qreal margin)
void setPlainText(const QString &text)
double toDouble(bool *ok) const const
int toInt(bool *ok) const const
qreal toReal(bool *ok) const const
QString toString() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.