QwtScaleWidget(3) | Qwt User's Guide | QwtScaleWidget(3) |
QwtScaleWidget - A Widget which contains a scale.
#include <qwt_scale_widget.h>
Inherits QWidget.
enum LayoutFlag { TitleInverted = 1 }
Layout flags of the title. typedef QFlags< LayoutFlag >
LayoutFlags
Layout flags of the title.
void scaleDivChanged ()
Signal emitted, whenever the scale division changes.
QwtScaleWidget (QWidget *parent=NULL)
Create a scale with the position QwtScaleWidget::Left. QwtScaleWidget
(QwtScaleDraw::Alignment, QWidget *parent=NULL)
Constructor. virtual ~QwtScaleWidget ()
Destructor. void setTitle (const QString &title)
void setTitle (const QwtText &title)
QwtText title () const
void setLayoutFlag (LayoutFlag, bool on)
bool testLayoutFlag (LayoutFlag) const
void setBorderDist (int dist1, int dist2)
int startBorderDist () const
int endBorderDist () const
void getBorderDistHint (int &start, int &end) const
Calculate a hint for the border distances. void getMinBorderDist (int
&start, int &end) const
void setMinBorderDist (int start, int end)
void setMargin (int)
Specify the margin to the colorBar/base line. int margin () const
void setSpacing (int)
Specify the distance between color bar, scale and title. int spacing ()
const
void setScaleDiv (const QwtScaleDiv &)
Assign a scale division. void setTransformation (QwtTransform *)
void setScaleDraw (QwtScaleDraw *)
const QwtScaleDraw * scaleDraw () const
QwtScaleDraw * scaleDraw ()
void setLabelAlignment (Qt::Alignment)
Change the alignment for the labels. void setLabelRotation (double
rotation)
Change the rotation for the labels. See
QwtScaleDraw::setLabelRotation(). void setColorBarEnabled
(bool)
bool isColorBarEnabled () const
void setColorBarWidth (int)
int colorBarWidth () const
void setColorMap (const QwtInterval &, QwtColorMap *)
QwtInterval colorBarInterval () const
const QwtColorMap * colorMap () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
int titleHeightForWidth (int width) const
Find the height of the title for a given width. int dimForLength (int
length, const QFont &scaleFont) const
Find the minimum dimension for a given length. dim is the height, length the
width seen in direction of the title. void drawColorBar (QPainter
*painter, const QRectF &) const
void drawTitle (QPainter *painter, QwtScaleDraw::Alignment,
const QRectF &rect) const
void setAlignment (QwtScaleDraw::Alignment)
QwtScaleDraw::Alignment alignment () const
QRectF colorBarRect (const QRectF &) const
virtual void paintEvent (QPaintEvent *)
paintEvent virtual void resizeEvent (QResizeEvent *)
void draw (QPainter *) const
draw the scale void scaleChange ()
Notify a change of the scale. void layoutScale (bool
update_geometry=true)
A Widget which contains a scale.
This Widget can be used to decorate composite widgets with a scale.
Layout flags of the title.
Enumerator
Create a scale with the position QwtScaleWidget::Left.
Parameters:
Constructor.
Parameters:
Returns:
See also:
Returns:
See also:
Calculate the the rectangle for the color bar
Parameters:
Returns:
Returns:
See also:
Returns:
See also:
Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title.
Parameters:
Returns:
Draw the color bar of the scale widget
Parameters:
See also:
Rotate and paint a title according to its position into a given rectangle.
Parameters:
Returns:
See also:
Calculate a hint for the border distances. This member function calculates the distance of the scale's endpoints from the widget borders which is required for the mark labels to fit into the widget. The maximum of this distance an the minimum border distance is returned.
Parameters:
Warning:
See also:
Get the minimum value for the distances of the scale's endpoints from the widget borders.
Parameters:
See also:
Returns:
See also:
Recalculate the scale's geometry and layout based on the current geometry and fonts.
Parameters:
Returns:
See also:
Returns:
Event handler for resize events
Parameters:
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.
Returns:
See also:
Returns:
See also:
Change the alignment
Parameters:
See also:
Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be less than minimum border distance.
Parameters:
See also:
En/disable a color bar associated to the scale
See also:
Set the width of the color bar
Parameters:
See also:
Set the color map and value interval, that are used for displaying the color bar.
Parameters:
See also:
Change the alignment for the labels.
See also:
Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().
Parameters:
See also:
Toggle an layout flag
Parameters:
See also:
Specify the margin to the colorBar/base line.
Parameters:
See also:
Set a minimum value for the distances of the scale's endpoints from the widget borders. This is useful to avoid that the scales are 'jumping', when the tick labels or their positions change often.
Parameters:
See also:
Assign a scale division. The scale division determines where to set the tick marks.
Parameters:
See also:
Set a scale draw
scaleDraw has to be created with new and will be deleted in ~QwtScaleWidget() or the next call of setScaleDraw(). scaleDraw will be initialized with the attributes of the previous scaleDraw object.
Parameters:
See also:
Specify the distance between color bar, scale and title.
Parameters:
See also:
Give title new text contents
Parameters:
See also:
Give title new text contents
Parameters:
See also:
Warning:
Set the transformation
Parameters:
See also:
Returns:
Returns:
See also:
Returns:
See also:
Test a layout flag
Parameters:
Returns:
See also:
Returns:
See also:
Find the height of the title for a given width.
Parameters:
Returns:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |