PCM_Viewer/README.md

57 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# PCM Viewer正在从 QML 迁移到 Widgets
当前仓库原本是基于 **PySide6 + QML** 的图片数据展示组件。
由于 QML 在本项目场景下维护成本偏高,现正全面迁移为 **PySide6/PyQt6 Widgets + QGraphicsView** 实现的 Dashboard。
目前状态:
- 所有 `*.qml` 相关代码已移除
- 旧的 `main.py` QML 入口已作废,仅保留占位提示
- 正在实现新的基于 Widgets 的主程序入口(例如 `dashboard_app.py`
## 安装依赖
```bash
pip install -r requirements.txt
```
## 运行方式
迁移完成后,将提供新的入口脚本(例如):
```bash
python dashboard_app.py
```
暂时可以把本仓库看作“数据模型 + InfluxDB 客户端 + 配置管理”等后端代码基础UI 部分会全部改为 Widgets。
## 目录说明(迁移期)
```
PCM_Viewer/
├── main.py # 旧 QML 入口,占位,运行会直接退出并提示
├── data_model.py # 文本数据模型(可复用)
├── influxdb_wrapper.py # InfluxDB 客户端封装(可复用)
├── config_manager.py # 配置管理(可复用)
├── requirements.txt # 依赖列表
└── README.md # 当前说明文档
```
后续会新增:
- `dashboard_app.py`:新的 Widgets 入口
- `main_window.py` / `dashboard_view.py` 等:基于 `QGraphicsView/QGraphicsScene` 的画布与属性面板
## 计划中的功能Widgets 版保留原有需求)
- 图片作为背景,叠加多个 Text 显示 InfluxDB 实时数据
- 文本位置/字体/颜色可自由配置,支持拖拽调整
- 曲线/Web 组件,用嵌入的浏览器加载自定义曲线页面
- 编辑模式:新增/删除组件、拖拽、缩放、配置
- 展示模式:全屏/纯展示,不暴露配置控件
- 布局与配置保存为 JSON启动时自动加载
## 许可证
MIT License