Qt 4.8
Public Functions | Private Functions | Properties | Friends | List of all members
QGridBox Class Reference

Public Functions

Qt::Alignment alignment () const
 
Qt::Orientations expandingDirections () const
 
bool hasHeightForWidth () const
 
int heightForWidth (int w) const
 
int hStretch ()
 
bool isEmpty () const
 
QLayoutItemitem ()
 
QSize maximumSize () const
 
QSize minimumSize () const
 
 QGridBox (QLayoutItem *lit)
 
 QGridBox (const QLayout *l, QWidget *wid)
 
void setAlignment (Qt::Alignment a)
 
void setGeometry (const QRect &r)
 
QSize sizeHint () const
 
QLayoutItemtakeItem ()
 
int vStretch ()
 
 ~QGridBox ()
 

Private Functions

int toCol (int cc) const
 
int toRow (int rr) const
 

Properties

int col
 
QLayoutItemitem_
 
int row
 
int tocol
 
int torow
 

Friends

class QGridLayout
 
class QGridLayoutPrivate
 

Detailed Description

Definition at line 67 of file qgridlayout.cpp.

Constructors and Destructors

◆ QGridBox() [1/2]

QGridBox::QGridBox ( QLayoutItem lit)
inline

Definition at line 70 of file qgridlayout.cpp.

70 { item_ = lit; }
QLayoutItem * item_

◆ QGridBox() [2/2]

QGridBox::QGridBox ( const QLayout l,
QWidget wid 
)
inline

Definition at line 72 of file qgridlayout.cpp.

QLayoutItem * item_
static QWidgetItem * createWidgetItem(const QLayout *layout, QWidget *widget)
Definition: qlayout.cpp:190

◆ ~QGridBox()

QGridBox::~QGridBox ( )
inline

Definition at line 73 of file qgridlayout.cpp.

73 { delete item_; }
QLayoutItem * item_

Functions

◆ alignment()

Qt::Alignment QGridBox::alignment ( ) const
inline

Definition at line 86 of file qgridlayout.cpp.

86 { return item_->alignment(); }
QLayoutItem * item_
Qt::Alignment alignment() const
Returns the alignment of this item.
Definition: qlayoutitem.h:85

◆ expandingDirections()

Qt::Orientations QGridBox::expandingDirections ( ) const
inline

Definition at line 78 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addData().

78 { return item_->expandingDirections(); }
virtual Qt::Orientations expandingDirections() const =0
Returns whether this layout item can make use of more space than sizeHint().
QLayoutItem * item_

◆ hasHeightForWidth()

bool QGridBox::hasHeightForWidth ( ) const
inline

Definition at line 81 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addHfwData(), QGridLayoutPrivate::setupHfwLayoutData(), and QGridLayoutPrivate::setupLayoutData().

81 { return item_->hasHeightForWidth(); }
virtual bool hasHeightForWidth() const
Returns true if this layout's preferred height depends on its width; otherwise returns false...
QLayoutItem * item_

◆ heightForWidth()

int QGridBox::heightForWidth ( int  w) const
inline

Definition at line 82 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addHfwData(), and QGridLayoutPrivate::setupHfwLayoutData().

82 { return item_->heightForWidth(w); }
QLayoutItem * item_
virtual int heightForWidth(int) const
Returns the preferred height for this layout item, given the width w.

◆ hStretch()

int QGridBox::hStretch ( )
inline

Definition at line 90 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addData(), and QGridLayoutPrivate::setupLayoutData().

90  { return item_->widget() ?
int horizontalStretch() const
Definition: qsizepolicy.h:144
QLayoutItem * item_
QSizePolicy sizePolicy
the default layout behavior of the widget
Definition: qwidget.h:171
virtual QWidget * widget()
If this item is a QWidget, it is returned as a QWidget; otherwise 0 is returned.

◆ isEmpty()

bool QGridBox::isEmpty ( ) const
inline

Definition at line 79 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addData().

79 { return item_->isEmpty(); }
virtual bool isEmpty() const =0
Implemented in subclasses to return whether this item is empty, i.
QLayoutItem * item_

◆ item()

QLayoutItem* QGridBox::item ( )
inline

◆ maximumSize()

QSize QGridBox::maximumSize ( ) const
inline

Definition at line 77 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::setupLayoutData().

77 { return item_->maximumSize(); }
QLayoutItem * item_
virtual QSize maximumSize() const =0
Implemented in subclasses to return the maximum size of this item.

◆ minimumSize()

QSize QGridBox::minimumSize ( ) const
inline

Definition at line 76 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addHfwData(), QGridLayoutPrivate::setupHfwLayoutData(), and QGridLayoutPrivate::setupLayoutData().

76 { return item_->minimumSize(); }
virtual QSize minimumSize() const =0
Implemented in subclasses to return the minimum size of this item.
QLayoutItem * item_

◆ setAlignment()

void QGridBox::setAlignment ( Qt::Alignment  a)
inline

Definition at line 84 of file qgridlayout.cpp.

Referenced by QGridLayout::addItem(), QGridLayout::addLayout(), and QGridLayout::addWidget().

84 { item_->setAlignment(a); }
long ASN1_INTEGER_get ASN1_INTEGER * a
void setAlignment(Qt::Alignment a)
Sets the alignment of this item to alignment.
QLayoutItem * item_

◆ setGeometry()

void QGridBox::setGeometry ( const QRect r)
inline

Definition at line 85 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::distribute().

85 { item_->setGeometry(r); }
QLayoutItem * item_
virtual void setGeometry(const QRect &)=0
Implemented in subclasses to set this item's geometry to r.

◆ sizeHint()

QSize QGridBox::sizeHint ( ) const
inline

Definition at line 75 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addHfwData(), QGridLayoutPrivate::setupHfwLayoutData(), and QGridLayoutPrivate::setupLayoutData().

75 { return item_->sizeHint(); }
QLayoutItem * item_
virtual QSize sizeHint() const =0
Implemented in subclasses to return the preferred size of this item.

◆ takeItem()

QLayoutItem* QGridBox::takeItem ( )
inline

Definition at line 88 of file qgridlayout.cpp.

88 { QLayoutItem *i = item_; item_ = 0; return i; }
The QLayoutItem class provides an abstract item that a QLayout manipulates.
Definition: qlayoutitem.h:64
QLayoutItem * item_

◆ toCol()

int QGridBox::toCol ( int  cc) const
inlineprivate

◆ toRow()

int QGridBox::toRow ( int  rr) const
inlineprivate

◆ vStretch()

int QGridBox::vStretch ( )
inline

Definition at line 92 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::addData(), QGridLayoutPrivate::setupHfwLayoutData(), and QGridLayoutPrivate::setupLayoutData().

92  { return item_->widget() ?
93  item_->widget()->sizePolicy().verticalStretch() : 0; }
QLayoutItem * item_
int verticalStretch() const
Definition: qsizepolicy.h:145
QSizePolicy sizePolicy
the default layout behavior of the widget
Definition: qwidget.h:171
virtual QWidget * widget()
If this item is a QWidget, it is returned as a QWidget; otherwise 0 is returned.

Friends and Related Functions

◆ QGridLayout

friend class QGridLayout
friend

Definition at line 97 of file qgridlayout.cpp.

◆ QGridLayoutPrivate

friend class QGridLayoutPrivate
friend

Definition at line 96 of file qgridlayout.cpp.

Properties

◆ col

int QGridBox::col
private

◆ item_

QLayoutItem* QGridBox::item_
private

Definition at line 102 of file qgridlayout.cpp.

◆ row

int QGridBox::row
private

◆ tocol

int QGridBox::tocol
private

Definition at line 104 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::add().

◆ torow

int QGridBox::torow
private

Definition at line 104 of file qgridlayout.cpp.

Referenced by QGridLayoutPrivate::add().


The documentation for this class was generated from the following file: