| 241 | } |
| 242 | |
| 243 | bool PartStack::CanMoveFolder() |
| 244 | { |
| 245 | if (appearance == PresentationFactoryUtil::ROLE_EDITOR) |
| 246 | return true; |
| 247 | |
| 248 | Perspective::Pointer perspective = this->GetPage()->GetActivePerspective(); |
| 249 | |
| 250 | if (perspective == 0) |
| 251 | { |
| 252 | // Shouldn't happen -- can't have a ViewStack without a |
| 253 | // perspective |
| 254 | return false; |
| 255 | } |
| 256 | |
| 257 | // We need to search if one of the presentations is not moveable |
| 258 | // if that's the case the whole folder should not be moveable |
| 259 | IStackPresentationSite::Pointer presenationSite; |
| 260 | |
| 261 | if ((presenationSite = this->GetPresentationSite()) != 0) |
| 262 | { |
| 263 | QList<IPresentablePart::Pointer> parts = presenationSite->GetPartList(); |
| 264 | for (QList<IPresentablePart::Pointer>::iterator iter = parts.begin(); iter |
| 265 | != parts.end(); ++iter) |
| 266 | { |
| 267 | if (!presenationSite->IsPartMoveable(*iter)) |
| 268 | { |
| 269 | return false; |
| 270 | } |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | return !perspective->IsFixedLayout(); |
| 275 | } |
| 276 | |
| 277 | void PartStack::DerefPart(LayoutPart::Pointer toDeref) |
| 278 | { |
no test coverage detected