Re: axis marking format
Brought to you by:
rathmann
From: Uwe R. <Uwe...@ep...> - 2002-04-08 09:46:04
|
I've commited the following changes to CVS: class QwtScaleDraw { public: virtual void draw(QPainter *p) const; protected: virtual QString label(double value) const; virtual int maxLabelWidth(const QFontMetrics &) const; }; class QwtScale { public: void setScaleDraw(QwtScaleDraw *); const QwtScaleDraw *scaleDraw() const; }; class QwtPlot { public: void setAxisScaleDraw(int axis, QwtScaleDraw *); const QwtScaleDraw *axisScaleDraw(int axis) const; }; A completely satisfying solution requires much more redesign than I like to do in Qwt 0.4.x, but this small solution makes it possible to use not printf-like scale labels. Please note that an fieldwidth != 0 will have an effect on the layout via maxLabelWidth() even if an overloaded label() won't use it anymore. HTH, Uwe |