Extends QSizeF with convenient grow/shrink operations and Rectangle conversion.
More...
#include <size.h>
|
| | Size () |
| | Default constructor — creates a null (0x0) size.
|
| |
| | Size (const QSizeF &other) |
| | Construct from a QSizeF.
|
| |
| | Size (const QSize &other) |
| | Construct from a QSize (integer dimensions).
|
| |
| | Size (double w, double h) |
| | Construct from explicit width and height.
|
| |
| Rectangle | toRectangle () const |
| | Convert this size to a Rectangle positioned at the origin.
|
| |
| void | grow (double amount) |
| | Grow both dimensions by the given amount.
|
| |
| void | shrink (double amount) |
| | Shrink both dimensions by the given amount.
|
| |
| QString | toString () const |
| | Format this size as "w, h".
|
| |
Extends QSizeF with convenient grow/shrink operations and Rectangle conversion.
Definition at line 14 of file size.h.
◆ Size() [1/4]
Default constructor — creates a null (0x0) size.
Definition at line 18 of file size.h.
◆ Size() [2/4]
| Size::Size |
( |
const QSizeF & |
other | ) |
|
|
inline |
Construct from a QSizeF.
- Parameters
-
Definition at line 21 of file size.h.
◆ Size() [3/4]
| Size::Size |
( |
const QSize & |
other | ) |
|
|
inline |
Construct from a QSize (integer dimensions).
- Parameters
-
Definition at line 24 of file size.h.
◆ Size() [4/4]
| Size::Size |
( |
double |
w, |
|
|
double |
h |
|
) |
| |
|
inline |
Construct from explicit width and height.
- Parameters
-
Definition at line 30 of file size.h.
◆ fromString()
| static Size Size::fromString |
( |
const QString & |
value | ) |
|
|
static |
Parse a Size from a string produced by toString().
- Parameters
-
| value | String of the form "w, h" |
- Returns
- Parsed Size
◆ grow()
| void Size::grow |
( |
double |
amount | ) |
|
Grow both dimensions by the given amount.
- Parameters
-
| amount | Amount to add to width and height |
◆ shrink()
| void Size::shrink |
( |
double |
amount | ) |
|
Shrink both dimensions by the given amount.
- Parameters
-
| amount | Amount to subtract from width and height |
◆ toRectangle()
◆ toString()
| QString Size::toString |
( |
| ) |
const |
|
inline |
Format this size as "w, h".
- Returns
- String representation
Definition at line 54 of file size.h.
The documentation for this class was generated from the following file:
- include/Kanoop/geometry/size.h