Project::Item Project::Item::getParent() const { if (isMainGroup() || ! isGroup()) return *this; return Item (project, state.getParent()); }
void AbstractGroup::setImmutability(Plasma::ImmutabilityType immutability) { if (!isMainGroup()) { setFlag(QGraphicsItem::ItemIsMovable, immutability == Plasma::Mutable); } d->immutability = immutability; foreach (Plasma::Applet *applet, applets()) { applet->setImmutability(immutability); }
const Drawable* Project::Item::getIcon() const { if (isFile()) { if (isImageFile()) return StoredSettings::getInstance()->getImageFileIcon(); return LookAndFeel::getDefaultLookAndFeel().getDefaultDocumentFileImage(); } else if (isMainGroup()) { return &(getProject().mainProjectIcon); } return LookAndFeel::getDefaultLookAndFeel().getDefaultFolderImage(); }
Icon Project::Item::getIcon() const { const Icons& icons = getIcons(); if (isFile()) { if (isImageFile()) return Icon (icons.imageDoc, Colours::blue); return Icon (icons.document, Colours::yellow); } if (isMainGroup()) return Icon (icons.juceLogo, Colours::orange); return Icon (icons.folder, Colours::darkgrey); }
bool Project::Item::isGroup() const { return state.hasType (Tags::group) || isMainGroup(); }
bool Project::Item::isGroup() const { return state.hasType (Ids::GROUP) || isMainGroup(); }