📄 qwtscaledraw.3
字号:
\fBParameters:\fP.RS 4\fIfm\fP QFontMetrics .RE.PP\fBReturns:\fP.RS 4the maximum width of a label .RE.PP.SS "int QwtScaleDraw::maxLabelWidth (const QFontMetrics & fm) const\fC [protected, virtual]\fP".PP\fBParameters:\fP.RS 4\fIfm\fP QFontMetrics .RE.PP\fBReturns:\fP.RS 4the maximum width of a label .RE.PP.SS "int QwtScaleDraw::maxWidth (const QPen & pen, const QFontMetrics & fm) const".PP\fBParameters:\fP.RS 4\fIpen\fP pen .br\fIfm\fP font metrics .RE.PP\fBReturns:\fP.RS 4the maximum width of the scale .RE.PP.SS "void QwtScaleDraw::minBorderDist (const QFontMetrics & fm, int & start, int & end) const".PPDetermine the minimum border distance. This member function returns the minimum space needed to draw the mark labels at the scale's endpoints..PP\fBParameters:\fP.RS 4\fIfm\fP QFontMetrics .br\fIstart\fP start border distance .br\fIend\fP end border distance .RE.PP.SS "int QwtScaleDraw::minHeight (const QPen & pen, const QFontMetrics & fm) const".PP\fBParameters:\fP.RS 4\fIpen\fP pen .br\fIfm\fP font metrics .RE.PP\fBReturns:\fP.RS 4the minimum height required to draw the scale including the minimum border distance .RE.PP.SS "int QwtScaleDraw::minLabelDist (const QFontMetrics & fm) const".PPDetermine the minimum distance between two labels, that is necessairy that the texts don't overlap..PP\fBParameters:\fP.RS 4\fIfm\fP QFontMetrics .RE.PP\fBReturns:\fP.RS 4the maximum width of a label .RE.PP\fBWarning:\fP.RS 4Not implemented for round scales .RE.PP.SS "int QwtScaleDraw::minWidth (const QPen & pen, const QFontMetrics & fm) const".PP\fBParameters:\fP.RS 4\fIpen\fP pen .br\fIfm\fP font metrics .RE.PP\fBReturns:\fP.RS 4the minimum width required to draw the scale including the minimum border distance .RE.PP.SS "\fBQwtScaleDraw::Orientation\fP QwtScaleDraw::orientation () const".PPReturn scale orientation. .SS "const \fBQwtScaleDiv\fP& QwtScaleDraw::scaleDiv () const".PP\fBReturns:\fP.RS 4scale division .RE.PP.SS "void QwtScaleDraw::setAngleRange (double angle1, double angle2)".PPAdjust the baseline circle segment for round scales. The baseline will be drawn from min(angle1,angle2) to max(angle1, angle2). The settings have no effect if the scale orientation is not set to QwtScaleDraw::Round. The default setting is [ -135, 135 ]. An angle of 0 degrees corresponds to the 12 o'clock position, and positive angles count in a clockwise direction. .PP\fBParameters:\fP.RS 4\fIangle1\fP .br\fIangle2\fP boundaries of the angle interval in degrees. .RE.PP\fBWarning:\fP.RS 4.IP "\(bu" 2The angle range is limited to [-360, 360] degrees. Angles exceeding this range will be clipped. .IP "\(bu" 2For angles more than 359 degrees above or below min(angle1, angle2), scale marks will not be drawn. .IP "\(bu" 2If you need a counterclockwise scale, use QwtScaleDiv::setRange .PP.RE.PP.SS "void QwtScaleDraw::setGeometry (int xorigin, int yorigin, int length, \fBOrientation\fP o)".PPSpecify the geometry of the scale. The parameters xorigin, yorigin and length have different meanings, dependent on the orientation: .IP "\fBQwtScaleDraw::Left \fP" 1cThe origin is the topmost point of the baseline. The baseline is a vertical line with the specified length. Scale marks and labels are drawn at the left of the baseline. .IP "\fBQwtScaleDraw::Right \fP" 1cThe origin is the topmost point of the baseline. The baseline is a vertical line with the specified length. Scale marks and labels are drawn at the right of the baseline. .IP "\fBQwtScaleDraw::Top \fP" 1cThe origin is the leftmost point of the baseline. The baseline is a horizontal line with the specified length. Scale marks and labels are drawn above the baseline. .IP "\fBQwtScaleDraw::Bottom \fP" 1cThe origin is the leftmost point of the baseline. The baseline is a horizontal line with the specified length. Scale marks and labels are drawn below the baseline. .IP "\fBQwtScaleDraw::Round \fP" 1cThe origin is the top left corner of the bounding rectangle of the baseline circle. The baseline is the segment of a circle with a diameter of the specified length. Scale marks and labels are drawn outside the baseline circle..PP.PP\fBParameters:\fP.RS 4\fIxorigin\fP x coordinate of the origin .br\fIyorigin\fP y coordinate of the origin .br\fIlength\fP length or diameter of the scale, excluding border distance .br\fIo\fP The orientation .RE.PP.SS "void QwtScaleDraw::setLabelAlignment (int alignment)".PPLabels are aligned to the point ticklength + margin away from the backbone. The alignment is relative to the orientation of the label text. In case of an alignment of 0 the label will be aligned depending on the orientation of the scale:.PPQwtScaleDraw::Top: Qt::AlignHCenter | Qt::AlignTop.br QwtScaleDraw::Bottom: Qt::AlignHCenter | Qt::AlignBottom.br QwtScaleDraw::Left: Qt::AlignLeft | Qt::AlignVCenter.br QwtScaleDraw::Right: Qt::AlignRight | Qt::AlignVCenter.br.PPChanging the alignment is often necessary for rotated labels..PP\fBParameters:\fP.RS 4\fIalignment\fP Or'd Qt::AlignmentFlags <see qnamespace.h> .RE.PP\fBWarning:\fP.RS 4Alignment of labels is not implemented for round scales. .RE.PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::setLabelRotation()\fP, \fBQwtScaleDraw::labelRotation()\fP, \fBQwtScaleDraw::labelAlignment()\fP .RE.PP.SS "void QwtScaleDraw::setLabelFormat (char f, int prec, int fieldwidth = 0)".PPSet the number format for the major scale labels. Format character and precision have the same meaning as for the QString class. .PP\fBParameters:\fP.RS 4\fIf\fP format character, 'g', 'e' or 'f' .br\fIprec\fP precision(f) or significance(g) .br\fIfieldwidth\fP fieldwidth .RE.PP\fBSee also:\fP.RS 4QString::sprintf in the Qt manual .RE.PP.SS "void QwtScaleDraw::setLabelRotation (double rotation)".PPRotate all labels..PP\fBParameters:\fP.RS 4\fIrotation\fP Angle in degrees. When changing the label rotation, the label alignment might be adjusted too. .RE.PP\fBSee also:\fP.RS 4\fBsetLabelAlignment()\fP, \fBlabelRotation()\fP, \fBlabelAlignment()\fP. .RE.PP\fBWarning:\fP.RS 4Rotation of labels is not implemented for round scales. .RE.PP.SS "void QwtScaleDraw::setMargin (uint hMargin, uint vMargin)".PPSet the margins of the ticks.PP\fBParameters:\fP.RS 4\fIhMargin\fP Horizontal margin .br\fIvMargin\fP Vertical margin .RE.PP.SS "void QwtScaleDraw::setScale (double x1, double x2, int maxMajIntv, int maxMinIntv, double step = 0.0, int logscale = 0)".PPAdjust the range of the scale. If step == 0.0, the step width is calculated automatically dependent on the maximal number of scale ticks. .PP\fBParameters:\fP.RS 4\fIx1\fP Value at the left/low endpoint of the scale .br\fIx2\fP Value at the right/high endpoint of the scale .br\fImaxMajIntv\fP Max. number of major step intervals .br\fImaxMinIntv\fP Max. number of minor step intervals .br\fIstep\fP Step size (default : 0.0) .br\fIlogscale\fP Logarithmic scale (default : 0) .RE.PP.SS "void QwtScaleDraw::setScale (const \fBQwtScaleDiv\fP & sd)".PPChange the scale division. \fBParameters:\fP.RS 4\fIsd\fP new scale division .RE.PP.SS "void QwtScaleDraw::setTickLength (unsigned int minLen, unsigned int medLen, unsigned int majLen)".PPSet the length of the ticks .SS "void QwtScaleDraw::tickLength (unsigned int & minLen, unsigned int & medLen, unsigned int & majLen) const".PPReturn the length of the ticks .PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::majTickLength()\fP .RE.PP.SS "int QwtScaleDraw::x () const".PPReturn x origin. .SS "int QwtScaleDraw::y () const".PPReturn y origin. .SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -