This Widget can be used to decorate composite widgets with a scale.
Public Types | |
enum | Position { Left, Right, Top, Bottom } |
Public Member Functions | |
QwtScale (Position, 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 |
void | minBorderDist (int &start, int &end) const |
void | setBaselineDist (int bd) |
int | baseLineDist () const |
void | setTitleDist (int td) |
int | titleDist () 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 |
void | setLabelAlignment (int align) |
void | setLabelRotation (double rotation) |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual QSizePolicy | sizePolicy () const |
int | titleHeightForWidth (int width) const |
int | dimForLength (int length, const QFontMetrics &scaleFontMetrics) const |
void | drawTitle (QPainter *painter, QwtScaleDraw::Orientation o, const QRect &rect) const |
void | setPosition (Position o) |
Position | position () const |
Protected Member Functions | |
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) |
|
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 position 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 distances. 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
|
|
|
|
resizeEvent
|
|
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.
|
|
Change the alignment for the labels. |
|
Set the number format for the major scale labels. Format character and precision have the same meaning as for the QString class.
|
|
Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().
|
|
Assign a position.
|
|
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.
|
|
Give title new text contents.
|
|
Change the title alignment.
|
|
Change the title color.
|
|
Specify the distance between scale and title.
|
|
Change the title font.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Find the height of the title for a given width.
|