21 inline qreal end()
const {
return start + length; }
27 typedef QVector< Segment > Segments;
32 inline qreal metric(
int which )
const
34 return metrics.metric( which );
37 inline void setMetric(
int which, qreal size )
39 metrics.setMetric( which, size );
44 bool isShrunk =
false;
61 void reset(
int count, qreal constraint );
62 void expandCell(
int index,
const CellData& );
63 void expandCells(
int start,
int end,
const CellData& );
64 void shrinkCell(
int index,
const CellData& );
67 const CellData& cell(
int index )
const {
return m_cells[ index ]; }
69 bool setSpacing( qreal spacing );
70 qreal spacing()
const {
return m_spacing; }
72 void setFillMode(
int mode ) { m_fillMode = mode; }
73 int fillMode()
const {
return m_fillMode; }
75 Segments segments( qreal size )
const;
78 inline qreal constraint()
const {
return m_constraint; }
79 inline int count()
const {
return m_cells.size(); }
82 Segments distributed(
int which, qreal offset, qreal extra )
const;
83 Segments minimumExpanded( qreal size )
const;
84 Segments preferredStretched( qreal size )
const;
87 qreal m_constraint = -2.0;
92 int m_sumStretches = 0;
95 QVector< CellData > m_cells;