.TH "QwtScaleWidget" 3 "Mon Aug 1 2011" "Version 5.2.2" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtScaleWidget \- .PP A Widget which contains a scale. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Signals" .in +1c .ti -1c .RI "void \fBscaleDivChanged\fP ()" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtScaleDraw::Alignment\fP \fBalignment\fP () const " .br .ti -1c .RI "\fBQwtDoubleInterval\fP \fBcolorBarInterval\fP () const " .br .ti -1c .RI "QRect \fBcolorBarRect\fP (const QRect &) const " .br .ti -1c .RI "int \fBcolorBarWidth\fP () const " .br .ti -1c .RI "const \fBQwtColorMap\fP & \fBcolorMap\fP () const " .br .ti -1c .RI "int \fBdimForLength\fP (int length, const QFont &scaleFont) const " .br .ti -1c .RI "void \fBdrawColorBar\fP (QPainter *painter, const QRect &rect) const " .br .ti -1c .RI "void \fBdrawTitle\fP (QPainter *painter, \fBQwtScaleDraw::Alignment\fP, const QRect &rect) const " .br .ti -1c .RI "int \fBendBorderDist\fP () const " .br .ti -1c .RI "void \fBgetBorderDistHint\fP (int &start, int &end) const " .br .ti -1c .RI "void \fBgetMinBorderDist\fP (int &start, int &end) const " .br .ti -1c .RI "bool \fBisColorBarEnabled\fP () const " .br .ti -1c .RI "int \fBmargin\fP () const " .br .ti -1c .RI "virtual QSize \fBminimumSizeHint\fP () const " .br .ti -1c .RI "int \fBpenWidth\fP () const " .br .ti -1c .RI "\fBQwtScaleWidget\fP (QWidget *parent=NULL)" .br .ti -1c .RI "\fBQwtScaleWidget\fP (\fBQwtScaleDraw::Alignment\fP, QWidget *parent=NULL)" .br .ti -1c .RI "const \fBQwtScaleDraw\fP * \fBscaleDraw\fP () const " .br .ti -1c .RI "\fBQwtScaleDraw\fP * \fBscaleDraw\fP ()" .br .ti -1c .RI "void \fBsetAlignment\fP (\fBQwtScaleDraw::Alignment\fP)" .br .ti -1c .RI "void \fBsetBorderDist\fP (int start, int end)" .br .ti -1c .RI "void \fBsetColorBarEnabled\fP (bool)" .br .ti -1c .RI "void \fBsetColorBarWidth\fP (int)" .br .ti -1c .RI "void \fBsetColorMap\fP (const \fBQwtDoubleInterval\fP &, const \fBQwtColorMap\fP &)" .br .ti -1c .RI "void \fBsetLabelAlignment\fP (Qt::Alignment)" .br .ti -1c .RI "void \fBsetLabelRotation\fP (double rotation)" .br .ti -1c .RI "void \fBsetMargin\fP (int)" .br .ti -1c .RI "void \fBsetMinBorderDist\fP (int start, int end)" .br .ti -1c .RI "void \fBsetPenWidth\fP (int)" .br .ti -1c .RI "void \fBsetScaleDiv\fP (\fBQwtScaleTransformation\fP *, const \fBQwtScaleDiv\fP &sd)" .br .ti -1c .RI "void \fBsetScaleDraw\fP (\fBQwtScaleDraw\fP *)" .br .ti -1c .RI "void \fBsetSpacing\fP (int td)" .br .ti -1c .RI "void \fBsetTitle\fP (const QString &title)" .br .ti -1c .RI "void \fBsetTitle\fP (const \fBQwtText\fP &title)" .br .ti -1c .RI "virtual QSize \fBsizeHint\fP () const " .br .ti -1c .RI "int \fBspacing\fP () const " .br .ti -1c .RI "int \fBstartBorderDist\fP () const " .br .ti -1c .RI "\fBQwtText\fP \fBtitle\fP () const " .br .ti -1c .RI "int \fBtitleHeightForWidth\fP (int width) const " .br .ti -1c .RI "virtual \fB~QwtScaleWidget\fP ()" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBdraw\fP (QPainter *p) const " .br .ti -1c .RI "void \fBlayoutScale\fP (bool update=true)" .br .ti -1c .RI "virtual void \fBpaintEvent\fP (QPaintEvent *e)" .br .ti -1c .RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)" .br .ti -1c .RI "void \fBscaleChange\fP ()" .br .in -1c .SH "Detailed Description" .PP A Widget which contains a scale. This Widget can be used to decorate composite widgets with a scale. .SH "Constructor & Destructor Documentation" .PP .SS "QwtScaleWidget::QwtScaleWidget (QWidget *parent = \fCNULL\fP)\fC [explicit]\fP" .PP Create a scale with the position QwtScaleWidget::Left. \fBParameters:\fP .RS 4 \fIparent\fP Parent widget .RE .PP .SS "QwtScaleWidget::QwtScaleWidget (\fBQwtScaleDraw::Alignment\fPalign, QWidget *parent = \fCNULL\fP)\fC [explicit]\fP" .PP Constructor. \fBParameters:\fP .RS 4 \fIalign\fP Alignment. .br \fIparent\fP Parent widget .RE .PP .SS "QwtScaleWidget::~QwtScaleWidget ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "\fBQwtScaleDraw::Alignment\fP QwtScaleWidget::alignment () const"\fBReturns:\fP .RS 4 position .RE .PP \fBSee also:\fP .RS 4 setPosition() .RE .PP .SS "int QwtScaleWidget::dimForLength (intlength, const QFont &scaleFont) const" .PP Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title. \fBParameters:\fP .RS 4 \fIlength\fP width for horizontal, height for vertical scales .br \fIscaleFont\fP Font of the scale .RE .PP \fBReturns:\fP .RS 4 height for horizontal, width for vertical scales .RE .PP .SS "void QwtScaleWidget::draw (QPainter *p) const\fC [protected]\fP" .PP draw the scale .SS "void QwtScaleWidget::drawTitle (QPainter *painter, \fBQwtScaleDraw::Alignment\fPalign, const QRect &rect) const"Rotate and paint a title according to its position into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIalign\fP Alignment .br \fIrect\fP Bounding rectangle .RE .PP .SS "int QwtScaleWidget::endBorderDist () const"\fBReturns:\fP .RS 4 end border distance .RE .PP \fBSee also:\fP .RS 4 \fBsetBorderDist()\fP .RE .PP .SS "void QwtScaleWidget::getBorderDistHint (int &start, int &end) const" .PP 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. .PP \fBWarning:\fP .RS 4 .PD 0 .IP "\(bu" 2 The minimum border distance depends on the font. .PP .RE .PP \fBSee also:\fP .RS 4 \fBsetMinBorderDist()\fP, \fBgetMinBorderDist()\fP, \fBsetBorderDist()\fP .RE .PP .SS "void QwtScaleWidget::getMinBorderDist (int &start, int &end) const"Get the minimum value for the distances of the scale's endpoints from the widget borders. .PP \fBSee also:\fP .RS 4 \fBsetMinBorderDist()\fP, \fBgetBorderDistHint()\fP .RE .PP .SS "void QwtScaleWidget::layoutScale (boolupdate = \fCtrue\fP)\fC [protected]\fP" .PP Recalculate the scale's geometry and layout based on. .SS "int QwtScaleWidget::margin () const"\fBReturns:\fP .RS 4 margin .RE .PP \fBSee also:\fP .RS 4 \fBsetMargin()\fP .RE .PP .SS "QSize QwtScaleWidget::minimumSizeHint () const\fC [virtual]\fP"\fBReturns:\fP .RS 4 a minimum size hint .RE .PP .SS "void QwtScaleWidget::paintEvent (QPaintEvent *e)\fC [protected, virtual]\fP" .PP paintEvent .SS "int QwtScaleWidget::penWidth () const"\fBReturns:\fP .RS 4 Scale pen width .RE .PP \fBSee also:\fP .RS 4 \fBsetPenWidth()\fP .RE .PP .SS "void QwtScaleWidget::resizeEvent (QResizeEvent *e)\fC [protected, virtual]\fP" .PP resizeEvent .SS "void QwtScaleWidget::scaleChange ()\fC [protected]\fP" .PP 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. .SS "void QwtScaleWidget::scaleDivChanged ()\fC [signal]\fP" .PP Signal emitted, whenever the scale divison changes. .SS "const \fBQwtScaleDraw\fP * QwtScaleWidget::scaleDraw () const"scaleDraw of this scale .PP \fBSee also:\fP .RS 4 \fBsetScaleDraw()\fP, QwtScaleDraw::setScaleDraw() .RE .PP .SS "\fBQwtScaleDraw\fP * QwtScaleWidget::scaleDraw ()"scaleDraw of this scale .PP \fBSee also:\fP .RS 4 QwtScaleDraw::setScaleDraw() .RE .PP .SS "void QwtScaleWidget::setAlignment (\fBQwtScaleDraw::Alignment\fPalignment)"Change the alignment .PP \fBParameters:\fP .RS 4 \fIalignment\fP New alignment .RE .PP \fBSee also:\fP .RS 4 \fBalignment()\fP .RE .PP .SS "void QwtScaleWidget::setBorderDist (intdist1, intdist2)"Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be less than minimum border distance. .PP \fBParameters:\fP .RS 4 \fIdist1\fP Left or top Distance .br \fIdist2\fP Right or bottom distance .RE .PP \fBSee also:\fP .RS 4 borderDist() .RE .PP .SS "void QwtScaleWidget::setLabelAlignment (Qt::Alignmentalignment)" .PP Change the alignment for the labels. \fBSee also:\fP .RS 4 \fBQwtScaleDraw::setLabelAlignment()\fP, \fBsetLabelRotation()\fP .RE .PP .SS "void QwtScaleWidget::setLabelRotation (doublerotation)" .PP Change the rotation for the labels. See \fBQwtScaleDraw::setLabelRotation()\fP. \fBParameters:\fP .RS 4 \fIrotation\fP Rotation .RE .PP \fBSee also:\fP .RS 4 \fBQwtScaleDraw::setLabelRotation()\fP, setLabelFlags() .RE .PP .SS "void QwtScaleWidget::setMargin (intmargin)" .PP Specify the margin to the colorBar/base line. \fBParameters:\fP .RS 4 \fImargin\fP Margin .RE .PP \fBSee also:\fP .RS 4 \fBmargin()\fP .RE .PP .SS "void QwtScaleWidget::setMinBorderDist (intstart, intend)"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. .PP \fBParameters:\fP .RS 4 \fIstart\fP Minimum for the start border .br \fIend\fP Minimum for the end border .RE .PP \fBSee also:\fP .RS 4 \fBgetMinBorderDist()\fP, \fBgetBorderDistHint()\fP .RE .PP .SS "void QwtScaleWidget::setPenWidth (intwidth)" .PP Specify the width of the scale pen. \fBParameters:\fP .RS 4 \fIwidth\fP Pen width .RE .PP \fBSee also:\fP .RS 4 \fBpenWidth()\fP .RE .PP .SS "void QwtScaleWidget::setScaleDiv (\fBQwtScaleTransformation\fP *transformation, const \fBQwtScaleDiv\fP &scaleDiv)" .PP Assign a scale division. The scale division determines where to set the tick marks. .PP \fBParameters:\fP .RS 4 \fItransformation\fP Transformation, needed to translate between scale and pixal values .br \fIscaleDiv\fP Scale Division .RE .PP \fBSee also:\fP .RS 4 For more information about scale divisions, see \fBQwtScaleDiv\fP. .RE .PP .SS "void QwtScaleWidget::setScaleDraw (\fBQwtScaleDraw\fP *sd)"Set a scale draw sd has to be created with new and will be deleted in \fB~QwtScaleWidget()\fP or the next call of \fBsetScaleDraw()\fP. .PP \fBParameters:\fP .RS 4 \fIsd\fP ScaleDraw object .RE .PP \fBSee also:\fP .RS 4 \fBscaleDraw()\fP .RE .PP .SS "void QwtScaleWidget::setSpacing (intspacing)" .PP Specify the distance between color bar, scale and title. \fBParameters:\fP .RS 4 \fIspacing\fP Spacing .RE .PP \fBSee also:\fP .RS 4 \fBspacing()\fP .RE .PP .SS "void QwtScaleWidget::setTitle (const QString &title)"Give title new text contents .PP \fBParameters:\fP .RS 4 \fItitle\fP New title .RE .PP \fBSee also:\fP .RS 4 \fBtitle()\fP, \fBsetTitle(const QwtText &)\fP; .RE .PP .SS "void QwtScaleWidget::setTitle (const \fBQwtText\fP &title)"Give title new text contents .PP \fBParameters:\fP .RS 4 \fItitle\fP New title .RE .PP \fBSee also:\fP .RS 4 \fBtitle()\fP .RE .PP \fBWarning:\fP .RS 4 The title flags are interpreted in direction of the label, AlignTop, AlignBottom can't be set as the title will always be aligned to the scale. .RE .PP .SS "QSize QwtScaleWidget::sizeHint () const\fC [virtual]\fP"\fBReturns:\fP .RS 4 a size hint .RE .PP .SS "int QwtScaleWidget::spacing () const"\fBReturns:\fP .RS 4 distance between scale and title .RE .PP \fBSee also:\fP .RS 4 \fBsetMargin()\fP .RE .PP .SS "int QwtScaleWidget::startBorderDist () const"\fBReturns:\fP .RS 4 start border distance .RE .PP \fBSee also:\fP .RS 4 \fBsetBorderDist()\fP .RE .PP .SS "\fBQwtText\fP QwtScaleWidget::title () const"\fBReturns:\fP .RS 4 title .RE .PP \fBSee also:\fP .RS 4 \fBsetTitle()\fP .RE .PP .SS "int QwtScaleWidget::titleHeightForWidth (intwidth) const" .PP Find the height of the title for a given width. \fBParameters:\fP .RS 4 \fIwidth\fP Width .RE .PP \fBReturns:\fP .RS 4 height Height .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.