Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
flow_layout.cpp File Reference

Implementation of FlowLayout — a QLayout that wraps child widgets into rows (Qt::Horizontal flow) or columns (Qt::Vertical flow). More...

#include "flow_layout.h"
#include <QDebug>
#include <QLayoutItem>
#include <QMessageLogger>
#include <QMetaObject>
#include <QObject>
#include <QPoint>
#include <QRect>
#include <QSizePolicy>
#include <QStyle>
#include <QWidget>
#include <QWidgetItem>
#include <QtGlobal>
Include dependency graph for flow_layout.cpp:

Detailed Description

Implementation of FlowLayout — a QLayout that wraps child widgets into rows (Qt::Horizontal flow) or columns (Qt::Vertical flow).

Design contract (following Qt layout conventions):

  • setGeometry() places children inside the given rect. Nothing else.
  • sizeHint() reports the unconstrained preferred size (all items in one line).
  • minimumSize() reports the minimum size (largest single item).
  • heightForWidth() reports the height needed for a given width (horizontal flow only).

The layout never calls setFixedSize() or adjustSize() on its parent widget; that is the responsibility of the parent widget / scroll area.