改进代码
This commit is contained in:
@@ -19,26 +19,26 @@ class QwtColumnSymbol;
|
||||
|
||||
/*!
|
||||
\brief QwtPlotMultiBarChart displays a series of a samples that consist
|
||||
each of a set of values.
|
||||
each of a set of values.
|
||||
|
||||
Each value is displayed as a bar, the bars of each set can be organized
|
||||
Each value is displayed as a bar, the bars of each set can be organized
|
||||
side by side or accumulated.
|
||||
|
||||
Each bar of a set is rendered by a QwtColumnSymbol, that is set by setSymbol().
|
||||
The bars of different sets use the same symbols. Exceptions are possible
|
||||
by overloading specialSymbol() or overloading drawBar().
|
||||
|
||||
Depending on its orientation() the bars are displayed horizontally
|
||||
or vertically. The bars cover the interval between the baseline()
|
||||
Depending on its orientation() the bars are displayed horizontally
|
||||
or vertically. The bars cover the interval between the baseline()
|
||||
and the value.
|
||||
|
||||
In opposite to most other plot items, QwtPlotMultiBarChart returns more
|
||||
than one entry for the legend - one for each symbol.
|
||||
|
||||
|
||||
\sa QwtPlotBarChart, QwtPlotHistogram
|
||||
QwtPlotSeriesItem::orientation(), QwtPlotAbstractBarChart::baseline()
|
||||
*/
|
||||
class QWT_EXPORT QwtPlotMultiBarChart:
|
||||
class QWT_EXPORT QwtPlotMultiBarChart:
|
||||
public QwtPlotAbstractBarChart, public QwtSeriesStore<QwtSetSample>
|
||||
{
|
||||
public:
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
Stacked
|
||||
};
|
||||
|
||||
explicit QwtPlotMultiBarChart( const QString &title = QString::null );
|
||||
explicit QwtPlotMultiBarChart( const QString &title = QString() );
|
||||
explicit QwtPlotMultiBarChart( const QwtText &title );
|
||||
|
||||
virtual ~QwtPlotMultiBarChart();
|
||||
@@ -78,8 +78,8 @@ public:
|
||||
void setStyle( ChartStyle style );
|
||||
ChartStyle style() const;
|
||||
|
||||
void setSymbol( int barIndex, QwtColumnSymbol *symbol );
|
||||
const QwtColumnSymbol *symbol( int barIndex ) const;
|
||||
void setSymbol( int valueIndex, QwtColumnSymbol * );
|
||||
const QwtColumnSymbol *symbol( int valueIndex ) const;
|
||||
|
||||
void resetSymbolMap();
|
||||
|
||||
@@ -94,9 +94,9 @@ public:
|
||||
virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
|
||||
|
||||
protected:
|
||||
QwtColumnSymbol *symbol( int barIndex );
|
||||
QwtColumnSymbol *symbol( int valueIndex );
|
||||
|
||||
virtual QwtColumnSymbol *specialSymbol(
|
||||
virtual QwtColumnSymbol *specialSymbol(
|
||||
int sampleIndex, int valueIndex ) const;
|
||||
|
||||
virtual void drawSample( QPainter *painter,
|
||||
@@ -105,7 +105,7 @@ protected:
|
||||
int index, const QwtSetSample& sample ) const;
|
||||
|
||||
virtual void drawBar( QPainter *, int sampleIndex,
|
||||
int barIndex, const QwtColumnRect & ) const;
|
||||
int valueIndex, const QwtColumnRect & ) const;
|
||||
|
||||
void drawStackedBars( QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
||||
|
||||
Reference in New Issue
Block a user