geopro/src/app/panels/KeyValueView.hpp

26 lines
859 B
C++
Raw 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 <QWidget>
#include "repo/RepoTypes.hpp"
class QVBoxLayout;
namespace geopro::app {
// 唯一的「只读键值表」渲染器(规范 §6.4 / §7.0.10分组标题formkit::addSection+
// 两列键值(数值/坐标等宽对齐)。**不含**滚动区/卡片外壳——容器由调用方决定:
// · 属性面板DynamicFormView 在滚动卡片内嵌本视图;
// · 数据详情对话框formkit::buildDetailDialog 直接内嵌本视图(随内容自适应大小)。
// 属性面板与各详情对话框共用本类,保证只读表单处处一致。
class KeyValueView : public QWidget {
public:
explicit KeyValueView(QWidget* parent = nullptr);
void setForm(const geopro::data::DynamicForm& form);
void clear();
private:
QVBoxLayout* lay_ = nullptr;
};
} // namespace geopro::app