#ifndef NMPEBIRESULTPROPERTYDISPLAYTEXT_H #define NMPEBIRESULTPROPERTYDISPLAYTEXT_H #include "nmSubWxs_global.h" #include /** * @brief 将结果属性目录中的稳定源文字转换为当前语言下的界面文字。 * * 属性 ID、英文源文字和单位仍由 nmPebiResultPropertyCatalog 维护; * 本类统一提供 Qt 翻译文字及 VTK 可稳定绘制的固定 ASCII 短标题。 */ class NM_SUB_WXS_EXPORT nmPebiResultPropertyDisplayText { public: /** * @brief 返回固定翻译上下文中的属性名称。 * @param sPropertyId Catalog 中的稳定英文属性 ID。 * @return 翻译后的名称;未知属性返回空字符串。 */ static QString getDisplayName(const QString& sPropertyId); /** * @brief 根据比例模式返回 VTK 色标使用的固定 ASCII 短标题。 * @param bLogarithmic 为 true 时只用 log(...) 包裹属性符号,单位仍置于括号外。 * @note 标题不参与翻译;未知属性返回空字符串。 */ static QString getScalarBarTitle(const QString& sPropertyId, bool bLogarithmic); /** * @brief 返回 Catalog 中的默认显示单位。 * @return 单位原文;未知属性或无量纲属性返回空字符串。 */ static QString getDefaultDisplayUnit(const QString& sPropertyId); private: /** @brief 纯静态辅助类,不允许创建实例。 */ nmPebiResultPropertyDisplayText(); }; #endif // NMPEBIRESULTPROPERTYDISPLAYTEXT_H