33 #ifndef CXLAYOUTDATA_H_ 34 #define CXLAYOUTDATA_H_ 36 #include "cxResourceVisualizationExport.h" 65 pos(r, c), span(rSpan, cSpan) {}
83 mGroup(-1), mPlane(ptCOUNT), mType(
View::VIEW), mRegion(row, col, rowSpan, colSpan) {}
89 void addXml(QDomNode node)
const;
90 void parseXml(QDomNode node);
91 bool isValid()
const {
return (( mGroup>=0 )&&( mPlane!=ptCOUNT )); }
103 static const int MaxGridSize = 20;
106 static LayoutData createHeader(QString uid, QString name);
107 static LayoutData create(QString uid, QString name,
int rows,
int cols);
113 void setName(
const QString& name) { mName = name; }
114 void resetUid(
const QString& uid);
115 void setView(
int group, PLANE_TYPE type,
LayoutRegion region);
118 iterator
begin() {
return mView.begin(); }
119 iterator
end() {
return mView.end(); }
120 const_iterator
begin()
const {
return mView.begin(); }
121 const_iterator
end()
const {
return mView.end(); }
123 bool isEmpty()
const {
return mSize.col == 0 || mSize.row == 0; }
125 void split(iterator iter);
128 void resize(
int rows,
int cols);
131 void addXml(QDomNode node)
const;
132 void parseXml(QDomNode node);
138 std::vector<LayoutViewData> mView;
139 bool mOffScreenRendering;
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)
PLANE_TYPE mPlane
ptNOPLANE means 3D
const_iterator begin() const
LayoutPosition size() const
LayoutPosition pos
start position of region
ViewDataContainer::const_iterator const_iterator
const_iterator end() const
void setOffScreenRendering(bool val)
LayoutRegion merge(LayoutRegion a, LayoutRegion b)
bool getOffScreenRendering() const
Namespace for all CustusX production code.