1// qpagelayout.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23%If (Qt_5_3_0 -) 24 25class QPageLayout 26{ 27%TypeHeaderCode 28#include <qpagelayout.h> 29%End 30 31public: 32 enum Unit 33 { 34 Millimeter, 35 Point, 36 Inch, 37 Pica, 38 Didot, 39 Cicero, 40 }; 41 42 enum Orientation 43 { 44 Portrait, 45 Landscape, 46 }; 47 48 enum Mode 49 { 50 StandardMode, 51 FullPageMode, 52 }; 53 54 QPageLayout(); 55 QPageLayout(const QPageSize &pageSize, QPageLayout::Orientation orientation, const QMarginsF &margins, QPageLayout::Unit units = QPageLayout::Point, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0)); 56 QPageLayout(const QPageLayout &other); 57 ~QPageLayout(); 58 void swap(QPageLayout &other /Constrained/); 59 bool isEquivalentTo(const QPageLayout &other) const; 60 bool isValid() const; 61 void setMode(QPageLayout::Mode mode); 62 QPageLayout::Mode mode() const; 63 void setPageSize(const QPageSize &pageSize, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0)); 64 QPageSize pageSize() const; 65 void setOrientation(QPageLayout::Orientation orientation); 66 QPageLayout::Orientation orientation() const; 67 void setUnits(QPageLayout::Unit units); 68 QPageLayout::Unit units() const; 69 bool setMargins(const QMarginsF &margins); 70 bool setLeftMargin(qreal leftMargin); 71 bool setRightMargin(qreal rightMargin); 72 bool setTopMargin(qreal topMargin); 73 bool setBottomMargin(qreal bottomMargin); 74 QMarginsF margins() const; 75 QMarginsF margins(QPageLayout::Unit units) const; 76 QMargins marginsPoints() const; 77 QMargins marginsPixels(int resolution) const; 78 void setMinimumMargins(const QMarginsF &minMargins); 79 QMarginsF minimumMargins() const; 80 QMarginsF maximumMargins() const; 81 QRectF fullRect() const; 82 QRectF fullRect(QPageLayout::Unit units) const; 83 QRect fullRectPoints() const; 84 QRect fullRectPixels(int resolution) const; 85 QRectF paintRect() const; 86 QRectF paintRect(QPageLayout::Unit units) const; 87 QRect paintRectPoints() const; 88 QRect paintRectPixels(int resolution) const; 89}; 90 91%End 92%If (Qt_5_3_0 -) 93bool operator==(const QPageLayout &lhs, const QPageLayout &rhs); 94%End 95%If (Qt_5_3_0 -) 96bool operator!=(const QPageLayout &lhs, const QPageLayout &rhs); 97%End 98