Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qfixed_p.h File Reference
#include <QtGui/private/qtguiglobal_p.h>
#include "QtCore/qdebug.h"
#include "QtCore/qpoint.h"
#include "QtCore/qnumeric.h"
#include "QtCore/qsize.h"
+ Include dependency graph for qfixed_p.h:

Go to the source code of this file.

Classes

struct  QFixed
 
struct  QFixedPoint
 
struct  QFixedSize
 

Macros

#define REL_OP(op)
 
#define QFIXED_MAX   (INT_MAX/256)
 

Functions

 Q_DECLARE_TYPEINFO (QFixed, Q_PRIMITIVE_TYPE)
 
constexpr int qRound (QFixed f)
 
constexpr int qFloor (QFixed f)
 
constexpr QFixed operator* (int i, QFixed d)
 
constexpr QFixed operator+ (int i, QFixed d)
 
constexpr QFixed operator- (int i, QFixed d)
 
constexpr QFixed operator* (uint i, QFixed d)
 
constexpr QFixed operator+ (uint i, QFixed d)
 
constexpr QFixed operator- (uint i, QFixed d)
 
bool qAddOverflow (QFixed v1, QFixed v2, QFixed *r)
 
bool qMulOverflow (QFixed v1, QFixed v2, QFixed *r)
 
QDebugoperator<< (QDebug &dbg, QFixed f)
 
 Q_DECLARE_TYPEINFO (QFixedPoint, Q_PRIMITIVE_TYPE)
 
constexpr QFixedPoint operator- (const QFixedPoint &p1, const QFixedPoint &p2)
 
constexpr QFixedPoint operator+ (const QFixedPoint &p1, const QFixedPoint &p2)
 
 Q_DECLARE_TYPEINFO (QFixedSize, Q_PRIMITIVE_TYPE)
 

Macro Definition Documentation

◆ QFIXED_MAX

#define QFIXED_MAX   (INT_MAX/256)

Definition at line 127 of file qfixed_p.h.

◆ REL_OP

#define REL_OP (   op)
Value:
friend constexpr bool operator op(QFixed lhs, QFixed rhs) noexcept \
{ return lhs.val op rhs.val; }

Definition at line 63 of file qfixed_p.h.

Function Documentation

◆ operator*() [1/2]

constexpr QFixed operator* ( int  i,
QFixed  d 
)
inlineconstexpr

Definition at line 132 of file qfixed_p.h.

References d, and i.

◆ operator*() [2/2]

constexpr QFixed operator* ( uint  i,
QFixed  d 
)
inlineconstexpr

Definition at line 135 of file qfixed_p.h.

References d, and i.

◆ operator+() [1/3]

constexpr QFixedPoint operator+ ( const QFixedPoint p1,
const QFixedPoint p2 
)
inlineconstexpr

Definition at line 179 of file qfixed_p.h.

References p1, and p2.

◆ operator+() [2/3]

constexpr QFixed operator+ ( int  i,
QFixed  d 
)
inlineconstexpr

Definition at line 133 of file qfixed_p.h.

References d, and i.

◆ operator+() [3/3]

constexpr QFixed operator+ ( uint  i,
QFixed  d 
)
inlineconstexpr

Definition at line 136 of file qfixed_p.h.

References d, and i.

◆ operator-() [1/3]

constexpr QFixedPoint operator- ( const QFixedPoint p1,
const QFixedPoint p2 
)
inlineconstexpr

Definition at line 177 of file qfixed_p.h.

References p1, and p2.

◆ operator-() [2/3]

constexpr QFixed operator- ( int  i,
QFixed  d 
)
inlineconstexpr

Definition at line 134 of file qfixed_p.h.

References d, and i.

◆ operator-() [3/3]

constexpr QFixed operator- ( uint  i,
QFixed  d 
)
inlineconstexpr

Definition at line 137 of file qfixed_p.h.

References d, and i.

◆ operator<<()

QDebug & operator<< ( QDebug dbg,
QFixed  f 
)
inline

Definition at line 157 of file qfixed_p.h.

◆ Q_DECLARE_TYPEINFO() [1/3]

Q_DECLARE_TYPEINFO ( QFixed  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [2/3]

Q_DECLARE_TYPEINFO ( QFixedPoint  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [3/3]

Q_DECLARE_TYPEINFO ( QFixedSize  ,
Q_PRIMITIVE_TYPE   
)

◆ qAddOverflow()

bool qAddOverflow ( QFixed  v1,
QFixed  v2,
QFixed r 
)
inline

Definition at line 140 of file qfixed_p.h.

References qAddOverflow().

Referenced by qAddOverflow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qFloor()

constexpr int qFloor ( QFixed  f)
inlineconstexpr

Definition at line 130 of file qfixed_p.h.

◆ qMulOverflow()

bool qMulOverflow ( QFixed  v1,
QFixed  v2,
QFixed r 
)
inline

Definition at line 148 of file qfixed_p.h.

References qMulOverflow().

Referenced by qMulOverflow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qRound()

constexpr int qRound ( QFixed  f)
inlineconstexpr

Definition at line 129 of file qfixed_p.h.