18#include "toolboxlayout.h"
20ToolBoxLayout::ToolBoxLayout(
QWidget* parent,
int margin,
int hSpacing,
int vSpacing)
21 :
FlowLayout(parent, margin, hSpacing, vSpacing)
26void ToolBoxLayout::lastLineAlignment(
int startIndex,
int count,
RowLayoutInfo rowInfo,
const QRect &effectiveRect)
const
28 alignRowFromRowInfo(startIndex, count, rowInfo);
31void ToolBoxLayout::alignRowFromRowInfo(
int startIndex,
int count,
RowLayoutInfo rowInfo)
const
33 int x = rowInfo.startX;
35 for (
int i = startIndex; i < startIndex + count; i += 1) {
37 if (i > itemList.
length() - 1) {
43 x += size.
width() + rowInfo.spacing;
virtual QRect geometry() const const=0
virtual void setGeometry(const QRect &r)=0
const T & at(int i) const const