##// END OF EJS Templates
Fixed documentation of qmlchart demo
Fixed documentation of qmlchart demo

File last commit:

r1517:7e86792a50b2
r1520:a557edf16956
Show More
qaxis.cpp
665 lines | 13.1 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 #include "qaxis.h"
#include "qaxis_p.h"
Michal Klocek
Adds qchartaxis stub
r72
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactor documentation...
r331 /*!
Marek Rosa
fixed doc for QAxis
r1019 \class QAxis
Jani Honkonen
Doc fixes
r1023 \brief The QAxis class is used for manipulating chart's axis
Michal Klocek
Refactor documentation...
r331 and for adding optional axes to the chart.
\mainclass
There is only one x Axis, however there can be multiple y axes.
Tero Ahola
Added missing properties to QAxis
r1449 Each chart series can be bound to exactly one Y axis and the shared common X axis.
Axis can be setup to show axis line with tick marks, grid lines and shades.
*/
/*!
\qmlclass Axis QAxis
\brief The Axis element is used for manipulating chart's axes
Michal Klocek
Refactor documentation...
r331
Tero Ahola
Added missing properties to QAxis
r1449 There is only one x Axis, however there can be multiple y axes on a ChartView.
Each chart series can be bound to exactly one Y axis and the shared common X axis.
Axis can be setup to show axis line with tick marks, grid lines and shades.
Tero Ahola
Documentation of QML ChartView, Axis and Legend
r1475
To access Axes you can use ChartView API. For example:
\code
ChartView {
axisX.min: 0
axisX.max: 3
axisX.ticksCount: 4
axisY.min: 0
axisY.max: 4
// Add a few series...
}
\endcode
Michal Klocek
Refactor documentation...
r331 */
Jani Honkonen
qaxis doc update
r1350 /*!
\property QAxis::labelsVisible
Tero Ahola
Added missing properties to QAxis
r1449 Defines if axis labels are visible.
*/
/*!
\qmlproperty bool Axis::labelsVisible
Jani Honkonen
qaxis doc update
r1350 Defines if axis labels are visible.
*/
/*!
\property QAxis::min
Tero Ahola
Added missing properties to QAxis
r1449 Defines the minimum value on the axis.
*/
/*!
\qmlproperty real Axis::min
Jani Honkonen
qaxis doc update
r1350 Defines the minimum value on the axis.
*/
/*!
\property QAxis::max
Tero Ahola
Added missing properties to QAxis
r1449 Defines the maximum value on the axis.
*/
/*!
\qmlproperty real Axis::max
Jani Honkonen
qaxis doc update
r1350 Defines the maximum value on the axis.
*/
Michal Klocek
Adds missing doc for qchartaxis
r333 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::visible
The visibility of the axis.
*/
/*!
\qmlproperty bool Axis::visible
The visibility of the axis.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
Michal Klocek
Refactor documentation...
r331 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::gridVisible
The visibility of the grid lines.
*/
/*!
\qmlproperty bool Axis::gridVisible
The visibility of the grid lines.
Michal Klocek
Refactor documentation...
r331 */
Tero Ahola
Added missing properties to QAxis
r1449 /*!
\property QAxis::color
The color of the axis and ticks.
*/
/*!
\qmlproperty color Axis::color
The color of the axis and ticks.
*/
Michal Klocek
Adds missing doc for qchartaxis
r333
Jani Honkonen
Add qml Font properties & docs
r1517 /*!
\property QAxis::labelsFont
The font of the axis labels.
*/
/*!
\qmlproperty Font Axis::labelsFont
The font of the axis labels.
See the \l {Font} {QML Font Element} for detailed documentation.
*/
Michal Klocek
Adds missing doc for qchartaxis
r333 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::labelsColor
The color of the axis labels.
*/
/*!
\qmlproperty color Axis::labelsColor
The color of the axis labels.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
Michal Klocek
Refactor documentation...
r331 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::labelsAngle
The angle of the axis labels in degrees.
*/
/*!
\qmlproperty int Axis::labelsAngle
The angle of the axis labels in degrees.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::shadesVisible
The visibility of the axis shades.
*/
/*!
\qmlproperty bool Axis::shadesVisible
The visibility of the axis shades.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::shadesColor
The fill (brush) color of the axis shades.
*/
/*!
\qmlproperty color Axis::shadesColor
The fill (brush) color of the axis shades.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::shadesBorderColor
The border (pen) color of the axis shades.
*/
/*!
\qmlproperty color Axis::shadesBorderColor
The border (pen) color of the axis shades.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::ticksCount
The number of tick marks for the axis.
*/
/*!
\qmlproperty int Axis::ticksCount
The number of tick marks for the axis.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Adds missing doc for qchartaxis
r333 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \property QAxis::niceNumbersEnabled
Whether the nice numbers algorithm is enabled or not for the axis.
*/
/*!
\qmlproperty bool Axis::niceNumbersEnabled
Whether the nice numbers algorithm is enabled or not for the axis.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::visibleChanged(bool)
Visiblity of the axis has changed to \a visible.
*/
Michal Klocek
Adds missing doc for qchartaxis
r333
Michal Klocek
Refactor documentation...
r331 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::labelsVisibleChanged(bool)
Visiblity of the labels of the axis has changed to \a visible.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::gridVisibleChanged(bool)
Visiblity of the grid lines of the axis has changed to \a visible.
*/
/*!
\fn void QAxis::minChanged(qreal min)
Axis emits signal when \a min of axis has changed.
*/
/*!
\fn void QAxis::maxChanged(qreal max)
Axis emits signal when \a max of axis has changed.
*/
/*!
\fn void QAxis::rangeChanged(qreal min, qreal max)
Axis emits signal when \a min or \a max of axis has changed.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Adds missing doc for qchartaxis
r333 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn QChartAxisCategories* QAxis::categories()
Returns pointer to the list of categories which correspond to the values on the axis.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::colorChanged(QColor)
Emitted if the \a color of the axis is changed.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::labelsColorChanged(QColor)
Emitted if the \a color of the axis labels is changed.
Michal Klocek
Adds missing doc for qchartaxis
r333 */
Michal Klocek
Refactor documentation...
r331 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::shadesVisibleChanged(bool)
Emitted if the visibility of the axis shades is changed to \a visible.
Michal Klocek
Refactor documentation...
r331 */
/*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::shadesColorChanged(QColor)
Emitted if the \a color of the axis shades is changed.
Michal Klocek
Refactor documentation...
r331 */
Marek Rosa
QChartaxis docs added
r936 /*!
Tero Ahola
Added missing properties to QAxis
r1449 \fn void QAxis::shadesBorderColorChanged(QColor)
Emitted if the border \a color of the axis shades is changed.
Marek Rosa
QChartaxis docs added
r936 */
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Constructs new axis object which is a child of \a parent. Ownership is taken by
QChart when axis added.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QAxis::QAxis(QObject *parent) : QObject(parent),
d_ptr(new QAxisPrivate(this))
Michal Klocek
Adds qchartaxis stub
r72 {
}
Michal Klocek
Refactor documentation...
r331 /*!
Tero Ahola
Added missing properties to QAxis
r1449 Destructor of the axis object. When axis is added to chart, chart object takes ownership.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QAxis::~QAxis()
Michal Klocek
Adds qchartaxis stub
r72 {
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a pen used to draw axis line and ticks.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setAxisPen(const QPen &pen)
Michal Klocek
Adds refactored axis to presenter
r140 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_axisPen!=pen) {
d_ptr->m_axisPen = pen;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds refactored axis to presenter
r140 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns pen used to draw axis and ticks.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QPen QAxis::axisPen() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_axisPen;
}
Tero Ahola
Added missing properties to QAxis
r1449 void QAxis::setAxisPenColor(QColor color)
{
QPen p = d_ptr->m_axisPen;
if (p.color() != color) {
p.setColor(color);
setAxisPen(p);
emit colorChanged(color);
}
}
QColor QAxis::axisPenColor() const
{
return d_ptr->m_axisPen.color();
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets if axis and ticks are \a visible.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setAxisVisible(bool visible)
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_axisVisible != visible) {
d_ptr->m_axisVisible = visible;
emit d_ptr->updated();
Tero Ahola
Added missing properties to QAxis
r1449 emit visibleChanged(visible);
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 bool QAxis::isAxisVisible() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_axisVisible;
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setGridLineVisible(bool visible)
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_gridLineVisible != visible) {
d_ptr->m_gridLineVisible = visible;
emit d_ptr->updated();
Tero Ahola
Added missing properties to QAxis
r1449 emit gridVisibleChanged(visible);
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 bool QAxis::isGridLineVisible() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_gridLineVisible;
}
Tero Ahola
Added missing properties to QAxis
r1449
Michal Klocek
Refactor documentation...
r331 /*!
Michal Klocek
Renames Grid to GridLine
r535 Sets \a pen used to draw grid line.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setGridLinePen(const QPen &pen)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_gridLinePen != pen) {
d_ptr->m_gridLinePen = pen;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns pen used to draw grid.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QPen QAxis::gridLinePen() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_gridLinePen;
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setLabelsVisible(bool visible)
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_labelsVisible != visible) {
d_ptr->m_labelsVisible = visible;
emit d_ptr->updated();
Tero Ahola
Added missing properties to QAxis
r1449 emit labelsVisibleChanged(visible);
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 bool QAxis::labelsVisible() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_labelsVisible;
}
Tero Ahola
Added missing properties to QAxis
r1449
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a pen used to draw labels.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setLabelsPen(const QPen &pen)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_labelsPen != pen) {
d_ptr->m_labelsPen = pen;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns the pen used to labels.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QPen QAxis::labelsPen() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_labelsPen;
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a brush used to draw labels.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setLabelsBrush(const QBrush &brush)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_labelsBrush != brush) {
d_ptr->m_labelsBrush = brush;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns brush used to draw labels.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QBrush QAxis::labelsBrush() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_labelsBrush;
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a font used to draw labels.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setLabelsFont(const QFont &font)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_labelsFont != font) {
d_ptr->m_labelsFont = font;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns font used to draw labels.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QFont QAxis::labelsFont() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_labelsFont;
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setLabelsAngle(int angle)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_labelsAngle != angle) {
d_ptr->m_labelsAngle = angle;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 int QAxis::labelsAngle() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_labelsAngle;
}
Tero Ahola
Added missing properties to QAxis
r1449 void QAxis::setLabelsColor(QColor color)
{
QBrush b = d_ptr->m_labelsBrush;
if (b.color() != color) {
b.setColor(color);
setLabelsBrush(b);
emit labelsColorChanged(color);
}
}
QColor QAxis::labelsColor() const
{
return d_ptr->m_labelsBrush.color();
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setShadesVisible(bool visible)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_shadesVisible != visible) {
d_ptr->m_shadesVisible = visible;
emit d_ptr->updated();
Tero Ahola
Added missing properties to QAxis
r1449 emit shadesVisibleChanged(visible);
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 bool QAxis::shadesVisible() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_shadesVisible;
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a pen used to draw shades.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setShadesPen(const QPen &pen)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_shadesPen != pen) {
d_ptr->m_shadesPen = pen;
emit d_ptr->updated();
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds more axis handling...
r176 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
Returns pen used to draw shades.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QPen QAxis::shadesPen() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_shadesPen;
}
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a brush used to draw shades.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setShadesBrush(const QBrush &brush)
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_shadesBrush != brush) {
d_ptr->m_shadesBrush = brush;
emit d_ptr->updated();
Tero Ahola
Added missing properties to QAxis
r1449 emit shadesColorChanged(brush.color());
}
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
\brief Returns brush used to draw shades.
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QBrush QAxis::shadesBrush() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_shadesBrush;
}
Tero Ahola
Added missing properties to QAxis
r1449 void QAxis::setShadesColor(QColor color)
Michal Klocek
Adds opacity to shades
r188 {
Tero Ahola
Added missing properties to QAxis
r1449 QBrush b = d_ptr->m_shadesBrush;
b.setColor(color);
setShadesBrush(b);
}
QColor QAxis::shadesColor() const
{
return d_ptr->m_shadesBrush.color();
}
void QAxis::setShadesBorderColor(QColor color)
{
QPen p = d_ptr->m_shadesPen;
p.setColor(color);
setShadesPen(p);
Michal Klocek
Adds opacity to shades
r188 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85
Tero Ahola
Added missing properties to QAxis
r1449 QColor QAxis::shadesBorderColor() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
Tero Ahola
Added missing properties to QAxis
r1449 return d_ptr->m_shadesPen.color();
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setMin(qreal min)
Michal Klocek
Refactors axis handling...
r223 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 setRange(min,d_ptr->m_max);
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 qreal QAxis::min() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_min;
Michal Klocek
Refactors axis handling...
r223 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setMax(qreal max)
Michal Klocek
Refactors axis handling...
r223 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 setRange(d_ptr->m_min,max);
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 qreal QAxis::max() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_max;
Michal Klocek
Refactors axis handling...
r223 }
Michal Klocek
Refactor documentation...
r331 /*!
Sets range from \a min to \a max on the axis.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setRange(qreal min, qreal max)
Michal Klocek
Refactors axis handling...
r223 {
Michal Klocek
Refactor domain model...
r439 bool changed = false;
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (!qFuzzyIsNull(d_ptr->m_min - min)) {
d_ptr->m_min = min;
sauimone
minor code review fixes
r759 changed = true;
Michal Klocek
Refactor domain model...
r439 emit minChanged(min);
}
Michal Klocek
Adds axis setRange implementation
r400
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (!qFuzzyIsNull(d_ptr->m_max - max)) {
d_ptr->m_max = max;
sauimone
minor code review fixes
r759 changed = true;
Michal Klocek
Adds axis setRange implementation
r400 emit maxChanged(max);
}
sauimone
minor code review fixes
r759 if (changed) {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 emit rangeChanged(d_ptr->m_min,d_ptr->m_max);
emit d_ptr->changed(d_ptr->m_min, d_ptr->m_max, d_ptr->m_ticksCount, d_ptr->m_niceNumbers);
Michal Klocek
Bugfix missing min max intialization when axis added to domain
r442 }
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Adds axis setRange implementation
r400
Michal Klocek
Refactor documentation...
r331 /*!
Sets \a count for ticks on the axis.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setTicksCount(int count)
Michal Klocek
Refactors axis handling...
r223 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_ticksCount != count) {
d_ptr->m_ticksCount = count;
emit d_ptr->changed(d_ptr->m_min, d_ptr->m_max, d_ptr->m_ticksCount, d_ptr->m_niceNumbers);
Michal Klocek
Refactor domain model...
r439 }
Michal Klocek
Refactors axis handling...
r223 }
Tero Ahola
Added missing properties to QAxis
r1449 /*!
\fn int QAxis::ticksCount() const
Return number of ticks on the axis
*/
Michal Klocek
Changes QChartAxis -> QAxis
r1006 int QAxis::ticksCount() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_ticksCount;
}
Michal Klocek
Adds axis show/hide to API
r534 /*!
Sets axis, shades, labels and grid lines to be visible.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::show()
Michal Klocek
Adds axis show/hide to API
r534 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 d_ptr->m_axisVisible=true;
d_ptr->m_gridLineVisible=true;
d_ptr->m_labelsVisible=true;
d_ptr->m_shadesVisible=true;
emit d_ptr->updated();
Michal Klocek
Adds axis show/hide to API
r534 }
/*!
Sets axis, shades, labels and grid lines to not be visible.
Tero Ahola
Added missing properties to QAxis
r1449 */
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::hide()
Michal Klocek
Adds axis show/hide to API
r534 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 d_ptr->m_axisVisible = false;
d_ptr->m_gridLineVisible = false;
d_ptr->m_labelsVisible = false;
d_ptr->m_shadesVisible = false;
emit d_ptr->updated();
Michal Klocek
Adds missing ticks hadnling
r554 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxis::setNiceNumbersEnabled(bool enable)
Michal Klocek
Adds missing ticks hadnling
r554 {
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 if (d_ptr->m_niceNumbers != enable){
d_ptr->m_niceNumbers = enable;
emit d_ptr->changed(d_ptr->m_min, d_ptr->m_max, d_ptr->m_ticksCount, d_ptr->m_niceNumbers);
Michal Klocek
Adds loosenumber algorithm...
r678 }
Michal Klocek
Adds missing ticks hadnling
r554 }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 bool QAxis::niceNumbersEnabled() const
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return d_ptr->m_niceNumbers;
}
Michal Klocek
Changes QChartAxisCategories -> QAxisCategories
r1032 QAxisCategories* QAxis::categories()
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
return &d_ptr->m_category;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QAxisPrivate::QAxisPrivate(QAxis* q):
Tero Ahola
Added missing properties to QAxis
r1449 q_ptr(q),
m_axisVisible(true),
m_gridLineVisible(true),
m_labelsVisible(true),
m_labelsAngle(0),
m_shadesVisible(false),
m_shadesBrush(Qt::SolidPattern),
m_shadesOpacity(1.0),
m_min(0),
m_max(0),
m_ticksCount(5),
m_niceNumbers(false)
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QAxisPrivate::~QAxisPrivate()
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
}
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void QAxisPrivate::handleAxisRangeChanged(qreal min, qreal max,int count)
Michal Klocek
Adds pimpl for qchartaxis and qchartaxiscategories
r963 {
q_ptr->setRange(min,max);
q_ptr->setTicksCount(count);
}
Tero Ahola
Added missing properties to QAxis
r1449 QTCOMMERCIALCHART_END_NAMESPACE
QTCOMMERCIALCHART_USE_NAMESPACE
Michal Klocek
Changes QChartAxis -> QAxis
r1006 #include "moc_qaxis.cpp"
#include "moc_qaxis_p.cpp"