geopro/src/app/panels/DynamicFormView.hpp

26 lines
772 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 QLabel;
namespace geopro::app {
class KeyValueView;
// 属性面板用的只读表单容器:滚动区 + 卡片,内嵌唯一渲染器 KeyValueView§6.4)。
// 对象属性 / 数据集属性面板共用。数据详情对话框不经本类,直接用 KeyValueView
// (见 formkit::buildDetailDialog但二者共享同一渲染器外观一致。
class DynamicFormView : public QWidget {
public:
explicit DynamicFormView(QWidget* parent = nullptr);
void setForm(const geopro::data::DynamicForm& form);
void showMessage(const QString& message); // 空/错占位
private:
KeyValueView* kv_ = nullptr;
QLabel* placeholder_ = nullptr;
};
} // namespace geopro::app