Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtCore.QSizeF Class Reference

The QSizeF class defines the size of a two-dimensional object using floating point precision. More...

Inheritance diagram for QtCore.QSizeF:
Collaboration diagram for QtCore.QSizeF:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QSizeF ()
  More...
 
 QSizeF (QSize sz)
  More...
 
 QSizeF (QSizeF copy)
 
 QSizeF (double w, double h)
  More...
 
virtual void CreateProxy ()
 
new QSizeF BoundedTo (QSizeF otherSize)
  More...
 
new QSizeF ExpandedTo (QSizeF otherSize)
  More...
 
new void Scale (QSizeF s, Qt.AspectRatioMode mode)
  More...
 
new void Scale (double w, double h, Qt.AspectRatioMode mode)
  More...
 
new QSize ToSize ()
  More...
 
new void Transpose ()
  More...
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QSizeF s1, QSizeF s2)
  More...
 
static QSizeF operator* (QSizeF s, double c)
  More...
 
static QSizeF operator+ (QSizeF s1, QSizeF s2)
  More...
 
static QSizeF operator- (QSizeF s1, QSizeF s2)
  More...
 
static QSizeF operator/ (QSizeF s, double c)
  More...
 
static bool operator== (QSizeF s1, QSizeF s2)
  More...
 

Protected Member Functions

 QSizeF (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

double Height [get, set]
  More...
 
double Width [get, set]
  More...
 
bool IsEmpty [get]
  More...
 
bool IsNull [get]
  More...
 
bool IsValid [get]
  More...
 
double Rheight [get]
  More...
 
double Rwidth [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QSizeF class defines the size of a two-dimensional object using floating point precision.

A size is specified by a width() and a height(). It can be set in the constructor and changed using the setWidth(), setHeight(), or scale() functions, or using arithmetic operators. A size can also be manipulated directly by retrieving references to the width and height using the rwidth() and rheight() functions. Finally, the width and height can be swapped using the transpose() function.

The isValid() function determines if a size is valid. A valid size has both width and height greater than or equal to zero. The isEmpty() function returns true if either of the width and height is less than (or equal to) zero, while the isNull() function returns true only if both the width and the height is zero.

Use the expandedTo() function to retrieve a size which holds the maximum height and width of this size and a given size. Similarly, the boundedTo() function returns a size which holds the minimum height and width of this size and a given size.

The QSizeF class also provides the toSize() function returning a QSize copy of this size, constructed by rounding the width and height to the nearest integers.

QSizeF objects can be streamed as well as compared.

See also QSize, QPointF, and QRectF.

Constructor & Destructor Documentation

QtCore.QSizeF.QSizeF ( System.Type  dummy)
protected
QtCore.QSizeF.QSizeF ( )

Constructs an invalid size.

See also isValid().

Here is the call graph for this function:

Here is the caller graph for this function:

QtCore.QSizeF.QSizeF ( QSize  sz)

Constructs a size with floating point accuracy from the given size.

See also toSize().

Here is the call graph for this function:

QtCore.QSizeF.QSizeF ( QSizeF  copy)

Here is the call graph for this function:

QtCore.QSizeF.QSizeF ( double  w,
double  h 
)

Constructs a size with the given width and height.

Here is the call graph for this function:

Member Function Documentation

new QSizeF QtCore.QSizeF.BoundedTo ( QSizeF  otherSize)

Returns a size holding the minimum width and height of this size and the given otherSize.

See also expandedTo() and scale().

virtual void QtCore.QSizeF.CreateProxy ( )
virtual

Here is the caller graph for this function:

new void QtCore.QSizeF.Dispose ( )
override bool QtCore.QSizeF.Equals ( object  o)

Here is the call graph for this function:

new QSizeF QtCore.QSizeF.ExpandedTo ( QSizeF  otherSize)

Returns a size holding the maximum width and height of this size and the given otherSize.

See also boundedTo() and scale().

override int QtCore.QSizeF.GetHashCode ( )
static bool QtCore.QSizeF.operator!= ( QSizeF  s1,
QSizeF  s2 
)
static

Returns true if s1 and s2 are different; otherwise returns false.

static QSizeF QtCore.QSizeF.operator* ( QSizeF  s,
double  c 
)
static

This is an overloaded function.

Multiplies the given size by the given factor and returns the result.

See also QSizeF::scale().

static QSizeF QtCore.QSizeF.operator+ ( QSizeF  s1,
QSizeF  s2 
)
static

Returns the sum of s1 and s2; each component is added separately.

static QSizeF QtCore.QSizeF.operator- ( QSizeF  s1,
QSizeF  s2 
)
static

Returns s2 subtracted from s1; each component is subtracted separately.

static QSizeF QtCore.QSizeF.operator/ ( QSizeF  s,
double  c 
)
static

This is an overloaded function.

Divides the given size by the given divisor and returns the result.

See also QSizeF::scale().

static bool QtCore.QSizeF.operator== ( QSizeF  s1,
QSizeF  s2 
)
static

Returns true if s1 and s2 are equal; otherwise returns false.

new void QtCore.QSizeF.Scale ( QSizeF  s,
Qt.AspectRatioMode  mode 
)

This is an overloaded function.

Scales the size to a rectangle with the given size, according to the specified mode.

new void QtCore.QSizeF.Scale ( double  w,
double  h,
Qt.AspectRatioMode  mode 
)

Scales the size to a rectangle with the given width and height, according to the specified mode.

If mode is Qt::IgnoreAspectRatio, the size is set to (width, height).

If mode is Qt::KeepAspectRatio, the current size is scaled to a rectangle as large as possible inside (width, height), preserving the aspect ratio.

If mode is Qt::KeepAspectRatioByExpanding, the current size is scaled to a rectangle as small as possible outside (width, height), preserving the aspect ratio.

Example:

QSizeF t1(10, 12);

t1.scale(60, 60, Qt::IgnoreAspectRatio);

// t1 is (60, 60)

QSizeF t2(10, 12);

t2.scale(60, 60, Qt::KeepAspectRatio);

// t2 is (50, 60)

QSizeF t3(10, 12);

t3.scale(60, 60, Qt::KeepAspectRatioByExpanding);

// t3 is (60, 72)

See also setWidth() and setHeight().

new QSize QtCore.QSizeF.ToSize ( )

Returns an integer based copy of this size.

Note that the coordinates in the returned size will be rounded to the nearest integer.

See also QSizeF().

new void QtCore.QSizeF.Transpose ( )

Swaps the width and height values.

See also setWidth() and setHeight().

Member Data Documentation

SmokeInvocation QtCore.QSizeF.interceptor
protected

Property Documentation

double QtCore.QSizeF.Height
getset

Returns the height.

Sets the height to the given height.

bool QtCore.QSizeF.IsEmpty
get

Returns true if either of the width and height is less than or equal to 0; otherwise returns false.

See also isNull() and isValid().

bool QtCore.QSizeF.IsNull
get

Returns true if both the width and height are +0.0; otherwise returns false.

Note: Since this function treats +0.0 and -0.0 differently, sizes with zero width and height where either or both values have a negative sign are not defined to be null sizes.

See also isValid() and isEmpty().

bool QtCore.QSizeF.IsValid
get

Returns true if both the width and height is equal to or greater than 0; otherwise returns false.

See also isNull() and isEmpty().

double QtCore.QSizeF.Rheight
get

Returns a reference to the height.

Using a reference makes it possible to manipulate the height directly. For example:

QSizeF size(100, 10.2);

size.rheight() += 5.5;

// size becomes (100,15.7)

See also rwidth() and setHeight().

double QtCore.QSizeF.Rwidth
get

Returns a reference to the width.

Using a reference makes it possible to manipulate the width directly. For example:

QSizeF size(100.3, 10);

size.rwidth() += 20.5;

// size becomes (120.8,10)

See also rheight() and setWidth().

virtual System.IntPtr QtCore.QSizeF.SmokeObject
getset
double QtCore.QSizeF.Width
getset

Returns the width.

Sets the width to the given width.