Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Static Public Member Functions | Static Private Member Functions
Visualization::GridLayouter Class Reference

Public Types

enum  MajorAxis { NoMajor , ColumnMajor , RowMajor }
 

Static Public Member Functions

static QVector< QVector< Model::Node * > > arrange (QVector< Model::Node * > nodes, MajorAxis majorAxis)
 
template<bool mayHaveMergedCells, typename NumRows , typename NumColumns , typename HasElement , typename Width , typename Height , typename ComputeElementSize , typename ChangeGeometry , typename IsStretchable , typename SetPosition , typename SpanGrid , typename RowStretchFactors , typename ColumnStretchFactors , typename HorizontalAlignment , typename VerticalAlignment , typename SpaceBetweenRows , typename SpaceBetweenColumns , typename TopMargin , typename BottomMargin , typename LeftMargin , typename RightMargin , typename MinWidth , typename MinHeight >
static QSize computeSize (int availableWidth, int availableHeight, MajorAxis majorAxis, NumRows numRows, NumColumns numColumns, HasElement has, SpanGrid spanGrid, Width width, Height height, ComputeElementSize computeElementSize, ChangeGeometry changeGeometry, IsStretchable isStretchable, SetPosition setPosition, RowStretchFactors rowStretchFactors, ColumnStretchFactors columnStretchFactors, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, SpaceBetweenRows spaceBetweenRows, SpaceBetweenColumns spaceBetweenColumns, TopMargin topMargin, BottomMargin bottomMargin, LeftMargin leftMargin, RightMargin rightMargin, MinWidth minWidth, MinHeight minHeight)
 
static void normalizeGridIndices (QVector< Model::Node * > nodes, MajorAxis majorAxis)
 
template<typename NumRows , typename NumColumns , typename HasElement , typename Width , typename Height , typename XPos , typename YPos , typename ChildItem , typename SpaceBetweenRows , typename SpaceBetweenColumns , typename TopMargin , typename BottomMargin , typename LeftMargin , typename RightMargin >
static QList< ItemRegionregions (Item *parent, FormElement *formElement, int xOffset, int yOffset, MajorAxis majorAxis, bool showCursorWhenEmpty, bool showInnerCursors, bool showBoundaryCursors, bool extraCursorsAroundParentShape, bool showMajorCursors, bool notLocationEquivalentCursors, NumRows numRows, NumColumns numColumns, HasElement has, Width width, Height height, XPos xPos, YPos yPos, ChildItem childItem, SpaceBetweenRows spaceBetweenRows, SpaceBetweenColumns spaceBetweenColumns, TopMargin topMargin, BottomMargin bottomMargin, LeftMargin leftMargin, RightMargin rightMargin)
 Does not consider spans. More...
 
static void removeFromGrid (QVector< Model::Node * > nodes, Model::Node *node, MajorAxis majorAxis)
 
static void setPositionInGrid (QVector< Model::Node * > nodes, int x, int y, Model::Node *node, MajorAxis majorAxis)
 

Static Private Member Functions

static ItemRegion cursorRegion (Item *parent, FormElement *formElement, int xIndex, int yIndex, bool horizontal, bool atBoundary, bool notLocationEquivalent, bool mayExpandFront, bool mayExpandBack, QRect area)
 
static void pushNodes (QVector< Model::Node * > nodes, int x, int y, int pushAmount, MajorAxis majorAxis, bool pushAllMajor)
 
template<typename Container , typename Value >
static void resizeReplace (Container &container, int majorIndex, int minorIndex, Value value)
 

Member Enumeration Documentation

◆ MajorAxis

Enumerator
NoMajor 
ColumnMajor 
RowMajor 

Member Function Documentation

◆ arrange()

QVector< QVector< Model::Node * > > Visualization::GridLayouter::arrange ( QVector< Model::Node * >  nodes,
MajorAxis  majorAxis 
)
static

◆ computeSize()

template<bool mayHaveMergedCells, typename NumRows , typename NumColumns , typename HasElement , typename Width , typename Height , typename ComputeElementSize , typename ChangeGeometry , typename IsStretchable , typename SetPosition , typename SpanGrid , typename RowStretchFactors , typename ColumnStretchFactors , typename HorizontalAlignment , typename VerticalAlignment , typename SpaceBetweenRows , typename SpaceBetweenColumns , typename TopMargin , typename BottomMargin , typename LeftMargin , typename RightMargin , typename MinWidth , typename MinHeight >
static QSize Visualization::GridLayouter::computeSize ( int  availableWidth,
int  availableHeight,
MajorAxis  majorAxis,
NumRows  numRows,
NumColumns  numColumns,
HasElement  has,
SpanGrid  spanGrid,
Width  width,
Height  height,
ComputeElementSize  computeElementSize,
ChangeGeometry  changeGeometry,
IsStretchable  isStretchable,
SetPosition  setPosition,
RowStretchFactors  rowStretchFactors,
ColumnStretchFactors  columnStretchFactors,
HorizontalAlignment  horizontalAlignment,
VerticalAlignment  verticalAlignment,
SpaceBetweenRows  spaceBetweenRows,
SpaceBetweenColumns  spaceBetweenColumns,
TopMargin  topMargin,
BottomMargin  bottomMargin,
LeftMargin  leftMargin,
RightMargin  rightMargin,
MinWidth  minWidth,
MinHeight  minHeight 
)
inlinestatic

◆ cursorRegion()

ItemRegion Visualization::GridLayouter::cursorRegion ( Item parent,
FormElement formElement,
int  xIndex,
int  yIndex,
bool  horizontal,
bool  atBoundary,
bool  notLocationEquivalent,
bool  mayExpandFront,
bool  mayExpandBack,
QRect  area 
)
staticprivate

◆ normalizeGridIndices()

void Visualization::GridLayouter::normalizeGridIndices ( QVector< Model::Node * >  nodes,
MajorAxis  majorAxis 
)
static

◆ pushNodes()

void Visualization::GridLayouter::pushNodes ( QVector< Model::Node * >  nodes,
int  x,
int  y,
int  pushAmount,
MajorAxis  majorAxis,
bool  pushAllMajor 
)
staticprivate

◆ regions()

template<typename NumRows , typename NumColumns , typename HasElement , typename Width , typename Height , typename XPos , typename YPos , typename ChildItem , typename SpaceBetweenRows , typename SpaceBetweenColumns , typename TopMargin , typename BottomMargin , typename LeftMargin , typename RightMargin >
static QList<ItemRegion> Visualization::GridLayouter::regions ( Item parent,
FormElement formElement,
int  xOffset,
int  yOffset,
MajorAxis  majorAxis,
bool  showCursorWhenEmpty,
bool  showInnerCursors,
bool  showBoundaryCursors,
bool  extraCursorsAroundParentShape,
bool  showMajorCursors,
bool  notLocationEquivalentCursors,
NumRows  numRows,
NumColumns  numColumns,
HasElement  has,
Width  width,
Height  height,
XPos  xPos,
YPos  yPos,
ChildItem  childItem,
SpaceBetweenRows  spaceBetweenRows,
SpaceBetweenColumns  spaceBetweenColumns,
TopMargin  topMargin,
BottomMargin  bottomMargin,
LeftMargin  leftMargin,
RightMargin  rightMargin 
)
inlinestatic

Does not consider spans.

◆ removeFromGrid()

void Visualization::GridLayouter::removeFromGrid ( QVector< Model::Node * >  nodes,
Model::Node node,
MajorAxis  majorAxis 
)
static

◆ resizeReplace()

template<typename Container , typename Value >
void Visualization::GridLayouter::resizeReplace ( Container &  container,
int  majorIndex,
int  minorIndex,
Value  value 
)
inlinestaticprivate

◆ setPositionInGrid()

void Visualization::GridLayouter::setPositionInGrid ( QVector< Model::Node * >  nodes,
int  x,
int  y,
Model::Node node,
MajorAxis  majorAxis 
)
static