Search for usage in LXR

#include <Chart.h>

Inheritance diagram for Chart:

Public Types

using DataSourcesProperty = QQmlListProperty<ChartDataSource>
enum  IndexingMode { IndexSourceValues = 1 , IndexEachSource , IndexAllValues }
- Public Types inherited from QQuickItem
enum  Flag
enum  ItemChange
enum  TransformOrigin


int highlight
IndexingMode indexingMode
QQmlListProperty< ChartDataSourcevalueSources
- Properties inherited from QQuickItem
- Properties inherited from QObject

Public Member Functions

 Chart (QQuickItem *parent=nullptr)
ChartDataSourcecolorSource () const
Q_SIGNAL void colorSourceChanged ()
Q_SIGNAL void dataChanged ()
int highlight () const
Q_SIGNAL void highlightChanged ()
IndexingMode indexingMode () const
Q_SIGNAL void indexingModeChanged ()
Q_INVOKABLE void insertValueSource (int index, ChartDataSource *source)
ChartDataSourcenameSource () const
Q_SIGNAL void nameSourceChanged ()
Q_INVOKABLE void removeValueSource (int index)
Q_INVOKABLE void removeValueSource (QObject *source)
void resetHighlight ()
void setColorSource (ChartDataSource *colorSource)
void setHighlight (int highlight)
void setIndexingMode (IndexingMode newIndexingMode)
void setNameSource (ChartDataSource *nameSource)
void setShortNameSource (ChartDataSource *shortNameSource)
ChartDataSourceshortNameSource () const
Q_SIGNAL void shortNameSourceChanged ()
QList< ChartDataSource * > valueSources () const
Q_SIGNAL void valueSourcesChanged ()
DataSourcesProperty valueSourcesProperty ()
- Public Member Functions inherited from QQuickItem
 QQuickItem (QQuickItem *parent)
Qt::MouseButtons acceptedMouseButtons () const const
bool acceptHoverEvents () const const
bool acceptTouchEvents () const const
void activeFocusChanged (bool)
bool activeFocusOnTab () const const
void activeFocusOnTabChanged (bool)
bool antialiasing () const const
void antialiasingChanged (bool)
qreal baselineOffset () const const
void baselineOffsetChanged (qreal)
QBindable< qreal > bindableHeight ()
QBindable< qreal > bindableWidth ()
QBindable< qreal > bindableX ()
QBindable< qreal > bindableY ()
virtual QRectF boundingRect () const const
QQuickItemchildAt (qreal x, qreal y) const const
QList< QQuickItem * > childItems () const const
QRectF childrenRect ()
void childrenRectChanged (const QRectF &)
bool clip () const const
void clipChanged (bool)
virtual QRectF clipRect () const const
QObjectcontainmentMask () const const
void containmentMaskChanged ()
virtual bool contains (const QPointF &point) const const
QCursor cursor () const const
void dumpItemTree () const const
void enabledChanged ()
void ensurePolished ()
bool filtersChildMouseEvents () const const
Flags flags () const const
void focusChanged (bool)
void forceActiveFocus ()
void forceActiveFocus (Qt::FocusReason reason)
void grabMouse ()
QSharedPointer< QQuickItemGrabResultgrabToImage (const QSize &targetSize)
void grabTouchPoints (const QList< int > &ids)
bool hasActiveFocus () const const
bool hasFocus () const const
qreal height () const const
void heightChanged ()
qreal implicitHeight () const const
void implicitHeightChanged ()
qreal implicitWidth () const const
void implicitWidthChanged ()
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const const
bool isAncestorOf (const QQuickItem *child) const const
bool isEnabled () const const
bool isFocusScope () const const
virtual bool isTextureProvider () const const
bool isVisible () const const
bool keepMouseGrab () const const
bool keepTouchGrab () const const
QPointF mapFromGlobal (const QPointF &point) const const
QPointF mapFromItem (const QQuickItem *item, const QPointF &point) const const
QPointF mapFromScene (const QPointF &point) const const
QRectF mapRectFromItem (const QQuickItem *item, const QRectF &rect) const const
QRectF mapRectFromScene (const QRectF &rect) const const
QRectF mapRectToItem (const QQuickItem *item, const QRectF &rect) const const
QRectF mapRectToScene (const QRectF &rect) const const
QPointF mapToGlobal (const QPointF &point) const const
QPointF mapToItem (const QQuickItem *item, const QPointF &point) const const
QPointF mapToScene (const QPointF &point) const const
QQuickItemnextItemInFocusChain (bool forward)
qreal opacity () const const
void opacityChanged ()
void parentChanged (QQuickItem *)
QQuickItemparentItem () const const
void polish ()
void resetAntialiasing ()
void resetHeight ()
void resetWidth ()
qreal rotation () const const
void rotationChanged ()
qreal scale () const const
void scaleChanged ()
QQuickItemscopedFocusItem () const const
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
void setAcceptHoverEvents (bool enabled)
void setAcceptTouchEvents (bool enabled)
void setActiveFocusOnTab (bool)
void setAntialiasing (bool)
void setBaselineOffset (qreal)
void setClip (bool)
void setContainmentMask (QObject *mask)
void setCursor (const QCursor &cursor)
void setEnabled (bool)
void setFiltersChildMouseEvents (bool filter)
void setFlag (Flag flag, bool enabled)
void setFlags (Flags flags)
void setFocus (bool focus, Qt::FocusReason reason)
void setFocus (bool)
void setHeight (qreal)
void setImplicitHeight (qreal)
void setImplicitWidth (qreal)
void setKeepMouseGrab (bool keep)
void setKeepTouchGrab (bool keep)
void setOpacity (qreal)
void setParentItem (QQuickItem *parent)
void setRotation (qreal)
void setScale (qreal)
void setSize (const QSizeF &size)
void setSmooth (bool)
void setState (const QString &)
void setTransformOrigin (TransformOrigin)
void setVisible (bool)
void setWidth (qreal)
void setX (qreal)
void setY (qreal)
void setZ (qreal)
QSizeF size () const const
bool smooth () const const
void smoothChanged (bool)
void stackAfter (const QQuickItem *sibling)
void stackBefore (const QQuickItem *sibling)
QString state () const const
void stateChanged (const QString &)
virtual QSGTextureProvidertextureProvider () const const
TransformOrigin transformOrigin () const const
void transformOriginChanged (TransformOrigin)
void ungrabMouse ()
void ungrabTouchPoints ()
void unsetCursor ()
void update ()
QQuickItemviewportItem () const const
void visibleChanged ()
qreal width () const const
void widthChanged ()
QQuickWindowwindow () const const
void windowChanged (QQuickWindow *window)
qreal x () const const
void xChanged ()
qreal y () const const
void yChanged ()
qreal z () const const
void zChanged ()
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
QBindable< QStringbindableObjectName ()
bool blockSignals (bool block)
const QObjectListchildren () const const
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
void deleteLater ()
void destroyed (QObject *obj)
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
bool disconnect (const QObject *receiver, const char *method) const const
void dumpObjectInfo () const const
void dumpObjectTree () const const
QList< QByteArraydynamicPropertyNames () const const
virtual bool eventFilter (QObject *watched, QEvent *event)
findChild (const QString &name, Qt::FindChildOptions options) const const
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
QList< T > findChildren (Qt::FindChildOptions options) const const
bool inherits (const char *className) const const
void installEventFilter (QObject *filterObj)
bool isQuickItemType () const const
bool isWidgetType () const const
bool isWindowType () const const
void killTimer (int id)
virtual const QMetaObjectmetaObject () const const
void moveToThread (QThread *targetThread)
QString objectName () const const
void objectNameChanged (const QString &objectName)
QObjectparent () const const
QVariant property (const char *name) const const
 Q_CLASSINFO (Name, Value)
 Q_ENUM (...)
 Q_ENUM_NS (...)
 Q_ENUMS (...)
 Q_FLAG (...)
 Q_FLAG_NS (...)
 Q_FLAGS (...)
qobject_cast (const QObject *object)
qobject_cast (QObject *object)
void removeEventFilter (QObject *obj)
void setObjectName (const QString &name)
void setObjectName (QAnyStringView name)
void setParent (QObject *parent)
bool setProperty (const char *name, const QVariant &value)
bool setProperty (const char *name, QVariant &&value)
bool signalsBlocked () const const
int startTimer (int interval, Qt::TimerType timerType)
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
QThreadthread () const const

Protected Member Functions

void componentComplete () override
QColor desaturate (const QColor &input)
virtual void onDataChanged ()=0
- Protected Member Functions inherited from QQuickItem
virtual bool childMouseEventFilter (QQuickItem *item, QEvent *event)
virtual void classBegin () override
virtual void dragEnterEvent (QDragEnterEvent *event)
virtual void dragLeaveEvent (QDragLeaveEvent *event)
virtual void dragMoveEvent (QDragMoveEvent *event)
virtual void dropEvent (QDropEvent *event)
virtual bool event (QEvent *ev) override
virtual void focusInEvent (QFocusEvent *)
virtual void focusOutEvent (QFocusEvent *)
virtual void geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry)
bool heightValid () const const
virtual void hoverEnterEvent (QHoverEvent *event)
virtual void hoverLeaveEvent (QHoverEvent *event)
virtual void hoverMoveEvent (QHoverEvent *event)
virtual void inputMethodEvent (QInputMethodEvent *event)
bool isComponentComplete () const const
virtual void itemChange (ItemChange change, const ItemChangeData &value)
virtual void keyPressEvent (QKeyEvent *event)
virtual void keyReleaseEvent (QKeyEvent *event)
virtual void mouseDoubleClickEvent (QMouseEvent *event)
virtual void mouseMoveEvent (QMouseEvent *event)
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void mouseUngrabEvent ()
virtual void releaseResources ()
virtual void touchEvent (QTouchEvent *event)
virtual void touchUngrabEvent ()
void updateInputMethod (Qt::InputMethodQueries queries)
virtual QSGNodeupdatePaintNode (QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
virtual void updatePolish ()
virtual void wheelEvent (QWheelEvent *event)
bool widthValid () const const
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
virtual void connectNotify (const QMetaMethod &signal)
virtual void customEvent (QEvent *event)
virtual void disconnectNotify (const QMetaMethod &signal)
bool isSignalConnected (const QMetaMethod &signal) const const
int receivers (const char *signal) const const
QObjectsender () const const
int senderSignalIndex () const const
virtual void timerEvent (QTimerEvent *event)

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect (const QMetaObject::Connection &connection)
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
QString tr (const char *sourceText, const char *disambiguation, int n)
- Public Attributes inherited from QQuickItem
typedef Flags
- Public Attributes inherited from QObject
typedef QObjectList

Detailed Description

Abstract base class for all charts.

Definition at line 21 of file Chart.h.

Member Typedef Documentation

◆ DataSourcesProperty

Member Enumeration Documentation

◆ IndexingMode

How to index color and name sources relative to the different value sources.


Index each value, restart indexing for each value source.


Index each value source, never index individual values.


Index each value, continuing with the index for each value source.

Definition at line 33 of file Chart.h.

Property Documentation

◆ colorSource

ChartDataSource * Chart::colorSource

The data source to use for colors of chart items.

Definition at line 62 of file Chart.h.

◆ highlight

int Chart::highlight

The index of a value source to highlight.

Highlighting is dependant on Chart type, but will generally mean that other value sources are rendered with lower opacity.

By default, this is -1 which means nothing is highlighted.

Definition at line 94 of file Chart.h.

◆ indexingMode

IndexingMode Chart::indexingMode

The indexing mode used for indexing colors and names.

Definition at line 81 of file Chart.h.

◆ nameSource

ChartDataSource * Chart::nameSource

The data source to use for names of chart items.

Definition at line 46 of file Chart.h.

◆ shortNameSource

ChartDataSource * Chart::shortNameSource

The data source to use for short names of chart items.

Definition at line 54 of file Chart.h.

◆ valueSources

QQmlListProperty<ChartDataSource> Chart::valueSources

The data sources providing the data this chart needs to render.

Definition at line 70 of file Chart.h.

Constructor & Destructor Documentation

◆ Chart()

Chart::Chart ( QQuickItem * parent = nullptr)

Definition at line 11 of file Chart.cpp.

Member Function Documentation

◆ colorSource()

ChartDataSource * Chart::colorSource ( ) const

Definition at line 50 of file Chart.cpp.

◆ componentComplete()

void Chart::componentComplete ( )

Reimplemented from QQuickItem.

Definition at line 173 of file Chart.cpp.

◆ desaturate()

QColor Chart::desaturate ( const QColor & input)

Desaturate and de-emphasise a color.

Mainly intended as a standard for ensuring everything but the highlighted item is desaturated.

Definition at line 179 of file Chart.cpp.

◆ highlight()

int Chart::highlight ( ) const

Definition at line 152 of file Chart.cpp.

◆ indexingMode()

Chart::IndexingMode Chart::indexingMode ( ) const

Definition at line 136 of file Chart.cpp.

◆ insertValueSource()

void Chart::insertValueSource ( int index,
ChartDataSource * source )

Definition at line 94 of file Chart.cpp.

◆ nameSource()

ChartDataSource * Chart::nameSource ( ) const

Definition at line 18 of file Chart.cpp.

◆ onDataChanged()

virtual void Chart::onDataChanged ( )
protectedpure virtual

Called when the data of a value source changes.

This method should be reimplemented by subclasses. It is called whenever the data of one of the value sources changes. Subclasses should use this to make sure that they update whatever internal state they use for rendering, then call update() to schedule rendering the item.

Implemented in BarChart, LineChart, and PieChart.

◆ removeValueSource() [1/2]

void Chart::removeValueSource ( int index)

Definition at line 108 of file Chart.cpp.

◆ removeValueSource() [2/2]

void Chart::removeValueSource ( QObject * source)

Definition at line 121 of file Chart.cpp.

◆ resetHighlight()

void Chart::resetHighlight ( )

Definition at line 168 of file Chart.cpp.

◆ setColorSource()

void Chart::setColorSource ( ChartDataSource * colorSource)

Definition at line 55 of file Chart.cpp.

◆ setHighlight()

void Chart::setHighlight ( int highlight)

Definition at line 157 of file Chart.cpp.

◆ setIndexingMode()

void Chart::setIndexingMode ( IndexingMode newIndexingMode)

Definition at line 141 of file Chart.cpp.

◆ setNameSource()

void Chart::setNameSource ( ChartDataSource * nameSource)

Definition at line 23 of file Chart.cpp.

◆ setShortNameSource()

void Chart::setShortNameSource ( ChartDataSource * shortNameSource)

Definition at line 39 of file Chart.cpp.

◆ shortNameSource()

ChartDataSource * Chart::shortNameSource ( ) const

Definition at line 34 of file Chart.cpp.

◆ valueSources()

QList< ChartDataSource * > Chart::valueSources ( ) const

Definition at line 89 of file Chart.cpp.

◆ valueSourcesProperty()

Chart::DataSourcesProperty Chart::valueSourcesProperty ( )

Definition at line 75 of file Chart.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:58:10 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.