Qt 4.8
Public Functions | Public Variables | List of all members
QGraphicsLinearLayoutPrivate Class Reference
Inheritance diagram for QGraphicsLinearLayoutPrivate:
QGraphicsLayoutPrivate QGraphicsLayoutItemPrivate

Public Functions

void fixIndex (int *index) const
 
int gridColumn (int index) const
 
int gridRow (int index) const
 
 QGraphicsLinearLayoutPrivate (Qt::Orientation orientation)
 
void removeGridItem (QGridLayoutItem *gridItem)
 
QLayoutStyleInfo styleInfo () const
 
- Public Functions inherited from QGraphicsLayoutPrivate
void activateRecursive (QGraphicsLayoutItem *item)
 
void addChildLayoutItem (QGraphicsLayoutItem *item)
 This function is called from subclasses to add a layout item layoutItem to a layout. More...
 
void getMargin (qreal *result, qreal userMargin, QStyle::PixelMetric pm) const
 
 QGraphicsLayoutPrivate ()
 
void reparentChildItems (QGraphicsItem *newParent)
 
Qt::LayoutDirection visualDirection () const
 
- Public Functions inherited from QGraphicsLayoutItemPrivate
QSizeFeffectiveSizeHints (const QSizeF &constraint) const
 
void ensureUserSizeHints ()
 Ensures that userSizeHints is allocated. More...
 
bool hasHeightForWidth () const
 
bool hasWidthForHeight () const
 
void init ()
 
QGraphicsItemparentItem () const
 Returns the parent item of this layout, or 0 if this layout is not installed on any widget. More...
 
 QGraphicsLayoutItemPrivate (QGraphicsLayoutItem *parent, bool isLayout)
 
void setSize (Qt::SizeHint which, const QSizeF &size)
 Sets the user size hint which to size. More...
 
void setSizeComponent (Qt::SizeHint which, SizeComponent component, qreal value)
 Sets the width of the user size hint which to width. More...
 
virtual ~QGraphicsLayoutItemPrivate ()
 

Public Variables

QGridLayoutEngine engine
 
Qt::Orientation orientation
 
- Public Variables inherited from QGraphicsLayoutPrivate
bool activated
 
qreal bottom
 
qreal left
 
qreal right
 
qreal top
 
- Public Variables inherited from QGraphicsLayoutItemPrivate
QSizeF cachedConstraint
 
QSizeF cachedSizeHints [Qt::NSizeHints]
 
QSizeF cachedSizeHintsWithConstraints [Qt::NSizeHints]
 
QRectF geom
 
QGraphicsItemgraphicsItem
 
quint32 isLayout: 1
 
quint32 ownedByLayout: 1
 
QGraphicsLayoutItemparent
 
QGraphicsLayoutItemq_ptr
 
quint32 sizeHintCacheDirty: 1
 
quint32 sizeHintWithConstraintCacheDirty: 1
 
QSizePolicy sizePolicy
 
QSizeFuserSizeHints
 

Additional Inherited Members

- Public Types inherited from QGraphicsLayoutItemPrivate
enum  SizeComponent { Width, Height }
 
- Static Public Functions inherited from QGraphicsLayoutItemPrivate
static QGraphicsLayoutItemPrivateget (QGraphicsLayoutItem *q)
 
static const QGraphicsLayoutItemPrivateget (const QGraphicsLayoutItem *q)
 

Detailed Description

Definition at line 134 of file qgraphicslinearlayout.cpp.

Constructors and Destructors

◆ QGraphicsLinearLayoutPrivate()

QGraphicsLinearLayoutPrivate::QGraphicsLinearLayoutPrivate ( Qt::Orientation  orientation)
inline

Definition at line 137 of file qgraphicslinearlayout.cpp.

Functions

◆ fixIndex()

void QGraphicsLinearLayoutPrivate::fixIndex ( int *  index) const

Definition at line 156 of file qgraphicslinearlayout.cpp.

Referenced by QGraphicsLinearLayoutPrivate().

157 {
158  int count = engine.rowCount(orientation);
159  if (uint(*index) > uint(count))
160  *index = count;
161 }
unsigned int uint
Definition: qglobal.h:996
quint16 index
int rowCount(Qt::Orientation orientation) const

◆ gridColumn()

int QGraphicsLinearLayoutPrivate::gridColumn ( int  index) const

Definition at line 170 of file qgraphicslinearlayout.cpp.

Referenced by QGraphicsLinearLayoutPrivate().

171 {
172  if (orientation == Qt::Vertical)
173  return 0;
174  return int(qMin(uint(index), uint(engine.columnCount())));
175 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
unsigned int uint
Definition: qglobal.h:996
int columnCount(Qt::Orientation orientation) const
quint16 index

◆ gridRow()

int QGraphicsLinearLayoutPrivate::gridRow ( int  index) const

Definition at line 163 of file qgraphicslinearlayout.cpp.

Referenced by QGraphicsLinearLayoutPrivate().

164 {
166  return 0;
167  return int(qMin(uint(index), uint(engine.rowCount())));
168 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
unsigned int uint
Definition: qglobal.h:996
quint16 index
int rowCount(Qt::Orientation orientation) const

◆ removeGridItem()

void QGraphicsLinearLayoutPrivate::removeGridItem ( QGridLayoutItem gridItem)

Definition at line 149 of file qgraphicslinearlayout.cpp.

Referenced by QGraphicsLinearLayoutPrivate().

150 {
151  int index = gridItem->firstRow(orientation);
152  engine.removeItem(gridItem);
153  engine.removeRows(index, 1, orientation);
154 }
void removeItem(QGridLayoutItem *item)
void removeRows(int row, int count, Qt::Orientation orientation)
quint16 index

◆ styleInfo()

QLayoutStyleInfo QGraphicsLinearLayoutPrivate::styleInfo ( ) const

Definition at line 179 of file qgraphicslinearlayout.cpp.

Referenced by QGraphicsLinearLayoutPrivate().

180 {
181  QGraphicsItem *item = parentItem();
182  QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
183  return QLayoutStyleInfo(style, globalStyleInfoWidget());
184 }
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
Definition: qgraphicsitem.h:89
static QStyle * style()
Returns the application&#39;s style object.
QGraphicsItem * parentItem() const
Returns the parent item of this layout, or 0 if this layout is not installed on any widget...
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
Definition: qstyle.h:68
bool isWidget() const
Returns true if this item is a widget (i.

Properties

◆ engine

QGridLayoutEngine QGraphicsLinearLayoutPrivate::engine

Definition at line 146 of file qgraphicslinearlayout.cpp.

Referenced by fixIndex(), gridColumn(), gridRow(), and removeGridItem().

◆ orientation

Qt::Orientation QGraphicsLinearLayoutPrivate::orientation

Definition at line 145 of file qgraphicslinearlayout.cpp.

Referenced by fixIndex(), gridColumn(), gridRow(), and removeGridItem().


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