|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
Geographic type enumerations and string-conversion helpers for Qt geometry types. More...
Enumerations | |
| enum | CardinalDirection { InvalidCardinalDirection = 0 , North = 1 , East = 2 , South = 3 , West = 4 } |
| Cardinal compass directions used by geographic coordinates. More... | |
| enum | Side { NoSide = 0x0000 , Top = 0x0001 , Left = 0x0002 , Bottom = 0x0004 , Right = 0x0008 , TopLeftCorner = 0x0010 , TopRightCorner = 0x0020 , BottomLeftCorner = 0x0040 , BottomRightCorner = 0x0080 } |
| Bitmask identifying which side(s) of a rectangle are relevant. More... | |
| enum | Direction { NoDirection = NoSide , Up = Top , Down = Bottom , ToLeft = Left , ToRight = Right } |
| Cardinal directions, aliased to the corresponding Side values. More... | |
| enum | SpatialRelationship { NoRelationship = 0x0000 , IntersectsWith = 0x0001 , Contains = 0x0002 , ContainedBy = 0x0004 , AwayFrom = 0x0008 , Towards = 0x0010 , Above = 0x0020 , Below = 0x0040 , ToLeftOf = 0x0080 , ToRightOf = 0x0100 , Contained = 0x0200 } |
| Spatial relationship between two geometric objects. More... | |
| enum | Axis { NoAxis = 0x0000 , XAxis = 0x0001 , YAxis = 0x0002 , ZAxis = 0x0004 } |
| Coordinate axes. More... | |
Functions | |
| static QString | string (const QRect &rect) |
| Format a QRect as a human-readable "x,y w,h" string. | |
| static QString | string (const QSize &size) |
| Format a QSize as a human-readable "w,h" string. | |
| static QString | string (const QPoint &point) |
| Format an integer QPoint as a "x,y" string. | |
| static QString | string (const QPointF &point) |
| Format a floating-point QPointF as a "x,y" string. | |
| KANOOP_EXPORT QList< Direction > | allDirections () |
| Return a list of all four cardinal directions. | |
| KANOOP_EXPORT Side | directionToSide (Direction direction) |
| Convert a Direction to the corresponding Side value. | |
| KANOOP_EXPORT Direction | sideToDirection (Side side) |
| Convert a Side to the corresponding Direction value. | |
| KANOOP_EXPORT double | directionToBearing (Direction direction) |
| Convert a cardinal Direction to a compass bearing in degrees. | |
| KANOOP_EXPORT Direction | bearingToDirection (double bearing) |
| Convert a compass bearing to the nearest cardinal Direction. | |
| KANOOP_EXPORT Direction | oppositeDirection (Direction direction) |
| Return the opposite of a cardinal Direction. | |
Geographic type enumerations and string-conversion helpers for Qt geometry types.
Geometry enumerations and utility functions for sides, directions, and spatial relationships.
Geographic namespace providing cardinal direction enumerations and geometry string helpers.
Geometry namespace providing enumerations and free functions for spatial reasoning.
| enum Geo::Axis |
Cardinal compass directions used by geographic coordinates.
Definition at line 19 of file geotypes.h.
| enum Geo::Direction |
| enum Geo::Side |
Spatial relationship between two geometric objects.
| KANOOP_EXPORT QList< Direction > Geo::allDirections | ( | ) |
Return a list of all four cardinal directions.
| KANOOP_EXPORT Direction Geo::bearingToDirection | ( | double | bearing | ) |
Convert a compass bearing to the nearest cardinal Direction.
| bearing | Bearing in degrees |
| KANOOP_EXPORT double Geo::directionToBearing | ( | Direction | direction | ) |
Convert a cardinal Direction to a compass bearing in degrees.
| direction | Direction to convert |
Convert a Direction to the corresponding Side value.
| direction | Direction to convert |
Return the opposite of a cardinal Direction.
| direction | Input direction |
Convert a Side to the corresponding Direction value.
| side | Side to convert |
|
inlinestatic |
Format an integer QPoint as a "x,y" string.
| point | Point to format |
Definition at line 53 of file geotypes.h.
|
inlinestatic |
Format a floating-point QPointF as a "x,y" string.
| point | Point to format |
Definition at line 63 of file geotypes.h.
|
inlinestatic |
Format a QRect as a human-readable "x,y w,h" string.
| rect | Rectangle to format |
Definition at line 33 of file geotypes.h.
|
inlinestatic |
Format a QSize as a human-readable "w,h" string.
| size | Size to format |
Definition at line 43 of file geotypes.h.