mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-01 15:42:20 +08:00
Compare commits
147 Commits
Author | SHA1 | Date | |
---|---|---|---|
84b3a367b2 | |||
a02ee68483 | |||
c330dc840e | |||
438d1fe623 | |||
e92b1dbea6 | |||
4d4c0f2259 | |||
991ef8809a | |||
abc396d619 | |||
28a36b16e9 | |||
c50583d66a | |||
dbe70f8212 | |||
93f73b034d | |||
f2edf8d12f | |||
1f90b7c734 | |||
ed411d986f | |||
0222a2111d | |||
a6001ea142 | |||
41f40d2313 | |||
649dfdd317 | |||
a705577cba | |||
9bc5794db8 | |||
3b1ab88b6d | |||
6a19b47508 | |||
cf2657078b | |||
1b0bd0e750 | |||
5056dc57cf | |||
190b14eed6 | |||
3933026de3 | |||
74c2dfed5b | |||
08dbd1d11b | |||
3dfca40680 | |||
9361d7b2eb | |||
93832fb325 | |||
d6325b4f5b | |||
53d28448e0 | |||
5b7bd8a774 | |||
0f3910c96b | |||
4cfd14e9bd | |||
e295b61596 | |||
fe8083fcb1 | |||
7546547364 | |||
4dbb68abf6 | |||
d37cd00322 | |||
f04bc2951f | |||
993de241cb | |||
cd7ce7fe67 | |||
d397b88892 | |||
ae2d517ad0 | |||
fde1b5ff3a | |||
53ba535abc | |||
5ea480afcb | |||
9d47c30a6b | |||
833a8217f4 | |||
3a0f6355c8 | |||
28a42d7ecc | |||
8778ca85a3 | |||
bb19554215 | |||
e0c28e2693 | |||
1d917baac7 | |||
cc4e88adbd | |||
284afed52f | |||
924ce5d127 | |||
0e0a385f2d | |||
1464e647d9 | |||
0241ecd07f | |||
0cad207359 | |||
00e028be07 | |||
4f66c546a8 | |||
475d293906 | |||
a6b8e656f3 | |||
4b84e9175d | |||
475cb54d73 | |||
b0edf23f33 | |||
c123db97b7 | |||
1450016c69 | |||
6221eb4178 | |||
42f0987e73 | |||
99ff310448 | |||
bf5c722058 | |||
8253fb611f | |||
0b0fbe1e64 | |||
2d1957afe3 | |||
823721ab8c | |||
bf074da658 | |||
91a692484f | |||
46f7299362 | |||
9f652a7c76 | |||
9adb6b645b | |||
2cfc73c00b | |||
d817782526 | |||
9dd9d10049 | |||
fa6b5cfc45 | |||
217ceabbaa | |||
83a66b3f15 | |||
3239e6f12c | |||
1c67f2a41b | |||
0b7358af41 | |||
a851696eb0 | |||
f6cc83123b | |||
70e525f51e | |||
72610da66e | |||
fde55d254c | |||
61659b5e31 | |||
f4112ee5dc | |||
f973f006d2 | |||
38ea91964e | |||
af6e39d8c0 | |||
6d2a8cde7a | |||
2bd0a831e7 | |||
1bf992ed69 | |||
ecd0f29d30 | |||
5e38493403 | |||
c5aad9feed | |||
d347512486 | |||
136e2c72af | |||
95f48b51bf | |||
7ba06d183d | |||
9ee50a585a | |||
c95ac86377 | |||
5787e308dd | |||
08c458c2a1 | |||
299eba18ac | |||
6da8117056 | |||
e5668869b9 | |||
65905b139e | |||
6974b0efa6 | |||
3c924bb0de | |||
ec2378a07a | |||
863c88411b | |||
6b6dbf27a1 | |||
dc37a151c8 | |||
6c86e61916 | |||
33c203fcb3 | |||
7086df10f0 | |||
13223a11a2 | |||
3d65bdc913 | |||
c80689e376 | |||
1abbc4593a | |||
c1ffce06aa | |||
bd8a561590 | |||
eed96b4c0e | |||
1b4fddec61 | |||
2c16f6f71a | |||
3770969097 | |||
d255f5881e | |||
711411f6a8 | |||
f5a4fc1300 |
@ -30,6 +30,7 @@ SolidCompression=yes
|
|||||||
WizardStyle=modern
|
WizardStyle=modern
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
SetupIconFile=.\..\favicon.ico
|
SetupIconFile=.\..\favicon.ico
|
||||||
|
MinVersion = 6.0
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
|
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
|
||||||
|
8
.github/workflows/macos.yml
vendored
8
.github/workflows/macos.yml
vendored
@ -21,8 +21,8 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13]
|
os: [macos-latest]
|
||||||
qt_ver: [6.6.0]
|
qt_ver: [6.6.2]
|
||||||
qt_arch: [clang_64]
|
qt_arch: [clang_64]
|
||||||
env:
|
env:
|
||||||
targetName: example
|
targetName: example
|
||||||
@ -50,11 +50,13 @@ jobs:
|
|||||||
cmake --version
|
cmake --version
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/6.6.0/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
cmake --build . --target all --config Release --parallel
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
run: |
|
run: |
|
||||||
|
# 先删除所有dSYM文件,减少包的体积
|
||||||
|
sudo find /Users/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/macos/qml -name "*.dSYM" | xargs rm -r
|
||||||
# 拷贝依赖
|
# 拷贝依赖
|
||||||
sudo macdeployqt bin/release/${targetName}.app -qmldir=. -dmg
|
sudo macdeployqt bin/release/${targetName}.app -qmldir=. -dmg
|
||||||
|
|
||||||
|
9
.github/workflows/ubuntu.yml
vendored
9
.github/workflows/ubuntu.yml
vendored
@ -22,8 +22,8 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
os: [ubuntu-latest]
|
||||||
qt_ver: [6.6.0]
|
qt_ver: [6.6.2]
|
||||||
qt_arch: [gcc_64]
|
qt_arch: [gcc_64]
|
||||||
env:
|
env:
|
||||||
targetName: example
|
targetName: example
|
||||||
@ -49,13 +49,16 @@ jobs:
|
|||||||
- name: ubuntu install GL library
|
- name: ubuntu install GL library
|
||||||
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
||||||
|
|
||||||
|
- name: ubuntu install libfuse2
|
||||||
|
run: sudo apt install libfuse2
|
||||||
|
|
||||||
- name: build ubuntu
|
- name: build ubuntu
|
||||||
run: |
|
run: |
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/6.6.0/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
cmake --build . --target all --config Release --parallel
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
- name: install QT linux deploy
|
- name: install QT linux deploy
|
||||||
|
6
.github/workflows/windows-mingw.yml
vendored
6
.github/workflows/windows-mingw.yml
vendored
@ -21,10 +21,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-2022]
|
os: [windows-latest]
|
||||||
include:
|
include:
|
||||||
- qt_arch: win64_mingw
|
- qt_arch: win64_mingw
|
||||||
qt_ver: 6.6.0
|
qt_ver: 6.6.2
|
||||||
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
||||||
qt_tools_mingw_install: mingw900_64
|
qt_tools_mingw_install: mingw900_64
|
||||||
env:
|
env:
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.0\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
cmake --build . --target all --config Release --parallel
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
|
2
.github/workflows/windows-qt5.yml
vendored
2
.github/workflows/windows-qt5.yml
vendored
@ -50,7 +50,7 @@ jobs:
|
|||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\5.15.2\msvc2019 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\msvc2019 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
cmake --build . --target all --config Release --parallel
|
cmake --build . --target all --config Release --parallel
|
||||||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
||||||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
||||||
|
13
.github/workflows/windows.yml
vendored
13
.github/workflows/windows.yml
vendored
@ -21,9 +21,9 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-2019]
|
os: [windows-latest]
|
||||||
include:
|
include:
|
||||||
- qt_ver: 6.6.0
|
- qt_ver: 6.6.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
|
||||||
@ -36,6 +36,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@master
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
@ -48,11 +53,11 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
||||||
ninja --version
|
ninja --version
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.0\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
cmake --build . --target all --config Release --parallel
|
cmake --build . --target all --config Release --parallel
|
||||||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
||||||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
||||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,6 +0,0 @@
|
|||||||
[submodule "framelesshelper"]
|
|
||||||
path = framelesshelper
|
|
||||||
url = https://github.com/zhuzichu520/framelesshelper.git
|
|
||||||
[submodule "zxing-cpp"]
|
|
||||||
path = zxing-cpp
|
|
||||||
url = https://github.com/zhuzichu520/zxing-cpp.git
|
|
BIN
3rdparty/Win_x86/msvc/libcrypto-1_1.dll
vendored
BIN
3rdparty/Win_x86/msvc/libcrypto-1_1.dll
vendored
Binary file not shown.
BIN
3rdparty/Win_x86/msvc/libssl-1_1.dll
vendored
BIN
3rdparty/Win_x86/msvc/libssl-1_1.dll
vendored
Binary file not shown.
@ -1,6 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
project(FluentUI VERSION 0.1 LANGUAGES CXX)
|
project(FluentUI VERSION 1.0)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
#让Release也生成pdb文件
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(FLUENTUI_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
set(FLUENTUI_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||||
list(APPEND CMAKE_MODULE_PATH ${FLUENTUI_DIRECTORY}/.cmake/)
|
list(APPEND CMAKE_MODULE_PATH ${FLUENTUI_DIRECTORY}/.cmake/)
|
||||||
@ -25,17 +31,17 @@ if(NOT FLUENTUI_QML_PLUGIN_DIRECTORY)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(zxing-cpp)
|
|
||||||
|
#Release也支持日志打印代码位置
|
||||||
|
target_compile_definitions(fluentuiplugin
|
||||||
|
PRIVATE
|
||||||
|
QT_MESSAGELOGCONTEXT
|
||||||
|
)
|
||||||
|
|
||||||
if (FLUENTUI_BUILD_EXAMPLES)
|
if (FLUENTUI_BUILD_EXAMPLES)
|
||||||
add_subdirectory(example)
|
add_subdirectory(example)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(FRAMELESSHELPER_BUILD_STATIC ON)
|
|
||||||
set(FRAMELESSHELPER_NO_DEBUG_OUTPUT ON)
|
|
||||||
set(FRAMELESSHELPER_BUILD_WIDGETS OFF)
|
|
||||||
add_subdirectory(framelesshelper)
|
|
||||||
|
|
||||||
message("------------------------ FluentUI ------------------------")
|
message("------------------------ FluentUI ------------------------")
|
||||||
message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}")
|
message("Build FluentUI demo applications.: ${FLUENTUI_BUILD_EXAMPLES}")
|
||||||
message("Build static library.: ${FLUENTUI_BUILD_STATIC_LIB}")
|
message("Build static library.: ${FLUENTUI_BUILD_STATIC_LIB}")
|
||||||
|
@ -46,7 +46,7 @@ Use [Qt Online Installers](https://download.qt.io/archive/online_installers/) to
|
|||||||
|
|
||||||
## ⚽ Get started
|
## ⚽ Get started
|
||||||
|
|
||||||
+ Download the [pre-built release](https://github.com/zhuzichu520/FluentUI/releases). (Please pecify your platform and compilers.)
|
+ Download the [pre-built release](https://github.com/zhuzichu520/FluentUI/releases). (Please specify your platform and compilers.)
|
||||||
|
|
||||||
+ run `example` program.
|
+ run `example` program.
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
project(example VERSION 0.1 LANGUAGES CXX)
|
project(example VERSION 1.0 LANGUAGES CXX)
|
||||||
|
|
||||||
#配置通用编译
|
#配置通用编译
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
if(APPLE)
|
|
||||||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#导入exmaple的QML位置,不然import example有时候会爆红
|
#导入exmaple的QML位置,不然import example有时候会爆红
|
||||||
set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/example CACHE STRING "Qt Creator extra QML import paths" FORCE)
|
set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/example CACHE STRING "Qt Creator extra QML import paths" FORCE)
|
||||||
@ -23,9 +21,7 @@ else()
|
|||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${FLUENTUI_DIRECTORY}/bin/release>)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${FLUENTUI_DIRECTORY}/bin/release>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#获取文件路径分隔符(解决执行命令的时候有些平台会报错)
|
#导入Qt相关依赖包
|
||||||
file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
|
|
||||||
|
|
||||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick Svg Network)
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick Svg Network)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network)
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network)
|
||||||
|
|
||||||
@ -51,24 +47,33 @@ foreach(filepath ${CPP_FILES})
|
|||||||
list(APPEND sources_files ${filename})
|
list(APPEND sources_files ${filename})
|
||||||
endforeach(filepath)
|
endforeach(filepath)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND sources_files "src/app_dmp.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
||||||
#遍历所有qml文件
|
#遍历所有qml文件
|
||||||
file(GLOB_RECURSE QML_PATHS *.qml)
|
file(GLOB_RECURSE QML_PATHS *.qml qmldir)
|
||||||
foreach(filepath ${QML_PATHS})
|
foreach(filepath ${QML_PATHS})
|
||||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||||
if(${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
|
if(${filepath} MATCHES "qml-Qt6")
|
||||||
string(REPLACE "qml-Qt${QT_VERSION_MAJOR}" "qml" filealias ${filename})
|
string(REPLACE "qml-Qt6" "qml" filealias ${filename})
|
||||||
set_source_files_properties(${filename} PROPERTIES QT_RESOURCE_ALIAS ${filealias})
|
set_source_files_properties(${filename} PROPERTIES QT_RESOURCE_ALIAS ${filealias})
|
||||||
|
if(${filename} MATCHES "qmldir")
|
||||||
|
list(APPEND resource_files ${filename})
|
||||||
|
else()
|
||||||
list(APPEND qml_files ${filename})
|
list(APPEND qml_files ${filename})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endforeach(filepath)
|
endforeach(filepath)
|
||||||
|
|
||||||
#遍历所有资源文件
|
#遍历所有资源文件
|
||||||
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.obj qmldir)
|
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.obj)
|
||||||
foreach(filepath ${RES_PATHS})
|
foreach(filepath ${RES_PATHS})
|
||||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||||
list(APPEND resource_files ${filename})
|
list(APPEND resource_files ${filename})
|
||||||
endforeach(filepath)
|
endforeach(filepath)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#如果是Windows平台,则生成rc文件,还有inno setup脚本文件
|
#如果是Windows平台,则生成rc文件,还有inno setup脚本文件
|
||||||
@ -79,10 +84,10 @@ if(WIN32)
|
|||||||
${FLUENTUI_DIRECTORY}/.cmake/version_exe.rc.in
|
${FLUENTUI_DIRECTORY}/.cmake/version_exe.rc.in
|
||||||
${EXAMPLE_VERSION_RC_PATH}
|
${EXAMPLE_VERSION_RC_PATH}
|
||||||
)
|
)
|
||||||
configure_file(
|
configure_file(
|
||||||
${FLUENTUI_DIRECTORY}/.cmake/InstallerScript.iss.in
|
${FLUENTUI_DIRECTORY}/.cmake/InstallerScript.iss.in
|
||||||
${FLUENTUI_DIRECTORY}/action-cli/InstallerScript.iss
|
${FLUENTUI_DIRECTORY}/action-cli/InstallerScript.iss
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#添加可执行文件
|
#添加可执行文件
|
||||||
@ -97,29 +102,26 @@ else ()
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
#复制程序运行所需要的动态库
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
#复制动态库到可执行文件同级目录下
|
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
||||||
set(3RDPARTY_ARCH_DIR ${CMAKE_SOURCE_DIR}/3rdparty/Win_x86)
|
|
||||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
||||||
set(3RDPARTY_ARCH_DIR ${CMAKE_SOURCE_DIR}/3rdparty/Win_x64)
|
|
||||||
endif()
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(DLLPATH ${3RDPARTY_ARCH_DIR}/msvc/*.dll)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
elseif(MINGW)
|
file(GLOB_RECURSE 3RDPARTY_DLL_DIR ${CMAKE_SOURCE_DIR}/3rdparty/msvc/x86/*.dll)
|
||||||
set(DLLPATH ${3RDPARTY_ARCH_DIR}/mingw/*.dll)
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
file(GLOB_RECURSE 3RDPARTY_DLL_DIR ${CMAKE_SOURCE_DIR}/3rdparty/msvc/x64/*.dll)
|
||||||
|
endif()
|
||||||
|
elseif(MINGW)
|
||||||
|
file(GLOB_RECURSE 3RDPARTY_DLL_DIR ${CMAKE_SOURCE_DIR}/3rdparty/mingw/*.dll)
|
||||||
endif()
|
endif()
|
||||||
string(REPLACE "/" ${PATH_SEPARATOR} DLLPATH "${DLLPATH}")
|
|
||||||
file(GLOB DLL_FILES ${DLLPATH})
|
|
||||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
${DLL_FILES}
|
${3RDPARTY_DLL_DIR}
|
||||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
||||||
#添加qml模块
|
#如果是Qt6.2以上,则使用qt_add_qml_module添加资源文件
|
||||||
qt_add_qml_module(example
|
qt_add_qml_module(example
|
||||||
URI "example"
|
URI "example"
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
@ -128,6 +130,7 @@ if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
|||||||
RESOURCE_PREFIX "/"
|
RESOURCE_PREFIX "/"
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
#如果是Qt6.2以下,则使用qrc添加资源文件
|
||||||
target_include_directories(example PRIVATE
|
target_include_directories(example PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
@ -155,6 +158,13 @@ set_target_properties(example PROPERTIES
|
|||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#Release也支持日志打印代码位置
|
||||||
|
target_compile_definitions(example
|
||||||
|
PRIVATE
|
||||||
|
QT_MESSAGELOGCONTEXT
|
||||||
|
)
|
||||||
|
|
||||||
|
#目标文件链接库
|
||||||
target_link_libraries(example PRIVATE
|
target_link_libraries(example PRIVATE
|
||||||
Qt${QT_VERSION_MAJOR}::Quick
|
Qt${QT_VERSION_MAJOR}::Quick
|
||||||
Qt${QT_VERSION_MAJOR}::Svg
|
Qt${QT_VERSION_MAJOR}::Svg
|
||||||
|
@ -134,7 +134,6 @@
|
|||||||
<file>qml/page/T_CalendarPicker.qml</file>
|
<file>qml/page/T_CalendarPicker.qml</file>
|
||||||
<file>qml/page/T_Captcha.qml</file>
|
<file>qml/page/T_Captcha.qml</file>
|
||||||
<file>qml/page/T_Carousel.qml</file>
|
<file>qml/page/T_Carousel.qml</file>
|
||||||
<file>qml/page/T_Chart.qml</file>
|
|
||||||
<file>qml/page/T_CheckBox.qml</file>
|
<file>qml/page/T_CheckBox.qml</file>
|
||||||
<file>qml/page/T_ColorPicker.qml</file>
|
<file>qml/page/T_ColorPicker.qml</file>
|
||||||
<file>qml/page/T_ComboBox.qml</file>
|
<file>qml/page/T_ComboBox.qml</file>
|
||||||
@ -155,10 +154,9 @@
|
|||||||
<file>qml/page/T_RatingControl.qml</file>
|
<file>qml/page/T_RatingControl.qml</file>
|
||||||
<file>qml/page/T_Rectangle.qml</file>
|
<file>qml/page/T_Rectangle.qml</file>
|
||||||
<file>qml/page/T_RemoteLoader.qml</file>
|
<file>qml/page/T_RemoteLoader.qml</file>
|
||||||
<file>qml/page/T_Screenshot.qml</file>
|
|
||||||
<file>qml/page/T_Settings.qml</file>
|
<file>qml/page/T_Settings.qml</file>
|
||||||
<file>qml/page/T_Slider.qml</file>
|
<file>qml/page/T_Slider.qml</file>
|
||||||
<file>qml/page/T_StatusView.qml</file>
|
<file>qml/page/T_StatusLayout.qml</file>
|
||||||
<file>qml/page/T_TableView.qml</file>
|
<file>qml/page/T_TableView.qml</file>
|
||||||
<file>qml/page/T_TabView.qml</file>
|
<file>qml/page/T_TabView.qml</file>
|
||||||
<file>qml/page/T_Text.qml</file>
|
<file>qml/page/T_Text.qml</file>
|
||||||
@ -182,7 +180,7 @@
|
|||||||
<file>res/image/bg_scenic.png</file>
|
<file>res/image/bg_scenic.png</file>
|
||||||
<file>res/image/image_1.jpg</file>
|
<file>res/image/image_1.jpg</file>
|
||||||
<file>qml/window/PageWindow.qml</file>
|
<file>qml/window/PageWindow.qml</file>
|
||||||
<file>qml/page/T_StaggeredView.qml</file>
|
<file>qml/page/T_StaggeredLayout.qml</file>
|
||||||
<file>qml/viewmodel/SettingsViewModel.qml</file>
|
<file>qml/viewmodel/SettingsViewModel.qml</file>
|
||||||
<file>qml/viewmodel/TextBoxViewModel.qml</file>
|
<file>qml/viewmodel/TextBoxViewModel.qml</file>
|
||||||
<file>qml/page/T_Clip.qml</file>
|
<file>qml/page/T_Clip.qml</file>
|
||||||
@ -190,5 +188,15 @@
|
|||||||
<file>qml/global/Lang.qml</file>
|
<file>qml/global/Lang.qml</file>
|
||||||
<file>qml/page/T_Network.qml</file>
|
<file>qml/page/T_Network.qml</file>
|
||||||
<file>qml/page/T_ShortcutPicker.qml</file>
|
<file>qml/page/T_ShortcutPicker.qml</file>
|
||||||
|
<file>qml/chart/T_BarChart.qml</file>
|
||||||
|
<file>qml/chart/T_LineChart.qml</file>
|
||||||
|
<file>qml/chart/T_PieChart.qml</file>
|
||||||
|
<file>qml/chart/T_RadarChart.qml</file>
|
||||||
|
<file>qml/chart/T_ScatterChart.qml</file>
|
||||||
|
<file>qml/chart/T_BubbleChart.qml</file>
|
||||||
|
<file>qml/chart/T_PolarAreaChart.qml</file>
|
||||||
|
<file>res/image/ic_crash.png</file>
|
||||||
|
<file>qml/window/CrashWindow.qml</file>
|
||||||
|
<file>qml/page/T_SplitLayout.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -16,21 +16,19 @@ Item {
|
|||||||
|
|
||||||
Connections{
|
Connections{
|
||||||
target: FluApp
|
target: FluApp
|
||||||
function onVsyncChanged(){
|
|
||||||
SettingsHelper.saveVsync(FluApp.vsync)
|
|
||||||
}
|
|
||||||
function onUseSystemAppBarChanged(){
|
function onUseSystemAppBarChanged(){
|
||||||
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
FluNetwork.openLog = false
|
||||||
FluNetwork.setInterceptor(function(param){
|
FluNetwork.setInterceptor(function(param){
|
||||||
param.addHeader("Token","000000000000000000000")
|
param.addHeader("Token","000000000000000000000")
|
||||||
})
|
})
|
||||||
FluApp.init(app)
|
FluApp.init(app)
|
||||||
|
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||||
FluApp.vsync = SettingsHelper.getVsync()
|
|
||||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||||
FluTheme.enableAnimation = true
|
FluTheme.enableAnimation = true
|
||||||
FluApp.routes = {
|
FluApp.routes = {
|
||||||
@ -38,12 +36,17 @@ Item {
|
|||||||
"/about":"qrc:/example/qml/window/AboutWindow.qml",
|
"/about":"qrc:/example/qml/window/AboutWindow.qml",
|
||||||
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
||||||
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
||||||
|
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
||||||
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
||||||
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
||||||
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
||||||
"/pageWindow":"qrc:/example/qml/window/PageWindow.qml"
|
"/pageWindow":"qrc:/example/qml/window/PageWindow.qml"
|
||||||
}
|
}
|
||||||
FluApp.initialRoute = "/"
|
var args = Qt.application.arguments
|
||||||
FluApp.run()
|
if(args.length>=2 && args[1].startsWith("-crashed=")){
|
||||||
|
FluApp.navigate("/crash",{crashFilePath:args[1].replace("-crashed=","")})
|
||||||
|
}else{
|
||||||
|
FluApp.navigate("/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
132
example/qml-Qt6/chart/T_BarChart.qml
Normal file
132
example/qml-Qt6/chart/T_BarChart.qml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Bar Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'bar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgba(255, 99, 132, 0.2)',
|
||||||
|
'rgba(255, 159, 64, 0.2)',
|
||||||
|
'rgba(255, 205, 86, 0.2)',
|
||||||
|
'rgba(75, 192, 192, 0.2)',
|
||||||
|
'rgba(54, 162, 235, 0.2)',
|
||||||
|
'rgba(153, 102, 255, 0.2)',
|
||||||
|
'rgba(201, 203, 207, 0.2)'
|
||||||
|
],
|
||||||
|
borderColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(255, 159, 64)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(153, 102, 255)',
|
||||||
|
'rgb(201, 203, 207)'
|
||||||
|
],
|
||||||
|
borderWidth: 1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Bar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
responsive: true,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true,
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'horizontalBar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgba(255, 99, 132, 0.2)',
|
||||||
|
'rgba(255, 159, 64, 0.2)',
|
||||||
|
'rgba(255, 205, 86, 0.2)',
|
||||||
|
'rgba(75, 192, 192, 0.2)',
|
||||||
|
'rgba(54, 162, 235, 0.2)',
|
||||||
|
'rgba(153, 102, 255, 0.2)',
|
||||||
|
'rgba(201, 203, 207, 0.2)'
|
||||||
|
],
|
||||||
|
borderColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(255, 159, 64)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(153, 102, 255)',
|
||||||
|
'rgb(201, 203, 207)'
|
||||||
|
],
|
||||||
|
borderWidth: 1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js HorizontalBar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
responsive: true,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true,
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
74
example/qml-Qt6/chart/T_BubbleChart.qml
Normal file
74
example/qml-Qt6/chart/T_BubbleChart.qml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Bubble Chart"
|
||||||
|
|
||||||
|
function randomScalingFactor() {
|
||||||
|
return Math.random().toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
height: 370
|
||||||
|
width: 500
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'bubble'
|
||||||
|
chartData: {
|
||||||
|
return {
|
||||||
|
datasets: [{
|
||||||
|
label: 'First Dataset',
|
||||||
|
data: [{
|
||||||
|
x: 20,
|
||||||
|
y: 30,
|
||||||
|
r: 15
|
||||||
|
}, {
|
||||||
|
x: 12,
|
||||||
|
y: 70,
|
||||||
|
r: 20
|
||||||
|
}, {
|
||||||
|
x: 11,
|
||||||
|
y: 28,
|
||||||
|
r: 8
|
||||||
|
}, {
|
||||||
|
x: 9,
|
||||||
|
y: 28,
|
||||||
|
r: 10
|
||||||
|
}, {
|
||||||
|
x: 43,
|
||||||
|
y: 7,
|
||||||
|
r: 14
|
||||||
|
}, {
|
||||||
|
x: 22,
|
||||||
|
y: 22,
|
||||||
|
r: 12
|
||||||
|
}, {
|
||||||
|
x: 40,
|
||||||
|
y: 10,
|
||||||
|
r: 10
|
||||||
|
}],
|
||||||
|
backgroundColor: 'rgb(255, 99, 132)'
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
chartOptions: {return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
responsive: true,
|
||||||
|
hoverMode: 'nearest',
|
||||||
|
intersect: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Bubble Chart - Multi Axis'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
45
example/qml-Qt6/chart/T_LineChart.qml
Normal file
45
example/qml-Qt6/chart/T_LineChart.qml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Line Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'line'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
|
tension: 0.1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Line Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
93
example/qml-Qt6/chart/T_PieChart.qml
Normal file
93
example/qml-Qt6/chart/T_PieChart.qml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Doughnut and Pie Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: "doughnut"
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Blue',
|
||||||
|
'Yellow'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [300, 50, 100],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(255, 205, 86)'
|
||||||
|
],
|
||||||
|
hoverOffset: 4
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Doughnut Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: "pie"
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Blue',
|
||||||
|
'Yellow'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [300, 50, 100],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(255, 205, 86)'
|
||||||
|
],
|
||||||
|
hoverOffset: 4
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Pie Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
example/qml-Qt6/chart/T_PolarAreaChart.qml
Normal file
57
example/qml-Qt6/chart/T_PolarAreaChart.qml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"PolarArea Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'polarArea'
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Green',
|
||||||
|
'Yellow',
|
||||||
|
'Grey',
|
||||||
|
'Blue'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [11, 16, 7, 3, 14],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(201, 203, 207)',
|
||||||
|
'rgb(54, 162, 235)'
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js PolarArea Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
74
example/qml-Qt6/chart/T_RadarChart.qml
Normal file
74
example/qml-Qt6/chart/T_RadarChart.qml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Radar Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'radar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Eating',
|
||||||
|
'Drinking',
|
||||||
|
'Sleeping',
|
||||||
|
'Designing',
|
||||||
|
'Coding',
|
||||||
|
'Cycling',
|
||||||
|
'Running'
|
||||||
|
],
|
||||||
|
datasets:
|
||||||
|
[{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 90, 81, 56, 55, 40],
|
||||||
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||||
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
|
pointBackgroundColor: 'rgb(255, 99, 132)',
|
||||||
|
pointBorderColor: '#fff',
|
||||||
|
pointHoverBackgroundColor: '#fff',
|
||||||
|
pointHoverBorderColor: 'rgb(255, 99, 132)'
|
||||||
|
}, {
|
||||||
|
label: 'My Second Dataset',
|
||||||
|
data: [28, 48, 40, 19, 96, 27, 100],
|
||||||
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||||
|
borderColor: 'rgb(54, 162, 235)',
|
||||||
|
pointBackgroundColor: 'rgb(54, 162, 235)',
|
||||||
|
pointBorderColor: '#fff',
|
||||||
|
pointHoverBackgroundColor: '#fff',
|
||||||
|
pointHoverBorderColor: 'rgb(54, 162, 235)'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Radar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
elements: {
|
||||||
|
line: {
|
||||||
|
borderWidth: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
123
example/qml-Qt6/chart/T_ScatterChart.qml
Normal file
123
example/qml-Qt6/chart/T_ScatterChart.qml
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Scatter Chart"
|
||||||
|
|
||||||
|
function randomScalingFactor() {
|
||||||
|
return Math.random().toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
height: 370
|
||||||
|
width: 500
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'scatter'
|
||||||
|
chartData: {
|
||||||
|
return {
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First dataset',
|
||||||
|
xAxisID: 'x-axis-1',
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: '#ff5555',
|
||||||
|
backgroundColor: 'rgba(255,192,192,0.3)',
|
||||||
|
data: [{
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
label: 'My Second dataset',
|
||||||
|
xAxisID: 'x-axis-1',
|
||||||
|
yAxisID: 'y-axis-2',
|
||||||
|
borderColor: '#5555ff',
|
||||||
|
backgroundColor: 'rgba(192,192,255,0.3)',
|
||||||
|
data: [{
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
chartOptions: {return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
responsive: true,
|
||||||
|
hoverMode: 'nearest',
|
||||||
|
intersect: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Scatter Chart - Multi Axis'
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
position: 'bottom',
|
||||||
|
gridLines: {
|
||||||
|
zeroLineColor: 'rgba(0,0,0,1)'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||||
|
display: true,
|
||||||
|
position: 'left',
|
||||||
|
id: 'y-axis-1',
|
||||||
|
}, {
|
||||||
|
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||||
|
display: true,
|
||||||
|
position: 'right',
|
||||||
|
reverse: true,
|
||||||
|
id: 'y-axis-2',
|
||||||
|
|
||||||
|
// grid line settings
|
||||||
|
gridLines: {
|
||||||
|
drawOnChartArea: false, // only want the grid lines for one axis to show up
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -118,7 +118,7 @@ FluExpander{
|
|||||||
"FluTableView",
|
"FluTableView",
|
||||||
"FluColors",
|
"FluColors",
|
||||||
"FluTheme",
|
"FluTheme",
|
||||||
"FluStatusView",
|
"FluStatusLayout",
|
||||||
"FluRatingControl",
|
"FluRatingControl",
|
||||||
"FluPasswordBox",
|
"FluPasswordBox",
|
||||||
"FluBreadcrumbBar",
|
"FluBreadcrumbBar",
|
||||||
@ -136,7 +136,7 @@ FluExpander{
|
|||||||
"FluTimeline",
|
"FluTimeline",
|
||||||
"FluChart",
|
"FluChart",
|
||||||
"FluRangeSlider",
|
"FluRangeSlider",
|
||||||
"FluStaggeredView",
|
"FluStaggeredLayout",
|
||||||
"FluProgressButton",
|
"FluProgressButton",
|
||||||
"FluLoadingButton",
|
"FluLoadingButton",
|
||||||
"FluClip",
|
"FluClip",
|
||||||
|
@ -50,9 +50,7 @@ FluObject{
|
|||||||
}
|
}
|
||||||
title:"Buttons"
|
title:"Buttons"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/Button.png"
|
extra:({image:"qrc:/example/res/image/control/Button.png",recentlyUpdated:true,desc:"A control that responds to user input and raisesa Click event."})
|
||||||
recentlyUpdated:true
|
|
||||||
desc:"A control that responds to user input and raisesa Click event."
|
|
||||||
url:"qrc:/example/qml/page/T_Buttons.qml"
|
url:"qrc:/example/qml/page/T_Buttons.qml"
|
||||||
onTap:{
|
onTap:{
|
||||||
item_buttons.count = 0
|
item_buttons.count = 0
|
||||||
@ -83,18 +81,14 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Slider"
|
title:"Slider"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/Slider.png"
|
extra:({image:"qrc:/example/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."})
|
||||||
recentlyUpdated:true
|
|
||||||
desc:"A control that lets the user select from a rangeof values by moving a Thumb control along atrack."
|
|
||||||
url:"qrc:/example/qml/page/T_Slider.qml"
|
url:"qrc:/example/qml/page/T_Slider.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"CheckBox"
|
title:"CheckBox"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/Checkbox.png"
|
extra:({image:"qrc:/example/res/image/control/Checkbox.png",recentlyUpdated:true,desc:"A control that a user can select or clear."})
|
||||||
recentlyUpdated:true
|
|
||||||
desc:"A control that a user can select or clear."
|
|
||||||
url:"qrc:/example/qml/page/T_CheckBox.qml"
|
url:"qrc:/example/qml/page/T_CheckBox.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -164,9 +158,7 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"InfoBar"
|
title:"InfoBar"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/InfoBar.png"
|
extra:({image:"qrc:/example/res/image/control/InfoBar.png",recentlyUpdated:true,desc:"An inline message to display app-wide statuschange information."})
|
||||||
recentlyUpdated:true
|
|
||||||
desc:"An inline message to display app-wide statuschange information."
|
|
||||||
url:"qrc:/example/qml/page/T_InfoBar.qml"
|
url:"qrc:/example/qml/page/T_InfoBar.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -200,12 +192,6 @@ FluObject{
|
|||||||
url:"qrc:/example/qml/page/T_Clip.qml"
|
url:"qrc:/example/qml/page/T_Clip.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
|
||||||
title:"StatusView"
|
|
||||||
menuDelegate: paneItemMenu
|
|
||||||
url:"qrc:/example/qml/page/T_StatusView.qml"
|
|
||||||
onTap:{ navigationView.push(url) }
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Carousel"
|
title:"Carousel"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
@ -218,12 +204,6 @@ FluObject{
|
|||||||
url:"qrc:/example/qml/page/T_Expander.qml"
|
url:"qrc:/example/qml/page/T_Expander.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
|
||||||
title:"StaggeredView"
|
|
||||||
menuDelegate: paneItemMenu
|
|
||||||
url:"qrc:/example/qml/page/T_StaggeredView.qml"
|
|
||||||
onTap:{ navigationView.push(url) }
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Watermark"
|
title:"Watermark"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
@ -232,6 +212,29 @@ FluObject{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title:Lang.layout
|
||||||
|
icon:FluentIcons.DockLeft
|
||||||
|
FluPaneItem{
|
||||||
|
title:"StaggeredLayout"
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/page/T_StaggeredLayout.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"SplitLayout"
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/page/T_SplitLayout.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"StatusLayout"
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/page/T_StatusLayout.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FluPaneItemExpander{
|
FluPaneItemExpander{
|
||||||
title:Lang.popus
|
title:Lang.popus
|
||||||
icon:FluentIcons.ButtonMenu
|
icon:FluentIcons.ButtonMenu
|
||||||
@ -276,10 +279,7 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Pivot"
|
title:"Pivot"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/Pivot.png"
|
extra:({image:"qrc:/example/res/image/control/Pivot.png",order:3,recentlyAdded:true,desc:"Presents information from different sources in atabbed view."})
|
||||||
recentlyAdded:true
|
|
||||||
order:3
|
|
||||||
desc:"Presents information from different sources in atabbed view."
|
|
||||||
url:"qrc:/example/qml/page/T_Pivot.qml"
|
url:"qrc:/example/qml/page/T_Pivot.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -292,10 +292,7 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"TabView"
|
title:"TabView"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/TabView.png"
|
extra:({image:"qrc:/example/res/image/control/TabView.png",order:1,recentlyAdded:true,desc:"A control that displays a collection of tabs thatcan be used to display several documents."})
|
||||||
recentlyAdded:true
|
|
||||||
order:1
|
|
||||||
desc:"A control that displays a collection of tabs thatcan be used to display several documents."
|
|
||||||
url:"qrc:/example/qml/page/T_TabView.qml"
|
url:"qrc:/example/qml/page/T_TabView.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -308,10 +305,7 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"TableView"
|
title:"TableView"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/DataGrid.png"
|
extra:({image:"qrc:/example/res/image/control/DataGrid.png",order:4,recentlyAdded:true,desc:"The TableView control provides a flexible way to display a collection of data in rows and columns"})
|
||||||
recentlyAdded:true
|
|
||||||
order:4
|
|
||||||
desc:"The TableView control provides a flexible way to display a collection of data in rows and columns"
|
|
||||||
url:"qrc:/example/qml/page/T_TableView.qml"
|
url:"qrc:/example/qml/page/T_TableView.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -330,10 +324,7 @@ FluObject{
|
|||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"FlipView"
|
title:"FlipView"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
image:"qrc:/example/res/image/control/FlipView.png"
|
extra:({image:"qrc:/example/res/image/control/FlipView.png",order:2,recentlyAdded:true,desc:"Presents a collection of items that the user canflip through, one item at a time."})
|
||||||
recentlyAdded:true
|
|
||||||
order:2
|
|
||||||
desc:"Presents a collection of items that the user canflip through, one item at a time."
|
|
||||||
url:"qrc:/example/qml/page/T_FlipView.qml"
|
url:"qrc:/example/qml/page/T_FlipView.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
@ -368,6 +359,53 @@ FluObject{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluPaneItemExpander{
|
||||||
|
title: Lang.chart
|
||||||
|
icon:FluentIcons.AreaChart
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.bar_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_BarChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.line_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_LineChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.pie_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_PieChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.polar_area_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_PolarAreaChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.bubble_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_BubbleChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.scatter_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_ScatterChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:Lang.radar_chart
|
||||||
|
menuDelegate: paneItemMenu
|
||||||
|
url:"qrc:/example/qml/chart/T_RadarChart.qml"
|
||||||
|
onTap:{ navigationView.push(url) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FluPaneItemSeparator{
|
FluPaneItemSeparator{
|
||||||
spacing:10
|
spacing:10
|
||||||
size:1
|
size:1
|
||||||
@ -394,24 +432,12 @@ FluObject{
|
|||||||
url:"qrc:/example/qml/page/T_Timeline.qml"
|
url:"qrc:/example/qml/page/T_Timeline.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
|
||||||
title:"Screenshot(Todo)"
|
|
||||||
menuDelegate: paneItemMenu
|
|
||||||
url:"qrc:/example/qml/page/T_Screenshot.qml"
|
|
||||||
onTap:{ navigationView.push(url) }
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Captcha"
|
title:"Captcha"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
url:"qrc:/example/qml/page/T_Captcha.qml"
|
url:"qrc:/example/qml/page/T_Captcha.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
FluPaneItem{
|
|
||||||
title:"Chart"
|
|
||||||
menuDelegate: paneItemMenu
|
|
||||||
url:"qrc:/example/qml/page/T_Chart.qml"
|
|
||||||
onTap:{ navigationView.push(url) }
|
|
||||||
}
|
|
||||||
FluPaneItem{
|
FluPaneItem{
|
||||||
title:"Network"
|
title:"Network"
|
||||||
menuDelegate: paneItemMenu
|
menuDelegate: paneItemMenu
|
||||||
@ -445,25 +471,25 @@ FluObject{
|
|||||||
url:"qrc:/example/qml/page/T_3D.qml"
|
url:"qrc:/example/qml/page/T_3D.qml"
|
||||||
onTap:{ navigationView.push(url) }
|
onTap:{ navigationView.push(url) }
|
||||||
}
|
}
|
||||||
|
FluPaneItem{
|
||||||
|
title:"Test Crash"
|
||||||
|
visible: FluTools.isWin()
|
||||||
|
onTapListener: function(){
|
||||||
|
AppInfo.testCrash()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRecentlyAddedData(){
|
function getRecentlyAddedData(){
|
||||||
var arr = []
|
var arr = []
|
||||||
for(var i=0;i<children.length;i++){
|
var items = navigationView.getItems();
|
||||||
var item = children[i]
|
for(var i=0;i<items.length;i++){
|
||||||
if(item instanceof FluPaneItem && item.recentlyAdded){
|
var item = items[i]
|
||||||
|
if(item instanceof FluPaneItem && item.extra && item.extra.recentlyAdded){
|
||||||
arr.push(item)
|
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.extra.order-o1.extra.order })
|
||||||
}
|
|
||||||
}
|
|
||||||
arr.sort(function(o1,o2){ return o2.order-o1.order })
|
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,7 +498,7 @@ FluObject{
|
|||||||
var items = navigationView.getItems();
|
var items = navigationView.getItems();
|
||||||
for(var i=0;i<items.length;i++){
|
for(var i=0;i<items.length;i++){
|
||||||
var item = items[i]
|
var item = items[i]
|
||||||
if(item instanceof FluPaneItem && item.recentlyUpdated){
|
if(item instanceof FluPaneItem && item.extra && item.extra.recentlyUpdated){
|
||||||
arr.push(item)
|
arr.push(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ QtObject {
|
|||||||
property string basic_input
|
property string basic_input
|
||||||
property string form
|
property string form
|
||||||
property string surface
|
property string surface
|
||||||
|
property string layout
|
||||||
property string popus
|
property string popus
|
||||||
property string navigation
|
property string navigation
|
||||||
property string theming
|
property string theming
|
||||||
@ -20,12 +21,21 @@ QtObject {
|
|||||||
property string locale
|
property string locale
|
||||||
property string navigation_view_display_mode
|
property string navigation_view_display_mode
|
||||||
property string other
|
property string other
|
||||||
|
property string chart
|
||||||
|
property string bar_chart
|
||||||
|
property string line_chart
|
||||||
|
property string pie_chart
|
||||||
|
property string polar_area_chart
|
||||||
|
property string bubble_chart
|
||||||
|
property string scatter_chart
|
||||||
|
property string radar_chart
|
||||||
|
|
||||||
function zh(){
|
function zh(){
|
||||||
home="首页"
|
home="首页"
|
||||||
basic_input="基本输入"
|
basic_input="基本输入"
|
||||||
form="表单"
|
form="表单"
|
||||||
surface="表面"
|
surface="表面"
|
||||||
|
layout="布局"
|
||||||
popus="弹窗"
|
popus="弹窗"
|
||||||
navigation="导航"
|
navigation="导航"
|
||||||
theming="主题"
|
theming="主题"
|
||||||
@ -38,6 +48,14 @@ QtObject {
|
|||||||
locale="语言环境"
|
locale="语言环境"
|
||||||
navigation_view_display_mode="导航视图显示模式"
|
navigation_view_display_mode="导航视图显示模式"
|
||||||
other="其他"
|
other="其他"
|
||||||
|
chart="表格"
|
||||||
|
bar_chart="条形图"
|
||||||
|
line_chart="折线图"
|
||||||
|
pie_chart="饼图"
|
||||||
|
polar_area_chart="极坐标区域图"
|
||||||
|
bubble_chart="气泡图"
|
||||||
|
scatter_chart="散点图"
|
||||||
|
radar_chart="雷达图"
|
||||||
}
|
}
|
||||||
|
|
||||||
function en(){
|
function en(){
|
||||||
@ -45,6 +63,7 @@ QtObject {
|
|||||||
basic_input="Basic Input"
|
basic_input="Basic Input"
|
||||||
form="Form"
|
form="Form"
|
||||||
surface="Surfaces"
|
surface="Surfaces"
|
||||||
|
layout="Layout"
|
||||||
popus="Popus"
|
popus="Popus"
|
||||||
navigation="Navigation"
|
navigation="Navigation"
|
||||||
theming="Theming"
|
theming="Theming"
|
||||||
@ -57,6 +76,14 @@ QtObject {
|
|||||||
locale="Locale"
|
locale="Locale"
|
||||||
navigation_view_display_mode="NavigationView Display Mode"
|
navigation_view_display_mode="NavigationView Display Mode"
|
||||||
other="Other"
|
other="Other"
|
||||||
|
chart="Chart"
|
||||||
|
bar_chart="Bar Chart"
|
||||||
|
line_chart="Line Chart"
|
||||||
|
pie_chart="Pie Chart"
|
||||||
|
polar_area_chart="Polar Area Chart"
|
||||||
|
bubble_chart="Bubble Chart"
|
||||||
|
scatter_chart="Scatter Chart"
|
||||||
|
radar_chart="Radar Chart"
|
||||||
}
|
}
|
||||||
|
|
||||||
property string __locale
|
property string __locale
|
||||||
|
@ -10,7 +10,7 @@ import Qt3D.Extras
|
|||||||
import QtQuick.Scene3D
|
import QtQuick.Scene3D
|
||||||
import QtQuick.Dialogs
|
import QtQuick.Dialogs
|
||||||
import Qt.labs.platform
|
import Qt.labs.platform
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluContentPage{
|
FluContentPage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import QtQuick.Window
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls.Basic
|
import QtQuick.Controls.Basic
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -1,331 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Window
|
|
||||||
import QtQuick.Controls
|
|
||||||
import FluentUI
|
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
|
|
||||||
FluScrollablePage{
|
|
||||||
|
|
||||||
title:"Chart"
|
|
||||||
|
|
||||||
function randomScalingFactor() {
|
|
||||||
return Math.random().toFixed(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
FluArea{
|
|
||||||
height: 370
|
|
||||||
width: 500
|
|
||||||
paddings: 10
|
|
||||||
Layout.topMargin: 20
|
|
||||||
FluChart{
|
|
||||||
anchors.fill: parent
|
|
||||||
chartType: 'scatter'
|
|
||||||
chartData: {
|
|
||||||
return {
|
|
||||||
datasets: [{
|
|
||||||
label: 'My First dataset',
|
|
||||||
xAxisID: 'x-axis-1',
|
|
||||||
yAxisID: 'y-axis-1',
|
|
||||||
borderColor: '#ff5555',
|
|
||||||
backgroundColor: 'rgba(255,192,192,0.3)',
|
|
||||||
data: [{
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}]
|
|
||||||
}, {
|
|
||||||
label: 'My Second dataset',
|
|
||||||
xAxisID: 'x-axis-1',
|
|
||||||
yAxisID: 'y-axis-2',
|
|
||||||
borderColor: '#5555ff',
|
|
||||||
backgroundColor: 'rgba(192,192,255,0.3)',
|
|
||||||
data: [{
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}, {
|
|
||||||
x: randomScalingFactor(),
|
|
||||||
y: randomScalingFactor(),
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}}
|
|
||||||
chartOptions: {return {
|
|
||||||
maintainAspectRatio: false,
|
|
||||||
responsive: true,
|
|
||||||
hoverMode: 'nearest',
|
|
||||||
intersect: true,
|
|
||||||
title: {
|
|
||||||
display: true,
|
|
||||||
text: 'Chart.js Scatter Chart - Multi Axis'
|
|
||||||
},
|
|
||||||
scales: {
|
|
||||||
xAxes: [{
|
|
||||||
position: 'bottom',
|
|
||||||
gridLines: {
|
|
||||||
zeroLineColor: 'rgba(0,0,0,1)'
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
yAxes: [{
|
|
||||||
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
|
||||||
display: true,
|
|
||||||
position: 'left',
|
|
||||||
id: 'y-axis-1',
|
|
||||||
}, {
|
|
||||||
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
|
||||||
display: true,
|
|
||||||
position: 'right',
|
|
||||||
reverse: true,
|
|
||||||
id: 'y-axis-2',
|
|
||||||
|
|
||||||
// grid line settings
|
|
||||||
gridLines: {
|
|
||||||
drawOnChartArea: false, // only want the grid lines for one axis to show up
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluArea{
|
|
||||||
width: 500
|
|
||||||
height: 370
|
|
||||||
paddings: 10
|
|
||||||
Layout.topMargin: 20
|
|
||||||
FluChart{
|
|
||||||
anchors.fill: parent
|
|
||||||
chartType: 'bar'
|
|
||||||
chartData: { return {
|
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
|
||||||
datasets: [{
|
|
||||||
label: 'Dataset 1',
|
|
||||||
backgroundColor: '#ff9999',
|
|
||||||
stack: 'Stack 0',
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: 'Dataset 2',
|
|
||||||
backgroundColor: '#9999ff',
|
|
||||||
stack: 'Stack 0',
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
label: 'Dataset 3',
|
|
||||||
backgroundColor: '#99ff99',
|
|
||||||
stack: 'Stack 1',
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chartOptions: { return {
|
|
||||||
maintainAspectRatio: false,
|
|
||||||
title: {
|
|
||||||
display: true,
|
|
||||||
text: 'Chart.js Bar Chart - Stacked'
|
|
||||||
},
|
|
||||||
tooltips: {
|
|
||||||
mode: 'index',
|
|
||||||
intersect: false
|
|
||||||
},
|
|
||||||
responsive: true,
|
|
||||||
scales: {
|
|
||||||
xAxes: [{
|
|
||||||
stacked: true,
|
|
||||||
}],
|
|
||||||
yAxes: [{
|
|
||||||
stacked: true
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluArea{
|
|
||||||
width: 500
|
|
||||||
height: 370
|
|
||||||
paddings: 10
|
|
||||||
Layout.topMargin: 20
|
|
||||||
FluChart{
|
|
||||||
anchors.fill: parent
|
|
||||||
chartType: 'pie'
|
|
||||||
chartData: {return {
|
|
||||||
datasets: [{
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
],
|
|
||||||
backgroundColor: [
|
|
||||||
'#ffbbbb',
|
|
||||||
'#ffddaa',
|
|
||||||
'#ffffbb',
|
|
||||||
'#bbffbb',
|
|
||||||
'#bbbbff'
|
|
||||||
],
|
|
||||||
label: 'Dataset 1'
|
|
||||||
}],
|
|
||||||
labels: [
|
|
||||||
'Red',
|
|
||||||
'Orange',
|
|
||||||
'Yellow',
|
|
||||||
'Green',
|
|
||||||
'Blue'
|
|
||||||
]
|
|
||||||
}}
|
|
||||||
chartOptions: {return {maintainAspectRatio: false, responsive: true}}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluArea{
|
|
||||||
width: 500
|
|
||||||
height: 370
|
|
||||||
paddings: 10
|
|
||||||
Layout.topMargin: 20
|
|
||||||
FluChart{
|
|
||||||
anchors.fill: parent
|
|
||||||
chartType: 'line'
|
|
||||||
chartData: { return {
|
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
|
||||||
datasets: [{
|
|
||||||
label: 'Filled',
|
|
||||||
fill: true,
|
|
||||||
backgroundColor: 'rgba(192,222,255,0.3)',
|
|
||||||
borderColor: 'rgba(128,192,255,255)',
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
],
|
|
||||||
}, {
|
|
||||||
label: 'Dashed',
|
|
||||||
fill: false,
|
|
||||||
backgroundColor: 'rgba(0,0,0,0)',
|
|
||||||
borderColor: '#009900',
|
|
||||||
borderDash: [5, 5],
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
],
|
|
||||||
}, {
|
|
||||||
label: 'Filled',
|
|
||||||
backgroundColor: 'rgba(0,0,0,0)',
|
|
||||||
borderColor: '#990000',
|
|
||||||
data: [
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor(),
|
|
||||||
randomScalingFactor()
|
|
||||||
],
|
|
||||||
fill: false,
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chartOptions: {return {
|
|
||||||
maintainAspectRatio: false,
|
|
||||||
responsive: true,
|
|
||||||
title: {
|
|
||||||
display: true,
|
|
||||||
text: 'Chart.js Line Chart'
|
|
||||||
},
|
|
||||||
tooltips: {
|
|
||||||
mode: 'index',
|
|
||||||
intersect: false,
|
|
||||||
},
|
|
||||||
hover: {
|
|
||||||
mode: 'nearest',
|
|
||||||
intersect: true
|
|
||||||
},
|
|
||||||
scales: {
|
|
||||||
xAxes: [{
|
|
||||||
display: true,
|
|
||||||
scaleLabel: {
|
|
||||||
display: true,
|
|
||||||
labelString: 'Month'
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
yAxes: [{
|
|
||||||
display: true,
|
|
||||||
scaleLabel: {
|
|
||||||
display: true,
|
|
||||||
labelString: 'Value'
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
@ -16,7 +16,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Double Button Dialog"
|
text:"Show Double Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
double_btn_dialog.open()
|
double_btn_dialog.open()
|
||||||
@ -65,7 +64,6 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.topMargin: 20
|
|
||||||
text:"Show Triple Button Dialog"
|
text:"Show Triple Button Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
triple_btn_dialog.open()
|
triple_btn_dialog.open()
|
||||||
@ -118,17 +116,25 @@ FluScrollablePage{
|
|||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
height: 68
|
height: 100
|
||||||
paddings: 10
|
paddings: 10
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluButton{
|
FluButton{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.top: parent.top
|
||||||
Layout.topMargin: 20
|
anchors.topMargin: 5
|
||||||
text:"Custom Content Dialog"
|
text:"Custom Content Dialog"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
custom_btn_dialog.open()
|
custom_btn_dialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluButton{
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 48
|
||||||
|
text:"Custom Content Dialog2"
|
||||||
|
onClicked: {
|
||||||
|
custom_btn_dialog2.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -164,8 +170,8 @@ FluScrollablePage{
|
|||||||
negativeText:"取消加载"
|
negativeText:"取消加载"
|
||||||
contentDelegate: Component{
|
contentDelegate: Component{
|
||||||
Item{
|
Item{
|
||||||
width: parent.width
|
implicitWidth: parent.width
|
||||||
height: 80
|
implicitHeight: 80
|
||||||
FluProgressRing{
|
FluProgressRing{
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
@ -179,4 +185,47 @@ FluScrollablePage{
|
|||||||
showSuccess("点击确定按钮")
|
showSuccess("点击确定按钮")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluContentDialog{
|
||||||
|
id:custom_btn_dialog2
|
||||||
|
title:"折线图"
|
||||||
|
contentDelegate: Component{
|
||||||
|
Item{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 300
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'line'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
|
tension: 0.1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Line Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buttonFlags: FluContentDialogType.PositiveButton
|
||||||
|
positiveText:"确定"
|
||||||
|
onPositiveClicked:{
|
||||||
|
showSuccess("点击确定按钮")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import "qrc:///example/qml/global"
|
|
||||||
import FluentUI
|
import FluentUI
|
||||||
|
import "../global"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
@ -27,7 +27,6 @@ FluScrollablePage{
|
|||||||
id: bg
|
id: bg
|
||||||
fillMode:Image.PreserveAspectCrop
|
fillMode:Image.PreserveAspectCrop
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
asynchronous: true
|
|
||||||
verticalAlignment: Qt.AlignTop
|
verticalAlignment: Qt.AlignTop
|
||||||
sourceSize: Qt.size(960,640)
|
sourceSize: Qt.size(960,640)
|
||||||
source: "qrc:/example/res/image/bg_home_header.png"
|
source: "qrc:/example/res/image/bg_home_header.png"
|
||||||
@ -160,7 +159,7 @@ FluScrollablePage{
|
|||||||
Component{
|
Component{
|
||||||
id:com_item
|
id:com_item
|
||||||
Item{
|
Item{
|
||||||
property string desc: modelData.desc
|
property string desc: modelData.extra.desc
|
||||||
width: 320
|
width: 320
|
||||||
height: 120
|
height: 120
|
||||||
FluArea{
|
FluArea{
|
||||||
@ -182,7 +181,7 @@ FluScrollablePage{
|
|||||||
id:item_icon
|
id:item_icon
|
||||||
height: 40
|
height: 40
|
||||||
width: 40
|
width: 40
|
||||||
source: modelData.image
|
source: modelData.extra.image
|
||||||
anchors{
|
anchors{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ FluScrollablePage{
|
|||||||
FluButton{
|
FluButton{
|
||||||
text:"Success"
|
text:"Success"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
showSuccess("这是一个Success样式的InfoBar这是一个Success样式的InfoBar")
|
showSuccess("这是一个Success样式的InfoBar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluButton{
|
FluButton{
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import QtQuick.Window
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import Qt.labs.platform
|
import Qt.labs.platform
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluContentPage{
|
FluContentPage{
|
||||||
|
|
||||||
@ -64,6 +64,20 @@ FluContentPage{
|
|||||||
.go(callable)
|
.go(callable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluButton{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 36
|
||||||
|
text: "Head"
|
||||||
|
onClicked: {
|
||||||
|
text_info.text = ""
|
||||||
|
FluNetwork.head("https://httpbingo.org/head")
|
||||||
|
.addQuery("name","孙悟空")
|
||||||
|
.addQuery("age",500)
|
||||||
|
.addQuery("address","花果山水帘洞")
|
||||||
|
.bind(root)
|
||||||
|
.go(callable)
|
||||||
|
}
|
||||||
|
}
|
||||||
FluButton{
|
FluButton{
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: 36
|
implicitHeight: 36
|
||||||
@ -280,6 +294,21 @@ FluContentPage{
|
|||||||
.go(callable)
|
.go(callable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluButton{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 36
|
||||||
|
text: "Open Log"
|
||||||
|
onClicked: {
|
||||||
|
text_info.text = ""
|
||||||
|
FluNetwork.postJson("https://httpbingo.org/post")
|
||||||
|
.add("name","孙悟空")
|
||||||
|
.add("age",500)
|
||||||
|
.add("address","花果山水帘洞")
|
||||||
|
.openLog(true)
|
||||||
|
.bind(root)
|
||||||
|
.go(callable)
|
||||||
|
}
|
||||||
|
}
|
||||||
FluButton{
|
FluButton{
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: 36
|
implicitHeight: 36
|
||||||
@ -378,7 +407,7 @@ FluContentPage{
|
|||||||
text: "Download File"
|
text: "Download File"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
folder_dialog.showDialog(function(path){
|
folder_dialog.showDialog(function(path){
|
||||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||||
.toDownload(path)
|
.toDownload(path)
|
||||||
.bind(root)
|
.bind(root)
|
||||||
.go(callable_download_file)
|
.go(callable_download_file)
|
||||||
@ -392,7 +421,7 @@ FluContentPage{
|
|||||||
text: "Breakpoint Download File"
|
text: "Breakpoint Download File"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
folder_dialog.showDialog(function(path){
|
folder_dialog.showDialog(function(path){
|
||||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||||
.toDownload(path,true)
|
.toDownload(path,true)
|
||||||
.bind(root)
|
.bind(root)
|
||||||
.go(callable_breakpoint_download_file)
|
.go(callable_breakpoint_download_file)
|
||||||
@ -492,7 +521,7 @@ FluContentPage{
|
|||||||
property var onSelectListener
|
property var onSelectListener
|
||||||
id: folder_dialog
|
id: folder_dialog
|
||||||
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
||||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/big_buck_bunny.mp4"
|
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/oceans.mp4"
|
||||||
fileMode: FileDialog.SaveFile
|
fileMode: FileDialog.SaveFile
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
||||||
|
@ -2,8 +2,8 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
import FluentUI
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage {
|
FluScrollablePage {
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluPage{
|
FluPage{
|
||||||
launchMode: FluPageType.SingleTop
|
launchMode: FluPageType.SingleTop
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import QtQuick.Window
|
|
||||||
import QtQuick.Controls
|
|
||||||
import FluentUI
|
|
||||||
import Qt.labs.platform
|
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
|
|
||||||
FluScrollablePage{
|
|
||||||
|
|
||||||
title:"Screenshot"
|
|
||||||
|
|
||||||
FluArea{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 100
|
|
||||||
paddings: 10
|
|
||||||
Layout.topMargin: 20
|
|
||||||
|
|
||||||
FluFilledButton{
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text:"Open Screenshot"
|
|
||||||
onClicked: {
|
|
||||||
screenshot.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle{
|
|
||||||
Layout.preferredHeight: 400
|
|
||||||
Layout.preferredWidth: 400
|
|
||||||
Layout.topMargin: 10
|
|
||||||
Layout.leftMargin: 4
|
|
||||||
Layout.bottomMargin: 4
|
|
||||||
radius: 4
|
|
||||||
color: FluTheme.dark ? FluColors.Black : FluColors.White
|
|
||||||
FluShadow{
|
|
||||||
radius: 4
|
|
||||||
color: FluTheme.primaryColor
|
|
||||||
}
|
|
||||||
Image{
|
|
||||||
id:image
|
|
||||||
anchors.fill: parent
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
asynchronous: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluScreenshot{
|
|
||||||
id:screenshot
|
|
||||||
captrueMode: FluScreenshotType.File
|
|
||||||
saveFolder: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation)+"/screenshot"
|
|
||||||
onCaptrueCompleted:
|
|
||||||
(captrue)=>{
|
|
||||||
image.source = captrue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,9 +3,9 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/global"
|
import "../global"
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
import "qrc:///example/qml/viewmodel"
|
import "../viewmodel"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
@ -56,22 +56,6 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluArea{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 20
|
|
||||||
height: 50
|
|
||||||
paddings: 10
|
|
||||||
FluCheckBox{
|
|
||||||
text:"V-Sync"
|
|
||||||
checked: FluApp.vsync
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
FluApp.vsync = !FluApp.vsync
|
|
||||||
dialog_restart.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
@ -103,26 +87,6 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluArea{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 20
|
|
||||||
height: 50
|
|
||||||
paddings: 10
|
|
||||||
FluCheckBox{
|
|
||||||
text:"Software Render"
|
|
||||||
checked: SettingsHelper.getRender() === "software"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
if(SettingsHelper.getRender() === "software"){
|
|
||||||
SettingsHelper.saveRender("")
|
|
||||||
}else{
|
|
||||||
SettingsHelper.saveRender("software")
|
|
||||||
}
|
|
||||||
dialog_restart.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluContentDialog{
|
FluContentDialog{
|
||||||
id:dialog_restart
|
id:dialog_restart
|
||||||
title:"友情提示"
|
title:"友情提示"
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
import FluentUI
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
84
example/qml-Qt6/page/T_SplitLayout.qml
Normal file
84
example/qml-Qt6/page/T_SplitLayout.qml
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import FluentUI
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluContentPage{
|
||||||
|
|
||||||
|
title:"SplitLayout"
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
id:layout_dropdown
|
||||||
|
anchors{
|
||||||
|
top: parent.top
|
||||||
|
topMargin: 20
|
||||||
|
}
|
||||||
|
FluText{
|
||||||
|
text:"orientation:"
|
||||||
|
}
|
||||||
|
FluDropDownButton{
|
||||||
|
id:btn_orientation
|
||||||
|
Layout.preferredWidth: 120
|
||||||
|
text:"Horizontal"
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Horizontal"
|
||||||
|
onClicked: {
|
||||||
|
btn_orientation.text = text
|
||||||
|
split_layout.orientation = Qt.Horizontal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluMenuItem{
|
||||||
|
text:"Vertical"
|
||||||
|
onClicked: {
|
||||||
|
btn_orientation.text = text
|
||||||
|
split_layout.orientation = Qt.Vertical
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluSplitLayout {
|
||||||
|
id:split_layout
|
||||||
|
anchors{
|
||||||
|
top: layout_dropdown.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
topMargin: 8
|
||||||
|
}
|
||||||
|
orientation: Qt.Horizontal
|
||||||
|
Item {
|
||||||
|
clip: true
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: 200
|
||||||
|
SplitView.maximumWidth: 400
|
||||||
|
SplitView.maximumHeight: 400
|
||||||
|
FluText {
|
||||||
|
text: "Page 1"
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
clip: true
|
||||||
|
id: centerItem
|
||||||
|
SplitView.minimumWidth: 50
|
||||||
|
SplitView.minimumHeight: 50
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
FluText {
|
||||||
|
text: "Page 2"
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
clip: true
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: 200
|
||||||
|
FluText {
|
||||||
|
text: "Page 3"
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,12 +2,12 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
import FluentUI 1.0
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
FluContentPage{
|
FluContentPage{
|
||||||
|
|
||||||
title:"StaggeredView"
|
title:"StaggeredLayout"
|
||||||
|
|
||||||
property var colors : [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green]
|
property var colors : [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green]
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ FluContentPage{
|
|||||||
contentHeight: staggered_view.implicitHeight
|
contentHeight: staggered_view.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
FluStaggeredView{
|
FluStaggeredLayout{
|
||||||
id:staggered_view
|
id:staggered_view
|
||||||
width: parent.width
|
width: parent.width
|
||||||
itemWidth: 160
|
itemWidth: 160
|
@ -3,11 +3,11 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
title:"StatusView"
|
title:"StatusLayout"
|
||||||
|
|
||||||
FluArea{
|
FluArea{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
@ -25,28 +25,28 @@ FluScrollablePage{
|
|||||||
text:"Loading"
|
text:"Loading"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btn_status_mode.text = text
|
btn_status_mode.text = text
|
||||||
status_view.statusMode = FluStatusViewType.Loading
|
status_view.statusMode = FluStatusLayoutType.Loading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
text:"Empty"
|
text:"Empty"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btn_status_mode.text = text
|
btn_status_mode.text = text
|
||||||
status_view.statusMode = FluStatusViewType.Empty
|
status_view.statusMode = FluStatusLayoutType.Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
text:"Error"
|
text:"Error"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btn_status_mode.text = text
|
btn_status_mode.text = text
|
||||||
status_view.statusMode = FluStatusViewType.Error
|
status_view.statusMode = FluStatusLayoutType.Error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
text:"Success"
|
text:"Success"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btn_status_mode.text = text
|
btn_status_mode.text = text
|
||||||
status_view.statusMode = FluStatusViewType.Success
|
status_view.statusMode = FluStatusLayoutType.Success
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
height: 380
|
height: 380
|
||||||
paddings: 10
|
paddings: 10
|
||||||
FluStatusView{
|
FluStatusLayout{
|
||||||
id:status_view
|
id:status_view
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onErrorClicked:{
|
onErrorClicked:{
|
||||||
@ -73,9 +73,9 @@ FluScrollablePage{
|
|||||||
CodeExpander{
|
CodeExpander{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: -1
|
Layout.topMargin: -1
|
||||||
code:'FluStatusView{
|
code:'FluStatusLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
statusMode: FluStatusViewType.Loading
|
statusMode: FluStatusLayoutType.Loading
|
||||||
Rectangle{
|
Rectangle{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color:FluTheme.primaryColor
|
color:FluTheme.primaryColor
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ FluScrollablePage{
|
|||||||
text:"Always"
|
text:"Always"
|
||||||
Layout.preferredWidth: 120
|
Layout.preferredWidth: 120
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
text:"Nerver"
|
text:"Never"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btn_close_button_visibility.text = text
|
btn_close_button_visibility.text = text
|
||||||
tab_view.closeButtonVisibility = FluTabViewType.Nerver
|
tab_view.closeButtonVisibility = FluTabViewType.Never
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluContentPage{
|
FluContentPage{
|
||||||
|
|
||||||
@ -29,6 +29,42 @@ FluContentPage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluContentDialog{
|
||||||
|
id:custom_update_dialog
|
||||||
|
property var text
|
||||||
|
property var onAccpetListener
|
||||||
|
title:"修改列名"
|
||||||
|
negativeText:"取消"
|
||||||
|
contentDelegate: Component{
|
||||||
|
Item{
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 60
|
||||||
|
FluTextBox{
|
||||||
|
id:textbox_text
|
||||||
|
anchors.centerIn: parent
|
||||||
|
onTextChanged: {
|
||||||
|
custom_update_dialog.text = textbox_text.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
textbox_text.text = custom_update_dialog.text
|
||||||
|
textbox_text.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
positiveText:"确定"
|
||||||
|
onPositiveClicked:{
|
||||||
|
if(custom_update_dialog.onAccpetListener){
|
||||||
|
custom_update_dialog.onAccpetListener(custom_update_dialog.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function showDialog(text,listener){
|
||||||
|
custom_update_dialog.text = text
|
||||||
|
custom_update_dialog.onAccpetListener = listener
|
||||||
|
custom_update_dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
id:com_checbox
|
id:com_checbox
|
||||||
Item{
|
Item{
|
||||||
@ -158,6 +194,34 @@ FluContentPage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component{
|
||||||
|
id:com_column_update_title
|
||||||
|
Item{
|
||||||
|
FluText{
|
||||||
|
id:text_title
|
||||||
|
text: {
|
||||||
|
if(options.title){
|
||||||
|
return options.title
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
anchors.fill: parent
|
||||||
|
verticalAlignment: Qt.AlignVCenter
|
||||||
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
custom_update_dialog.showDialog(options.title,function(text){
|
||||||
|
itemModel.display = table_view.customItem(com_column_update_title,{"title":text})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
id:com_column_sort_age
|
id:com_column_sort_age
|
||||||
Item{
|
Item{
|
||||||
@ -233,19 +297,17 @@ FluContentPage{
|
|||||||
dataIndex: 'checkbox',
|
dataIndex: 'checkbox',
|
||||||
width:80,
|
width:80,
|
||||||
minimumWidth:80,
|
minimumWidth:80,
|
||||||
maximumWidth:80,
|
maximumWidth:80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '头像',
|
title: table_view.customItem(com_column_update_title,{title:'头像'}),
|
||||||
dataIndex: 'avatar',
|
dataIndex: 'avatar',
|
||||||
width:100,
|
width:100
|
||||||
minimumWidth:100,
|
|
||||||
maximumWidth:100
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
readOnly:true,
|
readOnly:true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
title: table_view.customItem(com_column_sort_age,{sort:0}),
|
||||||
@ -349,5 +411,4 @@ FluContentPage{
|
|||||||
root.dataSource = dataSource
|
root.dataSource = dataSource
|
||||||
table_view.dataSource = root.dataSource
|
table_view.dataSource = root.dataSource
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
import "qrc:///example/qml/viewmodel"
|
import "../viewmodel"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
title:"TextBox"
|
title:"TextBox"
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluContentPage {
|
FluContentPage {
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluContentPage{
|
FluContentPage{
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
id:window
|
id:window
|
||||||
title:"关于"
|
title:"关于"
|
||||||
width: 600
|
width: 600
|
||||||
height: 600
|
height: 580
|
||||||
fixSize: true
|
fixSize: true
|
||||||
launchMode: FluWindowType.SingleTask
|
launchMode: FluWindowType.SingleTask
|
||||||
|
|
||||||
|
72
example/qml-Qt6/window/CrashWindow.qml
Normal file
72
example/qml-Qt6/window/CrashWindow.qml
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import FluentUI
|
||||||
|
import Qt.labs.platform
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
|
||||||
|
id:window
|
||||||
|
title:"友情提示"
|
||||||
|
width: 300
|
||||||
|
height: 400
|
||||||
|
fixSize: true
|
||||||
|
showMinimize: false
|
||||||
|
showStayTop: false
|
||||||
|
|
||||||
|
property string crashFilePath
|
||||||
|
|
||||||
|
onInitArgument:
|
||||||
|
(argument)=>{
|
||||||
|
crashFilePath = argument.crashFilePath
|
||||||
|
}
|
||||||
|
|
||||||
|
Image{
|
||||||
|
width: 540/2
|
||||||
|
height: 285/2
|
||||||
|
anchors{
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
top: parent.top
|
||||||
|
topMargin: 40
|
||||||
|
}
|
||||||
|
source: "qrc:/example/res/image/ic_crash.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
FluText{
|
||||||
|
id:text_info
|
||||||
|
anchors{
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
top: parent.top
|
||||||
|
topMargin: 240
|
||||||
|
}
|
||||||
|
text:"发生意外错误\n给您带来的不便,我们深表歉意"
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout{
|
||||||
|
anchors{
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
bottom: parent.bottom
|
||||||
|
bottomMargin: 20
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:"日志上报"
|
||||||
|
onClicked: {
|
||||||
|
FluTools.showFileInFolder(crashFilePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item{
|
||||||
|
width: 30
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
FluFilledButton{
|
||||||
|
text:"重启程序"
|
||||||
|
onClicked: {
|
||||||
|
FluApp.exit(931)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import example
|
import example
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ FluWindow {
|
|||||||
FluRemoteLoader{
|
FluRemoteLoader{
|
||||||
id:loader
|
id:loader
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
statusMode: FluStatusViewType.Success
|
statusMode: FluStatusLayoutType.Success
|
||||||
lazy: true
|
lazy: true
|
||||||
errorItem: Item{
|
errorItem: Item{
|
||||||
FluText{
|
FluText{
|
||||||
@ -43,7 +43,7 @@ FluWindow {
|
|||||||
text:"拖入qml文件"
|
text:"拖入qml文件"
|
||||||
font.pixelSize: 26
|
font.pixelSize: 26
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: !loader.itemLodaer().item && loader.statusMode === FluStatusViewType.Success
|
visible: !loader.itemLodaer().item && loader.statusMode === FluStatusLayoutType.Success
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
radius: 4
|
radius: 4
|
||||||
|
@ -2,7 +2,7 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
|
@ -5,22 +5,21 @@ import QtQuick.Layouts
|
|||||||
import Qt.labs.platform
|
import Qt.labs.platform
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import example
|
import example
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
import "qrc:///example/qml/global"
|
import "../global"
|
||||||
import "qrc:///example/qml/viewmodel"
|
import "../viewmodel"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
id:window
|
id:window
|
||||||
title: "FluentUI"
|
title: "FluentUI"
|
||||||
width: 1000
|
width: 960
|
||||||
height: 640
|
height: 600
|
||||||
minimumWidth: 520
|
minimumWidth: 520
|
||||||
minimumHeight: 200
|
minimumHeight: 200
|
||||||
launchMode: FluWindowType.SingleTask
|
launchMode: FluWindowType.SingleTask
|
||||||
fitsAppBarWindows: true
|
fitsAppBarWindows: true
|
||||||
appBar: FluAppBar {
|
appBar: FluAppBar {
|
||||||
width: window.width
|
|
||||||
height: 30
|
height: 30
|
||||||
darkText: Lang.dark_mode
|
darkText: Lang.dark_mode
|
||||||
showDark: true
|
showDark: true
|
||||||
@ -42,8 +41,16 @@ FluWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFirstVisible: {
|
onFirstVisible: {
|
||||||
|
timer_tour_delay.restart()
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer{
|
||||||
|
id:timer_tour_delay
|
||||||
|
interval: 200
|
||||||
|
onTriggered: {
|
||||||
tour.open()
|
tour.open()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
checkUpdate(true)
|
checkUpdate(true)
|
||||||
@ -172,7 +179,7 @@ FluWindow {
|
|||||||
id:loader
|
id:loader
|
||||||
lazy: true
|
lazy: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: "https://zhu-zichu.gitee.io/Qt_163_LieflatPage.qml"
|
source: "https://zhu-zichu.gitee.io/Qt_168_LieflatPage.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
front: Item{
|
front: Item{
|
||||||
@ -191,7 +198,12 @@ FluWindow {
|
|||||||
pageMode: FluNavigationViewType.NoStack
|
pageMode: FluNavigationViewType.NoStack
|
||||||
items: ItemsOriginal
|
items: ItemsOriginal
|
||||||
footerItems:ItemsFooter
|
footerItems:ItemsFooter
|
||||||
topPadding:FluTools.isMacos() ? 20 : 0
|
topPadding:{
|
||||||
|
if(window.useSystemAppBar){
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return FluTools.isMacos() ? 20 : 0
|
||||||
|
}
|
||||||
displayMode:viewmodel_settings.displayMode
|
displayMode:viewmodel_settings.displayMode
|
||||||
logo: "qrc:/example/res/image/favicon.ico"
|
logo: "qrc:/example/res/image/favicon.ico"
|
||||||
title:"FluentUI"
|
title:"FluentUI"
|
||||||
@ -228,7 +240,7 @@ FluWindow {
|
|||||||
id:com_reveal
|
id:com_reveal
|
||||||
CircularReveal{
|
CircularReveal{
|
||||||
id:reveal
|
id:reveal
|
||||||
target:window.contentItem
|
target:window.layoutContainer()
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onAnimationFinished:{
|
onAnimationFinished:{
|
||||||
//动画结束后释放资源
|
//动画结束后释放资源
|
||||||
@ -253,8 +265,11 @@ FluWindow {
|
|||||||
if(!FluTheme.enableAnimation || window.fitsAppBarWindows === false){
|
if(!FluTheme.enableAnimation || window.fitsAppBarWindows === false){
|
||||||
changeDark()
|
changeDark()
|
||||||
}else{
|
}else{
|
||||||
|
if(loader_reveal.sourceComponent){
|
||||||
|
return
|
||||||
|
}
|
||||||
loader_reveal.sourceComponent = com_reveal
|
loader_reveal.sourceComponent = com_reveal
|
||||||
var target = window.contentItem
|
var target = window.layoutContainer()
|
||||||
var pos = button.mapToItem(target,0,0)
|
var pos = button.mapToItem(target,0,0)
|
||||||
var mouseX = pos.x
|
var mouseX = pos.x
|
||||||
var mouseY = pos.y
|
var mouseY = pos.y
|
||||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import example
|
import example
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
|
||||||
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///example/qml/component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindow {
|
||||||
|
|
||||||
|
@ -16,21 +16,19 @@ Item {
|
|||||||
|
|
||||||
Connections{
|
Connections{
|
||||||
target: FluApp
|
target: FluApp
|
||||||
function onVsyncChanged(){
|
|
||||||
SettingsHelper.saveVsync(FluApp.vsync)
|
|
||||||
}
|
|
||||||
function onUseSystemAppBarChanged(){
|
function onUseSystemAppBarChanged(){
|
||||||
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
FluNetwork.openLog = false
|
||||||
FluNetwork.setInterceptor(function(param){
|
FluNetwork.setInterceptor(function(param){
|
||||||
param.addHeader("Token","000000000000000000000")
|
param.addHeader("Token","000000000000000000000")
|
||||||
})
|
})
|
||||||
FluApp.init(app)
|
FluApp.init(app)
|
||||||
|
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||||
FluApp.vsync = SettingsHelper.getVsync()
|
|
||||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||||
FluTheme.enableAnimation = true
|
FluTheme.enableAnimation = true
|
||||||
FluApp.routes = {
|
FluApp.routes = {
|
||||||
@ -38,12 +36,17 @@ Item {
|
|||||||
"/about":"qrc:/example/qml/window/AboutWindow.qml",
|
"/about":"qrc:/example/qml/window/AboutWindow.qml",
|
||||||
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
||||||
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
||||||
|
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
||||||
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
||||||
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
||||||
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
||||||
"/pageWindow":"qrc:/example/qml/window/PageWindow.qml"
|
"/pageWindow":"qrc:/example/qml/window/PageWindow.qml"
|
||||||
}
|
}
|
||||||
FluApp.initialRoute = "/"
|
var args = Qt.application.arguments
|
||||||
FluApp.run()
|
if(args.length>=2 && args[1].startsWith("-crashed=")){
|
||||||
|
FluApp.navigate("/crash",{crashFilePath:args[1].replace("-crashed=","")})
|
||||||
|
}else{
|
||||||
|
FluApp.navigate("/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
132
example/qml/chart/T_BarChart.qml
Normal file
132
example/qml/chart/T_BarChart.qml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Bar Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'bar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgba(255, 99, 132, 0.2)',
|
||||||
|
'rgba(255, 159, 64, 0.2)',
|
||||||
|
'rgba(255, 205, 86, 0.2)',
|
||||||
|
'rgba(75, 192, 192, 0.2)',
|
||||||
|
'rgba(54, 162, 235, 0.2)',
|
||||||
|
'rgba(153, 102, 255, 0.2)',
|
||||||
|
'rgba(201, 203, 207, 0.2)'
|
||||||
|
],
|
||||||
|
borderColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(255, 159, 64)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(153, 102, 255)',
|
||||||
|
'rgb(201, 203, 207)'
|
||||||
|
],
|
||||||
|
borderWidth: 1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Bar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
responsive: true,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true,
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'horizontalBar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgba(255, 99, 132, 0.2)',
|
||||||
|
'rgba(255, 159, 64, 0.2)',
|
||||||
|
'rgba(255, 205, 86, 0.2)',
|
||||||
|
'rgba(75, 192, 192, 0.2)',
|
||||||
|
'rgba(54, 162, 235, 0.2)',
|
||||||
|
'rgba(153, 102, 255, 0.2)',
|
||||||
|
'rgba(201, 203, 207, 0.2)'
|
||||||
|
],
|
||||||
|
borderColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(255, 159, 64)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(153, 102, 255)',
|
||||||
|
'rgb(201, 203, 207)'
|
||||||
|
],
|
||||||
|
borderWidth: 1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js HorizontalBar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
responsive: true,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true,
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
74
example/qml/chart/T_BubbleChart.qml
Normal file
74
example/qml/chart/T_BubbleChart.qml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Bubble Chart"
|
||||||
|
|
||||||
|
function randomScalingFactor() {
|
||||||
|
return Math.random().toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
height: 370
|
||||||
|
width: 500
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'bubble'
|
||||||
|
chartData: {
|
||||||
|
return {
|
||||||
|
datasets: [{
|
||||||
|
label: 'First Dataset',
|
||||||
|
data: [{
|
||||||
|
x: 20,
|
||||||
|
y: 30,
|
||||||
|
r: 15
|
||||||
|
}, {
|
||||||
|
x: 12,
|
||||||
|
y: 70,
|
||||||
|
r: 20
|
||||||
|
}, {
|
||||||
|
x: 11,
|
||||||
|
y: 28,
|
||||||
|
r: 8
|
||||||
|
}, {
|
||||||
|
x: 9,
|
||||||
|
y: 28,
|
||||||
|
r: 10
|
||||||
|
}, {
|
||||||
|
x: 43,
|
||||||
|
y: 7,
|
||||||
|
r: 14
|
||||||
|
}, {
|
||||||
|
x: 22,
|
||||||
|
y: 22,
|
||||||
|
r: 12
|
||||||
|
}, {
|
||||||
|
x: 40,
|
||||||
|
y: 10,
|
||||||
|
r: 10
|
||||||
|
}],
|
||||||
|
backgroundColor: 'rgb(255, 99, 132)'
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
chartOptions: {return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
responsive: true,
|
||||||
|
hoverMode: 'nearest',
|
||||||
|
intersect: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Bubble Chart - Multi Axis'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
45
example/qml/chart/T_LineChart.qml
Normal file
45
example/qml/chart/T_LineChart.qml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Line Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'line'
|
||||||
|
chartData: { return {
|
||||||
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
|
tension: 0.1
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Line Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
93
example/qml/chart/T_PieChart.qml
Normal file
93
example/qml/chart/T_PieChart.qml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Doughnut and Pie Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: "doughnut"
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Blue',
|
||||||
|
'Yellow'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [300, 50, 100],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(255, 205, 86)'
|
||||||
|
],
|
||||||
|
hoverOffset: 4
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Doughnut Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: "pie"
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Blue',
|
||||||
|
'Yellow'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [300, 50, 100],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(54, 162, 235)',
|
||||||
|
'rgb(255, 205, 86)'
|
||||||
|
],
|
||||||
|
hoverOffset: 4
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Pie Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
example/qml/chart/T_PolarAreaChart.qml
Normal file
57
example/qml/chart/T_PolarAreaChart.qml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"PolarArea Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'polarArea'
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Red',
|
||||||
|
'Green',
|
||||||
|
'Yellow',
|
||||||
|
'Grey',
|
||||||
|
'Blue'
|
||||||
|
],
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [11, 16, 7, 3, 14],
|
||||||
|
backgroundColor: [
|
||||||
|
'rgb(255, 99, 132)',
|
||||||
|
'rgb(75, 192, 192)',
|
||||||
|
'rgb(255, 205, 86)',
|
||||||
|
'rgb(201, 203, 207)',
|
||||||
|
'rgb(54, 162, 235)'
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js PolarArea Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
74
example/qml/chart/T_RadarChart.qml
Normal file
74
example/qml/chart/T_RadarChart.qml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Radar Chart"
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
width: 500
|
||||||
|
height: 370
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'radar'
|
||||||
|
chartData: { return {
|
||||||
|
labels: [
|
||||||
|
'Eating',
|
||||||
|
'Drinking',
|
||||||
|
'Sleeping',
|
||||||
|
'Designing',
|
||||||
|
'Coding',
|
||||||
|
'Cycling',
|
||||||
|
'Running'
|
||||||
|
],
|
||||||
|
datasets:
|
||||||
|
[{
|
||||||
|
label: 'My First Dataset',
|
||||||
|
data: [65, 59, 90, 81, 56, 55, 40],
|
||||||
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||||
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
|
pointBackgroundColor: 'rgb(255, 99, 132)',
|
||||||
|
pointBorderColor: '#fff',
|
||||||
|
pointHoverBackgroundColor: '#fff',
|
||||||
|
pointHoverBorderColor: 'rgb(255, 99, 132)'
|
||||||
|
}, {
|
||||||
|
label: 'My Second Dataset',
|
||||||
|
data: [28, 48, 40, 19, 96, 27, 100],
|
||||||
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||||
|
borderColor: 'rgb(54, 162, 235)',
|
||||||
|
pointBackgroundColor: 'rgb(54, 162, 235)',
|
||||||
|
pointBorderColor: '#fff',
|
||||||
|
pointHoverBackgroundColor: '#fff',
|
||||||
|
pointHoverBorderColor: 'rgb(54, 162, 235)'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chartOptions: { return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Radar Chart - Stacked'
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false
|
||||||
|
},
|
||||||
|
elements: {
|
||||||
|
line: {
|
||||||
|
borderWidth: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
123
example/qml/chart/T_ScatterChart.qml
Normal file
123
example/qml/chart/T_ScatterChart.qml
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
import "../component"
|
||||||
|
|
||||||
|
FluScrollablePage{
|
||||||
|
|
||||||
|
title:"Scatter Chart"
|
||||||
|
|
||||||
|
function randomScalingFactor() {
|
||||||
|
return Math.random().toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
FluArea{
|
||||||
|
height: 370
|
||||||
|
width: 500
|
||||||
|
paddings: 10
|
||||||
|
Layout.topMargin: 20
|
||||||
|
FluChart{
|
||||||
|
anchors.fill: parent
|
||||||
|
chartType: 'scatter'
|
||||||
|
chartData: {
|
||||||
|
return {
|
||||||
|
datasets: [{
|
||||||
|
label: 'My First dataset',
|
||||||
|
xAxisID: 'x-axis-1',
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: '#ff5555',
|
||||||
|
backgroundColor: 'rgba(255,192,192,0.3)',
|
||||||
|
data: [{
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
label: 'My Second dataset',
|
||||||
|
xAxisID: 'x-axis-1',
|
||||||
|
yAxisID: 'y-axis-2',
|
||||||
|
borderColor: '#5555ff',
|
||||||
|
backgroundColor: 'rgba(192,192,255,0.3)',
|
||||||
|
data: [{
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}, {
|
||||||
|
x: randomScalingFactor(),
|
||||||
|
y: randomScalingFactor(),
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}}
|
||||||
|
chartOptions: {return {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
responsive: true,
|
||||||
|
hoverMode: 'nearest',
|
||||||
|
intersect: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Chart.js Scatter Chart - Multi Axis'
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
position: 'bottom',
|
||||||
|
gridLines: {
|
||||||
|
zeroLineColor: 'rgba(0,0,0,1)'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||||
|
display: true,
|
||||||
|
position: 'left',
|
||||||
|
id: 'y-axis-1',
|
||||||
|
}, {
|
||||||
|
type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||||
|
display: true,
|
||||||
|
position: 'right',
|
||||||
|
reverse: true,
|
||||||
|
id: 'y-axis-2',
|
||||||
|
|
||||||
|
// grid line settings
|
||||||
|
gridLines: {
|
||||||
|
drawOnChartArea: false, // only want the grid lines for one axis to show up
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user