##// END OF EJS Templates
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash

File last commit:

r241:0019f0f15db3
r256:bd68fc4fe7ab
Show More
qchartaxis.cpp
154 lines | 2.4 KiB | text/x-c | CppLexer
Michal Klocek
Adds qchartaxis stub
r72 #include "qchartaxis.h"
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors axis handling...
r223 QChartAxis::QChartAxis(QObject* parent):QObject(parent),
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 m_axisVisible(true),
Michal Klocek
Adds more axis handling...
r176 m_gridVisible(true),
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 m_labelsVisible(true),
Michal Klocek
Refactors axis handling...
r223 m_labelsAngle(0),
Michal Klocek
Adds opacity to shades
r188 m_shadesVisible(true),
Michal Klocek
Refactors axis handling...
r223 m_shadesOpacity(1.0),
m_min(0),
m_max(0),
Michal Klocek
Bugfix shades not updated aftet tick changed
r241 m_ticksCount(5)
Michal Klocek
Adds qchartaxis stub
r72 {
}
QChartAxis::~QChartAxis()
{
}
Michal Klocek
Adds refactored axis to presenter
r140 void QChartAxis::setAxisPen(const QPen& pen)
{
Michal Klocek
Adds more axis handling...
r176 m_axisPen=pen;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds refactored axis to presenter
r140 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 void QChartAxis::setAxisVisible(bool visible)
{
m_axisVisible=visible;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
void QChartAxis::setGridVisible(bool visible)
{
Michal Klocek
Adds more axis handling...
r176 m_gridVisible=visible;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setGridPen(const QPen& pen)
{
m_gridPen=pen;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
void QChartAxis::setLabelsVisible(bool visible)
{
m_labelsVisible=visible;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Michal Klocek
Adds more axis handling...
r176 void QChartAxis::setLabelsPen(const QPen& pen)
{
m_labelsPen=pen;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setLabelsBrush(const QBrush& brush)
{
m_labelsBrush=brush;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setLabelsFont(const QFont& font)
{
m_labelsFont=font;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
Michal Klocek
Refactors axis handling...
r223 void QChartAxis::setLabelsAngle(int angle)
Michal Klocek
Adds more axis handling...
r176 {
Michal Klocek
Refactors axis handling...
r223 m_labelsAngle=angle;
emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setShadesVisible(bool visible)
{
m_shadesVisible=visible;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setShadesPen(const QPen& pen)
{
m_shadesPen=pen;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds more axis handling...
r176 }
void QChartAxis::setShadesBrush(const QBrush& brush)
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 {
Michal Klocek
Adds more axis handling...
r176 m_shadesBrush=brush;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 }
Michal Klocek
Adds opacity to shades
r188 void QChartAxis::setShadesOpacity(qreal opacity)
{
m_shadesOpacity=opacity;
Michal Klocek
Refactors axis handling...
r223 emit update(this);
Michal Klocek
Adds opacity to shades
r188 }
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85
Michal Klocek
Refactors axis handling...
r223 void QChartAxis::setMin(qreal min)
{
if(m_min!=min){
m_min=min;
emit minChanged(m_min);
}
}
void QChartAxis::setMax(qreal max)
{
if(m_max!=max){
m_max=max;
emit maxChanged(m_max);
}
}
void QChartAxis::setRange(qreal min, qreal max)
{
setMin(min);
setMax(max);
}
void QChartAxis::setTicksCount(int count)
{
m_ticksCount=count;
emit ticksChanged(this);
}
void QChartAxis::addAxisTickLabel(qreal value,const QString& label)
{
m_ticks.insert(value,label);
emit ticksChanged(this);
}
void QChartAxis::removeAxisTickLabel(qreal value)
{
m_ticks.remove(value);
emit ticksChanged(this);
}
QString QChartAxis::axisTickLabel(qreal value) const
{
return m_ticks.value(value);
}
void QChartAxis::clearAxisTickLabels()
{
m_ticks.clear();
emit ticksChanged(this);
}
#include "moc_qchartaxis.cpp"
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 QTCOMMERCIALCHART_END_NAMESPACE