33 #ifndef CXLAYOUTDATA_H_
34 #define CXLAYOUTDATA_H_
36 #include "cxResourceVisualizationExport.h"
65 pos(r, c), span(rSpan, cSpan) {}
71 return pos.row <= p.
row && p.
row < pos.row + span.row && pos.col <= p.
col && p.
col < pos.col + span.col;
75 cxResourceVisualization_EXPORT LayoutRegion
merge(LayoutRegion a, LayoutRegion b);
89 void addXml(QDomNode node)
const;
105 static LayoutData createHeader(QString uid, QString name);
106 static LayoutData create(QString uid, QString name,
int rows,
int cols);
110 void setName(
const QString& name) { mName = name; }
111 void resetUid(
const QString& uid);
112 void setView(
int group, PLANE_TYPE type,
LayoutRegion region);
120 bool isEmpty()
const {
return mSize.col == 0 || mSize.row == 0; }
122 void split(iterator iter);
125 void resize(
int rows,
int cols);
128 void addXml(QDomNode node)
const;
129 void parseXml(QDomNode node);
135 std::vector<LayoutViewData> mView;
int mGroup
what group to connect to. -1 means not set.
LayoutPosition(int r, int c)
std::vector< LayoutViewData > ViewDataContainer
ViewDataContainer::iterator iterator
bool contains(LayoutPosition p) const
LayoutRegion(int r, int c, int rSpan=1, int cSpan=1)
LayoutPosition span
size of region
void setName(const QString &name)
LayoutViewData(int row, int col, int rowSpan=1, int colSpan=1)
void parseXml(QDomNode node)
load state from xml
PLANE_TYPE mPlane
ptNOPLANE means 3D
const_iterator begin() const
LayoutPosition size() const
LayoutPosition pos
start position of region
ViewDataContainer::const_iterator const_iterator
void addXml(QDomNode node) const
save state to xml
const_iterator end() const
LayoutRegion merge(LayoutRegion a, LayoutRegion b)