⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwtscaledraw.3

📁 软件无线电的平台
💻 3
📖 第 1 页 / 共 2 页
字号:
.TH "QwtScaleDraw" 3 "4 Nov 2003" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtScaleDraw \- .SH SYNOPSIS.br.PPInherits \fBQwtDiMap\fP..PPInherited by \fBQwtDialScaleDraw\fP..PP.SH "Detailed Description".PP A class for drawing scales. QwtScaleDraw can be used to draw linear or logarithmic scales. A scale has an origin, an orientation and a length, which all can be specified with \fBQwtScaleDraw::setGeometry()\fP. The labels can be rotated and aligned to the ticks using \fBQwtScaleDraw::setLabelRotation()\fP, \fBQwtScaleDraw::setLabelAlignment()\fP..PPAfter a scale division has been specified as a \fBQwtScaleDiv\fP object using \fBQwtScaleDraw::setScale(const QwtScaleDiv &s)\fP, or determined internally using \fBQwtScaleDraw::setScale\fP(double vmin, double vmax, int maxMajIntv, int maxMinIntv, double step = 0.0, int logarithmic = 0), the scale can be drawn with the \fBQwtScaleDraw::draw()\fP member. .PP.SS "Public Types".in +1c.ti -1c.RI "enum \fBOrientation\fP { \fBBottom\fP, \fBTop\fP, \fBLeft\fP, \fBRight\fP, \fBRound\fP }".br.ti -1c.RI "enum \fBOption\fP { \fBNone\fP =  0, \fBBackbone\fP =  1 }".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtScaleDraw\fP ()".br.ti -1c.RI "virtual \fB~QwtScaleDraw\fP ()".br.ti -1c.RI "void \fBsetScale\fP (const  \fBQwtScaleDiv\fP &s)".br.ti -1c.RI "void \fBsetScale\fP (double vmin, double vmax, int maxMajIntv, int maxMinIntv, double step=0.0, int logarithmic=0)".br.ti -1c.RI "void \fBsetOptions\fP (int opt)".br.ti -1c.RI "int \fBoptions\fP () const ".br.ti -1c.RI "void \fBsetGeometry\fP (int xorigin, int yorigin, int length, \fBOrientation\fP o)".br.ti -1c.RI "int \fBx\fP () const ".br.ti -1c.RI "int \fBy\fP () const ".br.ti -1c.RI "int \fBlength\fP () const ".br.ti -1c.RI "\fBOrientation\fP \fBorientation\fP () const ".br.ti -1c.RI "void \fBsetAngleRange\fP (double angle1, double angle2)".br.ti -1c.RI "void \fBsetLabelFormat\fP (char f, int prec, int fieldwidth=0)".br.ti -1c.RI "void \fBsetLabelAlignment\fP (int align)".br.ti -1c.RI "void \fBsetLabelRotation\fP (double rotation)".br.ti -1c.RI "void \fBsetTickLength\fP (unsigned int minLen, unsigned int medLen, unsigned int majLen)".br.ti -1c.RI "void \fBsetMargin\fP (uint hMargin, uint vMargin)".br.ti -1c.RI "const  \fBQwtScaleDiv\fP & \fBscaleDiv\fP () const ".br.ti -1c.RI "int \fBmaxWidth\fP (const  QPen &pen, const  QFontMetrics &fm) const ".br.ti -1c.RI "int \fBmaxHeight\fP (const  QPen &pen, const  QFontMetrics &fm) const ".br.ti -1c.RI "void \fBminBorderDist\fP (const  QFontMetrics &fm, int &start, int &end) const ".br.ti -1c.RI "int \fBminLabelDist\fP (const  QFontMetrics &fm) const ".br.ti -1c.RI "int \fBminHeight\fP (const  QPen &pen, const  QFontMetrics &fm) const ".br.ti -1c.RI "int \fBminWidth\fP (const  QPen &pen, const  QFontMetrics &fm) const ".br.ti -1c.RI "void \fBlabelFormat\fP (char &f, int &prec, int &fieldwidth) const ".br.ti -1c.RI "int \fBlabelAlignment\fP () const ".br.ti -1c.RI "double \fBlabelRotation\fP () const ".br.ti -1c.RI "void \fBtickLength\fP (unsigned int &minLen, unsigned int &medLen, unsigned int &majLen) const ".br.ti -1c.RI "unsigned int \fBmajTickLength\fP () const ".br.ti -1c.RI "virtual void \fBdraw\fP (QPainter *p) const ".br.ti -1c.RI "virtual QString \fBlabel\fP (double) const ".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "virtual void \fBlabelPlacement\fP (const  QFontMetrics &, double val, QPoint &pos, int &alignment, double &rotation) const ".br.ti -1c.RI "virtual int \fBmaxLabelHeight\fP (const  QFontMetrics &) const ".br.ti -1c.RI "virtual int \fBmaxLabelWidth\fP (const  QFontMetrics &) const ".br.ti -1c.RI "QRect \fBlabelBoundingRect\fP (const  QFontMetrics &, double val) const ".br.ti -1c.RI "void \fBdrawTick\fP (QPainter *p, double val, int len) const ".br.ti -1c.RI "void \fBdrawBackbone\fP (QPainter *p) const ".br.ti -1c.RI "void \fBdrawLabel\fP (QPainter *p, double val) const ".br.ti -1c.RI "QWMatrix \fBlabelWorldMatrix\fP (const  QFontMetrics &, const  QPoint &, int alignment, double rotation, const  QString &) const ".br.in -1c.SH "Member Enumeration Documentation".PP .SS "enum \fBQwtScaleDraw::Orientation\fP".PPOrientation/Position of the scale draw .PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::setGeometry\fP .RE.PP.SH "Constructor & Destructor Documentation".PP .SS "QwtScaleDraw::QwtScaleDraw ()".PPConstructor. The range of the scale is initialized to [0, 100], the angle range is set to [-135, 135], the geometry is initialized such that the origin is at (0,0), the length is 100, and the orientation is QwtScaleDraw::Bottom. .SS "QwtScaleDraw::~\fBQwtScaleDraw\fP ()\fC [virtual]\fP".PPDestructor. .SH "Member Function Documentation".PP .SS "void QwtScaleDraw::draw (QPainter * p) const\fC [virtual]\fP".PPDraw the scale. \fBParameters:\fP.RS 4\fIp\fP the painter .RE.PP.SS "void QwtScaleDraw::drawBackbone (QPainter * p) const\fC [protected]\fP".PPDraws the baseline of the scale. .SS "void QwtScaleDraw::drawLabel (QPainter * p, double val) const\fC [protected]\fP".PPDraws the number label for a major scale tick. .SS "void QwtScaleDraw::drawTick (QPainter * p, double val, int len) const\fC [protected]\fP".PPDraws a single scale tick. .SS "QString QwtScaleDraw::label (double value) const\fC [virtual]\fP".PPConvert a value into its representing label using the labelFormat. \fBParameters:\fP.RS 4\fIvalue\fP Value .RE.PP\fBReturns:\fP.RS 4Label string. .RE.PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::setLabelFormat()\fP .RE.PPReimplemented in \fBQwtDialScaleDraw\fP..SS "int QwtScaleDraw::labelAlignment () const".PP\fBReturns:\fP.RS 4the label alignment .RE.PP\fBSee also:\fP.RS 4\fBsetLabelAlignment()\fP, \fBlabelRotation()\fP .RE.PP.SS "QRect QwtScaleDraw::labelBoundingRect (const QFontMetrics & fm, double val) const\fC [protected]\fP".PPFind the bounding rect for the label. The coordinates of the rect are relative to margin + ticklength from the backbone in direction of the tick. .SS "void QwtScaleDraw::labelFormat (char & f, int & prec, int & fieldwidth) const".PPFormat character and precision have the same meaning as for the QString class. .PP\fBReturn values:\fP.RS 4\fIf\fP format character 'g', 'e', or 'f' .br\fIprec\fP precision(f), or siginificance(g) .RE.PP\fBReturns:\fP.RS 4the number format for the major scale labels .RE.PP\fBSee also:\fP.RS 4QString::sprintf in the Qt manual .RE.PP.SS "void QwtScaleDraw::labelPlacement (const QFontMetrics &, double val, QPoint & pos, int & alignment, double & rotation) const\fC [protected, virtual]\fP".PPFind position, alignment and rotation of the label. .SS "double QwtScaleDraw::labelRotation () const".PP\fBReturns:\fP.RS 4the label rotation .RE.PP\fBSee also:\fP.RS 4\fBsetLabelRotation()\fP, \fBlabelAlignment()\fP .RE.PP.SS "QWMatrix QwtScaleDraw::labelWorldMatrix (const QFontMetrics &, const QPoint &, int alignment, double rotation, const QString &) const\fC [protected]\fP".PPReturn the world matrix for painting the label. .SS "int QwtScaleDraw::length () const".PPReturn length. .SS "unsigned int QwtScaleDraw::majTickLength () const".PPReturn the length of the major ticks .PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::tickLength()\fP .RE.PP.SS "int QwtScaleDraw::maxHeight (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 height of the scale .RE.PP.SS "int QwtScaleDraw::maxLabelHeight (const QFontMetrics & fm) const\fC [protected, virtual]\fP".PP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -