Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QFlags< Enum > Class Template Reference

#include <qflags.h>

+ Inheritance diagram for QFlags< Enum >:
+ Collaboration diagram for QFlags< Enum >:

Public Types

typedef Enum enum_type
 
using Int = typename Base::Int
 

Public Member Functions

constexpr QFlags () noexcept=default
 
constexpr Q_IMPLICIT QFlags (Enum flags) noexcept
 
constexpr QFlags (std::initializer_list< Enum > flags) noexcept
 
constexpr Int toInt () const noexcept
 
constexpr QFlagsoperator&= (int mask) noexcept
 
constexpr QFlagsoperator&= (uint mask) noexcept
 
constexpr QFlagsoperator&= (QFlags mask) noexcept
 
constexpr QFlagsoperator&= (Enum mask) noexcept
 
constexpr QFlagsoperator|= (QFlags other) noexcept
 
constexpr QFlagsoperator|= (Enum other) noexcept
 
constexpr QFlagsoperator^= (QFlags other) noexcept
 
constexpr QFlagsoperator^= (Enum other) noexcept
 
constexpr Q_IMPLICIT operator Int () const noexcept
 
constexpr bool operator! () const noexcept
 
constexpr QFlags operator| (QFlags other) const noexcept
 
constexpr QFlags operator| (Enum other) const noexcept
 
constexpr QFlags operator^ (QFlags other) const noexcept
 
constexpr QFlags operator^ (Enum other) const noexcept
 
constexpr QFlags operator& (int mask) const noexcept
 
constexpr QFlags operator& (uint mask) const noexcept
 
constexpr QFlags operator& (QFlags other) const noexcept
 
constexpr QFlags operator& (Enum other) const noexcept
 
constexpr QFlags operator~ () const noexcept
 
constexpr void operator+ (QFlags other) const noexcept=delete
 
constexpr void operator+ (Enum other) const noexcept=delete
 
constexpr void operator+ (int other) const noexcept=delete
 
constexpr void operator- (QFlags other) const noexcept=delete
 
constexpr void operator- (Enum other) const noexcept=delete
 
constexpr void operator- (int other) const noexcept=delete
 
constexpr bool testFlag (Enum flag) const noexcept
 
constexpr bool testFlags (QFlags flags) const noexcept
 
constexpr bool testAnyFlag (Enum flag) const noexcept
 
constexpr bool testAnyFlags (QFlags flags) const noexcept
 
constexpr QFlagssetFlag (Enum flag, bool on=true) noexcept
 
- Public Member Functions inherited from QtPrivate::QFlagsStorage< Enum >
constexpr QFlagsStorage () noexcept=default
 
constexpr QFlagsStorage (std::in_place_t, Int v)
 

Static Public Member Functions

static constexpr QFlags fromInt (Int i) noexcept
 

Friends

constexpr bool operator== (QFlags lhs, QFlags rhs) noexcept
 
constexpr bool operator!= (QFlags lhs, QFlags rhs) noexcept
 
constexpr bool operator== (QFlags lhs, Enum rhs) noexcept
 
constexpr bool operator!= (QFlags lhs, Enum rhs) noexcept
 
constexpr bool operator== (Enum lhs, QFlags rhs) noexcept
 
constexpr bool operator!= (Enum lhs, QFlags rhs) noexcept
 
template<typename E >
QDataStreamoperator<< (QDataStream &, QFlags< E >)
 
template<typename E >
QDataStreamoperator>> (QDataStream &, QFlags< E > &)
 

Additional Inherited Members

- Protected Types inherited from QtPrivate::QFlagsStorage< Enum >
typedef std::conditional< std::is_unsigned< typenamestd::underlying_type< Enum >::type >::value, typenameIntegers::Unsigned, typenameIntegers::Signed >::type Int
 
- Protected Attributes inherited from QtPrivate::QFlagsStorage< Enum >
Int i = 0
 

Detailed Description

template<typename Enum>
class QFlags< Enum >

Definition at line 102 of file qflags.h.

Member Typedef Documentation

◆ enum_type

template<typename Enum >
Enum QFlags< Enum >::enum_type

Definition at line 106 of file qflags.h.

◆ Int

template<typename Enum >
using QFlags< Enum >::Int = typename Base::Int

Definition at line 107 of file qflags.h.

Constructor & Destructor Documentation

◆ QFlags() [1/3]

template<typename Enum >
QFlags< Enum >::QFlags ( )
inlineconstexprdefaultnoexcept

◆ QFlags() [2/3]

template<typename Enum >
Q_IMPLICIT QFlags< Enum >::QFlags ( Enum flags)
inlineconstexprnoexcept

◆ QFlags() [3/3]

template<typename Enum >
QFlags< Enum >::QFlags ( std::initializer_list< Enum > flags)
inlineconstexprnoexcept

Definition at line 121 of file qflags.h.

References QFlags< Enum >::QFlags().

Referenced by QFlags< Enum >::QFlags().

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

Member Function Documentation

◆ fromInt()

template<typename Enum >
static constexpr QFlags QFlags< Enum >::fromInt ( Int i)
inlinestaticconstexprnoexcept

Definition at line 124 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator Int()

template<typename Enum >
Q_IMPLICIT QFlags< Enum >::operator Int ( ) const
inlineconstexprnoexcept

Definition at line 142 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator!()

template<typename Enum >
bool QFlags< Enum >::operator! ( ) const
inlineconstexprnoexcept

Definition at line 143 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator&() [1/4]

template<typename Enum >
QFlags QFlags< Enum >::operator& ( Enum other) const
inlineconstexprnoexcept

Definition at line 155 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator&() [2/4]

template<typename Enum >
QFlags QFlags< Enum >::operator& ( int mask) const
inlineconstexprnoexcept

Definition at line 151 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator&() [3/4]

template<typename Enum >
QFlags QFlags< Enum >::operator& ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 154 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator&() [4/4]

template<typename Enum >
QFlags QFlags< Enum >::operator& ( uint mask) const
inlineconstexprnoexcept

Definition at line 152 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator&=() [1/4]

template<typename Enum >
QFlags & QFlags< Enum >::operator&= ( Enum mask)
inlineconstexprnoexcept

Definition at line 132 of file qflags.h.

◆ operator&=() [2/4]

template<typename Enum >
QFlags & QFlags< Enum >::operator&= ( int mask)
inlineconstexprnoexcept

Definition at line 128 of file qflags.h.

◆ operator&=() [3/4]

template<typename Enum >
QFlags & QFlags< Enum >::operator&= ( QFlags< Enum > mask)
inlineconstexprnoexcept

Definition at line 131 of file qflags.h.

◆ operator&=() [4/4]

template<typename Enum >
QFlags & QFlags< Enum >::operator&= ( uint mask)
inlineconstexprnoexcept

Definition at line 129 of file qflags.h.

◆ operator+() [1/3]

template<typename Enum >
void QFlags< Enum >::operator+ ( Enum other) const
inlineconstexprdeletenoexcept

◆ operator+() [2/3]

template<typename Enum >
void QFlags< Enum >::operator+ ( int other) const
inlineconstexprdeletenoexcept

◆ operator+() [3/3]

template<typename Enum >
void QFlags< Enum >::operator+ ( QFlags< Enum > other) const
inlineconstexprdeletenoexcept

◆ operator-() [1/3]

template<typename Enum >
void QFlags< Enum >::operator- ( Enum other) const
inlineconstexprdeletenoexcept

◆ operator-() [2/3]

template<typename Enum >
void QFlags< Enum >::operator- ( int other) const
inlineconstexprdeletenoexcept

◆ operator-() [3/3]

template<typename Enum >
void QFlags< Enum >::operator- ( QFlags< Enum > other) const
inlineconstexprdeletenoexcept

◆ operator^() [1/2]

template<typename Enum >
QFlags QFlags< Enum >::operator^ ( Enum other) const
inlineconstexprnoexcept

Definition at line 149 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator^() [2/2]

template<typename Enum >
QFlags QFlags< Enum >::operator^ ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 148 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator^=() [1/2]

template<typename Enum >
QFlags & QFlags< Enum >::operator^= ( Enum other)
inlineconstexprnoexcept

Definition at line 136 of file qflags.h.

◆ operator^=() [2/2]

template<typename Enum >
QFlags & QFlags< Enum >::operator^= ( QFlags< Enum > other)
inlineconstexprnoexcept

Definition at line 135 of file qflags.h.

◆ operator|() [1/2]

template<typename Enum >
QFlags QFlags< Enum >::operator| ( Enum other) const
inlineconstexprnoexcept

Definition at line 147 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator|() [2/2]

template<typename Enum >
QFlags QFlags< Enum >::operator| ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 146 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ operator|=() [1/2]

template<typename Enum >
QFlags & QFlags< Enum >::operator|= ( Enum other)
inlineconstexprnoexcept

Definition at line 134 of file qflags.h.

◆ operator|=() [2/2]

template<typename Enum >
QFlags & QFlags< Enum >::operator|= ( QFlags< Enum > other)
inlineconstexprnoexcept

Definition at line 133 of file qflags.h.

◆ operator~()

template<typename Enum >
QFlags QFlags< Enum >::operator~ ( ) const
inlineconstexprnoexcept

Definition at line 156 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ setFlag()

template<typename Enum >
QFlags & QFlags< Enum >::setFlag ( Enum flag,
bool on = true )
inlineconstexprnoexcept

Definition at line 169 of file qflags.h.

References QFlags< Enum >::QFlags().

+ Here is the call graph for this function:

◆ testAnyFlag()

template<typename Enum >
bool QFlags< Enum >::testAnyFlag ( Enum flag) const
inlineconstexprnoexcept

Definition at line 167 of file qflags.h.

References QFlags< Enum >::testAnyFlags().

+ Here is the call graph for this function:

◆ testAnyFlags()

template<typename Enum >
bool QFlags< Enum >::testAnyFlags ( QFlags< Enum > flags) const
inlineconstexprnoexcept

Definition at line 168 of file qflags.h.

Referenced by QFlags< Enum >::testAnyFlag().

+ Here is the caller graph for this function:

◆ testFlag()

template<typename Enum >
bool QFlags< Enum >::testFlag ( Enum flag) const
inlineconstexprnoexcept

Definition at line 165 of file qflags.h.

References QFlags< Enum >::testFlags().

+ Here is the call graph for this function:

◆ testFlags()

template<typename Enum >
bool QFlags< Enum >::testFlags ( QFlags< Enum > flags) const
inlineconstexprnoexcept

Definition at line 166 of file qflags.h.

Referenced by QFlags< Enum >::testFlag().

+ Here is the caller graph for this function:

◆ toInt()

template<typename Enum >
Int QFlags< Enum >::toInt ( ) const
inlineconstexprnoexcept

Definition at line 125 of file qflags.h.

Friends And Related Symbol Documentation

◆ operator!= [1/3]

template<typename Enum >
bool operator!= ( Enum lhs,
QFlags< Enum > rhs )
friend

Definition at line 184 of file qflags.h.

◆ operator!= [2/3]

template<typename Enum >
bool operator!= ( QFlags< Enum > lhs,
Enum rhs )
friend

Definition at line 180 of file qflags.h.

◆ operator!= [3/3]

template<typename Enum >
bool operator!= ( QFlags< Enum > lhs,
QFlags< Enum > rhs )
friend

Definition at line 176 of file qflags.h.

◆ operator<<

template<typename Enum >
template<typename E >
QDataStream & operator<< ( QDataStream & ,
QFlags< E >  )
friend

◆ operator== [1/3]

template<typename Enum >
bool operator== ( Enum lhs,
QFlags< Enum > rhs )
friend

Definition at line 182 of file qflags.h.

◆ operator== [2/3]

template<typename Enum >
bool operator== ( QFlags< Enum > lhs,
Enum rhs )
friend

Definition at line 178 of file qflags.h.

◆ operator== [3/3]

template<typename Enum >
bool operator== ( QFlags< Enum > lhs,
QFlags< Enum > rhs )
friend

Definition at line 174 of file qflags.h.

◆ operator>>

template<typename Enum >
template<typename E >
QDataStream & operator>> ( QDataStream & ,
QFlags< E > &  )
friend

The documentation for this class was generated from the following files: