Struct qt_core::q_variant::Type

source ·
pub struct Type(/* private fields */);
Expand description

This enum type defines the types of variable that a QVariant can contain.

C++ enum: QVariant::Type.

C++ documentation:

This enum type defines the types of variable that a QVariant can contain.

Related Non-Members

Implementations§

source§

impl Type

source

pub fn to_int(&self) -> c_int

source§

impl Type

source

pub const Invalid: Type = _

no type (C++ enum variant: Invalid = 0)

source

pub const Bool: Type = _

a bool (C++ enum variant: Bool = 1)

source

pub const Int: Type = _

an int (C++ enum variant: Int = 2)

source

pub const UInt: Type = _

a uint (C++ enum variant: UInt = 3)

source

pub const LongLong: Type = _

a qlonglong (C++ enum variant: LongLong = 4)

source

pub const ULongLong: Type = _

a qulonglong (C++ enum variant: ULongLong = 5)

source

pub const Double: Type = _

a double (C++ enum variant: Double = 6)

source

pub const Char: Type = _

a QChar (C++ enum variant: Char = 7)

source

pub const Map: Type = _

a QVariantMap (C++ enum variant: Map = 8)

source

pub const List: Type = _

a QVariantList (C++ enum variant: List = 9)

source

pub const String: Type = _

a QString (C++ enum variant: String = 10)

source

pub const StringList: Type = _

a QStringList (C++ enum variant: StringList = 11)

source

pub const ByteArray: Type = _

a QByteArray (C++ enum variant: ByteArray = 12)

source

pub const BitArray: Type = _

a QBitArray (C++ enum variant: BitArray = 13)

source

pub const Date: Type = _

a QDate (C++ enum variant: Date = 14)

source

pub const Time: Type = _

a QTime (C++ enum variant: Time = 15)

source

pub const DateTime: Type = _

a QDateTime (C++ enum variant: DateTime = 16)

source

pub const Url: Type = _

a QUrl (C++ enum variant: Url = 17)

source

pub const Locale: Type = _

a QLocale (C++ enum variant: Locale = 18)

source

pub const Rect: Type = _

a QRect (C++ enum variant: Rect = 19)

source

pub const RectF: Type = _

a QRectF (C++ enum variant: RectF = 20)

source

pub const Size: Type = _

a QSize (C++ enum variant: Size = 21)

source

pub const SizeF: Type = _

a QSizeF (C++ enum variant: SizeF = 22)

source

pub const Line: Type = _

a QLine (C++ enum variant: Line = 23)

source

pub const LineF: Type = _

a QLineF (C++ enum variant: LineF = 24)

source

pub const Point: Type = _

a QPoint (C++ enum variant: Point = 25)

source

pub const PointF: Type = _

a QPointF (C++ enum variant: PointF = 26)

source

pub const RegExp: Type = _

a QRegExp (C++ enum variant: RegExp = 27)

source

pub const RegularExpression: Type = _

a QRegularExpression (C++ enum variant: RegularExpression = 44)

source

pub const Hash: Type = _

a QVariantHash (C++ enum variant: Hash = 28)

source

pub const EasingCurve: Type = _

a QEasingCurve (C++ enum variant: EasingCurve = 29)

source

pub const Uuid: Type = _

a QUuid (C++ enum variant: Uuid = 30)

source

pub const ModelIndex: Type = _

a QModelIndex (C++ enum variant: ModelIndex = 42)

source

pub const PersistentModelIndex: Type = _

a QPersistentModelIndex (since 5.5) (C++ enum variant: PersistentModelIndex = 50)

source

pub const LastCoreType: Type = _

C++ enum variant: LastCoreType = 51

source

pub const Font: Type = _

a QFont (C++ enum variant: Font = 64)

source

pub const Pixmap: Type = _

a QPixmap (C++ enum variant: Pixmap = 65)

source

pub const Brush: Type = _

a QBrush (C++ enum variant: Brush = 66)

source

pub const Color: Type = _

a QColor (C++ enum variant: Color = 67)

source

pub const Palette: Type = _

a QPalette (C++ enum variant: Palette = 68)

source

pub const Image: Type = _

a QImage (C++ enum variant: Image = 70)

source

pub const Polygon: Type = _

a QPolygon (C++ enum variant: Polygon = 71)

source

pub const Region: Type = _

a QRegion (C++ enum variant: Region = 72)

source

pub const Bitmap: Type = _

a QBitmap (C++ enum variant: Bitmap = 73)

source

pub const Cursor: Type = _

a QCursor (C++ enum variant: Cursor = 74)

source

pub const KeySequence: Type = _

a QKeySequence (C++ enum variant: KeySequence = 75)

source

pub const Pen: Type = _

a QPen (C++ enum variant: Pen = 76)

source

pub const TextLength: Type = _

a QTextLength (C++ enum variant: TextLength = 77)

source

pub const TextFormat: Type = _

a QTextFormat (C++ enum variant: TextFormat = 78)

source

pub const Matrix: Type = _

a QMatrix (C++ enum variant: Matrix = 79)

source

pub const Transform: Type = _

a QTransform (C++ enum variant: Transform = 80)

source

pub const Matrix4X4: Type = _

a QMatrix4x4 (C++ enum variant: Matrix4x4 = 81)

source

pub const Vector2D: Type = _

a QVector2D (C++ enum variant: Vector2D = 82)

source

pub const Vector3D: Type = _

a QVector3D (C++ enum variant: Vector3D = 83)

source

pub const Vector4D: Type = _

a QVector4D (C++ enum variant: Vector4D = 84)

source

pub const Quaternion: Type = _

a QQuaternion (C++ enum variant: Quaternion = 85)

source

pub const PolygonF: Type = _

a QPolygonF (C++ enum variant: PolygonF = 86)

source

pub const Icon: Type = _

a QIcon (C++ enum variant: Icon = 69)

source

pub const LastGuiType: Type = _

C++ enum variant: LastGuiType = 86

source

pub const SizePolicy: Type = _

a QSizePolicy (C++ enum variant: SizePolicy = 121)

source

pub const UserType: Type = _

Base value for user-defined types. (C++ enum variant: UserType = 1024)

source

pub const LastType: Type = _

C++ enum variant: LastType = -1

source

pub const LastCoreType2: Type = _

C++ enum variant: LastCoreType = 55

Trait Implementations§

source§

impl Clone for Type

source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Type

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Type> for c_int

source§

fn from(value: Type) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Type

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Type

source§

fn eq(&self, other: &Type) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Shl<Type> for &QDataStream

source§

fn shl(self, p: Type) -> Ref<QDataStream>

Writes bit array ba to stream out.

Calls C++ function: QDataStream& operator<<(QDataStream& s, QVariant::Type p).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for QDataStream &operator<<(QDataStream &out, const QBitArray &ba):

Writes bit array ba to stream out.

See also Format of the QDataStream operators.

§

type Output = Ref<QDataStream>

The resulting type after applying the << operator.
source§

impl Shl<Type> for &QDebug

source§

fn shl(self, arg2: Type) -> CppBox<QDebug>

Writes bit array ba to stream out.

Calls C++ function: QDebug operator<<(QDebug arg1, QVariant::Type arg2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for QDataStream &operator<<(QDataStream &out, const QBitArray &ba):

Writes bit array ba to stream out.

See also Format of the QDataStream operators.

§

type Output = CppBox<QDebug>

The resulting type after applying the << operator.
source§

impl Copy for Type

source§

impl Eq for Type

source§

impl StructuralEq for Type

source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.