Source Code (Use browser search to find items of interest.)
Class Index
qt'QGrid (./qt-2.1.0/src/widgets/qgrid.h:31)
class Q_EXPORT QGrid : public QFrame
{
Q_OBJECT
public:
enum Direction { Horizontal, Vertical };
QGrid( int n, QWidget *parent=0, const char *name=0, WFlags f=0 );
QGrid( int n, Direction, QWidget *parent=0, const char *name=0,
WFlags f=0 );
void setSpacing( int );
QSize sizeHint() const;
protected:
void frameChanged();
private:
QGridLayout *lay;
private: // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
QGrid( const QGrid & );
QGrid& operator=( const QGrid & );
#endif
};
qt'QGrid::QGrid() (./qt-2.1.0/src/widgets/qgrid.cpp:56)
QGrid::QGrid( int n, Direction dir, QWidget *parent, const char *name, WFlags f )
:QFrame( parent, name, f )
{
int nCols, nRows;
if ( dir == Horizontal ) {
nCols = n;
nRows = -1;
} else {
nCols = -1;
nRows = n;
}
lay = new QGridLayout( this, nRows, nCols, 0, 0, name );
lay->setAutoAdd( TRUE );
}
/*!
Constructs a grid widget with parent \a parent and name \a name.
\a n specifies the number of columns.
*/
qt'QGrid::QGrid() (./qt-2.1.0/src/widgets/qgrid.cpp:77)
QGrid::QGrid( int n, QWidget *parent, const char *name, WFlags f )
:QFrame( parent, name, f )
{
lay = new QGridLayout( this, -1, n, 0, 0, name );
lay->setAutoAdd( TRUE );
}
/*!
Sets the spacing between children to \a space.
*/
qt'QGrid::setSpacing() (./qt-2.1.0/src/widgets/qgrid.cpp:89)
void QGrid::setSpacing( int space )
{
if ( layout() )
layout()->setSpacing( space );
}
/*!\reimp
*/
qt'QGrid::frameChanged() (./qt-2.1.0/src/widgets/qgrid.cpp:98)
void QGrid::frameChanged()
{
if ( !layout() )
return;
layout()->setMargin( frameWidth() );
}
/*!
\reimp
*/
qt'QGrid::sizeHint() (./qt-2.1.0/src/widgets/qgrid.cpp:110)
QSize QGrid::sizeHint() const
{
QWidget *mThis = (QWidget*)this;
QApplication::sendPostedEvents( mThis, QEvent::ChildInserted );
return QFrame::sizeHint();
}