45 #include <QtGui/qsizepolicy.h> 46 #include <QtCore/qrect.h> 67 inline explicit QLayoutItem(Qt::Alignment alignment = 0);
68 virtual ~QLayoutItem();
69 virtual QSize sizeHint()
const = 0;
70 virtual QSize minimumSize()
const = 0;
71 virtual QSize maximumSize()
const = 0;
72 virtual Qt::Orientations expandingDirections()
const = 0;
73 virtual void setGeometry(
const QRect&) = 0;
74 virtual QRect geometry()
const = 0;
75 virtual bool isEmpty()
const = 0;
76 virtual bool hasHeightForWidth()
const;
77 virtual int heightForWidth(
int)
const;
79 virtual void invalidate();
83 virtual QSpacerItem *spacerItem();
86 void setAlignment(Qt::Alignment
a);
87 QSizePolicy::ControlTypes controlTypes()
const;
94 : align(aalignment) { }
102 : width(w), height(h), sizeP(hData, vData) { }
103 void changeSize(
int w,
int h,
156 enum { Dirty = -123, HfwCacheMaxSize = 3 };
158 inline bool useSizeCache()
const;
159 void updateCacheIfNecessary()
const;
161 q_cachedMinimumSize.setWidth(Dirty);
168 mutable QSize q_cachedHfws[HfwCacheMaxSize];
182 #endif // QLAYOUTITEM_H
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
virtual QRect geometry() const =0
Returns the rectangle covered by this layout item.
QLayoutItem(Qt::Alignment alignment=0)
Constructs a layout item with an alignment.
virtual bool isEmpty() const =0
Implemented in subclasses to return whether this item is empty, i.
virtual Qt::Orientations expandingDirections() const =0
Returns whether this layout item can make use of more space than sizeHint().
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
long ASN1_INTEGER_get ASN1_INTEGER * a
virtual QSize minimumSize() const =0
Implemented in subclasses to return the minimum size of this item.
virtual bool hasHeightForWidth() const
Returns true if this layout's preferred height depends on its width; otherwise returns false...
virtual QSpacerItem * spacerItem()
If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QLayoutItem class provides an abstract item that a QLayout manipulates.
static bool isEmpty(const char *str)
The QSpacerItem class provides blank space in a layout.
The QLayout class is the base class of geometry managers.
virtual void setGeometry(const QRect &)=0
Implemented in subclasses to set this item's geometry to r.
virtual QSize sizeHint() const =0
Implemented in subclasses to return the preferred size of this item.
virtual QSize maximumSize() const =0
Implemented in subclasses to return the maximum size of this item.
The QRect class defines a rectangle in the plane using integer precision.
Qt::Alignment alignment() const
Returns the alignment of this item.
virtual QWidget * widget()
If this item is a QWidget, it is returned as a QWidget; otherwise 0 is returned.
virtual int heightForWidth(int) const
Returns the preferred height for this layout item, given the width w.
The QSize class defines the size of a two-dimensional object using integer point precision.
static const int QLAYOUTSIZE_MAX
QSpacerItem(int w, int h, QSizePolicy::Policy hData=QSizePolicy::Minimum, QSizePolicy::Policy vData=QSizePolicy::Minimum)
Constructs a spacer item with preferred width w, preferred height h, horizontal size policy hPolicy a...