#include <qwt_scale.h>
Public Types | |
enum | Orientation { Left, Right, Top, Bottom } |
Public Methods | |
QwtScale (Orientation, QWidget *parent, const char *name=0) | |
virtual | ~QwtScale () |
void | setTitle (const QString &title) |
const QString & | title () const |
void | setTitleColor (const QColor &c) |
const QColor & | titleColor () const |
void | setTitleFont (const QFont &f) |
const QFont & | titleFont () const |
void | setTitleAlignment (int flags) |
int | titleAlignment () const |
void | setBorderDist (int start, int end) |
int | startBorderDist () const |
int | endBorderDist () const |
int | minBorderDist () const |
void | setBaselineDist (int bd) |
int | baseLineDist () const |
void | setScaleDiv (const QwtScaleDiv &sd) |
void | setScaleDraw (QwtScaleDraw *) |
const QwtScaleDraw * | scaleDraw () const |
void | setLabelFormat (char f, int prec, int fieldWidth) |
void | labelFormat (char &f, int &prec, int &fieldWidth) const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual QSizePolicy | sizePolicy () const |
int | dimForLength (int length, const QFontMetrics &titleFontMetrics, const QFontMetrics &scaleFontMetrics) const |
Static Public Methods | |
void | drawTitle (QPainter *, QwtScaleDraw::Orientation o, const QRect &, int align, const QString &) |
Protected Methods | |
void | draw (QPainter *p) const |
void | paintEvent (QPaintEvent *e) |
void | resizeEvent (QResizeEvent *e) |
void | scaleChange () |
void | fontChange (const QFont &oldfont) |
void | layoutScale (bool update=TRUE) |
This Widget can be used to decorate composite widgets with a scale.
|
Orientation/Position of the scale
|
|
Constructor.
|
|
Destructor.
|
|
|
|
Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title.
|
|
draw the scale.
|
|
Rotate and paint a title according to its orientation into a given rectangle.
|
|
|
|
Notify a change of the font.
This virtual function may be overloaded by derived widgets. The default implementation resizes the scale and repaints the widget.
|
|
Format character and precision have the same meaning as for the QString class.
|
|
Recalculate the scale's geometry and layout based on.
|
|
Determine the minimum Border distance.
This member function returns the minimum distance of the scale's endpoints from the widget borders which is required for the mark labels to fit into the widget.
|
|
|
|
paintEvent.
|
|
paintEvent.
|
|
Notify a change of the scale.
This virtual function can be overloaded by derived classes. The default implementation updates the geometry and repaints the widget. |
|
scaleDraw of this scale
|
|
Specify the border distance of the scale's base line.
|
|
Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be less than minimum border distance.
|
|
Set the number format for the major scale labels.
Format character and precision have the same meaning as for the QString class.
|
|
Assign a scale division.
The scale division determines where to set the tick marks.
|
|
Set a scale draw sd has to be created with new and will be deleted in QwtScale::~QwtScale or the next call of QwtScale::setScaleDraw.
|
|
Assign a title.
|
|
Change the title alignment.
|
|
Change the title color.
|
|
Change the title font.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|