Qt 4.8
Public Functions | Public Variables | List of all members
QGridLayoutRowInfo Class Reference

#include <qgridlayoutengine_p.h>

Public Functions

void dump (int indent=0) const
 
void insertOrRemoveRows (int row, int delta)
 
 QGridLayoutRowInfo ()
 

Public Variables

QVector< Qt::Alignment > alignments
 
QVector< QGridLayoutBoxboxes
 
int count
 
QVector< QLayoutParameter< qreal > > spacings
 
QVector< QStretchParameterstretches
 

Detailed Description

Definition at line 313 of file qgridlayoutengine_p.h.

Constructors and Destructors

◆ QGridLayoutRowInfo()

QGridLayoutRowInfo::QGridLayoutRowInfo ( )
inline

Definition at line 316 of file qgridlayoutengine_p.h.

Functions

◆ dump()

void QGridLayoutRowInfo::dump ( int  indent = 0) const

Definition at line 781 of file qgridlayoutengine.cpp.

782 {
783  qDebug("%*sInfo (count: %d)", indent, "", count);
784  for (int i = 0; i < count; ++i) {
785  QString message;
786 
787  if (stretches.value(i).value() >= 0)
788  message += QString::fromAscii(" stretch %1").arg(stretches.value(i).value());
789  if (spacings.value(i).value() >= 0.0)
790  message += QString::fromAscii(" spacing %1").arg(spacings.value(i).value());
791  if (alignments.value(i) != 0)
792  message += QString::fromAscii(" alignment %1").arg(int(alignments.value(i)), 16);
793 
794  if (!message.isEmpty() || boxes.value(i) != QGridLayoutBox()) {
795  qDebug("%*s Row %d:%s", indent, "", i, qPrintable(message));
796  if (boxes.value(i) != QGridLayoutBox())
797  boxes.value(i).dump(indent + 1);
798  }
799  }
800 }
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
Definition: qstring.cpp:4276
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_CORE_EXPORT void qDebug(const char *,...)
QVector< Qt::Alignment > alignments
QVector< QStretchParameter > stretches
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
T value(int i) const
Returns the value at index position i in the vector.
Definition: qvector.h:559
QVector< QLayoutParameter< qreal > > spacings
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
Definition: qstring.cpp:7186
void dump(int indent=0) const
QVector< QGridLayoutBox > boxes
#define qPrintable(string)
Definition: qglobal.h:1750

◆ insertOrRemoveRows()

void QGridLayoutRowInfo::insertOrRemoveRows ( int  row,
int  delta 
)

Definition at line 770 of file qgridlayoutengine.cpp.

771 {
772  count += delta;
773 
774  insertOrRemoveItems(stretches, row, delta);
775  insertOrRemoveItems(spacings, row, delta);
776  insertOrRemoveItems(alignments, row, delta);
777  insertOrRemoveItems(boxes, row, delta);
778 }
QVector< Qt::Alignment > alignments
QVector< QStretchParameter > stretches
QVector< QLayoutParameter< qreal > > spacings
static void insertOrRemoveItems(QVector< T > &items, int index, int delta)
QVector< QGridLayoutBox > boxes

Properties

◆ alignments

QVector<Qt::Alignment> QGridLayoutRowInfo::alignments

Definition at line 327 of file qgridlayoutengine_p.h.

Referenced by QGridLayoutEngine::setRowAlignment().

◆ boxes

QVector<QGridLayoutBox> QGridLayoutRowInfo::boxes

◆ count

int QGridLayoutRowInfo::count

Definition at line 324 of file qgridlayoutengine_p.h.

Referenced by QGridLayoutEngine::fillRowData().

◆ spacings

QVector<QLayoutParameter<qreal> > QGridLayoutRowInfo::spacings

◆ stretches

QVector<QStretchParameter> QGridLayoutRowInfo::stretches

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