Struct qt_core::QPairOfI64Uint

source ·
#[repr(C)]
pub struct QPairOfI64Uint { /* private fields */ }
Expand description

The QPair class is a template class that stores a pair of items.

C++ class: QPair<qint64, unsigned int>.

C++ documentation:

The QPair class is a template class that stores a pair of items.

QPair<T1, T2> can be used in your application if the STL pair type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.

Here's an example of a QPair that stores one QString and one double value:

QPair<QString, double> pair;

The components are accessible as public data members called first and second. For example:

pair.first = “pi”; pair.second = 3.14159265358979323846;

Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first and second:

struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;

The advent of C++11 automatic variable type deduction (auto) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair and std::tuple, is mostly useful in generic (template) code, where defining a dedicated type is not possible.

QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.

Implementations§

source§

impl QPairOfI64Uint

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QPairOfI64Uint>> ) -> Ref<QPairOfI64Uint>

The QPair class is a template class that stores a pair of items.

Calls C++ function: QPair<qint64, unsigned int>& QPair<qint64, unsigned int>::operator=(const QPair<qint64, unsigned int>& other).

C++ documentation:

The QPair class is a template class that stores a pair of items.

QPair<T1, T2> can be used in your application if the STL pair type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.

Here's an example of a QPair that stores one QString and one double value:

QPair<QString, double> pair;

The components are accessible as public data members called first and second. For example:

pair.first = “pi”; pair.second = 3.14159265358979323846;

Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first and second:

struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;

The advent of C++11 automatic variable type deduction (auto) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair and std::tuple, is mostly useful in generic (template) code, where defining a dedicated type is not possible.

QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.

source

pub unsafe fn new_0a() -> CppBox<QPairOfI64Uint>

Constructs an empty pair. The first and second elements are initialized with default-constructed values.

Calls C++ function: [constructor] void QPair<qint64, unsigned int>::QPair().

C++ documentation:

Constructs an empty pair. The first and second elements are initialized with default-constructed values.

source

pub unsafe fn new_2a( t1: *const i64, t2: *const c_uint ) -> CppBox<QPairOfI64Uint>

Constructs a pair and initializes the first element with value1 and the second element with value2.

Calls C++ function: [constructor] void QPair<qint64, unsigned int>::QPair(const qint64& t1, const unsigned int& t2).

C++ documentation:

Constructs a pair and initializes the first element with value1 and the second element with value2.

See also qMakePair().

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QPairOfI64Uint>> ) -> CppBox<QPairOfI64Uint>

The QPair class is a template class that stores a pair of items.

Calls C++ function: [constructor] void QPair<qint64, unsigned int>::QPair(const QPair<qint64, unsigned int>& other).

C++ documentation:

The QPair class is a template class that stores a pair of items.

QPair<T1, T2> can be used in your application if the STL pair type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.

Here's an example of a QPair that stores one QString and one double value:

QPair<QString, double> pair;

The components are accessible as public data members called first and second. For example:

pair.first = “pi”; pair.second = 3.14159265358979323846;

Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first and second:

struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;

The advent of C++11 automatic variable type deduction (auto) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair and std::tuple, is mostly useful in generic (template) code, where defining a dedicated type is not possible.

QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.

source

pub unsafe fn swap(&self, other: impl CastInto<Ref<QPairOfI64Uint>>)

Swaps this pair with other.

Calls C++ function: void QPair<qint64, unsigned int>::swap(QPair<qint64, unsigned int>& other).

C++ documentation:

Swaps this pair with other.

Equivalent to

qSwap(this->first, other.first); qSwap(this->second, other.second);

Swap overloads are found in namespace std as well as via argument-dependent lookup (ADL) in the namespace of T .

This function was introduced in Qt 5.5.

Trait Implementations§

source§

impl CppDeletable for QPairOfI64Uint

source§

unsafe fn delete(&self)

The QPair class is a template class that stores a pair of items.

Calls C++ function: [destructor] void QPair<qint64, unsigned int>::~QPair().

C++ documentation:

The QPair class is a template class that stores a pair of items.

QPair<T1, T2> can be used in your application if the STL pair type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.

Here's an example of a QPair that stores one QString and one double value:

QPair<QString, double> pair;

The components are accessible as public data members called first and second. For example:

pair.first = “pi”; pair.second = 3.14159265358979323846;

Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first and second:

struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;

The advent of C++11 automatic variable type deduction (auto) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair and std::tuple, is mostly useful in generic (template) code, where defining a dedicated type is not possible.

QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.

source§

impl Ge<Ref<QPairOfI64Uint>> for QPairOfI64Uint

source§

unsafe fn ge(&self, p2: &Ref<QPairOfI64Uint>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(const QPair<qint64, unsigned int>& p1, const QPair<qint64, unsigned int>& p2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Gt<Ref<QPairOfI64Uint>> for QPairOfI64Uint

source§

unsafe fn gt(&self, p2: &Ref<QPairOfI64Uint>) -> bool

Calls C++ function: bool operator>(const QPair<qint64, unsigned int>& p1, const QPair<qint64, unsigned int>& p2).

source§

impl Le<Ref<QPairOfI64Uint>> for QPairOfI64Uint

source§

unsafe fn le(&self, p2: &Ref<QPairOfI64Uint>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(const QPair<qint64, unsigned int>& p1, const QPair<qint64, unsigned int>& p2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Lt<Ref<QPairOfI64Uint>> for QPairOfI64Uint

source§

unsafe fn lt(&self, p2: &Ref<QPairOfI64Uint>) -> bool

Calls C++ function: bool operator<(const QPair<qint64, unsigned int>& p1, const QPair<qint64, unsigned int>& p2).

source§

impl PartialEq<Ref<QPairOfI64Uint>> for QPairOfI64Uint

source§

fn eq(&self, p2: &Ref<QPairOfI64Uint>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(const QPair<qint64, unsigned int>& p1, const QPair<qint64, unsigned int>& p2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

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.

Auto Trait Implementations§

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, 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.