| 67 | } |
| 68 | |
| 69 | ViewLayoutRec::Pointer PageLayout::GetViewLayoutRec(const QString& id, bool create) |
| 70 | { |
| 71 | ViewLayoutRec::Pointer rec = mapIDtoViewLayoutRec[id]; |
| 72 | if (rec == 0 && create) |
| 73 | { |
| 74 | rec = new ViewLayoutRec(); |
| 75 | // set up the view layout appropriately if the page layout is fixed |
| 76 | if (this->IsFixed()) |
| 77 | { |
| 78 | rec->isCloseable = false; |
| 79 | rec->isMoveable = false; |
| 80 | } |
| 81 | mapIDtoViewLayoutRec[id] = rec; |
| 82 | } |
| 83 | return rec; |
| 84 | } |
| 85 | |
| 86 | void PageLayout::AddPart(LayoutPart::Pointer newPart, |
| 87 | const QString& partId, int relationship, float ratio, |
no test coverage detected