# zhuzichu520/fluentui architecture

> Architecture diagram of the GitHub repository zhuzichu520/fluentui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zhuzichu520/fluentui
- Repository: https://github.com/zhuzichu520/fluentui

## Overview

FluentUI is a Qt/QML Fluent Design component library. The principal workflow is a QML application using the library’s registered entry point and types, then composing interface components; supporting runtime capabilities include themes, models, window behavior, QR codes, hotkeys, and plotting. The source tree also contains the implementations behind these features. Several subsystem connections are documented only by the README or import references; unsampled implementation details are not treated as confirmed call flows.

Main entry points: [`src/FluentUI.cpp`](https://github.com/zhuzichu520/fluentui/blob/main/src/FluentUI.cpp) (QML Registration), [`src/qmlcustomplot/baseplot.cpp`](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/baseplot.cpp) (QML Plot), [`src/qrcode/qrencode.cpp`](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrencode.cpp) (QR Encoder), [`src/qmlcustomplot/axis.cpp`](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/axis.cpp) (Plot Axes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_qml["QML Library"]
  node_plugin["QML Registration<br/>[FluentUI.cpp]"]
  node_app_runtime["App Runtime<br/>[FluApp.cpp]"]
  node_icon_catalog["Fluent Icons<br/>[FluentIconDef.h]"]
end

subgraph group_ui["UI Services"]
  node_theme["Theme and Colors<br/>[FluTheme.cpp]"]
  node_accent["Accent Color<br/>[FluAccentColor.cpp]"]
  node_text_style["Text Style<br/>[FluTextStyle.h]"]
  node_frameless["Frameless Window<br/>[FluFrameless.cpp]"]
  node_watermark["Watermark<br/>[FluWatermark.h]"]
  node_captcha["Captcha<br/>[FluCaptcha.cpp]"]
end

subgraph group_data["Models and Tools"]
  node_table_models["Table Models<br/>[FluTableModel.cpp]"]
  node_table_sort["Table Sorting"]
  node_tree_model["Tree Model<br/>[FluTreeModel.cpp]"]
  node_tools["QML Tools<br/>[FluTools.cpp]"]
end

subgraph group_integrations["Runtime Integrations"]
  node_hotkey["Global Hotkeys<br/>[qhotkey.cpp]"]
  node_hotkey_private["Hotkey Dispatch<br/>[qhotkey_p.h]"]
  node_qr_item["QR QML Item<br/>[FluQrCodeItem.h]"]
end

subgraph group_plot["Plotting"]
  node_plot_item["QML Plot<br/>[baseplot.cpp]"]
  node_plot_axis["Plot Axes<br/>[axis.cpp]"]
  node_plot_graph["Plot Graphs<br/>[graph.cpp]"]
  node_plot_grid["Plot Grid<br/>[grid.cpp]"]
  node_plot_ticker["Plot Tickers<br/>[ticker.cpp]"]
  node_plot_engine["QCustomPlot Engine<br/>[qcustomplot.h]"]
  node_time_plot["Time Plot<br/>[TimePlot.cpp]"]
  node_realtime_plot["Real-Time Plot<br/>[RealTimePlot.cpp]"]
end

subgraph group_qr["QR Encoding"]
  node_qr_encoder["QR Encoder<br/>[qrencode.cpp]"]
  node_qr_input["QR Input<br/>[qrinput.cpp]"]
  node_qr_specs["QR Specifications<br/>[qrspec.cpp]"]
  node_bitstream["Bit Stream<br/>[bitstream.cpp]"]
  node_masking["QR Masking<br/>[mask.cpp]"]
end

node_qml_author(("QML Developer"))
node_qml_app["QML Application"]

node_qml_author -->|"writes QML"| node_qml_app
node_qml_app -->|"uses library"| node_plugin
node_plugin -->|"registers"| node_app_runtime
node_plugin -->|"registers"| node_icon_catalog
node_plugin -->|"registers"| node_theme
node_plugin -->|"registers"| node_accent
node_plugin -->|"registers"| node_text_style
node_plugin -->|"registers"| node_frameless
node_plugin -->|"registers"| node_watermark
node_plugin -->|"registers"| node_captcha
node_plugin -->|"registers"| node_table_models
node_plugin -->|"registers"| node_table_sort
node_plugin -->|"registers"| node_tree_model
node_plugin -->|"registers"| node_tools
node_plugin -->|"registers"| node_hotkey
node_plugin -->|"registers"| node_qr_item
node_plot_item -->|"uses axes"| node_plot_axis
node_plot_item -->|"uses graphs"| node_plot_graph
node_plot_item -->|"delegates plotting"| node_plot_engine
node_plot_axis -->|"uses grid"| node_plot_grid
node_plot_axis -->|"uses tickers"| node_plot_ticker
node_plot_grid -->|"uses plotting types"| node_plot_engine
node_plot_ticker -->|"uses plotting types"| node_plot_engine
node_time_plot -->|"extends base"| node_plot_item
node_realtime_plot -.->|"specializes plot"| node_plot_item
node_hotkey -->|"dispatches shortcuts"| node_hotkey_private
node_qr_encoder -->|"encodes input"| node_qr_input
node_qr_encoder -->|"reads specifications"| node_qr_specs
node_qr_encoder -->|"builds bitstream"| node_bitstream
node_qr_encoder -->|"applies mask"| node_masking
node_qr_input -->|"appends encoded data"| node_bitstream
node_qr_input -->|"queries specifications"| node_qr_specs

click node_plugin "https://github.com/zhuzichu520/fluentui/blob/main/src/FluentUI.cpp"
click node_app_runtime "https://github.com/zhuzichu520/fluentui/blob/main/src/FluApp.cpp"
click node_icon_catalog "https://github.com/zhuzichu520/fluentui/blob/main/src/FluentIconDef.h"
click node_theme "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTheme.cpp"
click node_accent "https://github.com/zhuzichu520/fluentui/blob/main/src/FluAccentColor.cpp"
click node_text_style "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTextStyle.h"
click node_frameless "https://github.com/zhuzichu520/fluentui/blob/main/src/FluFrameless.cpp"
click node_watermark "https://github.com/zhuzichu520/fluentui/blob/main/src/FluWatermark.h"
click node_captcha "https://github.com/zhuzichu520/fluentui/blob/main/src/FluCaptcha.cpp"
click node_table_models "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTableModel.cpp"
click node_table_sort "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTableSortProxyModel.cpp"
click node_tree_model "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTreeModel.cpp"
click node_tools "https://github.com/zhuzichu520/fluentui/blob/main/src/FluTools.cpp"
click node_hotkey "https://github.com/zhuzichu520/fluentui/blob/main/src/qhotkey/qhotkey.cpp"
click node_hotkey_private "https://github.com/zhuzichu520/fluentui/blob/main/src/qhotkey/qhotkey_p.h"
click node_qr_item "https://github.com/zhuzichu520/fluentui/blob/main/src/FluQrCodeItem.h"
click node_plot_item "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/baseplot.cpp"
click node_plot_axis "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/axis.cpp"
click node_plot_graph "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/graph.cpp"
click node_plot_grid "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/grid.cpp"
click node_plot_ticker "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/ticker.cpp"
click node_plot_engine "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/qcustomplot.h"
click node_qr_encoder "https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrencode.cpp"
click node_qr_input "https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrinput.cpp"
click node_qr_specs "https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrspec.cpp"
click node_bitstream "https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/bitstream.cpp"
click node_masking "https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/mask.cpp"
click node_time_plot "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/TimePlot.cpp"
click node_realtime_plot "https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/RealTimePlot.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_app_runtime,node_icon_catalog toneBlue
class node_theme,node_accent,node_text_style,node_frameless,node_watermark,node_captcha toneAmber
class node_table_models,node_table_sort,node_tree_model,node_tools toneMint
class node_hotkey,node_hotkey_private,node_qr_item toneRose
class node_plot_item,node_plot_axis,node_plot_graph,node_plot_grid,node_plot_ticker,node_plot_engine,node_time_plot,node_realtime_plot,node_qml_author,node_qml_app toneIndigo
class node_qr_encoder,node_qr_input,node_qr_specs,node_bitstream,node_masking toneTeal
```

## Components

### QML Library

- [QML Registration](https://github.com/zhuzichu520/fluentui/blob/main/src/FluentUI.cpp): `src/FluentUI.cpp`
- [App Runtime](https://github.com/zhuzichu520/fluentui/blob/main/src/FluApp.cpp): `src/FluApp.cpp`
- [Fluent Icons](https://github.com/zhuzichu520/fluentui/blob/main/src/FluentIconDef.h): `src/FluentIconDef.h`

### UI Services

- [Theme and Colors](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTheme.cpp): `src/FluTheme.cpp`
- [Accent Color](https://github.com/zhuzichu520/fluentui/blob/main/src/FluAccentColor.cpp): `src/FluAccentColor.cpp`
- [Text Style](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTextStyle.h): `src/FluTextStyle.h`
- [Frameless Window](https://github.com/zhuzichu520/fluentui/blob/main/src/FluFrameless.cpp): `src/FluFrameless.cpp`
- [Watermark](https://github.com/zhuzichu520/fluentui/blob/main/src/FluWatermark.h): `src/FluWatermark.h`
- [Captcha](https://github.com/zhuzichu520/fluentui/blob/main/src/FluCaptcha.cpp): `src/FluCaptcha.cpp`

### Models and Tools

- [Table Models](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTableModel.cpp): `src/FluTableModel.cpp`
- [Table Sorting](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTableSortProxyModel.cpp): `src/FluTableSortProxyModel.cpp`
- [Tree Model](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTreeModel.cpp): `src/FluTreeModel.cpp`
- [QML Tools](https://github.com/zhuzichu520/fluentui/blob/main/src/FluTools.cpp): `src/FluTools.cpp`

### Runtime Integrations

- [Global Hotkeys](https://github.com/zhuzichu520/fluentui/blob/main/src/qhotkey/qhotkey.cpp): `src/qhotkey/qhotkey.cpp`
- [Hotkey Dispatch](https://github.com/zhuzichu520/fluentui/blob/main/src/qhotkey/qhotkey_p.h): `src/qhotkey/qhotkey_p.h`
- [QR QML Item](https://github.com/zhuzichu520/fluentui/blob/main/src/FluQrCodeItem.h): `src/FluQrCodeItem.h`

### Plotting

- [QML Plot](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/baseplot.cpp): `src/qmlcustomplot/baseplot.cpp`
- [Plot Axes](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/axis.cpp): `src/qmlcustomplot/axis.cpp`
- [Plot Graphs](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/graph.cpp): `src/qmlcustomplot/graph.cpp`
- [Plot Grid](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/grid.cpp): `src/qmlcustomplot/grid.cpp`
- [Plot Tickers](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/ticker.cpp): `src/qmlcustomplot/ticker.cpp`
- [QCustomPlot Engine](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/qcustomplot.h): `src/qmlcustomplot/qcustomplot.h`
- [Time Plot](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/TimePlot.cpp): `src/qmlcustomplot/TimePlot.cpp`
- [Real-Time Plot](https://github.com/zhuzichu520/fluentui/blob/main/src/qmlcustomplot/RealTimePlot.cpp): `src/qmlcustomplot/RealTimePlot.cpp`

### QR Encoding

- [QR Encoder](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrencode.cpp): `src/qrcode/qrencode.cpp`
- [QR Input](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrinput.cpp): `src/qrcode/qrinput.cpp`
- [QR Specifications](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/qrspec.cpp): `src/qrcode/qrspec.cpp`
- [Bit Stream](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/bitstream.cpp): `src/qrcode/bitstream.cpp`
- [QR Masking](https://github.com/zhuzichu520/fluentui/blob/main/src/qrcode/mask.cpp): `src/qrcode/mask.cpp`

### Other components

- **QML Developer**
- **QML Application**

## Connections

- QML Developer → QML Application: writes QML (evidence: `README.md`)
- QML Application → QML Registration: uses library (evidence: `README.md`)
- QML Registration → App Runtime: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Fluent Icons: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Theme and Colors: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Accent Color: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Text Style: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Frameless Window: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Watermark: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Captcha: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Table Models: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Table Sorting: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Tree Model: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → QML Tools: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → Global Hotkeys: registers (evidence: `src/FluentUI.cpp`)
- QML Registration → QR QML Item: registers (evidence: `src/FluentUI.cpp`)
- QML Plot → Plot Axes: uses axes (evidence: `src/qmlcustomplot/baseplot.cpp`)
- QML Plot → Plot Graphs: uses graphs (evidence: `src/qmlcustomplot/baseplot.cpp`)
- QML Plot → QCustomPlot Engine: delegates plotting (evidence: `src/qmlcustomplot/baseplot.cpp`)
- Plot Axes → Plot Grid: uses grid
- Plot Axes → Plot Tickers: uses tickers
- Plot Grid → QCustomPlot Engine: uses plotting types (evidence: `src/qmlcustomplot/grid.cpp`)
- Plot Tickers → QCustomPlot Engine: uses plotting types (evidence: `src/qmlcustomplot/ticker.cpp`)
- Time Plot → QML Plot: extends base
- Real-Time Plot → QML Plot: specializes plot
- Global Hotkeys → Hotkey Dispatch: dispatches shortcuts (evidence: `src/qhotkey/qhotkey.cpp`)
- QR Encoder → QR Input: encodes input (evidence: `src/qrcode/qrencode.cpp`)
- QR Encoder → QR Specifications: reads specifications (evidence: `src/qrcode/qrencode.cpp`)
- QR Encoder → Bit Stream: builds bitstream (evidence: `src/qrcode/qrencode.cpp`)
- QR Encoder → QR Masking: applies mask (evidence: `src/qrcode/qrencode.cpp`)
- QR Input → Bit Stream: appends encoded data (evidence: `src/qrcode/qrinput.cpp`)
- QR Input → QR Specifications: queries specifications (evidence: `src/qrcode/qrinput.cpp`)
