![]() |
Code Documentation 3.1
Social Network Visualizer
|
#include <chart.h>


Public Member Functions | |
| Chart (QWidget *parent=Q_NULLPTR) | |
| ~Chart () | |
| void | setTitle (const QString &title=QString(), const QFont &font=QFont()) |
| Set the title of the QChart. | |
| void | addSeries (QAbstractSeries *series=Q_NULLPTR) |
| Adds QAbstractSeries series to chart If no series are passed, a new QSplineSeries is created with 1 point at (0,0) | |
| void | appendToSeries (const QPointF &p) |
| Adds the data point p(qreal,qreal) to the series. | |
| void | removeAllSeries () |
| Removes and deletes all series objects that have been added to the chart. | |
| void | createDefaultAxes () |
| Creates default axes. Must be called AFTER loading a series to the chart. | |
| QList< QAbstractAxis * > | axes (Qt::Orientations orientation=Qt::Horizontal|Qt::Vertical, QAbstractSeries *series=Q_NULLPTR) const |
| void | removeAllAxes () |
| Removes all previously attached X,Y axes from the QChart. | |
| void | addAxis (QAbstractAxis *axis, Qt::Alignment alignment) |
| Add Axis axis to the QChart. Does not delete previously attached axis. | |
| void | setAxisX (QAbstractAxis *axis, QAbstractSeries *series=Q_NULLPTR) |
| Adds the axis axis to the chart and attaches it to the series series as a bottom-aligned horizontal axis. The chart takes ownership of both the axis and the series. | |
| void | setAxisY (QAbstractAxis *axis, QAbstractSeries *series=Q_NULLPTR) |
| Adds the axis axis to the chart and attaches it to the series series as a left-aligned horizontal axis. The chart takes ownership of both the axis and the series. | |
| void | setAxisXRange (const QVariant &min, const QVariant &max) |
| Set the range of the (first) horizontal axis. | |
| void | setAxisXMin (const QVariant &min) |
| Sets the minimum value shown on the horizontal axis. | |
| void | setAxisYRange (const QVariant &min, const QVariant &max) |
| Set the range of the vertical axis. | |
| void | setAxisYMin (const QVariant &min) |
| Sets the minimum value shown on the vertical axis. | |
| void | setAxesThemeDefault () |
| Applies a simple theme to axes (default label fonts, line and grid line pen). WARNING: Axes must be already attached to m_chart. | |
| void | setAxisXLabelsAngle (const int &angle) |
| void | setAxisXLabelFont (const QFont &font=QFont("Helvetica", 6)) |
| Set the label font of the horizontal axis. | |
| void | setAxisYLabelFont (const QFont &font=QFont("Helvetica", 6)) |
| Set the label font of the vertical axis. | |
| void | setAxisXLinePen (const QPen &pen=QPen(QColor("#d0d0d0"), 1, Qt::SolidLine)) |
| Set the line pen of the horizontal axis. | |
| void | setAxisYLinePen (const QPen &pen=QPen(QColor("#d0d0d0"), 1, Qt::SolidLine)) |
| Set the line pen of the vertical axis. | |
| void | setAxisXGridLinePen (const QPen &pen=QPen(QColor("#e0e0e0"), 1, Qt::DotLine)) |
| Set the grid line pen of the horizontal axis. | |
| void | setAxisYGridLinePen (const QPen &pen=QPen(QColor("#e0e0e0"), 1, Qt::DotLine)) |
| Set the grid line pen of the vertical axis. | |
| void | setTheme (QChart::ChartTheme theme=QChart::ChartThemeLight) |
| Set the theme of the QChart. | |
| void | setThemeSmallWidget (const int minWidth, const int minHeight) |
| Set the theme for when our chart widget is small. | |
| void | setChartBackgroundBrush (const QBrush &brush=QBrush(Qt::transparent)) |
| Sets the background brush of the QChart If no brush defined, it uses a transparent brush. | |
| void | setChartBackgroundPen (const QPen &pen=QPen(Qt::transparent)) |
| Sets the background pen of the QChart If no pen defined, it uses a transparent pen. | |
| void | setMargins (const QMargins &margins=QMargins()) |
| Set the margins of the QChart. | |
| void | toggleLegend (const bool &toggle=false) |
| Toggle the legend of the QChart. | |
| void | resetToTrivial () |
Private Attributes | |
| QChart * | m_chart |
| QSplineSeries * | m_series |
|
explicit |
| Chart::~Chart | ( | ) |
| void Chart::addAxis | ( | QAbstractAxis * | axis, |
| Qt::Alignment | alignment | ||
| ) |
Add Axis axis to the QChart. Does not delete previously attached axis.
| axis | |
| alignment |
| void Chart::addSeries | ( | QAbstractSeries * | series = Q_NULLPTR | ) |
Adds QAbstractSeries series to chart If no series are passed, a new QSplineSeries is created with 1 point at (0,0)
| series |
| void Chart::appendToSeries | ( | const QPointF & | p | ) |
Adds the data point p(qreal,qreal) to the series.
| p |
| QList< QAbstractAxis * > Chart::axes | ( | Qt::Orientations | orientation = Qt::Horizontal|Qt::Vertical, |
| QAbstractSeries * | series = Q_NULLPTR |
||
| ) | const |
| void Chart::createDefaultAxes | ( | ) |
Creates default axes. Must be called AFTER loading a series to the chart.
| void Chart::removeAllAxes | ( | ) |
Removes all previously attached X,Y axes from the QChart.
| void Chart::removeAllSeries | ( | ) |
Removes and deletes all series objects that have been added to the chart.
| void Chart::resetToTrivial | ( | ) |
| void Chart::setAxesThemeDefault | ( | ) |
Applies a simple theme to axes (default label fonts, line and grid line pen). WARNING: Axes must be already attached to m_chart.
| void Chart::setAxisX | ( | QAbstractAxis * | axis, |
| QAbstractSeries * | series = Q_NULLPTR |
||
| ) |
Adds the axis axis to the chart and attaches it to the series series as a bottom-aligned horizontal axis. The chart takes ownership of both the axis and the series.
| axis | |
| series |
| void Chart::setAxisXGridLinePen | ( | const QPen & | pen = QPen(QColor("#e0e0e0"), 1,Qt::DotLine) | ) |
Set the grid line pen of the horizontal axis.
| font |
| void Chart::setAxisXLabelFont | ( | const QFont & | font = QFont("Helvetica", 6 ) | ) |
Set the label font of the horizontal axis.
| font |
| void Chart::setAxisXLabelsAngle | ( | const int & | angle | ) |
| void Chart::setAxisXLinePen | ( | const QPen & | pen = QPen(QColor("#d0d0d0"), 1,Qt::SolidLine) | ) |
Set the line pen of the horizontal axis.
| font |
| void Chart::setAxisXMin | ( | const QVariant & | min | ) |
Sets the minimum value shown on the horizontal axis.
| min |
| void Chart::setAxisXRange | ( | const QVariant & | min, |
| const QVariant & | max | ||
| ) |
Set the range of the (first) horizontal axis.
| min | |
| max |
| void Chart::setAxisY | ( | QAbstractAxis * | axis, |
| QAbstractSeries * | series = Q_NULLPTR |
||
| ) |
Adds the axis axis to the chart and attaches it to the series series as a left-aligned horizontal axis. The chart takes ownership of both the axis and the series.
| axis | |
| series |
| void Chart::setAxisYGridLinePen | ( | const QPen & | pen = QPen(QColor("#e0e0e0"), 1,Qt::DotLine) | ) |
Set the grid line pen of the vertical axis.
| font |
| void Chart::setAxisYLabelFont | ( | const QFont & | font = QFont("Helvetica", 6 ) | ) |
Set the label font of the vertical axis.
| font |
| void Chart::setAxisYLinePen | ( | const QPen & | pen = QPen(QColor("#d0d0d0"), 1,Qt::SolidLine) | ) |
Set the line pen of the vertical axis.
| font |
| void Chart::setAxisYMin | ( | const QVariant & | min | ) |
Sets the minimum value shown on the vertical axis.
| min |
| void Chart::setAxisYRange | ( | const QVariant & | min, |
| const QVariant & | max | ||
| ) |
Set the range of the vertical axis.
| min | |
| max |
| void Chart::setChartBackgroundBrush | ( | const QBrush & | brush = QBrush(Qt::transparent) | ) |
Sets the background brush of the QChart If no brush defined, it uses a transparent brush.
| brush |
| void Chart::setChartBackgroundPen | ( | const QPen & | pen = QPen(Qt::transparent) | ) |
Sets the background pen of the QChart If no pen defined, it uses a transparent pen.
| brush |
| void Chart::setMargins | ( | const QMargins & | margins = QMargins() | ) |
Set the margins of the QChart.
| margins |
| void Chart::setTheme | ( | QChart::ChartTheme | theme = QChart::ChartThemeLight | ) |
Set the theme of the QChart.
| theme |
| void Chart::setThemeSmallWidget | ( | const int | minWidth, |
| const int | minHeight | ||
| ) |
Set the theme for when our chart widget is small.
| chartHeight |
| void Chart::setTitle | ( | const QString & | title = QString(), |
| const QFont & | font = QFont() |
||
| ) |
Set the title of the QChart.
| title |
| void Chart::toggleLegend | ( | const bool & | toggle = false | ) |
Toggle the legend of the QChart.
| toggle |
|
private |
|
private |