Compare commits
173 Commits
Author | SHA1 | Date | |
---|---|---|---|
47ab4dabbd | |||
206669e5f0 | |||
08457dc75e | |||
0c59a233ea | |||
fcb8da2c50 | |||
a8701256d4 | |||
8eaa4b6cbb | |||
af80a882d0 | |||
9d89328a43 | |||
0d4477437f | |||
6b3e73ce0b | |||
625bc74e26 | |||
731e4f27b4 | |||
fce64eccc6 | |||
689e0805e7 | |||
986f1242dd | |||
a9c97a5c56 | |||
81e78834d0 | |||
5279a2c7b2 | |||
6391fc8dc6 | |||
9cf4b4b1af | |||
32c0b4ccd6 | |||
b2bfdd17da | |||
27db8160d4 | |||
ed0c9048b0 | |||
de2c891912 | |||
16daeb5268 | |||
0b37ddcb6e | |||
d2e3e6dd4b | |||
1e5bd75123 | |||
1b97b197a4 | |||
936a310ca6 | |||
3236be8a7f | |||
2008e0f524 | |||
4e53936bb7 | |||
eb758f7765 | |||
1ab69e401a | |||
e014aa774d | |||
0595e2e640 | |||
b5894158d2 | |||
4829ce58fd | |||
b5f44f4f7d | |||
cbd4c229aa | |||
7720208d17 | |||
9790ae12eb | |||
37ae17d92d | |||
036450f0a3 | |||
5a1b10fef8 | |||
a33a63abc9 | |||
ff4ec71379 | |||
76ed63eaf0 | |||
825a6f4461 | |||
98f4d970c6 | |||
38f4ae92db | |||
2e31ab902d | |||
850a1ba8d8 | |||
a298f43388 | |||
b70a982586 | |||
6a2a93561a | |||
96ad06c2e4 | |||
e7f6ad8b26 | |||
6174cbc2a4 | |||
e5bdd36e27 | |||
038cc37c12 | |||
f0f58ca2dd | |||
3a32d66d6a | |||
a2c23231f2 | |||
dae49a5bfc | |||
5e61af99ba | |||
e2d72d4510 | |||
fcdb05b7d1 | |||
a59010ec72 | |||
36d7c714a5 | |||
2f95bdf649 | |||
faa6c625cb | |||
0176f14469 | |||
128869f46e | |||
14ceb3a4c6 | |||
a1d8581768 | |||
e7146bf2ca | |||
432023aee3 | |||
a1959641c2 | |||
0f7c5f4ff5 | |||
b6befc4416 | |||
901c83e499 | |||
7e60bfd37f | |||
d2e1a6fef9 | |||
ffd7d3bce5 | |||
424a6137c5 | |||
57d453d574 | |||
697c379ee1 | |||
f5adefb0f1 | |||
00f08eaf99 | |||
795fc26777 | |||
603bab5d93 | |||
d570acf5a7 | |||
758f8ccb9c | |||
dfd8ef875c | |||
8b156699fb | |||
183f105776 | |||
162c4851ea | |||
6f38bb9985 | |||
30b8c19f52 | |||
64d636d391 | |||
4ba19a5bf2 | |||
3c978f1655 | |||
592abd3cab | |||
8b0a0c7c98 | |||
09bf3cf0ab | |||
753d1cdd30 | |||
11cd46ba18 | |||
587b422275 | |||
fb68455ded | |||
d2d2e97d28 | |||
6d809efd4b | |||
d8d95399cd | |||
1f1e8b0ed0 | |||
a3fb672cc7 | |||
f20dc1edcb | |||
bfaffd3dab | |||
2c63eb21f0 | |||
f4e5316987 | |||
d3d6e64af1 | |||
82a7aa167a | |||
83f97159e9 | |||
5fcd95611f | |||
b83e70ba24 | |||
e29cb7433e | |||
9545175445 | |||
a447b260e7 | |||
8eb7e1df4a | |||
c622f80659 | |||
c0ed9cb41c | |||
e5a24ec642 | |||
6553584c3d | |||
1ea043ee13 | |||
0d6b0d9d25 | |||
5f71ad57d0 | |||
c789d53d6a | |||
f2bbbd5250 | |||
4e95923847 | |||
5fadb582c9 | |||
6b54401371 | |||
28b65e2f33 | |||
0689c3b9d9 | |||
9c121c6ba9 | |||
f2a66221e6 | |||
2de9d78f41 | |||
96355b0a97 | |||
47597471dd | |||
184f52c896 | |||
31b2b0b004 | |||
1e4f939de7 | |||
926132a285 | |||
9e245fb533 | |||
8bfbfd63fb | |||
51a206e583 | |||
ee3ddf7732 | |||
6d238871ee | |||
9d3de073c0 | |||
7282a6f8d1 | |||
2b9e9b2159 | |||
23bc5cdf68 | |||
f75da5e3ce | |||
8cc828a56b | |||
f36914fdee | |||
0cf3f2aa22 | |||
5bb8f27968 | |||
e6d2513482 | |||
5917d23286 | |||
eb1744d5f8 | |||
b1b727030c | |||
a71831cd9d |
25
.github/workflows/macos.yml
vendored
@ -16,24 +16,25 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-10.15,macos-11.0]
|
os: [macos-12]
|
||||||
qt_ver: [5.15.2]
|
qt_ver: [6.4.3]
|
||||||
qt_arch: [clang_64]
|
qt_arch: [clang_64]
|
||||||
env:
|
env:
|
||||||
targetName: example
|
targetName: example
|
||||||
steps:
|
steps:
|
||||||
# macos 11.0 默认环境变了,要指定
|
- name: '⚙️ Cache Qt'
|
||||||
- name: prepare env
|
id: cache-qt
|
||||||
if: ${{ matrix.os == 'macos-11.0' }}
|
uses: actions/cache@v3
|
||||||
run: |
|
with:
|
||||||
softwareupdate --all --install --force
|
path: ${{ runner.workspace }}/Qt
|
||||||
sudo xcode-select --print-path
|
key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
|
||||||
sudo xcode-select --switch /Library/Developer/CommandLineTools
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
cached: 'false'
|
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
|
arch: ${{ matrix.qt_arch }}
|
||||||
|
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -58,6 +59,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: bin/release/${{ env.targetName }}.dmg
|
file: bin/release/${{ env.targetName }}.dmg
|
||||||
asset_name: ${{ env.targetName }}_${{ matrix.os }}_${{ matrix.qt_ver }}.dmg
|
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.dmg
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
20
.github/workflows/ubuntu.yml
vendored
@ -18,17 +18,25 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04,ubuntu-20.04]
|
os: [ubuntu-20.04]
|
||||||
qt_ver: [5.15.2]
|
qt_ver: [6.4.3]
|
||||||
qt_arch: [gcc_64]
|
qt_arch: [gcc_64]
|
||||||
env:
|
env:
|
||||||
targetName: example
|
targetName: example
|
||||||
steps:
|
steps:
|
||||||
|
- name: '⚙️ Cache Qt'
|
||||||
|
id: cache-qt
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ runner.workspace }}/Qt
|
||||||
|
key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
cached: 'false'
|
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
|
arch: ${{ matrix.qt_arch }}
|
||||||
|
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
||||||
- name: ubuntu install GL library
|
- name: ubuntu install GL library
|
||||||
run: sudo apt-get install -y libglew-dev libglfw3-dev qml-module-qtquick-controls qml-module-qtquick-controls2
|
run: sudo apt-get install -y libglew-dev libglfw3-dev qml-module-qtquick-controls qml-module-qtquick-controls2
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -42,6 +50,8 @@ jobs:
|
|||||||
uses: miurahr/install-linuxdeploy-action@v1
|
uses: miurahr/install-linuxdeploy-action@v1
|
||||||
with:
|
with:
|
||||||
plugins: qt appimage
|
plugins: qt appimage
|
||||||
|
- name: Check if svg file exists
|
||||||
|
run: if [ ! -f "${targetName}.svg" ]; then echo "File not found, creating..."; touch ${targetName}.svg; fi
|
||||||
# 打包
|
# 打包
|
||||||
- name: package
|
- name: package
|
||||||
run: |
|
run: |
|
||||||
@ -62,6 +72,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: ${{ env.targetName }}.AppImage
|
file: ${{ env.targetName }}.AppImage
|
||||||
asset_name: ${{ env.targetName }}_${{ matrix.os }}_${{ matrix.qt_ver }}.AppImage
|
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.AppImage
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
33
.github/workflows/windows-mingw.yml
vendored
@ -13,40 +13,29 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-2019
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- qt_arch: win32_mingw81
|
- qt_arch: win64_mingw
|
||||||
qt_ver: 5.15.2
|
qt_ver: 6.4.3
|
||||||
qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win32_mingw810"
|
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
||||||
qt_tools_mingw_install: mingw810_32
|
qt_tools_mingw_install: mingw900_64
|
||||||
- qt_arch: win64_mingw81
|
|
||||||
qt_ver: 5.15.2
|
|
||||||
qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win64_mingw810"
|
|
||||||
qt_tools_mingw_install: mingw810_64
|
|
||||||
env:
|
env:
|
||||||
targetName: example.exe
|
targetName: example.exe
|
||||||
fileName: example
|
fileName: example
|
||||||
steps:
|
steps:
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
aqtversion: '==2.0.5'
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
arch: ${{ matrix.qt_arch }}
|
||||||
tools: ${{ matrix.qt_tools }}
|
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
cached: 'false'
|
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Qt 5 environment configuration
|
- name: Qt6 environment configuration
|
||||||
if: ${{ startsWith( matrix.qt_ver, 5 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt5_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt5_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
- name: Qt 6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
@ -66,7 +55,7 @@ jobs:
|
|||||||
- name: package
|
- name: package
|
||||||
id: package
|
id: package
|
||||||
env:
|
env:
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
||||||
@ -82,6 +71,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
asset_name: ${{ steps.package.outputs.packageName }}.zip
|
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.zip
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
29
.github/workflows/windows.yml
vendored
@ -16,17 +16,13 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
# 运行平台, windows-latest目前是windows server 2019
|
# 运行平台, windows-latest目前是windows server 2019
|
||||||
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
|
# 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
|
||||||
runs-on: windows-2019
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
# 矩阵配置
|
# 矩阵配置
|
||||||
matrix:
|
matrix:
|
||||||
|
os: [windows-2019]
|
||||||
include:
|
include:
|
||||||
# 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/
|
- qt_ver: 6.4.3
|
||||||
- qt_ver: 5.15.2
|
|
||||||
qt_arch: win32_msvc2019
|
|
||||||
msvc_arch: x86
|
|
||||||
qt_arch_install: msvc2019
|
|
||||||
- qt_ver: 5.15.2
|
|
||||||
qt_arch: win64_msvc2019_64
|
qt_arch: win64_msvc2019_64
|
||||||
msvc_arch: x64
|
msvc_arch: x64
|
||||||
qt_arch_install: msvc2019_64
|
qt_arch_install: msvc2019_64
|
||||||
@ -35,18 +31,21 @@ jobs:
|
|||||||
fileName: example
|
fileName: example
|
||||||
# 步骤
|
# 步骤
|
||||||
steps:
|
steps:
|
||||||
|
- name: '⚙️ Cache Qt'
|
||||||
|
id: cache-qt
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ runner.workspace }}\Qt
|
||||||
|
key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
|
||||||
# 安装Qt
|
# 安装Qt
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
# 使用外部action。这个action专门用来安装Qt
|
# 使用外部action。这个action专门用来安装Qt
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
# Version of Qt to install
|
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
# Target platform for build
|
|
||||||
# target: ${{ matrix.qt_target }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
arch: ${{ matrix.qt_arch }}
|
||||||
cached: 'false'
|
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
aqtversion: '==2.0.5'
|
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
||||||
# 拉取代码
|
# 拉取代码
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -67,7 +66,7 @@ jobs:
|
|||||||
- name: package
|
- name: package
|
||||||
id: package
|
id: package
|
||||||
env:
|
env:
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}
|
||||||
msvcArch: ${{ matrix.msvc_arch }}
|
msvcArch: ${{ matrix.msvc_arch }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
@ -88,6 +87,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
asset_name: ${{ steps.package.outputs.packageName }}.zip
|
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.zip
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
12
.gitignore
vendored
@ -1,14 +1,3 @@
|
|||||||
# C++ objects and libs
|
|
||||||
*.slo
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.a
|
|
||||||
*.la
|
|
||||||
*.lai
|
|
||||||
*.so
|
|
||||||
*.dll
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Qt-es
|
# Qt-es
|
||||||
object_script.*.Release
|
object_script.*.Release
|
||||||
object_script.*.Debug
|
object_script.*.Debug
|
||||||
@ -44,3 +33,4 @@ CMakeLists.txt.user*
|
|||||||
|
|
||||||
src/build-preset/plugins.qmltypes
|
src/build-preset/plugins.qmltypes
|
||||||
bin
|
bin
|
||||||
|
.DS_Store
|
5
CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(FluentUI VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
add_subdirectory(example)
|
21
License
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 zhuzichu
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
26
README.md
@ -57,12 +57,21 @@
|
|||||||
|FluTooltip|tooltip提示框||
|
|FluTooltip|tooltip提示框||
|
||||||
|FluTreeView|树控件||
|
|FluTreeView|树控件||
|
||||||
|FluTheme|主题设置|支持主题颜色切换,夜间模式|
|
|FluTheme|主题设置|支持主题颜色切换,夜间模式|
|
||||||
|
|FluCarousel|轮播图组件|支持无限轮播|
|
||||||
|
|FluTimePicker|时间选择器||
|
||||||
|
|FluDatePicker|日期选择器||
|
||||||
|
|FluMenu|菜单Popup||
|
||||||
|
|FluNavigationView|响应式导航布局||
|
||||||
|
|
||||||
# 部分效果预览
|
# 部分效果预览
|
||||||
|
|
||||||
## 主页
|
## 首页
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 各种Button按钮
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 主题颜色切换、夜间模式
|
## 主题颜色切换、夜间模式
|
||||||
|
|
||||||
@ -72,10 +81,17 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Toast组件
|
## 轮播图组件
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## InfoBar提示框组件
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Rectangle组件
|
## 多窗口路由跳转
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### ⚡ Visitor count
|
||||||
|

|
BIN
doc/preview/buttons.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
doc/preview/carousel.png
Normal file
After Width: | Height: | Size: 383 KiB |
BIN
doc/preview/chatgpt.png
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
doc/preview/home.png
Normal file
After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 119 KiB |
BIN
doc/preview/multiwindow.png
Normal file
After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 703 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 101 KiB |
@ -1,22 +1,25 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import QtMultimedia
|
||||||
import FluentUI 1.0
|
import FluentUI
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id:app
|
id:app
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
|
//初始化一个MediaPlayer,解决macos切换到T_MediaPalyer页面崩溃问题
|
||||||
|
MediaPlayer{}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
FluApp.init(app,properties)
|
FluApp.init(app,properties)
|
||||||
FluTheme.isDark = false
|
FluTheme.frameless = ("windows" === Qt.platform.os)
|
||||||
|
FluTheme.dark = false
|
||||||
FluApp.routes = {
|
FluApp.routes = {
|
||||||
"/":"qrc:/MainPage.qml",
|
"/":"qrc:/page/MainPage.qml",
|
||||||
"/Setting":"qrc:/SettingPage.qml",
|
"/about":"qrc:/page/AboutPage.qml",
|
||||||
"/About":"qrc:/AboutPage.qml",
|
"/login":"qrc:/page/LoginPage.qml",
|
||||||
"/Installer":"qrc:/Installer.qml",
|
"/chat":"qrc:/page/ChatPage.qml",
|
||||||
"/Uninstall":"qrc:/Uninstall.qml"
|
"/media":"qrc:/page/MediaPage.qml",
|
||||||
}
|
}
|
||||||
FluApp.initialRoute = "/"
|
FluApp.initialRoute = "/"
|
||||||
FluApp.run()
|
FluApp.run()
|
||||||
|
86
example/CMakeLists.txt
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(example)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(platform 64)
|
||||||
|
else()
|
||||||
|
set(platform 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/debug)
|
||||||
|
else()
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/release)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Qt6 COMPONENTS Core Quick QuickControls2 Concurrent Network Multimedia REQUIRED)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
ChatController.cpp
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(HEADERS
|
||||||
|
ChatController.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(RESOURCES
|
||||||
|
qml.qrc
|
||||||
|
)
|
||||||
|
|
||||||
|
set(RC_ICONS
|
||||||
|
favicon.ico
|
||||||
|
)
|
||||||
|
|
||||||
|
qt_add_resources(QT_RESOURCES ${RESOURCES})
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${QT_RESOURCES} ${RC_ICONS})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(platform EQUAL 32)
|
||||||
|
file(GLOB DLL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../third/Win_x86/*.dll)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${DLL_FILES}
|
||||||
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
file(GLOB DLL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../third/Win_x64/*.dll)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${DLL_FILES}
|
||||||
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
|
QT_DEPRECATED_WARNINGS
|
||||||
|
QT_NO_WARNING_OUTPUT
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
|
Qt6::Core
|
||||||
|
Qt6::Quick
|
||||||
|
Qt6::QuickControls2
|
||||||
|
Qt6::Concurrent
|
||||||
|
Qt6::Network
|
||||||
|
Qt6::Multimedia
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE WIN32 _WINDOWS)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE dwmapi user32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST Info.plist
|
||||||
|
)
|
||||||
|
endif()
|
56
example/ChatController.cpp
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#include "ChatController.h"
|
||||||
|
|
||||||
|
ChatController::ChatController(QObject *parent)
|
||||||
|
: QObject{parent}
|
||||||
|
{
|
||||||
|
isLoading(false);
|
||||||
|
networkManager = new QNetworkAccessManager(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ChatController::sendMessage(const QString& text){
|
||||||
|
isLoading(true);
|
||||||
|
QUrl apiUrl("https://api.openai.com/v1/chat/completions");
|
||||||
|
QNetworkRequest request(apiUrl);
|
||||||
|
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
|
request.setRawHeader("Authorization", QString::fromStdString("Bearer %1").arg(QString::fromUtf8(QByteArray::fromBase64(baseKey.toUtf8()))).toUtf8());
|
||||||
|
QJsonObject requestData;
|
||||||
|
requestData.insert("model", "gpt-3.5-turbo");
|
||||||
|
messages.append(createMessage("user",text));
|
||||||
|
requestData.insert("messages", messages);
|
||||||
|
QJsonDocument requestDoc(requestData);
|
||||||
|
QByteArray requestDataBytes = requestDoc.toJson();
|
||||||
|
QNetworkReply* reply = networkManager->post(request, requestDataBytes);
|
||||||
|
connect(reply, &QNetworkReply::finished,this, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
QString responseString = QString::fromUtf8(reply->readAll());
|
||||||
|
qDebug() << responseString;
|
||||||
|
QJsonDocument doc = QJsonDocument::fromJson(responseString.toUtf8());
|
||||||
|
QJsonObject jsonObj = doc.object();
|
||||||
|
QString text = jsonObj.value("choices").toArray().at(0).toObject().value("message").toObject().value("content").toString();
|
||||||
|
if(text.isEmpty()){
|
||||||
|
text = "响应错误:content为空数据";
|
||||||
|
}else{
|
||||||
|
messages.append(createMessage("assistant",text));
|
||||||
|
}
|
||||||
|
responseData(text.trimmed());
|
||||||
|
} else {
|
||||||
|
responseData("网络错误:"+reply->errorString());
|
||||||
|
}
|
||||||
|
isLoading(false);
|
||||||
|
reply->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QJsonObject ChatController::createMessage(const QString& role,const QString& content){
|
||||||
|
QJsonObject message;
|
||||||
|
message.insert("role",role);
|
||||||
|
message.insert("content",content);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatController::clipText(const QString& text){
|
||||||
|
qDebug()<<text;
|
||||||
|
QClipboard *clipboard = QGuiApplication::clipboard();
|
||||||
|
clipboard->setText(text);
|
||||||
|
}
|
35
example/ChatController.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#ifndef CHATCONTROLLER_H
|
||||||
|
#define CHATCONTROLLER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <QFile>
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
class ChatController : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY_AUTO(bool,isLoading)
|
||||||
|
Q_PROPERTY_AUTO(QString,responseData);
|
||||||
|
public:
|
||||||
|
explicit ChatController(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
Q_INVOKABLE void sendMessage(const QString& text);
|
||||||
|
Q_INVOKABLE void clipText(const QString& text);
|
||||||
|
private:
|
||||||
|
QJsonObject createMessage(const QString& role,const QString& content);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QNetworkAccessManager* networkManager;
|
||||||
|
QJsonArray messages;
|
||||||
|
QString baseKey = "c2stbXgxWm5MQkZ5TzhNYzNmRWl6eDZUM0JsYmtGSnNBWjNiakJjSXB6WGN3QW9KSk11";
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHATCONTROLLER_H
|
29
example/Info.plist
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>example</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.zhuzichu.example</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.13</string>
|
||||||
|
<key>NOTE</key>
|
||||||
|
<string>This file was generated by Qt/QMake.</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -1,180 +0,0 @@
|
|||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Window 2.15
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import QtGraphicalEffects 1.15
|
|
||||||
|
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluWindow {
|
|
||||||
id:rootwindow
|
|
||||||
width: 800
|
|
||||||
height: 600
|
|
||||||
title: "FluentUI"
|
|
||||||
minimumWidth: 500
|
|
||||||
minimumHeight: 400
|
|
||||||
|
|
||||||
FluAppBar{
|
|
||||||
id:appbar
|
|
||||||
title: "FluentUI"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FluObject{
|
|
||||||
id:original_items
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Inputs"
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Buttons"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Buttons.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Slider"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Slider.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"ToggleSwitch"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_ToggleSwitch.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Form"
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"TextBox"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_TextBox.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Surface"
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"InfoBar"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_InfoBar.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Progress"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Progress.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Rectangle"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Rectangle.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Expander"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Expander.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Popus"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Dialog"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Dialog.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Navigation"
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"TreeView"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_TreeView.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItemHeader{
|
|
||||||
title:"Theming"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Theme"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Theme.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Awesome"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Awesome.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
|
||||||
title:"Typography"
|
|
||||||
onTap:{
|
|
||||||
nav_view.push("qrc:/T_Typography.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
FluObject{
|
|
||||||
id:footer_items
|
|
||||||
FluPaneItemSeparator{}
|
|
||||||
FluPaneItem{
|
|
||||||
title:"意见反馈"
|
|
||||||
onTap:{
|
|
||||||
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/issues/new")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
|
||||||
title:"关于"
|
|
||||||
onTap:{
|
|
||||||
FluApp.navigate("/About")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FluNavigationView{
|
|
||||||
id:nav_view
|
|
||||||
anchors{
|
|
||||||
top: appbar.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
items:original_items
|
|
||||||
footerItems:footer_items
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
nav_view.setCurrentIndex(1)
|
|
||||||
nav_view.push("qrc:/T_Buttons.qml")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
import QtQuick 2.15
|
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluWindow {
|
|
||||||
|
|
||||||
width: 500
|
|
||||||
height: 600
|
|
||||||
title:"设置"
|
|
||||||
|
|
||||||
FluAppBar{
|
|
||||||
id:appbar
|
|
||||||
title:"设置"
|
|
||||||
}
|
|
||||||
|
|
||||||
FluText{
|
|
||||||
text:"设置"
|
|
||||||
fontStyle: FluText.Display
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
FluApp.navigate("/About")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,13 +1,17 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import FluentUI 1.0
|
import FluentUI
|
||||||
|
|
||||||
FluContentPage {
|
FluContentPage {
|
||||||
|
|
||||||
title:"Awesome"
|
title:"Awesome"
|
||||||
|
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluTextBox{
|
FluTextBox{
|
||||||
id:text_box
|
id:text_box
|
||||||
placeholderText: "请输入关键字"
|
placeholderText: "请输入关键字"
|
||||||
@ -30,8 +34,8 @@ FluContentPage {
|
|||||||
}
|
}
|
||||||
GridView{
|
GridView{
|
||||||
id:grid_view
|
id:grid_view
|
||||||
cellWidth: 120
|
cellWidth: 80
|
||||||
cellHeight: 60
|
cellHeight: 80
|
||||||
clip: true
|
clip: true
|
||||||
model:FluApp.awesomelist()
|
model:FluApp.awesomelist()
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
@ -43,11 +47,11 @@ FluContentPage {
|
|||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: 120
|
width: 68
|
||||||
height: 60
|
height: 80
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
id:item_icon
|
id:item_icon
|
||||||
icon:modelData.icon
|
iconSource:modelData.icon
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var text ="FluentIcons."+modelData.name;
|
var text ="FluentIcons."+modelData.name;
|
||||||
@ -57,10 +61,13 @@ FluContentPage {
|
|||||||
}
|
}
|
||||||
FluText {
|
FluText {
|
||||||
id:item_name
|
id:item_name
|
||||||
font.pixelSize: 10;
|
font.pixelSize: 10
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: item_icon.bottom
|
anchors.top: item_icon.bottom
|
||||||
|
width:parent.width
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
text: modelData.name
|
text: modelData.name
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
103
example/T_Badge.qml
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Badge"
|
||||||
|
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 106
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 15
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"一般出现在通知图标或头像的右上角,用于显示需要处理的消息条数"
|
||||||
|
}
|
||||||
|
|
||||||
|
Row{
|
||||||
|
spacing: 20
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
isDot:true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:99
|
||||||
|
color: Qt.rgba(250/255,173/255,20/255,1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
width: 40
|
||||||
|
height: 40
|
||||||
|
radius: 8
|
||||||
|
color: Qt.rgba(191/255,191/255,191/255,1)
|
||||||
|
FluBadge{
|
||||||
|
count:99
|
||||||
|
color: Qt.rgba(82/255,196/255,26/255,1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,22 +1,62 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import FluentUI 1.0
|
import FluentUI
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
title:"Buttons"
|
title:"Buttons"
|
||||||
|
|
||||||
spacing: 20
|
spacing: 20
|
||||||
|
|
||||||
FluArea{
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluText{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
width: parent.width
|
text:"支持Tab键切换焦点,空格键执行点击事件"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 68
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
FluTextButton{
|
||||||
|
disabled:text_button_switch.selected
|
||||||
|
text:"Text Button"
|
||||||
|
onClicked: {
|
||||||
|
showInfo("点击Text Button")
|
||||||
|
}
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row{
|
||||||
|
spacing: 5
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
FluToggleSwitch{
|
||||||
|
id:text_button_switch
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
text:"Disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 68
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
FluButton{
|
FluButton{
|
||||||
disabled:button_switch.checked
|
disabled:button_switch.selected
|
||||||
|
text:"Standard Button"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
showInfo("点击StandardButton")
|
showInfo("点击StandardButton")
|
||||||
}
|
}
|
||||||
@ -35,20 +75,19 @@ FluScrollablePage{
|
|||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
id:button_switch
|
id:button_switch
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Disabled"
|
text:"Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
width: parent.width
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 68
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
FluFilledButton{
|
FluFilledButton{
|
||||||
disabled:filled_button_switch.checked
|
disabled:filled_button_switch.selected
|
||||||
|
text:"Filled Button"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
showWarning("点击FilledButton")
|
showWarning("点击FilledButton")
|
||||||
}
|
}
|
||||||
@ -67,8 +106,6 @@ FluScrollablePage{
|
|||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
id:filled_button_switch
|
id:filled_button_switch
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Disabled"
|
text:"Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,13 +113,14 @@ FluScrollablePage{
|
|||||||
|
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
width: parent.width
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 68
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
FluIconButton{
|
FluIconButton{
|
||||||
icon:FluentIcons.FA_close
|
iconSource:FluentIcons.ChromeCloseContrast
|
||||||
disabled:icon_button_switch.checked
|
disabled:icon_button_switch.selected
|
||||||
|
iconSize: 15
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
@ -101,15 +139,54 @@ FluScrollablePage{
|
|||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
id:icon_button_switch
|
id:icon_button_switch
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Disabled"
|
text:"Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
width: parent.width
|
Layout.fillWidth: true
|
||||||
|
height: 68
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
FluDropDownButton{
|
||||||
|
disabled:drop_down_button_switch.selected
|
||||||
|
text:"DropDownButton"
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
items:[
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Menu_1"
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Menu_2"
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Menu_3"
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Menu_4"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Row{
|
||||||
|
spacing: 5
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
FluToggleSwitch{
|
||||||
|
id:drop_down_button_switch
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
text:"Disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
height: 100
|
height: 100
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
@ -124,8 +201,8 @@ FluScrollablePage{
|
|||||||
property int selecIndex : 0
|
property int selecIndex : 0
|
||||||
model: 3
|
model: 3
|
||||||
delegate: FluRadioButton{
|
delegate: FluRadioButton{
|
||||||
checked : repeater.selecIndex===index
|
selected : repeater.selecIndex===index
|
||||||
disabled:radio_button_switch.checked
|
disabled:radio_button_switch.selected
|
||||||
text:"Radio Button_"+index
|
text:"Radio Button_"+index
|
||||||
onClicked:{
|
onClicked:{
|
||||||
repeater.selecIndex = index
|
repeater.selecIndex = index
|
||||||
@ -144,8 +221,6 @@ FluScrollablePage{
|
|||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
id:radio_button_switch
|
id:radio_button_switch
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Disabled"
|
text:"Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,12 +228,13 @@ FluScrollablePage{
|
|||||||
|
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
width: parent.width
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 68
|
||||||
paddings: 10
|
paddings: 10
|
||||||
|
|
||||||
FluCheckBox{
|
FluCheckBox{
|
||||||
disabled:icon_button_check.checked
|
disabled:check_box_switch.selected
|
||||||
|
text:"Check Box"
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
@ -173,10 +249,8 @@ FluScrollablePage{
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
id:icon_button_check
|
id:check_box_switch
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Disabled"
|
text:"Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
38
example/T_CalendarPicker.qml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"CalendarPicker"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 350
|
||||||
|
paddings: 10
|
||||||
|
FluCalendarView{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 80
|
||||||
|
paddings: 10
|
||||||
|
ColumnLayout{
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluCalendarPicker{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
example/T_Carousel.qml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Carousel"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Column{
|
||||||
|
spacing: 15
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left:parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"轮播图,支持无限轮播,无限滑动,用ListView实现的组件"
|
||||||
|
}
|
||||||
|
FluCarousel{
|
||||||
|
id:carousel
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 5
|
||||||
|
Component.onCompleted: {
|
||||||
|
carousel.setData([{url:"qrc:/res/image/banner_1.jpg"},{url:"qrc:/res/image/banner_2.jpg"},{url:"qrc:/res/image/banner_3.jpg"}])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
example/T_CheckBox.qml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"CheckBox"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluCheckBox{
|
||||||
|
Layout.topMargin: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
FluCheckBox{
|
||||||
|
Layout.topMargin: 20
|
||||||
|
text:"Text"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
59
example/T_ColorPicker.qml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"ColorPicker"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 280
|
||||||
|
Layout.topMargin: 20
|
||||||
|
paddings: 10
|
||||||
|
ColumnLayout{
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left:parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"此颜色组件是Github上的开源项目"
|
||||||
|
}
|
||||||
|
FluTextButton{
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: 0
|
||||||
|
text:"https://github.com/rshest/qml-colorpicker"
|
||||||
|
onClicked: {
|
||||||
|
Qt.openUrlExternally(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluColorView{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 60
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
FluText{
|
||||||
|
text:"点击选择颜色->"
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
}
|
||||||
|
FluColorPicker{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
63
example/T_DatePicker.qml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"TimePicker"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 80
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text:"showYear=true"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluDatePicker{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 80
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text:"showYear=false"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluDatePicker{
|
||||||
|
showYear:false
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Dialog"
|
title:"Dialog"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluContentDialog{
|
FluContentDialog{
|
||||||
id:dialog
|
id:dialog
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Expander"
|
title:"Expander"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluExpander{
|
FluExpander{
|
||||||
headerText:"打开一个单选框"
|
headerText:"打开一个单选框"
|
||||||
@ -26,7 +29,7 @@ FluScrollablePage{
|
|||||||
property int selecIndex : 0
|
property int selecIndex : 0
|
||||||
model: 3
|
model: 3
|
||||||
delegate: FluRadioButton{
|
delegate: FluRadioButton{
|
||||||
checked : repeater.selecIndex===index
|
selected : repeater.selecIndex===index
|
||||||
text:"Radio Button_"+index
|
text:"Radio Button_"+index
|
||||||
onClicked:{
|
onClicked:{
|
||||||
repeater.selecIndex = index
|
repeater.selecIndex = index
|
||||||
@ -42,13 +45,15 @@ FluScrollablePage{
|
|||||||
headerText:"打开一个滑动文本框"
|
headerText:"打开一个滑动文本框"
|
||||||
Item{
|
Item{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ScrollView{
|
Flickable{
|
||||||
id:scrollview
|
id:scrollview
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
contentWidth: parent.width
|
contentWidth: width
|
||||||
|
contentHeight: text_info.height
|
||||||
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
FluText{
|
FluText{
|
||||||
id:test
|
id:text_info
|
||||||
width: scrollview.width
|
width: scrollview.width
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
padding: 14
|
padding: 14
|
||||||
|
78
example/T_FlipView.qml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"FlipView"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 340
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
ColumnLayout{
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
FluText{
|
||||||
|
text:"水平方向的FlipView"
|
||||||
|
}
|
||||||
|
FluFlipView{
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_1.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
sourceSize: Qt.size(400,300)
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_2.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_3.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 340
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
ColumnLayout{
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
FluText{
|
||||||
|
text:"垂直方向的FlipView"
|
||||||
|
}
|
||||||
|
FluFlipView{
|
||||||
|
vertical:true
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_1.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
sourceSize: Qt.size(400,300)
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_2.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
source: "qrc:/res/image/banner_3.jpg"
|
||||||
|
asynchronous: true
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
271
example/T_Home.qml
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import "qrc:///global/"
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:0
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
ListModel{
|
||||||
|
id:model_header
|
||||||
|
ListElement{
|
||||||
|
icon:"qrc:/res/image/ic_home_github.png"
|
||||||
|
title:"FluentUI GitHub"
|
||||||
|
desc:"The latest FluentUI controls and styles for your applications."
|
||||||
|
url:"https://github.com/zhuzichu520/FluentUI"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Item{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 320
|
||||||
|
Image {
|
||||||
|
fillMode:Image.PreserveAspectCrop
|
||||||
|
anchors.fill: parent
|
||||||
|
verticalAlignment: Qt.AlignTop
|
||||||
|
source: "qrc:/res/image/bg_home_header.png"
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
anchors.fill: parent
|
||||||
|
gradient: Gradient{
|
||||||
|
GradientStop { position: 0.8; color: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(1,1,1,0) }
|
||||||
|
GradientStop { position: 1.0; color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"FluentUI Gallery"
|
||||||
|
fontStyle: FluText.TitleLarge
|
||||||
|
anchors{
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
topMargin: 20
|
||||||
|
leftMargin: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListView{
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
orientation: ListView.Horizontal
|
||||||
|
height: 240
|
||||||
|
model: model_header
|
||||||
|
header: Item{height: 10;width: 10}
|
||||||
|
footer: Item{height: 10;width: 10}
|
||||||
|
ScrollBar.horizontal: FluScrollBar{
|
||||||
|
id: scrollbar_header
|
||||||
|
}
|
||||||
|
clip: false
|
||||||
|
delegate:Item{
|
||||||
|
width: 220
|
||||||
|
height: 240
|
||||||
|
FluArea{
|
||||||
|
radius: 8
|
||||||
|
width: 200
|
||||||
|
height: 220
|
||||||
|
anchors.centerIn: parent
|
||||||
|
Rectangle{
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: 8
|
||||||
|
color:{
|
||||||
|
if(FluTheme.dark){
|
||||||
|
if(item_mouse.containsMouse){
|
||||||
|
return Qt.rgba(1,1,1,0.03)
|
||||||
|
}
|
||||||
|
return Qt.rgba(0,0,0,0)
|
||||||
|
}else{
|
||||||
|
if(item_mouse.containsMouse){
|
||||||
|
return Qt.rgba(0,0,0,0.03)
|
||||||
|
}
|
||||||
|
return Qt.rgba(0,0,0,0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
Image {
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.preferredWidth: 50
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
source: model.icon
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text: model.title
|
||||||
|
fontStyle: FluText.Body
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text: model.desc
|
||||||
|
Layout.topMargin: 5
|
||||||
|
Layout.preferredWidth: 160
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
color: FluColors.Grey120
|
||||||
|
font.pixelSize: 12
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluIcon{
|
||||||
|
iconSource: FluentIcons.OpenInNewWindow
|
||||||
|
iconSize: 15
|
||||||
|
anchors{
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 10
|
||||||
|
bottomMargin: 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MouseArea{
|
||||||
|
id:item_mouse
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onWheel: (wheel)=>{
|
||||||
|
if (wheel.angleDelta.y > 0) scrollbar_header.decrease()
|
||||||
|
else scrollbar_header.increase()
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
Qt.openUrlExternally(model.url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component{
|
||||||
|
id:com_item
|
||||||
|
Item{
|
||||||
|
width: 320
|
||||||
|
height: 120
|
||||||
|
FluArea{
|
||||||
|
radius: 8
|
||||||
|
width: 300
|
||||||
|
height: 100
|
||||||
|
anchors.centerIn: parent
|
||||||
|
Rectangle{
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: 8
|
||||||
|
color:{
|
||||||
|
if(FluTheme.dark){
|
||||||
|
if(item_mouse.containsMouse){
|
||||||
|
return Qt.rgba(1,1,1,0.03)
|
||||||
|
}
|
||||||
|
return Qt.rgba(0,0,0,0)
|
||||||
|
}else{
|
||||||
|
if(item_mouse.containsMouse){
|
||||||
|
return Qt.rgba(0,0,0,0.03)
|
||||||
|
}
|
||||||
|
return Qt.rgba(0,0,0,0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
id:item_icon
|
||||||
|
height: 40
|
||||||
|
width: 40
|
||||||
|
source: modelData.image
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 20
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
id:item_title
|
||||||
|
text:modelData.title
|
||||||
|
fontStyle: FluText.BodyStrong
|
||||||
|
anchors{
|
||||||
|
left: item_icon.right
|
||||||
|
leftMargin: 20
|
||||||
|
top: item_icon.top
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
id:item_desc
|
||||||
|
text:modelData.desc
|
||||||
|
color:FluColors.Grey120
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
elide: Text.ElideRight
|
||||||
|
fontStyle: FluText.Caption
|
||||||
|
maximumLineCount: 2
|
||||||
|
anchors{
|
||||||
|
left: item_title.left
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 20
|
||||||
|
top: item_title.bottom
|
||||||
|
topMargin: 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
height: 12
|
||||||
|
width: 12
|
||||||
|
radius: 6
|
||||||
|
color: FluTheme.primaryColor.dark
|
||||||
|
anchors{
|
||||||
|
right: parent.right
|
||||||
|
top: parent.top
|
||||||
|
rightMargin: 14
|
||||||
|
topMargin: 14
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
id:item_mouse
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: {
|
||||||
|
ItemsOriginal.startPageByItem(modelData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text: "Recently added samples"
|
||||||
|
fontStyle: FluText.Title
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
GridView{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: contentHeight
|
||||||
|
cellHeight: 120
|
||||||
|
cellWidth: 320
|
||||||
|
model:ItemsOriginal.getRecentlyAddedData()
|
||||||
|
interactive: false
|
||||||
|
delegate: com_item
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text: "Recently updated samples"
|
||||||
|
fontStyle: FluText.Title
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
GridView{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: contentHeight
|
||||||
|
cellHeight: 120
|
||||||
|
cellWidth: 320
|
||||||
|
interactive: false
|
||||||
|
model: ItemsOriginal.getRecentlyUpdatedData()
|
||||||
|
delegate: com_item
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"InfoBar"
|
title:"InfoBar"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluButton{
|
FluButton{
|
||||||
text:"Info"
|
text:"Info"
|
||||||
|
56
example/T_MediaPlayer.qml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"MediaPlayer"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
if(visible){
|
||||||
|
player.play()
|
||||||
|
}else{
|
||||||
|
player.pause()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 320
|
||||||
|
Layout.topMargin: 20
|
||||||
|
paddings: 10
|
||||||
|
ColumnLayout{
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left:parent.left
|
||||||
|
}
|
||||||
|
FluMediaPlayer{
|
||||||
|
id:player
|
||||||
|
source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 68
|
||||||
|
Layout.topMargin: 20
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
FluButton{
|
||||||
|
text:"跳转到视频播放器窗口"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked:{
|
||||||
|
FluApp.navigate("/media",{source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
54
example/T_Menu.qml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Menu"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluButton{
|
||||||
|
text:"左击菜单"
|
||||||
|
Layout.topMargin: 20
|
||||||
|
onClicked:{
|
||||||
|
menu.popup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluButton{
|
||||||
|
text:"右击菜单"
|
||||||
|
Layout.topMargin: 20
|
||||||
|
onClicked: {
|
||||||
|
showSuccess("请按鼠标右击")
|
||||||
|
}
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.RightButton
|
||||||
|
onClicked: {
|
||||||
|
menu.popup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluMenu{
|
||||||
|
id:menu
|
||||||
|
FluMenuItem{
|
||||||
|
text:"删除"
|
||||||
|
onClicked: {
|
||||||
|
showError("删除")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluMenuItem{
|
||||||
|
text:"修改"
|
||||||
|
onClicked: {
|
||||||
|
showError("修改")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
78
example/T_MultiWindow.qml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"MultiWindow"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
property string password: ""
|
||||||
|
|
||||||
|
property var loginPageRegister: registerForPageResult("/login")
|
||||||
|
|
||||||
|
Connections{
|
||||||
|
target: loginPageRegister
|
||||||
|
function onResult(data)
|
||||||
|
{
|
||||||
|
password = data.password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 100
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 15
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"页面跳转,不携带任何参数"
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:"点击跳转"
|
||||||
|
onClicked: {
|
||||||
|
FluApp.navigate("/about")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 130
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 15
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"页面跳转,并携带参数用户名:zhuzichu"
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:"点击跳转到登录"
|
||||||
|
onClicked: {
|
||||||
|
loginPageRegister.launch({username:"zhuzichu"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text:"登录窗口返回过来的密码->"+password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
51
example/T_Pivot.qml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Pivot"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 400
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
FluPivot{
|
||||||
|
anchors.fill: parent
|
||||||
|
FluPivotItem{
|
||||||
|
title:"All"
|
||||||
|
contentItem:FluText{
|
||||||
|
text:"All emails go here."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPivotItem{
|
||||||
|
title:"Unread"
|
||||||
|
contentItem:FluText{
|
||||||
|
text:"Unread emails go here."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPivotItem{
|
||||||
|
title:"Flagged"
|
||||||
|
contentItem:FluText{
|
||||||
|
text:"Flagged emails go here."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPivotItem{
|
||||||
|
title:"Urgent"
|
||||||
|
contentItem:FluText{
|
||||||
|
text:"Urgent emails go here."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Progress"
|
title:"Progress"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluProgressBar{
|
FluProgressBar{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Rectangle"
|
title:"Rectangle"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
@ -49,7 +52,7 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"配合图片使用"
|
text:"配合图片使用"
|
||||||
fontStyle: FluText.Subtitle
|
fontStyle: FluText.SubTitle
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
RowLayout{
|
RowLayout{
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Slider"
|
title:"Slider"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluSlider{
|
FluSlider{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
Layout.leftMargin: 15
|
|
||||||
value: 50
|
value: 50
|
||||||
|
Layout.leftMargin: 10
|
||||||
}
|
}
|
||||||
FluSlider{
|
FluSlider{
|
||||||
orientation:FluSlider.Vertical
|
vertical:true
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
Layout.leftMargin: 15
|
Layout.leftMargin: 10
|
||||||
|
Layout.bottomMargin: 20
|
||||||
value: 50
|
value: 50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
113
example/T_TabView.qml
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"TabView"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
property var colors : [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green]
|
||||||
|
|
||||||
|
Component{
|
||||||
|
id:com_page
|
||||||
|
Rectangle{
|
||||||
|
anchors.fill: parent
|
||||||
|
color: argument
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function newTab(){
|
||||||
|
tab_view.appendTab("qrc:/res/image/favicon.ico","Document "+tab_view.count(),com_page,colors[Math.floor(Math.random() * 8)].dark)
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
newTab()
|
||||||
|
newTab()
|
||||||
|
newTab()
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 50
|
||||||
|
paddings: 10
|
||||||
|
RowLayout{
|
||||||
|
spacing: 14
|
||||||
|
FluDropDownButton{
|
||||||
|
id:btn_tab_width_behavior
|
||||||
|
Layout.preferredWidth: 140
|
||||||
|
text:"Equal"
|
||||||
|
items:[
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Equal"
|
||||||
|
onClicked: {
|
||||||
|
btn_tab_width_behavior.text = text
|
||||||
|
tab_view.tabWidthBehavior = FluTabView.Equal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"SizeToContent"
|
||||||
|
onClicked: {
|
||||||
|
btn_tab_width_behavior.text = text
|
||||||
|
tab_view.tabWidthBehavior = FluTabView.SizeToContent
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Compact"
|
||||||
|
onClicked: {
|
||||||
|
btn_tab_width_behavior.text = text
|
||||||
|
tab_view.tabWidthBehavior = FluTabView.Compact
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
FluDropDownButton{
|
||||||
|
id:btn_close_button_visibility
|
||||||
|
text:"Always"
|
||||||
|
Layout.preferredWidth: 120
|
||||||
|
items:[
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Nerver"
|
||||||
|
onClicked: {
|
||||||
|
btn_close_button_visibility.text = text
|
||||||
|
tab_view.closeButtonVisibility = FluTabView.Nerver
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Always"
|
||||||
|
onClicked: {
|
||||||
|
btn_close_button_visibility.text = text
|
||||||
|
tab_view.closeButtonVisibility = FluTabView.Always
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FluMenuItem{
|
||||||
|
text:"OnHover"
|
||||||
|
onClicked: {
|
||||||
|
btn_close_button_visibility.text = text
|
||||||
|
tab_view.closeButtonVisibility = FluTabView.OnHover
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 5
|
||||||
|
height: 400
|
||||||
|
paddings: 10
|
||||||
|
FluTabView{
|
||||||
|
id:tab_view
|
||||||
|
onNewPressed:{
|
||||||
|
newTab()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,29 +1,40 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"TextBox"
|
title:"TextBox"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluTextBox{
|
FluTextBox{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
placeholderText: "单行输入框"
|
placeholderText: "单行输入框"
|
||||||
Layout.preferredWidth: 300
|
Layout.preferredWidth: 300
|
||||||
|
disabled:toggle_switch.selected
|
||||||
}
|
}
|
||||||
FluMultiLineTextBox{
|
FluMultilineTextBox{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
Layout.preferredWidth: 300
|
Layout.preferredWidth: 300
|
||||||
placeholderText: "多行输入框"
|
placeholderText: "多行输入框"
|
||||||
|
disabled:toggle_switch.selected
|
||||||
}
|
}
|
||||||
FluAutoSuggestBox{
|
FluAutoSuggestBox{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
values:generateRandomNames(100)
|
items:generateRandomNames(100)
|
||||||
placeholderText: "AutoSuggestBox"
|
placeholderText: "AutoSuggestBox"
|
||||||
Layout.preferredWidth: 300
|
Layout.preferredWidth: 300
|
||||||
|
disabled:toggle_switch.selected
|
||||||
|
}
|
||||||
|
|
||||||
|
FluToggleSwitch{
|
||||||
|
id:toggle_switch
|
||||||
|
text:"Disabled"
|
||||||
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateRandomNames(numNames) {
|
function generateRandomNames(numNames) {
|
||||||
@ -40,7 +51,7 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < numNames; i++) {
|
for (let i = 0; i < numNames; i++) {
|
||||||
const name = generateRandomName();
|
const name = generateRandomName();
|
||||||
names.push(name);
|
names.push({title:name});
|
||||||
}
|
}
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,31 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"Theme"
|
title:"Theme"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
Repeater{
|
Repeater{
|
||||||
model: [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green]
|
model: [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green]
|
||||||
delegate: Rectangle{
|
delegate: FluRectangle{
|
||||||
width: 42
|
width: 42
|
||||||
height: 42
|
height: 42
|
||||||
radius: 4
|
radius: [4,4,4,4]
|
||||||
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
|
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
|
||||||
FluIcon {
|
FluIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
icon: FluentIcons.FA_check
|
iconSource: FluentIcons.AcceptMedium
|
||||||
iconSize: 15
|
iconSize: 15
|
||||||
visible: modelData === FluTheme.primaryColor
|
visible: modelData === FluTheme.primaryColor
|
||||||
color: FluTheme.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||||
}
|
}
|
||||||
MouseArea{
|
MouseArea{
|
||||||
id:mouse_item
|
id:mouse_item
|
||||||
@ -38,24 +40,22 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"夜间模式"
|
text:"夜间模式"
|
||||||
fontStyle: FluText.Subtitle
|
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
checked: FluTheme.isDark
|
selected: FluTheme.dark
|
||||||
onClickFunc:function(){
|
clickFunc:function(){
|
||||||
FluTheme.isDark = !FluTheme.isDark
|
FluTheme.dark = !FluTheme.dark
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"无边框"
|
text:"native文本渲染"
|
||||||
fontStyle: FluText.Subtitle
|
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
checked: FluTheme.isFrameless
|
selected: FluTheme.nativeText
|
||||||
onClickFunc:function(){
|
clickFunc:function(){
|
||||||
FluTheme.isFrameless = !FluTheme.isFrameless
|
FluTheme.nativeText = !FluTheme.nativeText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
63
example/T_TimePicker.qml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"TimePicker"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 80
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text:"hourFormat=FluTimePicker.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluTimePicker{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 80
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
text:"hourFormat=FluTimePicker.HH"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluTimePicker{
|
||||||
|
hourFormat:FluTimePicker.HH
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,15 +1,21 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import FluentUI
|
||||||
import FluentUI 1.0
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"ToggleSwitch"
|
title:"ToggleSwitch"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
|
FluToggleSwitch{
|
||||||
|
Layout.topMargin: 20
|
||||||
|
text:"Text"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
77
example/T_Tooltip.qml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Tooltip"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
Layout.topMargin: 20
|
||||||
|
text:"鼠标悬停不动,弹出Tooltip"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 68
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 5
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"FluIconButton的text属性自带Tooltip效果"
|
||||||
|
}
|
||||||
|
FluIconButton{
|
||||||
|
iconSource:FluentIcons.ChromeCloseContrast
|
||||||
|
iconSize: 15
|
||||||
|
text:"删除"
|
||||||
|
onClicked:{
|
||||||
|
showSuccess("点击IconButton")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20
|
||||||
|
height: 68
|
||||||
|
paddings: 10
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 5
|
||||||
|
anchors{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"给一个Button添加Tooltip效果"
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
id:button_1
|
||||||
|
text:"删除"
|
||||||
|
onClicked:{
|
||||||
|
showSuccess("点击一个Button")
|
||||||
|
}
|
||||||
|
FluTooltip{
|
||||||
|
visible: button_1.hovered
|
||||||
|
text:button_1.text
|
||||||
|
delay: 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,12 +1,15 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import FluentUI 1.0
|
import FluentUI
|
||||||
|
|
||||||
FluContentPage {
|
FluContentPage {
|
||||||
|
|
||||||
title:"TreeView"
|
title:"TreeView"
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
function randomName() {
|
function randomName() {
|
||||||
var names = ["张三", "李四", "王五", "赵六", "钱七", "孙八", "周九", "吴十"]
|
var names = ["张三", "李四", "王五", "赵六", "钱七", "孙八", "周九", "吴十"]
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import FluentUI 1.0
|
import FluentUI
|
||||||
|
|
||||||
FluContentPage {
|
FluContentPage {
|
||||||
|
|
||||||
title: "Typography"
|
title: "Typography"
|
||||||
property int textSize: 13
|
property int textSize: FluTheme.textSize
|
||||||
|
leftPadding:10
|
||||||
|
rightPadding:10
|
||||||
|
bottomPadding:20
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
slider.seek(0)
|
||||||
|
}
|
||||||
|
|
||||||
ScrollView{
|
ScrollView{
|
||||||
clip: true
|
clip: true
|
||||||
@ -37,13 +44,7 @@ FluContentPage {
|
|||||||
text:"Subtitle"
|
text:"Subtitle"
|
||||||
padding: 0
|
padding: 0
|
||||||
pixelSize: textSize
|
pixelSize: textSize
|
||||||
fontStyle: FluText.Subtitle
|
fontStyle: FluText.SubTitle
|
||||||
}
|
|
||||||
FluText{
|
|
||||||
text:"Body Large"
|
|
||||||
padding: 0
|
|
||||||
pixelSize: textSize
|
|
||||||
fontStyle: FluText.BodyLarge
|
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"Body Strong"
|
text:"Body Strong"
|
||||||
@ -68,17 +69,17 @@ FluContentPage {
|
|||||||
|
|
||||||
|
|
||||||
FluSlider{
|
FluSlider{
|
||||||
orientation:FluSlider.Vertical
|
id:slider
|
||||||
|
vertical:true
|
||||||
anchors{
|
anchors{
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 30
|
rightMargin: 45
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: 30
|
topMargin: 30
|
||||||
}
|
}
|
||||||
onValueChanged:{
|
onValueChanged:{
|
||||||
textSize = value/100*16+8
|
textSize = value/100*6+FluTheme.textSize
|
||||||
}
|
}
|
||||||
value: 31
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,41 @@
|
|||||||
QT += quick concurrent
|
QT += quick quickcontrols2 concurrent network multimedia
|
||||||
CONFIG += c++11
|
CONFIG += c++17
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT
|
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
ChatController.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
|
ChatController.cpp \
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
RESOURCES += qml.qrc
|
RESOURCES += qml.qrc
|
||||||
|
|
||||||
#qnx: target.path = /tmp/$${TARGET}/bin
|
RC_ICONS = favicon.ico
|
||||||
#else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|
||||||
#!isEmpty(target.path): INSTALLS += target
|
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
|
||||||
QML_IMPORT_PATH =
|
QML_IMPORT_PATH =
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
|
||||||
QML_DESIGNER_IMPORT_PATH =
|
QML_DESIGNER_IMPORT_PATH =
|
||||||
|
|
||||||
CONFIG(debug,debug|release) {
|
CONFIG(debug,debug|release) {
|
||||||
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/debug)
|
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/debug)
|
||||||
} else {
|
} else {
|
||||||
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/release)
|
DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/release)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
contains(QT_ARCH, i386) {
|
||||||
|
COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/Win_x86/*.dll) $$DESTDIR
|
||||||
|
QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, $$QMAKE_DIR_SEP)
|
||||||
|
} else {
|
||||||
|
COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/Win_x64/*.dll) $$DESTDIR
|
||||||
|
QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, $$QMAKE_DIR_SEP)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
mac: {
|
||||||
|
QMAKE_INFO_PLIST = Info.plist
|
||||||
|
}
|
||||||
|
BIN
example/favicon.ico
Normal file
After Width: | Height: | Size: 116 KiB |
21
example/global/ItemsFooter.qml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluObject{
|
||||||
|
id:footer_items
|
||||||
|
FluPaneItemSeparator{}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"意见反馈"
|
||||||
|
onTap:{
|
||||||
|
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/issues/new")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"关于"
|
||||||
|
onTap:{
|
||||||
|
FluApp.navigate("/about")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
321
example/global/ItemsOriginal.qml
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
|
||||||
|
FluObject{
|
||||||
|
|
||||||
|
property var navigationView
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Home"
|
||||||
|
icon:FluentIcons.Home
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Home.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Basic input"
|
||||||
|
icon:FluentIcons.CheckboxComposite
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Buttons"
|
||||||
|
image:"qrc:/res/image/control/Button.png"
|
||||||
|
recentlyUpdated:true
|
||||||
|
desc:"A control that responds to user input and raisesa Click event."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Buttons.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Slider"
|
||||||
|
image:"qrc:/res/image/control/Slider.png"
|
||||||
|
recentlyUpdated:true
|
||||||
|
desc:"A control that lets the user select from a rangeof values by moving a Thumb control along atrack."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Slider.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"CheckBox"
|
||||||
|
image:"qrc:/res/image/control/Checkbox.png"
|
||||||
|
recentlyUpdated:true
|
||||||
|
desc:"A control that a user can select or clear."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_CheckBox.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"ToggleSwitch"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_ToggleSwitch.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Form"
|
||||||
|
icon:FluentIcons.GridView
|
||||||
|
FluPaneItem{
|
||||||
|
title:"TextBox"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_TextBox.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"TimePicker"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_TimePicker.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"DatePicker"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_DatePicker.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"CalendarPicker"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_CalendarPicker.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"ColorPicker"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_ColorPicker.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Surface"
|
||||||
|
icon:FluentIcons.SurfaceHub
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"InfoBar"
|
||||||
|
image:"qrc:/res/image/control/InfoBar.png"
|
||||||
|
recentlyUpdated:true
|
||||||
|
desc:"An inline message to display app-wide statuschange information."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_InfoBar.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Progress"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Progress.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Badge"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Badge.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Rectangle"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Rectangle.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Carousel"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Carousel.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Expander"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Expander.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Popus"
|
||||||
|
icon:FluentIcons.ButtonMenu
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Dialog"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Dialog.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Tooltip"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Tooltip.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Menu"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Menu.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Navigation"
|
||||||
|
icon:FluentIcons.AllApps
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Pivot"
|
||||||
|
image:"qrc:/res/image/control/Pivot.png"
|
||||||
|
recentlyAdded:true
|
||||||
|
order:3
|
||||||
|
desc:"Presents information from different sources in atabbed view."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Pivot.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"TabView"
|
||||||
|
image:"qrc:/res/image/control/TabView.png"
|
||||||
|
recentlyAdded:true
|
||||||
|
order:1
|
||||||
|
desc:"A control that displays a collection of tabs thatcan be used to display several documents."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_TabView.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"TreeView"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_TreeView.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"MultiWindow"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_MultiWindow.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"FlipView"
|
||||||
|
image:"qrc:/res/image/control/FlipView.png"
|
||||||
|
recentlyAdded:true
|
||||||
|
order:2
|
||||||
|
desc:"Presents a collection of items that the user canflip through, one item at a time."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_FlipView.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Theming"
|
||||||
|
icon:FluentIcons.Brightness
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Theme"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Theme.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Awesome"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Awesome.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Typography"
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_Typography.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:"Media"
|
||||||
|
icon:FluentIcons.Media
|
||||||
|
FluPaneItem{
|
||||||
|
title:"MediaPlayer"
|
||||||
|
image:"qrc:/res/image/control/MediaPlayerElement.png"
|
||||||
|
recentlyAdded:true
|
||||||
|
order:0
|
||||||
|
desc:"A control to display video and image content."
|
||||||
|
onTap:{
|
||||||
|
navigationView.push("qrc:/T_MediaPlayer.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRecentlyAddedData(){
|
||||||
|
var arr = []
|
||||||
|
for(var i=0;i<children.length;i++){
|
||||||
|
var item = children[i]
|
||||||
|
if(item instanceof FluPaneItem && item.recentlyAdded){
|
||||||
|
arr.push(item)
|
||||||
|
}
|
||||||
|
if(item instanceof FluPaneItemExpander){
|
||||||
|
for(var j=0;j<item.children.length;j++){
|
||||||
|
var itemChild = item.children[j]
|
||||||
|
if(itemChild instanceof FluPaneItem && itemChild.recentlyAdded){
|
||||||
|
arr.push(itemChild)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.sort(function(o1,o2){ return o2.order-o1.order })
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRecentlyUpdatedData(){
|
||||||
|
var arr = []
|
||||||
|
var items = navigationView.getItems();
|
||||||
|
for(var i=0;i<items.length;i++){
|
||||||
|
var item = items[i]
|
||||||
|
if(item instanceof FluPaneItem && item.recentlyUpdated){
|
||||||
|
arr.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchData(){
|
||||||
|
var arr = []
|
||||||
|
var items = navigationView.getItems();
|
||||||
|
for(var i=0;i<items.length;i++){
|
||||||
|
var item = items[i]
|
||||||
|
if(item instanceof FluPaneItem){
|
||||||
|
arr.push({title:item.title,key:item.key})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
function startPageByItem(data){
|
||||||
|
var items = navigationView.getItems();
|
||||||
|
for(var i=0;i<items.length;i++){
|
||||||
|
var item = items[i]
|
||||||
|
if(item.key === data.key){
|
||||||
|
if(navigationView.getCurrentIndex() === i){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
item.tap()
|
||||||
|
navigationView.setCurrentIndex(i)
|
||||||
|
if(item.parent){
|
||||||
|
item.parent.isExpand = true
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
2
example/global/qmldir
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
singleton ItemsOriginal 1.0 ItemsOriginal.qml
|
||||||
|
singleton ItemsFooter 1.0 ItemsFooter.qml
|
@ -3,11 +3,13 @@
|
|||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
|
#include <QQuickStyle>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
#include "ChatController.h"
|
||||||
|
|
||||||
QMap<QString, QVariant> properties(){
|
QMap<QString, QVariant> properties(){
|
||||||
QMap<QString, QVariant> map;
|
QMap<QString, QVariant> map;
|
||||||
// map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance()));
|
// map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance()));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,10 +18,12 @@ int main(int argc, char *argv[])
|
|||||||
QCoreApplication::setOrganizationName("ZhuZiChu");
|
QCoreApplication::setOrganizationName("ZhuZiChu");
|
||||||
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
||||||
QCoreApplication::setApplicationName("FluentUI");
|
QCoreApplication::setApplicationName("FluentUI");
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QQuickStyle::setStyle("Basic");
|
||||||
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
|
|
||||||
|
qmlRegisterType<ChatController>("Controller",1,0,"ChatController");
|
||||||
|
|
||||||
QMapIterator<QString, QVariant> iterator(properties());
|
QMapIterator<QString, QVariant> iterator(properties());
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
iterator.next();
|
iterator.next();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Controls
|
||||||
import FluentUI 1.0
|
import QtQuick.Layouts
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
@ -16,6 +17,7 @@ FluWindow {
|
|||||||
FluAppBar{
|
FluAppBar{
|
||||||
id:appbar
|
id:appbar
|
||||||
title:"关于"
|
title:"关于"
|
||||||
|
width:parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout{
|
ColumnLayout{
|
||||||
@ -34,7 +36,7 @@ FluWindow {
|
|||||||
fontStyle: FluText.Title
|
fontStyle: FluText.Title
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"v1.0.3"
|
text:"v1.1.9"
|
||||||
fontStyle: FluText.Body
|
fontStyle: FluText.Body
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
}
|
}
|
||||||
@ -69,9 +71,25 @@ FluWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RowLayout{
|
||||||
|
spacing: 14
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 15
|
||||||
|
FluText{
|
||||||
|
id:text_info
|
||||||
|
text:"如果该项目对你有作用,就请点击上方链接给一个免费的star吧!"
|
||||||
|
ColorAnimation {
|
||||||
|
id: animation
|
||||||
|
target: text_info
|
||||||
|
property: "color"
|
||||||
|
from: "red"
|
||||||
|
to: "blue"
|
||||||
|
duration: 1000
|
||||||
|
running: true
|
||||||
|
loops: Animation.Infinite
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
262
example/page/ChatPage.qml
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import Controller
|
||||||
|
import QtQuick.Dialogs
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
|
||||||
|
width: 680
|
||||||
|
height: 600
|
||||||
|
minimumWidth: 500
|
||||||
|
minimumHeight: 600
|
||||||
|
|
||||||
|
title:"ChatGPT"
|
||||||
|
|
||||||
|
onInitArgument:
|
||||||
|
(argument)=>{
|
||||||
|
scrollview.focus = true
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatController{
|
||||||
|
id:controller
|
||||||
|
|
||||||
|
onResponseDataChanged: {
|
||||||
|
appendMessage(false,responseData)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel{
|
||||||
|
id:model_message
|
||||||
|
ListElement{
|
||||||
|
isMy:false
|
||||||
|
text:"欢迎使用ChatGPT"
|
||||||
|
}
|
||||||
|
ListElement{
|
||||||
|
isMy:true
|
||||||
|
text:"好的,3Q"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluAppBar{
|
||||||
|
id:appbar
|
||||||
|
title:"ChatGPT"
|
||||||
|
width:parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
Component{
|
||||||
|
id:com_text
|
||||||
|
TextEdit {
|
||||||
|
id:item_text
|
||||||
|
text: message
|
||||||
|
wrapMode: Text.WrapAnywhere
|
||||||
|
readOnly: true
|
||||||
|
selectByMouse: true
|
||||||
|
selectByKeyboard: true
|
||||||
|
selectedTextColor: Qt.rgba(51,153,255,1)
|
||||||
|
color:FluColors.Black
|
||||||
|
selectionColor: {
|
||||||
|
if(FluTheme.dark){
|
||||||
|
return FluTheme.primaryColor.lighter
|
||||||
|
}else{
|
||||||
|
return FluTheme.primaryColor.dark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
width: Math.min(list_message.width-200,600,implicitWidth)
|
||||||
|
TapHandler{
|
||||||
|
acceptedButtons: Qt.RightButton
|
||||||
|
onTapped: {
|
||||||
|
menu_item.showMenu(item_text.selectedText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
id:layout_content
|
||||||
|
anchors{
|
||||||
|
top: appbar.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: layout_bottom.top
|
||||||
|
margins: 10
|
||||||
|
}
|
||||||
|
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(245/255,245/255,245/255,1)
|
||||||
|
ListView{
|
||||||
|
id:list_message
|
||||||
|
anchors.fill: parent
|
||||||
|
model:model_message
|
||||||
|
clip: true
|
||||||
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
|
preferredHighlightBegin: 0
|
||||||
|
preferredHighlightEnd: 0
|
||||||
|
highlightMoveDuration: 0
|
||||||
|
header:Item{
|
||||||
|
width: list_message.width
|
||||||
|
height:20
|
||||||
|
}
|
||||||
|
footer:Item{
|
||||||
|
width: list_message.width
|
||||||
|
height:20
|
||||||
|
}
|
||||||
|
delegate: Item{
|
||||||
|
width: ListView.view.width
|
||||||
|
height: childrenRect.height
|
||||||
|
|
||||||
|
FluRectangle{
|
||||||
|
id:item_avatar
|
||||||
|
width: 30
|
||||||
|
height: 30
|
||||||
|
radius:[15,15,15,15]
|
||||||
|
anchors{
|
||||||
|
right: isMy ? parent.right : undefined
|
||||||
|
rightMargin: isMy ? 20 : undefined
|
||||||
|
left: isMy ? undefined : parent.left
|
||||||
|
leftMargin: isMy ? undefined : 20
|
||||||
|
top:parent.top
|
||||||
|
}
|
||||||
|
Image {
|
||||||
|
asynchronous: true
|
||||||
|
anchors.fill: parent
|
||||||
|
sourceSize: Qt.size(100,100)
|
||||||
|
source: isMy ? "qrc:/res/svg/avatar_2.svg" : "qrc:/res/image/logo_openai.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id:item_layout_content
|
||||||
|
color: isMy ? "#FF95EC69" : "#FFFFFF"
|
||||||
|
width: item_msg_loader.width+10
|
||||||
|
height: item_msg_loader.height+10
|
||||||
|
radius: 3
|
||||||
|
anchors{
|
||||||
|
top: item_avatar.top
|
||||||
|
right: isMy ? item_avatar.left : undefined
|
||||||
|
rightMargin: isMy ? 10 : undefined
|
||||||
|
left: isMy ? undefined : item_avatar.right
|
||||||
|
leftMargin: isMy ? undefined : 10
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader{
|
||||||
|
id:item_msg_loader
|
||||||
|
property var message: model.text
|
||||||
|
anchors.centerIn: parent
|
||||||
|
sourceComponent: com_text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Item{
|
||||||
|
id:item_layout_bottom
|
||||||
|
width: parent.width
|
||||||
|
anchors.top: item_layout_content.bottom
|
||||||
|
height: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
id:layout_bottom
|
||||||
|
height: 90
|
||||||
|
anchors{
|
||||||
|
bottom: parent.bottom
|
||||||
|
bottomMargin: 10
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
leftMargin: 10
|
||||||
|
rightMargin: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ScrollView{
|
||||||
|
id:scrollview
|
||||||
|
anchors{
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: button_send.left
|
||||||
|
bottomMargin: 10
|
||||||
|
leftMargin: 10
|
||||||
|
rightMargin: 10
|
||||||
|
}
|
||||||
|
height: Math.min(textbox.implicitHeight,64)
|
||||||
|
FluMultiLineTextBox{
|
||||||
|
id:textbox
|
||||||
|
focus:true
|
||||||
|
placeholderText: "请输入消息"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluFilledButton{
|
||||||
|
id:button_send
|
||||||
|
text:controller.isLoading ? timer_loading.loadingText :"发送"
|
||||||
|
anchors{
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: parent.right
|
||||||
|
bottomMargin: 10
|
||||||
|
rightMargin: 10
|
||||||
|
}
|
||||||
|
width: 60
|
||||||
|
disabled: controller.isLoading
|
||||||
|
onClicked:{
|
||||||
|
var text = textbox.text
|
||||||
|
appendMessage(true,text)
|
||||||
|
controller.sendMessage(text)
|
||||||
|
textbox.clear()
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer{
|
||||||
|
id:timer_loading
|
||||||
|
property int count : 0
|
||||||
|
property string loadingText : ""
|
||||||
|
interval: 500
|
||||||
|
running: controller.isLoading
|
||||||
|
repeat: true
|
||||||
|
onTriggered: {
|
||||||
|
switch(count%3){
|
||||||
|
case 0:
|
||||||
|
loadingText = "."
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
loadingText = ".."
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
loadingText = "..."
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
loadingText = ""
|
||||||
|
break
|
||||||
|
}
|
||||||
|
count++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluMenu{
|
||||||
|
id:menu_item
|
||||||
|
focus: false
|
||||||
|
property string selectedText: ""
|
||||||
|
FluMenuItem{
|
||||||
|
text:"复制"
|
||||||
|
onClicked: {
|
||||||
|
controller.clipText(menu_item.selectedText)
|
||||||
|
showSuccess("复制成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function showMenu(text){
|
||||||
|
menu_item.selectedText = text
|
||||||
|
menu_item.popup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function appendMessage(isMy,text){
|
||||||
|
model_message.append({isMy:isMy,text:text})
|
||||||
|
list_message.positionViewAtEnd()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
73
example/page/LoginPage.qml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
|
||||||
|
id:window
|
||||||
|
width: 400
|
||||||
|
height: 400
|
||||||
|
minimumWidth: 400
|
||||||
|
minimumHeight: 400
|
||||||
|
maximumWidth: 400
|
||||||
|
maximumHeight: 400
|
||||||
|
modality:2
|
||||||
|
|
||||||
|
title:"登录"
|
||||||
|
|
||||||
|
onInitArgument:
|
||||||
|
(argument)=>{
|
||||||
|
textbox_uesrname.updateText(argument.username)
|
||||||
|
textbox_password.focus = true
|
||||||
|
}
|
||||||
|
|
||||||
|
FluAppBar{
|
||||||
|
id:appbar
|
||||||
|
title:"登录"
|
||||||
|
width:parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout{
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
FluAutoSuggestBox{
|
||||||
|
id:textbox_uesrname
|
||||||
|
items:[{title:"Admin"},{title:"User"}]
|
||||||
|
placeholderText: "请输入账号"
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
FluTextBox{
|
||||||
|
id:textbox_password
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
placeholderText: "请输入密码"
|
||||||
|
echoMode:TextInput.Password
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
FluFilledButton{
|
||||||
|
text:"登录"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: 20
|
||||||
|
onClicked:{
|
||||||
|
if(textbox_password.text === ""){
|
||||||
|
showError("请随便输入一个密码")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
onResult({password:textbox_password.text})
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
49
example/page/MainPage.qml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import "qrc:///global/"
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
id:rootwindow
|
||||||
|
width: 1000
|
||||||
|
height: 640
|
||||||
|
title: "FluentUI"
|
||||||
|
minimumWidth: 520
|
||||||
|
minimumHeight: 460
|
||||||
|
|
||||||
|
FluAppBar{
|
||||||
|
id:appbar
|
||||||
|
z:10
|
||||||
|
showDark: true
|
||||||
|
width:parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
FluNavigationView{
|
||||||
|
id:nav_view
|
||||||
|
anchors.fill: parent
|
||||||
|
items: ItemsOriginal
|
||||||
|
footerItems:ItemsFooter
|
||||||
|
logo: "qrc:/res/image/favicon.ico"
|
||||||
|
z: 11
|
||||||
|
title:"FluentUI"
|
||||||
|
autoSuggestBox:FluAutoSuggestBox{
|
||||||
|
width: 280
|
||||||
|
anchors.centerIn: parent
|
||||||
|
iconSource: FluentIcons.Zoom
|
||||||
|
items: ItemsOriginal.getSearchData()
|
||||||
|
placeholderText: "查找"
|
||||||
|
onItemClicked:
|
||||||
|
(data)=>{
|
||||||
|
ItemsOriginal.startPageByItem(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
ItemsOriginal.navigationView = nav_view
|
||||||
|
nav_view.setCurrentIndex(0)
|
||||||
|
nav_view.push("qrc:/T_Home.qml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
37
example/page/MediaPage.qml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
|
||||||
|
width: 640
|
||||||
|
height: 480
|
||||||
|
minimumWidth: 640
|
||||||
|
minimumHeight: 480
|
||||||
|
|
||||||
|
title:"视频播放器"
|
||||||
|
|
||||||
|
onInitArgument:
|
||||||
|
(argument)=>{
|
||||||
|
player.source = argument.source
|
||||||
|
}
|
||||||
|
|
||||||
|
FluAppBar{
|
||||||
|
id:appbar
|
||||||
|
title:"视频播放器"
|
||||||
|
width:parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FluMediaPlayer{
|
||||||
|
id:player
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
top: appbar.bottom
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
145
example/qml.qrc
@ -1,15 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>T_ToggleSwitch.qml</file>
|
|
||||||
<file>T_Typography.qml</file>
|
|
||||||
<file>App.qml</file>
|
<file>App.qml</file>
|
||||||
<file>SettingPage.qml</file>
|
|
||||||
<file>AboutPage.qml</file>
|
|
||||||
<file>T_Buttons.qml</file>
|
|
||||||
<file>T_Rectangle.qml</file>
|
|
||||||
<file>T_InfoBar.qml</file>
|
|
||||||
<file>T_Progress.qml</file>
|
|
||||||
<file>T_Slider.qml</file>
|
|
||||||
<file>res/image/image_huoyin.webp</file>
|
<file>res/image/image_huoyin.webp</file>
|
||||||
<file>res/svg/avatar_1.svg</file>
|
<file>res/svg/avatar_1.svg</file>
|
||||||
<file>res/svg/avatar_2.svg</file>
|
<file>res/svg/avatar_2.svg</file>
|
||||||
@ -23,12 +14,146 @@
|
|||||||
<file>res/svg/avatar_10.svg</file>
|
<file>res/svg/avatar_10.svg</file>
|
||||||
<file>res/svg/avatar_11.svg</file>
|
<file>res/svg/avatar_11.svg</file>
|
||||||
<file>res/svg/avatar_12.svg</file>
|
<file>res/svg/avatar_12.svg</file>
|
||||||
|
<file>page/AboutPage.qml</file>
|
||||||
|
<file>page/MainPage.qml</file>
|
||||||
|
<file>page/LoginPage.qml</file>
|
||||||
|
<file>T_ToggleSwitch.qml</file>
|
||||||
|
<file>T_Typography.qml</file>
|
||||||
<file>T_Awesome.qml</file>
|
<file>T_Awesome.qml</file>
|
||||||
|
<file>T_Buttons.qml</file>
|
||||||
|
<file>T_Rectangle.qml</file>
|
||||||
|
<file>T_InfoBar.qml</file>
|
||||||
|
<file>T_Progress.qml</file>
|
||||||
|
<file>T_Slider.qml</file>
|
||||||
<file>T_TextBox.qml</file>
|
<file>T_TextBox.qml</file>
|
||||||
<file>T_Theme.qml</file>
|
<file>T_Theme.qml</file>
|
||||||
<file>T_Dialog.qml</file>
|
<file>T_Dialog.qml</file>
|
||||||
<file>T_TreeView.qml</file>
|
<file>T_TreeView.qml</file>
|
||||||
<file>T_Expander.qml</file>
|
<file>T_Expander.qml</file>
|
||||||
<file>MainPage.qml</file>
|
<file>T_TimePicker.qml</file>
|
||||||
|
<file>T_DatePicker.qml</file>
|
||||||
|
<file>T_MultiWindow.qml</file>
|
||||||
|
<file>T_Menu.qml</file>
|
||||||
|
<file>res/image/banner_1.jpg</file>
|
||||||
|
<file>res/image/banner_2.jpg</file>
|
||||||
|
<file>res/image/banner_3.jpg</file>
|
||||||
|
<file>res/image/logo_openai.png</file>
|
||||||
|
<file>page/ChatPage.qml</file>
|
||||||
|
<file>T_Tooltip.qml</file>
|
||||||
|
<file>T_Badge.qml</file>
|
||||||
|
<file>T_CalendarPicker.qml</file>
|
||||||
|
<file>T_ColorPicker.qml</file>
|
||||||
|
<file>T_Carousel.qml</file>
|
||||||
|
<file>T_MediaPlayer.qml</file>
|
||||||
|
<file>T_TabView.qml</file>
|
||||||
|
<file>res/image/favicon.ico</file>
|
||||||
|
<file>T_Home.qml</file>
|
||||||
|
<file>res/image/bg_home_header.png</file>
|
||||||
|
<file>res/image/ic_home_github.png</file>
|
||||||
|
<file>res/image/control/Acrylic.png</file>
|
||||||
|
<file>res/image/control/AnimatedIcon.png</file>
|
||||||
|
<file>res/image/control/AnimatedVisualPlayer.png</file>
|
||||||
|
<file>res/image/control/AnimationInterop.png</file>
|
||||||
|
<file>res/image/control/AppBarButton.png</file>
|
||||||
|
<file>res/image/control/AppBarSeparator.png</file>
|
||||||
|
<file>res/image/control/AppBarToggleButton.png</file>
|
||||||
|
<file>res/image/control/AutomationProperties.png</file>
|
||||||
|
<file>res/image/control/AutoSuggestBox.png</file>
|
||||||
|
<file>res/image/control/Border.png</file>
|
||||||
|
<file>res/image/control/BreadcrumbBar.png</file>
|
||||||
|
<file>res/image/control/Button.png</file>
|
||||||
|
<file>res/image/control/CalendarDatePicker.png</file>
|
||||||
|
<file>res/image/control/CalendarView.png</file>
|
||||||
|
<file>res/image/control/Canvas.png</file>
|
||||||
|
<file>res/image/control/Checkbox.png</file>
|
||||||
|
<file>res/image/control/Clipboard.png</file>
|
||||||
|
<file>res/image/control/ColorPaletteResources.png</file>
|
||||||
|
<file>res/image/control/ColorPicker.png</file>
|
||||||
|
<file>res/image/control/ComboBox.png</file>
|
||||||
|
<file>res/image/control/CommandBar.png</file>
|
||||||
|
<file>res/image/control/CommandBarFlyout.png</file>
|
||||||
|
<file>res/image/control/CompactSizing.png</file>
|
||||||
|
<file>res/image/control/ConnectedAnimation.png</file>
|
||||||
|
<file>res/image/control/ContentDialog.png</file>
|
||||||
|
<file>res/image/control/CreateMultipleWindows.png</file>
|
||||||
|
<file>res/image/control/DataGrid.png</file>
|
||||||
|
<file>res/image/control/DatePicker.png</file>
|
||||||
|
<file>res/image/control/DropDownButton.png</file>
|
||||||
|
<file>res/image/control/EasingFunction.png</file>
|
||||||
|
<file>res/image/control/Expander.png</file>
|
||||||
|
<file>res/image/control/FilePicker.png</file>
|
||||||
|
<file>res/image/control/FlipView.png</file>
|
||||||
|
<file>res/image/control/Flyout.png</file>
|
||||||
|
<file>res/image/control/Grid.png</file>
|
||||||
|
<file>res/image/control/GridView.png</file>
|
||||||
|
<file>res/image/control/HyperlinkButton.png</file>
|
||||||
|
<file>res/image/control/IconElement.png</file>
|
||||||
|
<file>res/image/control/Image.png</file>
|
||||||
|
<file>res/image/control/ImplicitTransition.png</file>
|
||||||
|
<file>res/image/control/InfoBadge.png</file>
|
||||||
|
<file>res/image/control/InfoBar.png</file>
|
||||||
|
<file>res/image/control/InkCanvas.png</file>
|
||||||
|
<file>res/image/control/InkToolbar.png</file>
|
||||||
|
<file>res/image/control/InputValidation.png</file>
|
||||||
|
<file>res/image/control/ItemsRepeater.png</file>
|
||||||
|
<file>res/image/control/Line.png</file>
|
||||||
|
<file>res/image/control/ListBox.png</file>
|
||||||
|
<file>res/image/control/ListView.png</file>
|
||||||
|
<file>res/image/control/MediaPlayerElement.png</file>
|
||||||
|
<file>res/image/control/MenuBar.png</file>
|
||||||
|
<file>res/image/control/MenuFlyout.png</file>
|
||||||
|
<file>res/image/control/NavigationView.png</file>
|
||||||
|
<file>res/image/control/NumberBox.png</file>
|
||||||
|
<file>res/image/control/PageTransition.png</file>
|
||||||
|
<file>res/image/control/ParallaxView.png</file>
|
||||||
|
<file>res/image/control/PasswordBox.png</file>
|
||||||
|
<file>res/image/control/PersonPicture.png</file>
|
||||||
|
<file>res/image/control/PipsPager.png</file>
|
||||||
|
<file>res/image/control/Pivot.png</file>
|
||||||
|
<file>res/image/control/ProgressBar.png</file>
|
||||||
|
<file>res/image/control/ProgressRing.png</file>
|
||||||
|
<file>res/image/control/PullToRefresh.png</file>
|
||||||
|
<file>res/image/control/RadialGradientBrush.png</file>
|
||||||
|
<file>res/image/control/RadioButton.png</file>
|
||||||
|
<file>res/image/control/RadioButtons.png</file>
|
||||||
|
<file>res/image/control/RatingControl.png</file>
|
||||||
|
<file>res/image/control/RelativePanel.png</file>
|
||||||
|
<file>res/image/control/RepeatButton.png</file>
|
||||||
|
<file>res/image/control/RevealFocus.png</file>
|
||||||
|
<file>res/image/control/RichEditBox.png</file>
|
||||||
|
<file>res/image/control/RichTextBlock.png</file>
|
||||||
|
<file>res/image/control/ScrollViewer.png</file>
|
||||||
|
<file>res/image/control/SemanticZoom.png</file>
|
||||||
|
<file>res/image/control/Shape.png</file>
|
||||||
|
<file>res/image/control/Slider.png</file>
|
||||||
|
<file>res/image/control/Sound.png</file>
|
||||||
|
<file>res/image/control/SplitButton.png</file>
|
||||||
|
<file>res/image/control/SplitView.png</file>
|
||||||
|
<file>res/image/control/StackPanel.png</file>
|
||||||
|
<file>res/image/control/StandardUICommand.png</file>
|
||||||
|
<file>res/image/control/SwipeControl.png</file>
|
||||||
|
<file>res/image/control/TabView.png</file>
|
||||||
|
<file>res/image/control/TeachingTip.png</file>
|
||||||
|
<file>res/image/control/TextBlock.png</file>
|
||||||
|
<file>res/image/control/TextBox.png</file>
|
||||||
|
<file>res/image/control/ThemeTransition.png</file>
|
||||||
|
<file>res/image/control/TimePicker.png</file>
|
||||||
|
<file>res/image/control/TitleBar.png</file>
|
||||||
|
<file>res/image/control/ToggleButton.png</file>
|
||||||
|
<file>res/image/control/ToggleSplitButton.png</file>
|
||||||
|
<file>res/image/control/ToggleSwitch.png</file>
|
||||||
|
<file>res/image/control/ToolTip.png</file>
|
||||||
|
<file>res/image/control/TreeView.png</file>
|
||||||
|
<file>res/image/control/VariableSizedWrapGrid.png</file>
|
||||||
|
<file>res/image/control/Viewbox.png</file>
|
||||||
|
<file>res/image/control/WebView.png</file>
|
||||||
|
<file>res/image/control/XamlUICommand.png</file>
|
||||||
|
<file>T_CheckBox.qml</file>
|
||||||
|
<file>global/ItemsOriginal.qml</file>
|
||||||
|
<file>global/qmldir</file>
|
||||||
|
<file>global/ItemsFooter.qml</file>
|
||||||
|
<file>page/MediaPage.qml</file>
|
||||||
|
<file>T_FlipView.qml</file>
|
||||||
|
<file>T_Pivot.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
example/res/image/banner_1.jpg
Normal file
After Width: | Height: | Size: 300 KiB |
BIN
example/res/image/banner_2.jpg
Normal file
After Width: | Height: | Size: 298 KiB |
BIN
example/res/image/banner_3.jpg
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
example/res/image/bg_home_header.png
Normal file
After Width: | Height: | Size: 791 KiB |
BIN
example/res/image/control/Acrylic.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
example/res/image/control/AnimatedIcon.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
example/res/image/control/AnimatedVisualPlayer.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
example/res/image/control/AnimationInterop.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
example/res/image/control/AppBarButton.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
example/res/image/control/AppBarSeparator.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
example/res/image/control/AppBarToggleButton.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
example/res/image/control/AutoSuggestBox.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
example/res/image/control/AutomationProperties.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
example/res/image/control/Border.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
example/res/image/control/BreadcrumbBar.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
example/res/image/control/Button.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
example/res/image/control/CalendarDatePicker.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
example/res/image/control/CalendarView.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
example/res/image/control/Canvas.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
example/res/image/control/Checkbox.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
example/res/image/control/Clipboard.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
example/res/image/control/ColorPaletteResources.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
example/res/image/control/ColorPicker.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
example/res/image/control/ComboBox.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
example/res/image/control/CommandBar.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
example/res/image/control/CommandBarFlyout.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
example/res/image/control/CompactSizing.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
example/res/image/control/ConnectedAnimation.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
example/res/image/control/ContentDialog.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
example/res/image/control/CreateMultipleWindows.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
example/res/image/control/DataGrid.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
example/res/image/control/DatePicker.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
example/res/image/control/DropDownButton.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
example/res/image/control/EasingFunction.png
Normal file
After Width: | Height: | Size: 5.2 KiB |