zoukankan      html  css  js  c++  java
  • QSize

    Header: #include <QSize>
    qmake: QT += core

    Public Functions

      QSize()
      QSize(int width, int height)
    QSize boundedTo(const QSize &otherSize) const
    QSize expandedTo(const QSize &otherSize) const
    int height() const
    bool isEmpty() const
    bool isNull() const
    bool isValid() const
    int & rheight()
    int & rwidth()
    void scale(int width, int height, Qt::AspectRatioMode mode)
    void scale(const QSize &size, Qt::AspectRatioMode mode)
    QSize scaled(int width, int height, Qt::AspectRatioMode mode) const
    QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const
    void setHeight(int height)
    void setWidth(int width)
    CGSize toCGSize() const
    void transpose()
    QSize transposed() const
    int width() const
    QSize & operator*=(qreal factor)
    QSize & operator+=(const QSize &size)
    QSize & operator-=(const QSize &size)
    QSize & operator/=(qreal divisor)

    bool operator!=(const QSize &s1, const QSize &s2)
    const QSize operator*(const QSize &size, qreal factor)
    const QSize operator*(qreal factor, const QSize &size)
    const QSize operator+(const QSize &s1, const QSize &s2)
    const QSize operator-(const QSize &s1, const QSize &s2)
    const QSize operator/(const QSize &size, qreal divisor)
    QDataStream & operator<<(QDataStream &stream, const QSize &size)
    bool operator==(const QSize &s1, const QSize &s2)
    QDataStream & operator>>(QDataStream &stream, QSize &size)

    The QSize class defines the size of a two-dimensional object using integer 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.

    QSize objects can be streamed as well as compared.

    #########################

    QQ 3087438119
  • 相关阅读:
    python简介
    Error:unknown filesystem
    Ubuntu 12.04 相关问题
    C/C++版数据结构之链表<一>
    C/C++版数据结构之链表<二>
    C/C++版数据结构之树<二>
    C/C++版数据结构之树<一>
    C/C++版数据结构之链表<三>
    C/C++版数据结构之排序算法
    php 操作文件简单例子
  • 原文地址:https://www.cnblogs.com/herd/p/14757073.html
Copyright © 2011-2022 走看看