QTfrontend/ui/qaspectratiolayout.h
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
equal deleted inserted replaced
6615:65602f1ef0f8 6616:f77bb02b669f
    14 
    14 
    15 class QAspectRatioLayout : public QLayout
    15 class QAspectRatioLayout : public QLayout
    16 {
    16 {
    17         Q_OBJECT
    17         Q_OBJECT
    18 
    18 
    19 public:
    19     public:
    20         QAspectRatioLayout(QWidget* parent, int spacing =-1);
    20         QAspectRatioLayout(QWidget* parent, int spacing =-1);
    21         QAspectRatioLayout(int spacing = -1);
    21         QAspectRatioLayout(int spacing = -1);
    22         ~QAspectRatioLayout();
    22         ~QAspectRatioLayout();
    23 
    23 
    24         /* Convenience method */
    24         /* Convenience method */
    25         virtual void add(QLayoutItem* item);
    25         virtual void add(QLayoutItem* item);
    26 
    26 
    27 /* http://doc.trolltech.com/qlayout.html#addItem */
    27         /* http://doc.trolltech.com/qlayout.html#addItem */
    28         virtual void addItem(QLayoutItem* item);
    28         virtual void addItem(QLayoutItem* item);
    29         /* http://doc.trolltech.com/qlayout.html#addWidget */
    29         /* http://doc.trolltech.com/qlayout.html#addWidget */
    30         virtual void addWidget(QWidget* widget);
    30         virtual void addWidget(QWidget* widget);
    31         /* http://doc.trolltech.com/qlayout.html#takeAt */
    31         /* http://doc.trolltech.com/qlayout.html#takeAt */
    32         virtual QLayoutItem* takeAt(int index);
    32         virtual QLayoutItem* takeAt(int index);
    40          */
    40          */
    41         virtual QLayoutItem* replaceItem(QLayoutItem* item);
    41         virtual QLayoutItem* replaceItem(QLayoutItem* item);
    42         virtual QLayoutItem* take();
    42         virtual QLayoutItem* take();
    43         virtual bool hasItem() const;
    43         virtual bool hasItem() const;
    44 
    44 
    45 /* http://doc.trolltech.com/qlayout.html#expandingDirections */
    45         /* http://doc.trolltech.com/qlayout.html#expandingDirections */
    46         virtual Qt::Orientations expandingDirections() const;
    46         virtual Qt::Orientations expandingDirections() const;
    47 
    47 
    48         /*
    48         /*
    49          * This method contains most of the juice of this article.
    49          * This method contains most of the juice of this article.
    50          * http://doc.trolltech.com/qlayoutitem.html#setGeometry
    50          * http://doc.trolltech.com/qlayoutitem.html#setGeometry
    58         /* http://doc.trolltech.com/qlayout.html#minimumSize */
    58         /* http://doc.trolltech.com/qlayout.html#minimumSize */
    59         virtual QSize minimumSize() const;
    59         virtual QSize minimumSize() const;
    60         /* http://doc.trolltech.com/qlayoutitem.html#hasHeightForWidth */
    60         /* http://doc.trolltech.com/qlayoutitem.html#hasHeightForWidth */
    61         virtual bool hasHeightForWidth() const;
    61         virtual bool hasHeightForWidth() const;
    62 
    62 
    63 private:
    63     private:
    64         /* Saves the last received rect. */
    64         /* Saves the last received rect. */
    65         void setLastReceivedRect(const QRect& rect);
    65         void setLastReceivedRect(const QRect& rect);
    66         /* Used to initialize the object. */
    66         /* Used to initialize the object. */
    67         void init(int spacing);
    67         void init(int spacing);
    68         /* Calculates the maximum size for the item from the assigned size. */
    68         /* Calculates the maximum size for the item from the assigned size. */