The QSize class defines the size of a two-dimensional object. More...
#include <qsize.h>
A size is specified by a width and a height.
The coordinate type is QCOORD (defined in qwindowdefs.h as short).
The minimum value of QCOORD is QCOORD_MIN (-32768) and the maximum
value is QCOORD_MAX (32767).
Examples: tictac/tictac.cpp xform/xform.cpp pref/pref.cpp progress/progress.cpp
Constructs a size with invalid (negative) width and height.
Constructs a size with width w and height h.
Returns a size with the minimum width and height of this size and otherSize.
Returns a size with the maximum width and height of this size and otherSize.
Returns the height.
See also: width().
Examples: pref/pref.cpp
Returns TRUE if the width is <= 0 or the height is <= 0, otherwise FALSE.
Returns TRUE if the width is 0 and the height is 0, otherwise FALSE.
Returns TRUE if the width is equal to or greater than 0 and the height is equal to or greater than 0, otherwise FALSE.
Multiplies both the width and height with c and returns a reference to the size.
Note that the result is truncated.
Multiplies both the width and height with c and returns a reference to the size.
Adds s to the size and returns a reference to this size.
Example:
QSize s( 3, 7 ); QSize r( -1, 4 ); s += r; // s becomes (2,11)
Subtracts s from the size and returns a reference to this size.
Example:
QSize s( 3, 7 ); QSize r( -1, 4 ); s -= r; // s becomes (4,3)
Divides both the width and height by c and returns a reference to the size.
Note that the result is truncated.
Divides both the width and height by c and returns a reference to the size.
Returns a reference to the height.
Using a reference makes it possible to directly manipulate the height.
Example:
QSize s( 100, 10 ); s.rheight() += 5; // s becomes (100,15)
See also: rwidth().
Returns a reference to the width.
Using a reference makes it possible to directly manipulate the width.
Example:
QSize s( 100, 10 ); s.rwidth() += 20; // s becomes (120,10)
See also: rheight().
Sets the height to h.
See also: height() and setWidth().
Examples: pref/pref.cpp
Sets the width to w.
See also: width() and setHeight().
Examples: pref/pref.cpp
Swaps the values of width and height.
Returns the width.
See also: height().
Examples: pref/pref.cpp
Returns TRUE if s1 and s2 are equal, or FALSE if they are different.
Returns TRUE if s1 and s2 are different, or FALSE if they are equal.
Returns the sum of s1 and s2; each component is added separately.
Returns s2 subtracted from s1; each component is subtracted separately.
Multiplies s by c and returns the result.
Multiplies s by c and returns the result.
Multiplies s by c and returns the result.
Multiplies s by c and returns the result.
Divides s by c and returns the result.
Divides s by c and returns the result.
Note that the result is truncated.
Writes the size to the stream and returns a reference to the stream.
Serialization format: [width (INT16), height (INT16)].
Reads the size from the stream and returns a reference to the stream.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright İ 1998 Troll Tech | Trademarks | Qt version 1.42
|