return d->m_label;
}
-void KPlotAxis::setTickLabelFormat( char fmt, int fieldWidth, int prec )
+void KPlotAxis::setTickLabelFormat( char format, int fieldWidth, int precision )
{
d->m_labelFieldWidth = fieldWidth;
- d->m_labelFmt = fmt;
- d->m_labelPrec = prec;
+ d->m_labelFmt = format;
+ d->m_labelPrec = precision;
}
int KPlotAxis::tickLabelWidth() const
return d->m_labelFieldWidth;
}
-char KPlotAxis::tickLabelFmt() const
+char KPlotAxis::tickLabelFormat() const
{
return d->m_labelFmt;
}
-int KPlotAxis::tickLabelPrec() const
+int KPlotAxis::tickLabelPrecision() const
{
return d->m_labelPrec;
}
}
QString KPlotAxis::tickLabel( double val ) const {
- if ( tickLabelFmt() == 't' ) {
+ if ( d->m_labelFmt == 't' ) {
while ( val < 0.0 ) val += 24.0;
while ( val >= 24.0 ) val -= 24.0;
return QString( "%1:%2" ).arg( h, 2, 10, QLatin1Char('0') ).arg( m, 2, 10, QLatin1Char('0') );
}
- return QString( "%1" ).arg( val, tickLabelWidth(), tickLabelFmt(), tickLabelPrec() );
+ return QString( "%1" ).arg( val, d->m_labelFieldWidth, d->m_labelFmt, d->m_labelPrec );
}
-QList<double>& KPlotAxis::majorTickMarks() const
+QList< double > KPlotAxis::majorTickMarks() const
{
return d->m_MajorTickMarks;
}
-QList<double>& KPlotAxis::minorTickMarks() const
+QList< double > KPlotAxis::minorTickMarks() const
{
return d->m_MinorTickMarks;
}
* Note that when the format character is 't', the fieldWidth and prec
* values are ignored.
*
- * @param fmt the format specification character
+ * @param format the format specification character
* @param fieldWidth the number of characters in the output string.
* If set to 0, the string will be as wide as it needs to be to fully
* render the value.
- * @param prec the number of characters following the decimal point.
+ * @param precison the number of characters following the decimal point.
*/
- void setTickLabelFormat( char fmt = 'g', int fieldWidth = 0, int prec = -1 );
+ void setTickLabelFormat( char format = 'g', int fieldWidth = 0, int precision = -1 );
/**
* @return the field width of the tick labels
/**
* @return the number format of the tick labels
*/
- char tickLabelFmt() const;
+ char tickLabelFormat() const;
/**
* @return the number precision of the tick labels
*/
- int tickLabelPrec() const;
+ int tickLabelPrecision() const;
/**
* Determine the positions of major and minor tickmarks for this axis.
*/
void setTickMarks( double x0, double length );
- QList<double>& majorTickMarks() const;
+ /**
+ * @return the list with the major tickmarks
+ */
+ QList< double > majorTickMarks() const;
- QList<double>& minorTickMarks() const;
+ /**
+ * @return the list with the minor tickmarks
+ */
+ QList< double > minorTickMarks() const;
private:
class Private;