9#ifndef KCHARTLAYOUTITEMS_H
10#define KCHARTLAYOUTITEMS_H
14#include <QFontMetricsF>
19#include "KChartTextAttributes.h"
20#include "KChartMarkerAttributes.h"
31 class AbstractDiagram;
44 mParentLayout(
nullptr ) {}
52 virtual void paintAll(
QPainter& painter );
70 virtual void setParentWidget(
QWidget* widget );
75 virtual void sizeHintChanged()
const;
77 void setParentLayout(
QLayout* lay )
85 void removeFromParentLayout()
87 if ( mParentLayout ) {
89 mParentLayout->removeWidget( widget() );
91 mParentLayout->removeItem(
this );
109 const QObject* autoReferenceArea,
113 void setAutoReferenceArea(
const QObject* area );
114 const QObject* autoReferenceArea()
const;
116 void setText(
const QString & text);
137 bool isEmpty()
const override;
141 QSize maximumSize()
const override;
143 QSize minimumSize()
const override;
145 QSize sizeHint()
const override;
147 void setGeometry(
const QRect& r )
override;
149 QRect geometry()
const override;
151 virtual int marginWidth()
const;
153 virtual QSize sizeHintUnrotated()
const;
158 virtual qreal realFontSize()
const;
159 virtual QFont realFont()
const;
165 bool maybeUpdateRealFont()
const;
168 QSize calcSizeHint(
const QFont& font )
const;
169 int marginWidth(
const QSize& textSize )
const;
171 qreal fitFontSizeToGeometry()
const;
177 const QObject* mAutoReferenceArea;
179 mutable QSize cachedSizeHint;
180 mutable QPolygon mCachedBoundingPolygon;
181 mutable qreal cachedFontSize;
182 mutable QFont cachedFont;
188 TextBubbleLayoutItem();
189 TextBubbleLayoutItem(
const QString& text,
191 const QObject* autoReferenceArea,
195 ~TextBubbleLayoutItem()
override;
197 void setAutoReferenceArea(
const QObject* area );
198 const QObject* autoReferenceArea()
const;
200 void setText(
const QString & text);
207 bool isEmpty()
const override;
211 QSize maximumSize()
const override;
213 QSize minimumSize()
const override;
215 QSize sizeHint()
const override;
217 void setGeometry(
const QRect& r )
override;
219 QRect geometry()
const override;
221 void paint(
QPainter* painter )
override;
224 int borderWidth()
const;
244 QRect geometry()
const override;
245 bool isEmpty()
const override;
246 QSize maximumSize()
const override;
247 QSize minimumSize()
const override;
248 void setGeometry(
const QRect& r )
override;
249 QSize sizeHint()
const override;
253 static void paintIntoRect(
283 QRect geometry()
const override;
284 bool isEmpty()
const override;
285 QSize maximumSize()
const override;
286 QSize minimumSize()
const override;
287 void setGeometry(
const QRect& r )
override;
288 QSize sizeHint()
const override;
290 void setLegendLineSymbolAlignment(
Qt::Alignment legendLineSymbolAlignment);
295 static void paintIntoRect(
321 const QBrush& markerBrush,
322 const QPen& markerPen,
326 QRect geometry()
const override;
327 bool isEmpty()
const override;
328 QSize maximumSize()
const override;
329 QSize minimumSize()
const override;
330 void setGeometry(
const QRect& r )
override;
331 QSize sizeHint()
const override;
357 QRect geometry()
const override;
358 bool isEmpty()
const override;
359 QSize maximumSize()
const override;
360 QSize minimumSize()
const override;
361 void setGeometry(
const QRect& r )
override;
362 QSize sizeHint()
const override;
380 QRect geometry()
const override;
381 bool isEmpty()
const override;
382 QSize maximumSize()
const override;
383 QSize minimumSize()
const override;
384 void setGeometry(
const QRect& r )
override;
385 QSize sizeHint()
const override;
467 bool layoutIsAtTopPosition,
QHBoxLayout *rightLeftLayout,
468 bool layoutIsAtLeftPosition,
QVBoxLayout *topBottomLayout );
471 QRect geometry()
const override;
472 bool isEmpty()
const override;
473 QSize maximumSize()
const override;
474 QSize minimumSize()
const override;
475 void setGeometry(
const QRect& r )
override;
476 QSize sizeHint()
const override;
482 bool mLayoutIsAtTopPosition;
484 bool mLayoutIsAtLeftPosition;
487 mutable QBrush mCommonBrush;
488 mutable QSize mCachedSize;
MeasureOrientation
Measure orientation mode: the way how the absolute value of a KChart::Measure is determined during KC...
AbstractDiagram defines the interface for diagram classes.
Base class for all layout items of KChart.
Layout item showing a horizontal line.
Layout item showing a coloured line.
Layout item showing a coloured line and a data point marker.
A set of attributes controlling the appearance of data set markers.
Layout item showing a data point marker.
Stores information about painting diagrams.
A set of text attributes.
Layout item showing a text.
Layout item showing a vertical line.
KTextDocument is an internally used enhanced QTextDocument.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.