改进代码

This commit is contained in:
feiyangqingyun
2021-10-08 10:52:05 +08:00
parent f6923b97a2
commit 200b7eeafb
171 changed files with 2894 additions and 1940 deletions

View File

@@ -23,19 +23,19 @@ class QFont;
It can be used together with a QwtLegend or instead of it
to have more space for the plot canvas.
In opposite to QwtLegend the legend item is not interactive.
In opposite to QwtLegend the legend item is not interactive.
To identify mouse clicks on a legend item an event filter
needs to be installed catching mouse events ob the plot canvas.
The geometries of the legend items are available using
legendGeometries().
The legend item is aligned to plot canvas according to
The legend item is aligned to plot canvas according to
its alignment() flags. It might have a background for the
complete legend ( usually semi transparent ) or for
each legend item.
\note An external QwtLegend with a transparent background
on top the plot canvas might be another option
\note An external QwtLegend with a transparent background
on top the plot canvas might be another option
with a similar effect.
*/
@@ -45,7 +45,7 @@ public:
/*!
\brief Background mode
Depending on the mode the complete legend or each item
Depending on the mode the complete legend or each item
might have an background.
The default setting is LegendBackground.
@@ -83,11 +83,11 @@ public:
void setItemSpacing( int );
int itemSpacing() const;
void setFont( const QFont& );
QFont font() const;
void setBorderDistance( int numPixels );
void setBorderDistance( int );
int borderDistance() const;
void setBorderRadius( double );
@@ -105,9 +105,9 @@ public:
void setTextPen( const QPen & );
QPen textPen() const;
virtual void draw( QPainter *p,
virtual void draw( QPainter *,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &rect ) const;
const QRectF &canvasRect ) const;
void clearLegend();
@@ -117,13 +117,13 @@ public:
virtual QRect geometry( const QRectF &canvasRect ) const;
virtual QSize minimumSize( const QwtLegendData & ) const;
virtual int heightForWidth( const QwtLegendData &, int w ) const;
virtual int heightForWidth( const QwtLegendData &, int width ) const;
QList< const QwtPlotItem * > plotItems() const;
QList< QRect > legendGeometries( const QwtPlotItem * ) const;
protected:
virtual void drawLegendData( QPainter *painter,
virtual void drawLegendData( QPainter *painter,
const QwtPlotItem *, const QwtLegendData &, const QRectF & ) const;
virtual void drawBackground( QPainter *, const QRectF &rect ) const;