增加预览页介绍信息显示

This commit is contained in:
2026-04-08 09:56:25 +08:00
parent f53fee8e5a
commit 028ed1b18d
17 changed files with 1059 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
#pragma once
#include <QString>
#include <QVector>
namespace core {
/// 实体在「预览展示」模式下点击后显示的介绍内容(可持久化到 .hfe
struct EntityIntroContent {
QString title;
QString bodyText;
QVector<QString> imagePathsRelative;
/// 预留:相对项目根的视频路径,将来可用 QMediaPlayer 播放
QString videoPathRelative;
void clear() {
title.clear();
bodyText.clear();
imagePathsRelative.clear();
videoPathRelative.clear();
}
bool hasDisplayableContent() const {
return !title.trimmed().isEmpty() || !bodyText.trimmed().isEmpty() ||
!imagePathsRelative.isEmpty() || !videoPathRelative.trimmed().isEmpty();
}
};
} // namespace core