12 #ifndef CXLAYOUTDATA_H_ 13 #define CXLAYOUTDATA_H_ 15 #include "cxResourceVisualizationExport.h" 44 pos(r, c), span(rSpan, cSpan) {}
62 mGroup(-1), mPlane(ptCOUNT), mType(
View::VIEW), mRegion(row, col, rowSpan, colSpan) {}
68 void addXml(QDomNode node)
const;
69 void parseXml(QDomNode node);
70 bool isValid()
const {
return (( mGroup>=0 )&&( mPlane!=ptCOUNT )); }
82 static const int MaxGridSize = 20;
85 static LayoutData createHeader(QString uid, QString name);
86 static LayoutData create(QString uid, QString name,
int rows,
int cols);
88 QString
getUid()
const {
return mUid; }
92 void setName(
const QString& name) { mName = name; }
93 void resetUid(
const QString& uid);
94 void setView(
int group, PLANE_TYPE type,
LayoutRegion region);
97 iterator
begin() {
return mView.begin(); }
98 iterator
end() {
return mView.end(); }
99 const_iterator
begin()
const {
return mView.begin(); }
100 const_iterator
end()
const {
return mView.end(); }
102 bool isEmpty()
const {
return mSize.col == 0 || mSize.row == 0; }
104 void split(iterator iter);
107 void resize(
int rows,
int cols);
110 void addXml(QDomNode node)
const;
111 void parseXml(QDomNode node);
117 std::vector<LayoutViewData> mView;
118 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.