EntityPreview.h header
#include <ew/app/EntityPreview.h>
Namespace ew::app
Functions
QString ew::app::entityPreview(const ew::core::Project &project, ew::core::ContentId id)
Returns a short rich-text (HTML) preview of the entity id: its name, its category, and a summary if it has one. It is suitable for a hover tooltip or preview card and is shared so every surface previews entities the same way. Returns an empty string if id does not identify an entity.
QString ew::app::entityPreview(const ew::core::Project &project, const MountedLibraries &libraries, ew::core::ContentId id, const QString &projectDirectory={})
Like entityPreview(), but resolves id across project and every mounted library, using the entity's owning-repo taxonomy for its category, so a shared-library entity previews the same as a local one. When projectDirectory (the project's on-disk folder, the asset root) is non-empty and the entity has a gallery whose first (cover) image is a resolvable image asset, the preview is topped with that cover thumbnail so hover cards show the entity's picture.