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

📄 qpoint.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
字号:
.TH QPoint 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQPoint \- Defines a point in the plane.SH SYNOPSIS.br.PP\fC#include <qpoint.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQPoint\fR ()".br.ti -1c.BI "\fBQPoint\fR ( int " "xpos" ", int ypos )".br.ti -1c.BI "bool \fBisNull\fR () const".br.ti -1c.BI "int \fBx\fR () const".br.ti -1c.BI "int \fBy\fR () const".br.ti -1c.BI "void \fBsetX\fR ( int x )".br.ti -1c.BI "void \fBsetY\fR ( int y )".br.ti -1c.BI "int \fBmanhattanLength\fR () const".br.ti -1c.BI "QCOORD& \fBrx\fR ()".br.ti -1c.BI "QCOORD& \fBry\fR ()".br.ti -1c.BI "QPoint& \fBoperator+=\fR ( const QPoint & p )".br.ti -1c.BI "QPoint& \fBoperator-=\fR ( const QPoint & p )".br.ti -1c.BI "QPoint& \fBoperator*=\fR ( int c )".br.ti -1c.BI "QPoint& \fBoperator*=\fR ( double c )".br.ti -1c.BI "QPoint& \fBoperator/=\fR ( int c )".br.ti -1c.BI "QPoint& \fBoperator/=\fR ( double c )".br.in -1c.SH RELATED FUNCTION DOCUMENTATION(Note that these are not member functions.).in +1c.ti -1c.BI "QPoint \fBoperator+\fR (const QPoint & " "p1" ", const QPoint & " "p2" ")".br.ti -1c.BI "QPoint \fBoperator*\fR (double " "c" ", const QPoint & " "p" ")".br.ti -1c.BI "QPoint \fBoperator-\fR (const QPoint & " "p" ")".br.ti -1c.BI "QDataStream & \fBoperator<<\fR (QDataStream & " "s" ", const QPoint & " "p" ")".br.ti -1c.BI "QPoint \fBoperator/\fR (const QPoint & " "p" ", int " "c" ")".br.ti -1c.BI "QPoint \fBoperator*\fR (const QPoint & " "p" ", double " "c" ")".br.ti -1c.BI "QPoint \fBoperator*\fR (int " "c" ", const QPoint & " "p" ")".br.ti -1c.BI "QDataStream & \fBoperator>>\fR (QDataStream & " "s" ", QPoint & " "p" ")".br.ti -1c.BI "bool \fBoperator!=\fR (const QPoint & " "p1" ", const QPoint & " "p2" ")".br.ti -1c.BI "bool \fBoperator==\fR (const QPoint & " "p1" ", const QPoint & " "p2" ")".br.ti -1c.BI "QPoint \fBoperator*\fR (const QPoint & " "p" ", int " "c" ")".br.ti -1c.BI "QPoint \fBoperator-\fR (const QPoint & " "p1" ", const QPoint & " "p2" ")".br.ti -1c.BI "QPoint \fBoperator/\fR (const QPoint & " "p" ", double " "c" ")".br.in -1c.SH DESCRIPTIONThe QPoint class defines a point in the plane..PPA point is specified by an x coordinate and a y coordinate..PPThe coordinate type is QCOORD (defined in qwindowdefs.h as \fCint).\fR The minimum value of QCOORD is QCOORD_MIN (-2147483648) and the maximum value is QCOORD_MAX (2147483647)..PPWe have defined many operator functions that make arithmetic on points simple and intuitive..PPExample:.PP.nf.br    QPoint p(  1, 2 );.br    QPoint q( -8, 5 );.br    QPoint r(  9, 7 );.br    QPoint x = 2*p + (q-r)*5.5 - (r+p/1.5);.fi.PPSee also: QSize and QRect..PPExamples:.(ldrawlines/connect.cpp xform/xform.cpp drawdemo/drawdemo.cpp forever/forever.cpp.)l.SH MEMBER FUNCTION DOCUMENTATION.SH "QPoint::QPoint ()"Constructs a point (0,0) (a null point)..SH "QPoint::QPoint ( int xpos, int ypos )"Constructs a point with the x value \fIxpos\fR and y value \fIypos.\fR.SH "bool QPoint::isNull () const"Returns TRUE if both the x value and the y value are 0..SH "int QPoint::manhattanLength () const"Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" of the vector from the origin to the point. The tradition arises since such distances apply to travelers who can only travel on a rectangular grid, like the streets of Manhattan..PPThis is a useful approximation to the true length, sqrt(pow(x(),2)+pow(y(),2))..SH "QPoint & QPoint::operator*= ( double c )"Multiplies both x and y with \fIc,\fR and return a reference to this point..PPExample:.PP.nf.br    QPoint p( -1, 4 );.br    p *= 2.5;                   // p becomes (-3,10).fi.PPNote that the result is truncated..SH "QPoint & QPoint::operator*= ( int c )"Multiplies both x and y with \fIc,\fR and return a reference to this point..PPExample:.PP.nf.br    QPoint p( -1, 4 );.br    p *= 2;                     // p becomes (-2,8).fi.SH "QPoint & QPoint::operator+= ( const QPoint & p )"Adds \fIp\fR to the point and returns a reference to this point..PPExample:.PP.nf.br    QPoint p(  3, 7 );.br    QPoint q( -1, 4 );.br    p += q;                     // p becomes (2,11).fi.SH "QPoint & QPoint::operator-= ( const QPoint & p )"Subtracts \fIp\fR from the point and returns a reference to this point..PPExample:.PP.nf.br    QPoint p(  3, 7 );.br    QPoint q( -1, 4 );.br    p -= q;                     // p becomes (4,3).fi.SH "QPoint & QPoint::operator/= ( double c )"Divides both x and y by \fIc,\fR and return a reference to this point..PPExample:.PP.nf.br    QPoint p( -3, 10 );.br    p /= 2.5;                   // p becomes (-1,4).fi.PPNote that the result is truncated..SH "QPoint & QPoint::operator/= ( int c )"Divides both x and y by \fIc,\fR and return a reference to this point..PPExample:.PP.nf.br    QPoint p( -2, 8 );.br    p /= 2;                     // p becomes (-1,4).fi.SH "QCOORD & QPoint::rx ()"Returns a reference to the x coordinate of the point..PPUsing a reference makes it possible to directly manipulate x..PPExample:.PP.nf.br    QPoint p( 1, 2 );.br    p.rx()--;                   // p becomes (0,2).fi.PPSee also: ry()..SH "QCOORD & QPoint::ry ()"Returns a reference to the y coordinate of the point..PPUsing a reference makes it possible to directly manipulate y..PPExample:.PP.nf.br    QPoint p( 1, 2 );.br    p.ry()++;                   // p becomes (1,3).fi.PPSee also: rx()..SH "void QPoint::setX ( int x )"Sets the x coordinate of the point to \fIx.\fR.PPSee also: setY()..SH "void QPoint::setY ( int y )"Sets the y coordinate of the point to \fIy.\fR.PPSee also: setX()..SH "int QPoint::x () const"Returns the x coordinate of the point..PPSee also: y()..PPExamples:.(ldrawdemo/drawdemo.cpp.)l.SH "int QPoint::y () const"Returns the y coordinate of the point..PPSee also: x()..PPExamples:.(ldrawdemo/drawdemo.cpp.)l.SH RELATED FUNCTION DOCUMENTATION.SH "QPoint operator+ (const QPoint & p1, const QPoint & p2)"Returns the sum of \fIp1\fR and \fIp2;\fR each component is added separately..SH "QPoint operator* (double c, const QPoint & p)"Multiplies both of \fIp's\fR components by \fIc\fR and returns the result..SH "QPoint operator- (const QPoint & p)"Returns \fIp\fR where x and y have opposite signs..SH "QDataStream & operator<< (QDataStream & s, const QPoint & p)"Writes a QPoint to the stream and returns a reference to the stream..PPSerialization format: [x (Q_INT32), y (Q_INT32)]..SH "QPoint operator/ (const QPoint & p, int c)"Divides both of \fIp's\fR components by \fIc\fR and returns the result..SH "QPoint operator* (const QPoint & p, double c)"Multiplies both of \fIp's\fR components by \fIc\fR and returns the result..SH "QPoint operator* (int c, const QPoint & p)"Multiplies both of \fIp's\fR components by \fIc\fR and returns the result..SH "QDataStream & operator>> (QDataStream & s, QPoint & p)"Reads a QPoint from the stream and returns a reference to the stream..SH "bool operator!= (const QPoint & p1, const QPoint & p2)"Returns TRUE if \fIp1\fR and \fIp2\fR are different, or FALSE if they are equal..SH "bool operator== (const QPoint & p1, const QPoint & p2)"Returns TRUE if \fIp1\fR and \fIp2\fR are equal, or FALSE if they are different..SH "QPoint operator* (const QPoint & p, int c)"Multiplies both of \fIp's\fR components by \fIc\fR and returns the result..SH "QPoint operator- (const QPoint & p1, const QPoint & p2)"Returns \fIp2\fR subtracted from \fIp1;\fR each component is subtracted separately..SH "QPoint operator/ (const QPoint & p, double c)"Divides both of \fIp's\fR components by \fIc\fR and returns the result..PPNote that the result is truncated..SH "SEE ALSO".BR http://www.troll.no/qt/qpoint.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS.  See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

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