Files
hfut-bishe/client/core/domain/EntityIntro.h

30 lines
777 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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