diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 57741792..884d50ff 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -2,14 +2,19 @@ name: MacOS
on:
push:
paths:
- - '*.pro'
+ - '*.txt'
+ - 'example/**'
- 'src/**'
+ - 'scripts/**'
- '.github/workflows/macos.yml'
pull_request:
paths:
- - '*.pro'
+ - '*.txt'
+ - 'example/**'
- 'src/**'
+ - 'scripts/**'
- '.github/workflows/macos.yml'
+
jobs:
build:
name: Build
@@ -22,12 +27,11 @@ jobs:
env:
targetName: example
steps:
- - name: '⚙️ Cache Qt'
- id: cache-qt
- uses: actions/cache@v3
+ - name: Check out repository
+ uses: actions/checkout@v3
with:
- path: ${{ runner.workspace }}/Qt
- key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
+ submodules: recursive
+
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
@@ -35,24 +39,30 @@ jobs:
cache: ${{steps.cache-qt.outputs.cache-hit}}
arch: ${{ matrix.qt_arch }}
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
- - uses: actions/checkout@v2
+
+ - name: Set up Ninja
+ uses: seanmiddleditch/gha-setup-ninja@v3
with:
- fetch-depth: 1
+ version: 1.10.2
+
- name: build macos
run: |
- qmake
- make
- # 打包
+ cmake --version
+ mkdir build
+ cd build
+ cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
+ cmake --build . --target all --config Release --parallel
+
- name: package
run: |
# 拷贝依赖
- macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
- # 上传artifacts
+ macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
+
- uses: actions/upload-artifact@v2
with:
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}.zip
path: bin/release/${{ env.targetName }}.app
- # tag 上传Release
+
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index d8b5ef34..a51948e2 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,17 +1,21 @@
name: Ubuntu
-# Qt官方没有linux平台的x86包
on:
workflow_dispatch:
push:
paths:
- - '*.pro'
+ - '*.txt'
- 'src/**'
+ - 'example/**'
+ - 'scripts/**'
- '.github/workflows/ubuntu.yml'
pull_request:
paths:
- - '*.pro'
+ - '*.txt'
- 'src/**'
- - '.github/workflows/ubuntu.yml'
+ - 'example/**'
+ - 'scripts/**'
+ - '.github/workflows/ubuntu.yml'
+
jobs:
build:
name: Build
@@ -24,12 +28,11 @@ jobs:
env:
targetName: example
steps:
- - name: '⚙️ Cache Qt'
- id: cache-qt
- uses: actions/cache@v3
+ - name: Check out repository
+ uses: actions/checkout@v3
with:
- path: ${{ runner.workspace }}/Qt
- key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
+ submodules: recursive
+
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
@@ -37,22 +40,32 @@ jobs:
cache: ${{steps.cache-qt.outputs.cache-hit}}
arch: ${{ matrix.qt_arch }}
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
+
+ - name: Set up Ninja
+ uses: seanmiddleditch/gha-setup-ninja@v3
+ with:
+ version: 1.10.2
+
- name: ubuntu install GL library
run: sudo apt-get install -y 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
- - uses: actions/checkout@v2
- with:
- fetch-depth: 1
+
- name: build ubuntu
run: |
- qmake
- make
+ ninja --version
+ cmake --version
+ mkdir build
+ cd build
+ cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
+ cmake --build . --target all --config Release --parallel
+
- name: install QT linux deploy
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: qt appimage
+
- name: Check if svg file exists
run: if [ ! -f "${targetName}.svg" ]; then echo "File not found, creating..."; touch ${targetName}.svg; fi
- # 打包
+
- name: package
run: |
# make sure Qt plugin finds QML sources so it can deploy the imported files
@@ -60,12 +73,12 @@ jobs:
# 拷贝依赖
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${targetName}.svg --executable=bin/release/${targetName} --appdir bin/release/
mv ${{ env.targetName }}-*.AppImage ${{ env.targetName }}.AppImage
- # 上传artifacts
+
- uses: actions/upload-artifact@v2
with:
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}
path: ${{ env.targetName }}.AppImage
- # tag 上传Release
+
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml
index 7830b05d..616913df 100644
--- a/.github/workflows/windows-mingw.yml
+++ b/.github/workflows/windows-mingw.yml
@@ -2,14 +2,19 @@ name: Windows MinGW
on:
push:
paths:
- - '*.pro'
+ - '*.txt'
- 'src/**'
+ - 'example/**'
+ - 'scripts/**'
- '.github/workflows/windows-mingw.yml'
pull_request:
paths:
- - '*.pro'
+ - '*.txt'
+ - 'example/**'
- 'src/**'
- - '.github/workflows/windows-mingw.yml'
+ - 'scripts/**'
+ - '.github/workflows/windows-mingw.yml'
+
jobs:
build:
name: Build
@@ -25,6 +30,11 @@ jobs:
targetName: example.exe
fileName: example
steps:
+ - name: Check out repository
+ uses: actions/checkout@v3
+ with:
+ submodules: recursive
+
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
@@ -32,26 +42,29 @@ jobs:
arch: ${{ matrix.qt_arch }}
cache: ${{steps.cache-qt.outputs.cache-hit}}
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
- - uses: actions/checkout@v2
- with:
- fetch-depth: 1
+
- name: Qt6 environment configuration
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
shell: pwsh
run: |
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- - name: where is qmake & where is mingw32-make
+
+ - name: where is cmake & where is mingw32-make
shell: pwsh
run: |
- Get-Command -Name 'qmake' | Format-List
+ Get-Command -Name 'cmake' | Format-List
Get-Command -Name 'mingw32-make' | Format-List
+
- name: mingw-build
id: build
shell: cmd
run: |
- qmake
- mingw32-make
+ mkdir build
+ cd build
+ cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
+ cmake --build . --target all --config Release --parallel
+
- name: package
id: package
env:
@@ -61,10 +74,12 @@ jobs:
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
$name = ${env:archiveName}
echo "::set-output name=packageName::$name"
+
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.package.outputs.packageName }}
path: ${{ steps.package.outputs.packageName }}
+
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 723ba826..f94c6f0f 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,24 +1,25 @@
name: Windows
on:
- # push代码时触发workflow
push:
paths:
- - '*.pro'
+ - '*.txt'
- 'src/**'
+ - 'example/**'
+ - 'scripts/**'
- '.github/workflows/windows.yml'
pull_request:
paths:
- - '*.pro'
+ - '*.txt'
+ - 'example/**'
- 'src/**'
- - '.github/workflows/windows.yml'
+ - 'scripts/**'
+ - '.github/workflows/windows.yml'
+
jobs:
build:
name: Build
- # 运行平台, windows-latest目前是windows server 2019
- # 参考文档 https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
runs-on: ${{ matrix.os }}
strategy:
- # 矩阵配置
matrix:
os: [windows-2019]
include:
@@ -29,40 +30,34 @@ jobs:
env:
targetName: example.exe
fileName: example
- # 步骤
steps:
- - name: '⚙️ Cache Qt'
- id: cache-qt
- uses: actions/cache@v3
+ - name: Check out repository
+ uses: actions/checkout@v3
with:
- path: ${{ runner.workspace }}\Qt
- key: ${{runner.os}}-qtcachedir-${{ matrix.qt_ver }}
- # 安装Qt
+ submodules: recursive
+
- name: Install Qt
- # 使用外部action。这个action专门用来安装Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
cache: ${{steps.cache-qt.outputs.cache-hit}}
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
- # 拉取代码
- - uses: actions/checkout@v2
- with:
- fetch-depth: 1
- # msvc编译
+
- name: msvc-build
id: build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
- qmake
- nmake
+ mkdir build
+ cd build
+ cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
+ cmake --build . --target all --config Release --parallel
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
- # 打包
+
- name: package
id: package
env:
@@ -73,14 +68,13 @@ jobs:
& scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName}
# 记录packageName给后续step
$name = ${env:archiveName}
- echo "::set-output name=packageName::$name"
- # tag 查询github-Release
- # 上传artifacts
+ echo "::set-output name=packageName::$name"
+
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.package.outputs.packageName }}
path: ${{ steps.package.outputs.packageName }}
- # tag 上传Release
+
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
diff --git a/.gitignore b/.gitignore
index 13805800..6c24bd08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,5 @@ CMakeLists.txt.user*
src/build-preset/plugins.qmltypes
bin
-.DS_Store
\ No newline at end of file
+.DS_Store
+build
\ No newline at end of file
diff --git a/third/mingw/libcrypto-1_1-x64.dll b/3rdparty/mingw/libcrypto-1_1-x64.dll
similarity index 100%
rename from third/mingw/libcrypto-1_1-x64.dll
rename to 3rdparty/mingw/libcrypto-1_1-x64.dll
diff --git a/third/mingw/libgcc_s_seh-1.dll b/3rdparty/mingw/libgcc_s_seh-1.dll
similarity index 100%
rename from third/mingw/libgcc_s_seh-1.dll
rename to 3rdparty/mingw/libgcc_s_seh-1.dll
diff --git a/third/mingw/libssl-1_1-x64.dll b/3rdparty/mingw/libssl-1_1-x64.dll
similarity index 100%
rename from third/mingw/libssl-1_1-x64.dll
rename to 3rdparty/mingw/libssl-1_1-x64.dll
diff --git a/third/mingw/libstdc++-6.dll b/3rdparty/mingw/libstdc++-6.dll
similarity index 100%
rename from third/mingw/libstdc++-6.dll
rename to 3rdparty/mingw/libstdc++-6.dll
diff --git a/third/mingw/libwinpthread-1.dll b/3rdparty/mingw/libwinpthread-1.dll
similarity index 100%
rename from third/mingw/libwinpthread-1.dll
rename to 3rdparty/mingw/libwinpthread-1.dll
diff --git a/third/msvc/libcrypto-1_1-x64.dll b/3rdparty/msvc/libcrypto-1_1-x64.dll
similarity index 100%
rename from third/msvc/libcrypto-1_1-x64.dll
rename to 3rdparty/msvc/libcrypto-1_1-x64.dll
diff --git a/third/msvc/libssl-1_1-x64.dll b/3rdparty/msvc/libssl-1_1-x64.dll
similarity index 100%
rename from third/msvc/libssl-1_1-x64.dll
rename to 3rdparty/msvc/libssl-1_1-x64.dll
diff --git a/FluentUI.pro b/FluentUI.pro
deleted file mode 100644
index 982edabd..00000000
--- a/FluentUI.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += \
- src/FluentUI.pro \
- example
- example.depends = src/FluentUI.pro
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index 46fba119..6a8081a5 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -1,65 +1,54 @@
cmake_minimum_required(VERSION 3.16)
-project(example)
+
+project(example VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+#获取文件分隔符(解决执行命令的时候有些平台会报错)
file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(platform 64)
-else()
- set(platform 32)
-endif()
-
+#设置可执行文件输出目录
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/debug)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
else()
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/release)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/release)
endif()
-find_package(Qt6 COMPONENTS Core Quick QuickControls2 Concurrent Network Multimedia REQUIRED)
+find_package(Qt6 REQUIRED COMPONENTS Quick REQUIRED)
-set(SOURCES
- src/controller/ChatController.cpp
- src/AppInfo.cpp
- src/main.cpp
- src/lang/Lang.cpp
- src/lang/Zh.cpp
- src/lang/En.cpp
- src/tool/IPC.cpp
+#遍历所有Cpp文件
+file(GLOB_RECURSE CPP_FILES *.cpp *.h)
+foreach(filepath ${CPP_FILES})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND sources_files ${filename})
+endforeach(filepath)
+
+#遍历所有qml文件
+file(GLOB_RECURSE QML_PATHS *.qml)
+foreach(filepath ${QML_PATHS})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND qml_files ${filename})
+endforeach(filepath)
+
+#遍历所有资源文件
+file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp)
+foreach(filepath ${RES_PATHS})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND resource_files ${filename})
+endforeach(filepath)
+
+#添加可执行文件
+qt_add_executable(example
+ ${sources_files}
)
-set(HEADERS
- src/controller/ChatController.h
- src/AppInfo.h
- src/stdafx.h
- src/lang/Lang.h
- src/lang/Zh.h
- src/lang/En.h
- src/tool/IPC.h
-)
-
-set(RESOURCES
- qml.qrc
-)
-
-set(RC_ICONS
- favicon.ico
-)
-
-qt_add_resources(QT_RESOURCES ${RESOURCES})
-
-add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${QT_RESOURCES} ${RC_ICONS})
-
+#复制动态库到可执行文件同级目录下
if(WIN32)
- if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
- set(DLLPATH ${CMAKE_CURRENT_SOURCE_DIR}/../third/msvc/*.dll)
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
+ set(DLLPATH ${CMAKE_SOURCE_DIR}/3rdparty/msvc/*.dll)
else()
- set(DLLPATH ${CMAKE_CURRENT_SOURCE_DIR}/../third/mingw/*.dll)
+ set(DLLPATH ${CMAKE_SOURCE_DIR}/3rdparty/mingw/*.dll)
endif()
string(REPLACE "/" ${PATH_SEPARATOR} DLLPATH "${DLLPATH}")
file(GLOB DLL_FILES ${DLLPATH})
@@ -70,27 +59,29 @@ if(WIN32)
)
endif()
-target_compile_definitions(${PROJECT_NAME} PRIVATE
- QT_DEPRECATED_WARNINGS
- QT_NO_WARNING_OUTPUT
+#添加qml模块
+qt_add_qml_module(example
+ URI example
+ VERSION 1.0
+ QML_FILES ${qml_files} qml/global/qmldir
+ RESOURCES ${resource_files}
)
-target_link_libraries(${PROJECT_NAME} PRIVATE
- Qt6::Core
- Qt6::Quick
- Qt6::QuickControls2
- Qt6::Concurrent
- Qt6::Network
- Qt6::Multimedia
+#设置属性
+set_target_properties(example PROPERTIES
+ MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
)
-if(WIN32)
- target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE WIN32 _WINDOWS)
- target_link_libraries(${PROJECT_NAME} PRIVATE dwmapi user32)
-endif()
+#链接库
+target_link_libraries(example
+ PRIVATE Qt6::Quick
+)
-if(APPLE)
- set_target_properties(${PROJECT_NAME} PROPERTIES
- MACOSX_BUNDLE_INFO_PLIST Info.plist
- )
-endif()
+#安装
+install(TARGETS example
+ BUNDLE DESTINATION .
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/example/Info.plist b/example/Info.plist
deleted file mode 100644
index 819a005d..00000000
--- a/example/Info.plist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- NSAppTransportSecurity
-
- NSAllowsArbitraryLoads
-
-
- CFBundleExecutable
- example
- CFBundleIconFile
-
- CFBundleIdentifier
- com.zhuzichu.example
- CFBundlePackageType
- APPL
- CFBundleSignature
- ????
- LSMinimumSystemVersion
- 10.13
- NOTE
- This file was generated by Qt/QMake.
- NSPrincipalClass
- NSApplication
- NSSupportsAutomaticGraphicsSwitching
-
-
-
diff --git a/example/example.pro b/example/example.pro
deleted file mode 100644
index 0aca3535..00000000
--- a/example/example.pro
+++ /dev/null
@@ -1,59 +0,0 @@
-QT += quick concurrent network multimedia
-CONFIG += c++17
-DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT
-
-HEADERS += \
- src/lang/En.h \
- src/lang/Lang.h \
- src/lang/Zh.h \
- src/stdafx.h \
- src/controller/ChatController.h \
- src/AppInfo.h \
- src/tool/IPC.h
-
-SOURCES += \
- src/controller/ChatController.cpp \
- src/AppInfo.cpp \
- src/lang/En.cpp \
- src/lang/Lang.cpp \
- src/lang/Zh.cpp \
- src/main.cpp \
- src/tool/IPC.cpp
-
-RESOURCES += qml.qrc
-
-RC_ICONS = favicon.ico
-
-QML_IMPORT_PATH =
-QML_DESIGNER_IMPORT_PATH =
-
-CONFIG(debug,debug|release) {
- DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/debug)
-} else {
- DESTDIR = $$absolute_path($${_PRO_FILE_PWD_}/../bin/release)
-}
-
-win32 {
-
-contains(QMAKE_CC, cl) {
- COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/msvc/*.dll) $$DESTDIR
- QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, $$QMAKE_DIR_SEP)
-} else {
- COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/mingw/*.dll) $$DESTDIR
- QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, $$QMAKE_DIR_SEP)
-}
-
-}
-
-qnx: target.path = /tmp/$${TARGET}/bin
-else: unix:!android: target.path = /opt/$${TARGET}/bin
-!isEmpty(target.path): INSTALLS += target
-
-mac: {
- QMAKE_INFO_PLIST = Info.plist
-}
-
-#### 如果你正在使用静态库,请将将下面的配置注释取消掉。
-#DEFINES += STATICLIB
-#INCLUDEPATH += $$OUT_PWD/../bin/FluentUI/
-#LIBS += -L$$OUT_PWD/../bin/FluentUI/ -lFluentUI
diff --git a/example/favicon.ico b/example/favicon.ico
deleted file mode 100644
index dcb1c035..00000000
Binary files a/example/favicon.ico and /dev/null differ
diff --git a/example/qml.qrc b/example/qml.qrc
deleted file mode 100644
index f0c0e667..00000000
--- a/example/qml.qrc
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
- res/image/image_huoyin.webp
- res/svg/avatar_1.svg
- res/svg/avatar_2.svg
- res/svg/avatar_3.svg
- res/svg/avatar_4.svg
- res/svg/avatar_5.svg
- res/svg/avatar_6.svg
- res/svg/avatar_7.svg
- res/svg/avatar_8.svg
- res/svg/avatar_9.svg
- res/svg/avatar_10.svg
- res/svg/avatar_11.svg
- res/svg/avatar_12.svg
- res/image/banner_1.jpg
- res/image/banner_2.jpg
- res/image/banner_3.jpg
- res/image/logo_openai.png
- res/image/favicon.ico
- res/image/bg_home_header.png
- res/image/ic_home_github.png
- res/image/control/Acrylic.png
- res/image/control/AnimatedIcon.png
- res/image/control/AnimatedVisualPlayer.png
- res/image/control/AnimationInterop.png
- res/image/control/AppBarButton.png
- res/image/control/AppBarSeparator.png
- res/image/control/AppBarToggleButton.png
- res/image/control/AutomationProperties.png
- res/image/control/AutoSuggestBox.png
- res/image/control/Border.png
- res/image/control/BreadcrumbBar.png
- res/image/control/Button.png
- res/image/control/CalendarDatePicker.png
- res/image/control/CalendarView.png
- res/image/control/Canvas.png
- res/image/control/Checkbox.png
- res/image/control/Clipboard.png
- res/image/control/ColorPaletteResources.png
- res/image/control/ColorPicker.png
- res/image/control/ComboBox.png
- res/image/control/CommandBar.png
- res/image/control/CommandBarFlyout.png
- res/image/control/CompactSizing.png
- res/image/control/ConnectedAnimation.png
- res/image/control/ContentDialog.png
- res/image/control/CreateMultipleWindows.png
- res/image/control/DataGrid.png
- res/image/control/DatePicker.png
- res/image/control/DropDownButton.png
- res/image/control/EasingFunction.png
- res/image/control/Expander.png
- res/image/control/FilePicker.png
- res/image/control/FlipView.png
- res/image/control/Flyout.png
- res/image/control/Grid.png
- res/image/control/GridView.png
- res/image/control/HyperlinkButton.png
- res/image/control/IconElement.png
- res/image/control/Image.png
- res/image/control/ImplicitTransition.png
- res/image/control/InfoBadge.png
- res/image/control/InfoBar.png
- res/image/control/InkCanvas.png
- res/image/control/InkToolbar.png
- res/image/control/InputValidation.png
- res/image/control/ItemsRepeater.png
- res/image/control/Line.png
- res/image/control/ListBox.png
- res/image/control/ListView.png
- res/image/control/MediaPlayerElement.png
- res/image/control/MenuBar.png
- res/image/control/MenuFlyout.png
- res/image/control/NavigationView.png
- res/image/control/NumberBox.png
- res/image/control/PageTransition.png
- res/image/control/ParallaxView.png
- res/image/control/PasswordBox.png
- res/image/control/PersonPicture.png
- res/image/control/PipsPager.png
- res/image/control/Pivot.png
- res/image/control/ProgressBar.png
- res/image/control/ProgressRing.png
- res/image/control/PullToRefresh.png
- res/image/control/RadialGradientBrush.png
- res/image/control/RadioButton.png
- res/image/control/RadioButtons.png
- res/image/control/RatingControl.png
- res/image/control/RelativePanel.png
- res/image/control/RepeatButton.png
- res/image/control/RevealFocus.png
- res/image/control/RichEditBox.png
- res/image/control/RichTextBlock.png
- res/image/control/ScrollViewer.png
- res/image/control/SemanticZoom.png
- res/image/control/Shape.png
- res/image/control/Slider.png
- res/image/control/Sound.png
- res/image/control/SplitButton.png
- res/image/control/SplitView.png
- res/image/control/StackPanel.png
- res/image/control/StandardUICommand.png
- res/image/control/SwipeControl.png
- res/image/control/TabView.png
- res/image/control/TeachingTip.png
- res/image/control/TextBlock.png
- res/image/control/TextBox.png
- res/image/control/ThemeTransition.png
- res/image/control/TimePicker.png
- res/image/control/TitleBar.png
- res/image/control/ToggleButton.png
- res/image/control/ToggleSplitButton.png
- res/image/control/ToggleSwitch.png
- res/image/control/ToolTip.png
- res/image/control/TreeView.png
- res/image/control/VariableSizedWrapGrid.png
- res/image/control/Viewbox.png
- res/image/control/WebView.png
- res/image/control/XamlUICommand.png
- res/svg/home.svg
- res/svg/home_dark.svg
- res/image/qrcode_wx.jpg
- res/image/qrcode_zfb.jpg
- qml/component/CodeExpander.qml
- qml/global/ItemsFooter.qml
- qml/global/ItemsOriginal.qml
- qml/global/MainEvent.qml
- qml/global/qmldir
- qml/App.qml
- qml/window/AboutWindow.qml
- qml/window/ChatWindow.qml
- qml/window/LoginWindow.qml
- qml/window/MainWindow.qml
- qml/window/MediaWindow.qml
- qml/window/SingleInstanceWindow.qml
- qml/window/SingleTaskWindow.qml
- qml/window/StandardWindow.qml
- qml/page/T_Awesome.qml
- qml/page/T_Badge.qml
- qml/page/T_Buttons.qml
- qml/page/T_CalendarPicker.qml
- qml/page/T_Carousel.qml
- qml/page/T_CheckBox.qml
- qml/page/T_ColorPicker.qml
- qml/page/T_DatePicker.qml
- qml/page/T_Dialog.qml
- qml/page/T_Expander.qml
- qml/page/T_FlipView.qml
- qml/page/T_Home.qml
- qml/page/T_InfoBar.qml
- qml/page/T_MediaPlayer.qml
- qml/page/T_Menu.qml
- qml/page/T_MultiWindow.qml
- qml/page/T_Pivot.qml
- qml/page/T_Progress.qml
- qml/page/T_RatingControl.qml
- qml/page/T_Rectangle.qml
- qml/page/T_Settings.qml
- qml/page/T_Slider.qml
- qml/page/T_StatusView.qml
- qml/page/T_TableView.qml
- qml/page/T_TabView.qml
- qml/page/T_TextBox.qml
- qml/page/T_Theme.qml
- qml/page/T_TimePicker.qml
- qml/page/T_ToggleSwitch.qml
- qml/page/T_Tooltip.qml
- qml/page/T_TreeView.qml
- qml/page/T_Typography.qml
- qml/page/T_BreadcrumbBar.qml
-
-
diff --git a/example/qml/App.qml b/example/qml/App.qml
index 9635c77c..f45e90ec 100644
--- a/example/qml/App.qml
+++ b/example/qml/App.qml
@@ -11,14 +11,14 @@ Window {
FluTheme.frameless = ("windows" === Qt.platform.os)
FluTheme.darkMode = FluDarkMode.System
FluApp.routes = {
- "/":"qrc:/qml/window/MainWindow.qml",
- "/about":"qrc:/qml/window/AboutWindow.qml",
- "/login":"qrc:/qml/window/LoginWindow.qml",
- "/chat":"qrc:/qml/window/ChatWindow.qml",
- "/media":"qrc:/qml/window/MediaWindow.qml",
- "/singleTaskWindow":"qrc:/qml/window/SingleTaskWindow.qml",
- "/standardWindow":"qrc:/qml/window/StandardWindow.qml",
- "/singleInstanceWindow":"qrc:/qml/window/SingleInstanceWindow.qml"
+ "/":"qrc:/example/qml/window/MainWindow.qml",
+ "/about":"qrc:/example/qml/window/AboutWindow.qml",
+ "/login":"qrc:/example/qml/window/LoginWindow.qml",
+ "/chat":"qrc:/example/qml/window/ChatWindow.qml",
+ "/media":"qrc:/example/qml/window/MediaWindow.qml",
+ "/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
+ "/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
+ "/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml"
}
FluApp.initialRoute = "/"
FluApp.run()
diff --git a/example/qml/global/ItemsFooter.qml b/example/qml/global/ItemsFooter.qml
index 0db36fbc..5f7991a6 100644
--- a/example/qml/global/ItemsFooter.qml
+++ b/example/qml/global/ItemsFooter.qml
@@ -20,7 +20,7 @@ FluObject{
title:lang.settings
icon:FluentIcons.Settings
onTap:{
- navigationView.push("qrc:/qml/page/T_Settings.qml")
+ navigationView.push("qrc:/example/qml/page/T_Settings.qml")
}
}
}
diff --git a/example/qml/global/ItemsOriginal.qml b/example/qml/global/ItemsOriginal.qml
index 30e226ba..f5b52c23 100644
--- a/example/qml/global/ItemsOriginal.qml
+++ b/example/qml/global/ItemsOriginal.qml
@@ -12,13 +12,13 @@ FluObject{
// icon:FluentIcons.Home
cusIcon: Image{
anchors.centerIn: parent
- source: FluTheme.dark ? "qrc:/res/svg/home_dark.svg" : "qrc:/res/svg/home.svg"
+ source: FluTheme.dark ? "qrc:/example/res/svg/home_dark.svg" : "qrc:/example/res/svg/home.svg"
sourceSize: Qt.size(30,30)
width: 18
height: 18
}
onTap:{
- navigationView.push("qrc:/qml/page/T_Home.qml")
+ navigationView.push("qrc:/example/qml/page/T_Home.qml")
}
}
@@ -27,35 +27,35 @@ FluObject{
icon:FluentIcons.CheckboxComposite
FluPaneItem{
title:"Buttons"
- image:"qrc:/res/image/control/Button.png"
+ image:"qrc:/example/res/image/control/Button.png"
recentlyUpdated:true
desc:"A control that responds to user input and raisesa Click event."
onTap:{
- navigationView.push("qrc:/qml/page/T_Buttons.qml")
+ navigationView.push("qrc:/example/qml/page/T_Buttons.qml")
}
}
FluPaneItem{
title:"Slider"
- image:"qrc:/res/image/control/Slider.png"
+ 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."
onTap:{
- navigationView.push("qrc:/qml/page/T_Slider.qml")
+ navigationView.push("qrc:/example/qml/page/T_Slider.qml")
}
}
FluPaneItem{
title:"CheckBox"
- image:"qrc:/res/image/control/Checkbox.png"
+ image:"qrc:/example/res/image/control/Checkbox.png"
recentlyUpdated:true
desc:"A control that a user can select or clear."
onTap:{
- navigationView.push("qrc:/qml/page/T_CheckBox.qml")
+ navigationView.push("qrc:/example/qml/page/T_CheckBox.qml")
}
}
FluPaneItem{
title:"ToggleSwitch"
onTap:{
- navigationView.push("qrc:/qml/page/T_ToggleSwitch.qml")
+ navigationView.push("qrc:/example/qml/page/T_ToggleSwitch.qml")
}
}
}
@@ -66,31 +66,31 @@ FluObject{
FluPaneItem{
title:"TextBox"
onTap:{
- navigationView.push("qrc:/qml/page/T_TextBox.qml")
+ navigationView.push("qrc:/example/qml/page/T_TextBox.qml")
}
}
FluPaneItem{
title:"TimePicker"
onTap:{
- navigationView.push("qrc:/qml/page/T_TimePicker.qml")
+ navigationView.push("qrc:/example/qml/page/T_TimePicker.qml")
}
}
FluPaneItem{
title:"DatePicker"
onTap:{
- navigationView.push("qrc:/qml/page/T_DatePicker.qml")
+ navigationView.push("qrc:/example/qml/page/T_DatePicker.qml")
}
}
FluPaneItem{
title:"CalendarPicker"
onTap:{
- navigationView.push("qrc:/qml/page/T_CalendarPicker.qml")
+ navigationView.push("qrc:/example/qml/page/T_CalendarPicker.qml")
}
}
FluPaneItem{
title:"ColorPicker"
onTap:{
- navigationView.push("qrc:/qml/page/T_ColorPicker.qml")
+ navigationView.push("qrc:/example/qml/page/T_ColorPicker.qml")
}
}
}
@@ -100,53 +100,53 @@ FluObject{
icon:FluentIcons.SurfaceHub
FluPaneItem{
title:"InfoBar"
- image:"qrc:/res/image/control/InfoBar.png"
+ image:"qrc:/example/res/image/control/InfoBar.png"
recentlyUpdated:true
desc:"An inline message to display app-wide statuschange information."
onTap:{
- navigationView.push("qrc:/qml/page/T_InfoBar.qml")
+ navigationView.push("qrc:/example/qml/page/T_InfoBar.qml")
}
}
FluPaneItem{
title:"Progress"
onTap:{
- navigationView.push("qrc:/qml/page/T_Progress.qml")
+ navigationView.push("qrc:/example/qml/page/T_Progress.qml")
}
}
FluPaneItem{
title:"RatingControl"
onTap:{
- navigationView.push("qrc:/qml/page/T_RatingControl.qml")
+ navigationView.push("qrc:/example/qml/page/T_RatingControl.qml")
}
}
FluPaneItem{
title:"Badge"
onTap:{
- navigationView.push("qrc:/qml/page/T_Badge.qml")
+ navigationView.push("qrc:/example/qml/page/T_Badge.qml")
}
}
FluPaneItem{
title:"Rectangle"
onTap:{
- navigationView.push("qrc:/qml/page/T_Rectangle.qml")
+ navigationView.push("qrc:/example/qml/page/T_Rectangle.qml")
}
}
FluPaneItem{
title:"StatusView"
onTap:{
- navigationView.push("qrc:/qml/page/T_StatusView.qml")
+ navigationView.push("qrc:/example/qml/page/T_StatusView.qml")
}
}
FluPaneItem{
title:"Carousel"
onTap:{
- navigationView.push("qrc:/qml/page/T_Carousel.qml")
+ navigationView.push("qrc:/example/qml/page/T_Carousel.qml")
}
}
FluPaneItem{
title:"Expander"
onTap:{
- navigationView.push("qrc:/qml/page/T_Expander.qml")
+ navigationView.push("qrc:/example/qml/page/T_Expander.qml")
}
}
}
@@ -157,19 +157,19 @@ FluObject{
FluPaneItem{
title:"Dialog"
onTap:{
- navigationView.push("qrc:/qml/page/T_Dialog.qml")
+ navigationView.push("qrc:/example/qml/page/T_Dialog.qml")
}
}
FluPaneItem{
title:"Tooltip"
onTap:{
- navigationView.push("qrc:/qml/page/T_Tooltip.qml")
+ navigationView.push("qrc:/example/qml/page/T_Tooltip.qml")
}
}
FluPaneItem{
title:"Menu"
onTap:{
- navigationView.push("qrc:/qml/page/T_Menu.qml")
+ navigationView.push("qrc:/example/qml/page/T_Menu.qml")
}
}
}
@@ -179,60 +179,60 @@ FluObject{
icon:FluentIcons.AllApps
FluPaneItem{
title:"Pivot"
- image:"qrc:/res/image/control/Pivot.png"
+ image:"qrc:/example/res/image/control/Pivot.png"
recentlyAdded:true
order:3
desc:"Presents information from different sources in atabbed view."
onTap:{
- navigationView.push("qrc:/qml/page/T_Pivot.qml")
+ navigationView.push("qrc:/example/qml/page/T_Pivot.qml")
}
}
FluPaneItem{
title:"BreadcrumbBar"
onTap:{
- navigationView.push("qrc:/qml/page/T_BreadcrumbBar.qml")
+ navigationView.push("qrc:/example/qml/page/T_BreadcrumbBar.qml")
}
}
FluPaneItem{
title:"TabView"
- image:"qrc:/res/image/control/TabView.png"
+ image:"qrc:/example/res/image/control/TabView.png"
recentlyAdded:true
order:1
desc:"A control that displays a collection of tabs thatcan be used to display several documents."
onTap:{
- navigationView.push("qrc:/qml/page/T_TabView.qml")
+ navigationView.push("qrc:/example/qml/page/T_TabView.qml")
}
}
FluPaneItem{
title:"TreeView"
onTap:{
- navigationView.push("qrc:/qml/page/T_TreeView.qml")
+ navigationView.push("qrc:/example/qml/page/T_TreeView.qml")
}
}
FluPaneItem{
title:"TableView"
- image:"qrc:/res/image/control/DataGrid.png"
+ image:"qrc:/example/res/image/control/DataGrid.png"
recentlyAdded:true
order:4
desc:"The TableView control provides a flexible way to display a collection of data in rows and columns"
onTap:{
- navigationView.push("qrc:/qml/page/T_TableView.qml")
+ navigationView.push("qrc:/example/qml/page/T_TableView.qml")
}
}
FluPaneItem{
title:"MultiWindow"
onTap:{
- navigationView.push("qrc:/qml/page/T_MultiWindow.qml")
+ navigationView.push("qrc:/example/qml/page/T_MultiWindow.qml")
}
}
FluPaneItem{
title:"FlipView"
- image:"qrc:/res/image/control/FlipView.png"
+ image:"qrc:/example/res/image/control/FlipView.png"
recentlyAdded:true
order:2
desc:"Presents a collection of items that the user canflip through, one item at a time."
onTap:{
- navigationView.push("qrc:/qml/page/T_FlipView.qml")
+ navigationView.push("qrc:/example/qml/page/T_FlipView.qml")
}
}
}
@@ -243,19 +243,19 @@ FluObject{
FluPaneItem{
title:"Theme"
onTap:{
- navigationView.push("qrc:/qml/page/T_Theme.qml")
+ navigationView.push("qrc:/example/qml/page/T_Theme.qml")
}
}
FluPaneItem{
title:"Typography"
onTap:{
- navigationView.push("qrc:/qml/page/T_Typography.qml")
+ navigationView.push("qrc:/example/qml/page/T_Typography.qml")
}
}
FluPaneItem{
title:"Awesome"
onTap:{
- navigationView.push("qrc:/qml/page/T_Awesome.qml")
+ navigationView.push("qrc:/example/qml/page/T_Awesome.qml")
}
}
}
@@ -265,12 +265,12 @@ FluObject{
icon:FluentIcons.Media
FluPaneItem{
title:"MediaPlayer"
- image:"qrc:/res/image/control/MediaPlayerElement.png"
+ image:"qrc:/example/res/image/control/MediaPlayerElement.png"
recentlyAdded:true
order:0
desc:"A control to display video and image content."
onTap:{
- navigationView.push("qrc:/qml/page/T_MediaPlayer.qml")
+ navigationView.push("qrc:/example/qml/page/T_MediaPlayer.qml")
}
}
}
diff --git a/example/qml/page/T_Carousel.qml b/example/qml/page/T_Carousel.qml
index 64d10736..3461464e 100644
--- a/example/qml/page/T_Carousel.qml
+++ b/example/qml/page/T_Carousel.qml
@@ -32,7 +32,7 @@ FluScrollablePage{
Layout.topMargin: 20
Layout.leftMargin: 5
Component.onCompleted: {
- carousel.setData([{url:"qrc:/res/image/banner_1.jpg"},{url:"qrc:/res/image/banner_2.jpg"},{url:"qrc:/res/image/banner_3.jpg"}])
+ carousel.setData([{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}])
}
}
}
@@ -44,7 +44,7 @@ FluScrollablePage{
width: 400
height: 300
Component.onCompleted: {
- setData([{url:"qrc:/res/image/banner_1.jpg"},{url:"qrc:/res/image/banner_2.jpg"},{url:"qrc:/res/image/banner_3.jpg"}])
+ setData([{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}])
}
}'
}
diff --git a/example/qml/page/T_FlipView.qml b/example/qml/page/T_FlipView.qml
index eb0890cf..0ac49475 100644
--- a/example/qml/page/T_FlipView.qml
+++ b/example/qml/page/T_FlipView.qml
@@ -25,17 +25,17 @@ FluScrollablePage{
}
FluFlipView{
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_2.jpg"
+ source: "qrc:/example/res/image/banner_2.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_3.jpg"
+ source: "qrc:/example/res/image/banner_3.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
@@ -47,17 +47,17 @@ FluScrollablePage{
Layout.topMargin: -1
code:'FluFlipView{
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
@@ -78,18 +78,18 @@ FluScrollablePage{
FluFlipView{
vertical:true
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
sourceSize: Qt.size(400,300)
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_2.jpg"
+ source: "qrc:/example/res/image/banner_2.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_3.jpg"
+ source: "qrc:/example/res/image/banner_3.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
@@ -102,17 +102,17 @@ FluScrollablePage{
code:'FluFlipView{
vertical:true
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
- source: "qrc:/res/image/banner_1.jpg"
+ source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
diff --git a/example/qml/page/T_Home.qml b/example/qml/page/T_Home.qml
index 11ca4a51..66a416e4 100644
--- a/example/qml/page/T_Home.qml
+++ b/example/qml/page/T_Home.qml
@@ -2,7 +2,7 @@
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
-import "qrc:///qml/global/"
+import "qrc:///example/qml/global/"
import FluentUI
FluScrollablePage{
@@ -15,7 +15,7 @@ FluScrollablePage{
ListModel{
id:model_header
ListElement{
- icon:"qrc:/res/image/ic_home_github.png"
+ icon:"qrc:/example/res/image/ic_home_github.png"
title:"FluentUI GitHub"
desc:"The latest FluentUI controls and styles for your applications."
url:"https://github.com/zhuzichu520/FluentUI"
@@ -30,7 +30,7 @@ FluScrollablePage{
fillMode:Image.PreserveAspectCrop
anchors.fill: parent
verticalAlignment: Qt.AlignTop
- source: "qrc:/res/image/bg_home_header.png"
+ source: "qrc:/example/res/image/bg_home_header.png"
}
Rectangle{
anchors.fill: parent
diff --git a/example/qml/page/T_Rectangle.qml b/example/qml/page/T_Rectangle.qml
index f8e893c7..6592e053 100644
--- a/example/qml/page/T_Rectangle.qml
+++ b/example/qml/page/T_Rectangle.qml
@@ -79,7 +79,7 @@ FluScrollablePage{
Image {
asynchronous: true
anchors.fill: parent
- source: "qrc:/res/svg/avatar_1.svg"
+ source: "qrc:/example/res/svg/avatar_1.svg"
sourceSize: Qt.size(width,height)
}
}
@@ -91,7 +91,7 @@ FluScrollablePage{
asynchronous: true
anchors.fill: parent
sourceSize: Qt.size(width,height)
- source: "qrc:/res/svg/avatar_2.svg"
+ source: "qrc:/example/res/svg/avatar_2.svg"
}
}
FluRectangle{
@@ -102,7 +102,7 @@ FluScrollablePage{
asynchronous: true
anchors.fill: parent
sourceSize: Qt.size(width,height)
- source: "qrc:/res/svg/avatar_3.svg"
+ source: "qrc:/example/res/svg/avatar_3.svg"
}
}
FluRectangle{
@@ -113,7 +113,7 @@ FluScrollablePage{
asynchronous: true
anchors.fill: parent
sourceSize: Qt.size(width,height)
- source: "qrc:/res/svg/avatar_4.svg"
+ source: "qrc:/example/res/svg/avatar_4.svg"
}
}
}
@@ -123,7 +123,7 @@ FluScrollablePage{
radius:[25,25,25,25]
Image {
asynchronous: true
- source: "qrc:/res/image/image_huoyin.webp"
+ source: "qrc:/example/res/image/image_huoyin.webp"
anchors.fill: parent
sourceSize: Qt.size(width,height)
}
@@ -142,7 +142,7 @@ FluScrollablePage{
Image{
asynchronous: true
anchors.fill: parent
- source: "qrc:/res/svg/avatar_4.svg"
+ source: "qrc:/example/res/svg/avatar_4.svg"
sourceSize: Qt.size(width,height)
}
}'
diff --git a/example/qml/page/T_Settings.qml b/example/qml/page/T_Settings.qml
index d173b58c..c6ef662c 100644
--- a/example/qml/page/T_Settings.qml
+++ b/example/qml/page/T_Settings.qml
@@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
-import "qrc:///qml/global/"
+import "qrc:///example/qml/global/"
import "../component"
FluScrollablePage{
diff --git a/example/qml/page/T_TabView.qml b/example/qml/page/T_TabView.qml
index d22d4fd2..a03f3032 100644
--- a/example/qml/page/T_TabView.qml
+++ b/example/qml/page/T_TabView.qml
@@ -24,7 +24,7 @@ FluScrollablePage{
}
function newTab(){
- tab_view.appendTab("qrc:/res/image/favicon.ico","Document "+tab_view.count(),com_page,colors[Math.floor(Math.random() * 8)].dark)
+ tab_view.appendTab("qrc:/example/res/image/favicon.ico","Document "+tab_view.count(),com_page,colors[Math.floor(Math.random() * 8)].dark)
}
Component.onCompleted: {
@@ -129,7 +129,7 @@ FluScrollablePage{
}
}
function newTab(){
- tab_view.appendTab("qrc:/res/image/favicon.ico","Document 1",com_page,argument)
+ tab_view.appendTab("qrc:/example/res/image/favicon.ico","Document 1",com_page,argument)
}
}
'
diff --git a/example/qml/window/AboutWindow.qml b/example/qml/window/AboutWindow.qml
index f326978d..2147054e 100644
--- a/example/qml/window/AboutWindow.qml
+++ b/example/qml/window/AboutWindow.qml
@@ -128,12 +128,12 @@ FluWindow {
Image{
width: 164.55
height: 224.25
- source: "qrc:/res/image/qrcode_wx.jpg"
+ source: "qrc:/example/res/image/qrcode_wx.jpg"
}
Image{
width: 162
height: 252
- source: "qrc:/res/image/qrcode_zfb.jpg"
+ source: "qrc:/example/res/image/qrcode_zfb.jpg"
}
}
}
diff --git a/example/qml/window/ChatWindow.qml b/example/qml/window/ChatWindow.qml
index 9424c33c..ec049836 100644
--- a/example/qml/window/ChatWindow.qml
+++ b/example/qml/window/ChatWindow.qml
@@ -120,7 +120,7 @@ FluWindow {
asynchronous: true
anchors.fill: parent
sourceSize: Qt.size(100,100)
- source: isMy ? "qrc:/res/svg/avatar_2.svg" : "qrc:/res/image/logo_openai.png"
+ source: isMy ? "qrc:/example/res/svg/avatar_2.svg" : "qrc:/example/res/image/logo_openai.png"
}
}
diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml
index 1ed287c0..9fd50400 100644
--- a/example/qml/window/MainWindow.qml
+++ b/example/qml/window/MainWindow.qml
@@ -4,7 +4,8 @@ import QtQuick.Controls
import QtQuick.Layouts
import Qt.labs.platform
import FluentUI
-import "qrc:///qml/global/"
+import example
+import "qrc:///example/qml/global/"
FluWindow {
@@ -41,7 +42,7 @@ FluWindow {
SystemTrayIcon {
id:system_tray
visible: true
- icon.source: "qrc:/res/image/favicon.ico"
+ icon.source: "qrc:/example/res/image/favicon.ico"
tooltip: "FluentUI"
menu: Menu {
MenuItem {
@@ -88,7 +89,7 @@ FluWindow {
footerItems:ItemsFooter
z:11
displayMode:MainEvent.displayMode
- logo: "qrc:/res/image/favicon.ico"
+ logo: "qrc:/example/res/image/favicon.ico"
title:"FluentUI"
autoSuggestBox:FluAutoSuggestBox{
width: 280
diff --git a/example/src/main.cpp b/example/src/main.cpp
index 8851e74c..e76d8b85 100644
--- a/example/src/main.cpp
+++ b/example/src/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
context->setContextProperty("lang",appInfo->lang());
});
context->setContextProperty("appInfo",appInfo);
- const QUrl url(QStringLiteral("qrc:/qml/App.qml"));
+ const QUrl url(QStringLiteral("qrc:/example/qml/App.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
diff --git a/scripts/windows-mingw-publish.ps1 b/scripts/windows-mingw-publish.ps1
index d1c8fae8..472300f8 100644
--- a/scripts/windows-mingw-publish.ps1
+++ b/scripts/windows-mingw-publish.ps1
@@ -17,7 +17,7 @@ function Main() {
New-Item -ItemType Directory $archiveName
# 拷贝exe
- Copy-Item bin\release\* $archiveName\
+ Copy-Item bin\release\* $archiveName\ -Force -Recurse | Out-Null
# 拷贝依赖
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
# 删除不必要的文件
diff --git a/scripts/windows-publish.ps1 b/scripts/windows-publish.ps1
index 80432f36..b406b57f 100644
--- a/scripts/windows-publish.ps1
+++ b/scripts/windows-publish.ps1
@@ -27,7 +27,7 @@ function Main() {
New-Item -ItemType Directory $archiveName
# 拷贝exe
- Copy-Item bin\release\* $archiveName\
+ Copy-Item bin\release\* $archiveName\ -Force -Recurse | Out-Null
# 拷贝依赖
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
# 删除不必要的文件
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 308ed5d8..84c109ea 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,67 +1,59 @@
cmake_minimum_required(VERSION 3.16)
-project(FluentUI)
+project(fluentui LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-find_package(Qt6 COMPONENTS Core Quick Svg REQUIRED)
-set(QT_INSTALL_QML ${Qt6Core_DIR}/../../../qml)
-set(TARGET_TYPE SHARED)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/FluentUI)
-
-if(WIN32)
- set(CMAKE_SHARED_LIBRARY_PREFIX "")
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
+else()
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/release)
endif()
-set(TARGET_RESOURCES res.qrc)
-set(TARGET_SOURCES
- Def.cpp
- FluApp.cpp
- FluColorSet.cpp
- FluColors.cpp
- FluRegister.cpp
- FluTheme.cpp
- Fluent.cpp
- FluentUI.cpp
- NativeEventFilter.cpp
- WindowHelper.cpp
- qml_plugin.cpp
+find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)
+
+file(GLOB_RECURSE CPP_FILES *.cpp *.h)
+foreach(filepath ${CPP_FILES})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND sources_files ${filename})
+endforeach(filepath)
+
+file(GLOB_RECURSE QML_PATHS *.qml)
+foreach(filepath ${QML_PATHS})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND qml_files ${filename})
+endforeach(filepath)
+
+file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp)
+foreach(filepath ${RES_PATHS})
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
+ list(APPEND resource_files ${filename})
+endforeach(filepath)
+
+foreach(filepath IN LISTS qml_files resource_files)
+ string(REPLACE "imports/FluentUI/" "" filename ${filepath})
+ set_source_files_properties(${filepath} PROPERTIES QT_RESOURCE_ALIAS ${filename})
+endforeach()
+
+qt_add_qml_module(fluentui
+ OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/FluentUI
+ VERSION 1.0
+ URI "FluentUI"
+ SOURCES ${sources_files}
+ QML_FILES ${qml_files}
+ RESOURCES ${resource_files}
)
-set(TARGET_HEADERS
- Def.h
- FluApp.h
- FluColorSet.h
- FluColors.h
- FluRegister.h
- FluTheme.h
- Fluent.h
- FluentUI.h
- NativeEventFilter.h
- WindowHelper.h
- qml_plugin.h
- stdafx.h
+set_target_properties(fluentui PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
)
-add_definitions(-DVERSION_IN="1.0.0")
-add_definitions(-DURI_STR="FluentUI")
-
-add_library(${PROJECT_NAME} ${TARGET_TYPE} ${TARGET_SOURCES} ${TARGET_HEADERS} ${TARGET_RESOURCES})
-
-set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/FluentUI)
+target_link_libraries(fluentui PUBLIC
+ Qt::Core
+ Qt::Quick
+ Qt::Qml
+)
if(WIN32)
- target_link_libraries(${PROJECT_NAME} PRIVATE dwmapi user32)
-else()
-endif()
-
-target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
-
-target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick Qt6::Svg)
-
-if(WIN32)
- include(build_windows.cmake)
-else()
- include(build_macos.cmake)
+ target_link_libraries(fluentui PRIVATE dwmapi user32)
endif()
diff --git a/src/Def.h b/src/Def.h
index f6e95bab..41855239 100644
--- a/src/Def.h
+++ b/src/Def.h
@@ -2,6 +2,7 @@
#define DEF_H
#include
+#include
namespace Fluent_DarkMode {
Q_NAMESPACE
@@ -10,6 +11,7 @@ Q_NAMESPACE
Light = 0x1,
Dark = 0x2,
};
+ QML_NAMED_ELEMENT(FluDarkMode)
Q_ENUMS(Fluent_DarkModeType);
}
@@ -1420,6 +1422,7 @@ enum class Fluent_AwesomeType {
SpeechSolidBold=0xf8b2,
ClickedOutLoudSolidBold=0xf8b3,
};
+ QML_NAMED_ELEMENT(FluentIcons)
Q_ENUMS(Fluent_AwesomeType)
}
diff --git a/src/FluApp.cpp b/src/FluApp.cpp
index 2ccc67ce..334c8353 100644
--- a/src/FluApp.cpp
+++ b/src/FluApp.cpp
@@ -1,4 +1,4 @@
-#include "FluApp.h"
+#include "FluApp.h"
#include
#include
@@ -6,6 +6,7 @@
#include
#include
#include
+#include
#include
#include "FluTheme.h"
#include "Def.h"
@@ -24,29 +25,39 @@ static bool isCompositionEnabled()
}
#endif
-FluApp* FluApp::m_instance = nullptr;
+FluApp* FluApp::fluApp = nullptr;
+FluTheme* FluApp::fluTheme = nullptr;
+FluColors* FluApp::flutColors = nullptr;
-FluApp *FluApp::getInstance()
-{
- if(FluApp::m_instance == nullptr){
- FluApp::m_instance = new FluApp;
- }
- return FluApp::m_instance;
+void FluApp::setFluApp(FluApp* val){
+ FluApp::fluApp = val;
+}
+void FluApp::setFluTheme(FluTheme* val){
+ FluApp::fluTheme = val;
+}
+void FluApp::setFluColors(FluColors* val){
+ FluApp::flutColors = val;
}
FluApp::FluApp(QObject *parent)
: QObject{parent}
{
+ QFontDatabase::addApplicationFont(":/FluentUI/Font/Segoe_Fluent_Icons.ttf");
}
void FluApp::init(QQuickWindow *window){
this->appWindow = window;
+ QQmlEngine *engine = qmlEngine(appWindow);
+ QQmlComponent component(engine, ":/FluentUI/Controls/FluSingleton.qml");
+ component.create();
+ nativeEvent = new NativeEventFilter();
+ qApp->installNativeEventFilter(nativeEvent);
}
void FluApp::run(){
#ifdef Q_OS_WIN
if(!isCompositionEnabled()){
- FluTheme::getInstance()->frameless(false);
+ fluTheme->frameless(false);
}
#endif
navigate(initialRoute());
@@ -66,7 +77,6 @@ void FluApp::navigate(const QString& route,const QJsonObject& argument,FluRegist
}
properties.insert("argument",argument);
QQuickWindow *view = qobject_cast(component.createWithInitialProperties(properties));
-
int launchMode = view->property("launchMode").toInt();
if(launchMode==1){
for (auto& pair : wnds) {
@@ -88,8 +98,7 @@ void FluApp::navigate(const QString& route,const QJsonObject& argument,FluRegist
}
}
}
-
- if(FluTheme::getInstance()->frameless()){
+ if(fluTheme->frameless()){
view->setFlag(Qt::FramelessWindowHint,true);
}
wnds.insert(view->winId(),view);
diff --git a/src/FluApp.h b/src/FluApp.h
index 5c33bd99..effb68bf 100644
--- a/src/FluApp.h
+++ b/src/FluApp.h
@@ -3,10 +3,14 @@
#include
#include
+#include
#include
#include
#include
#include
+#include "FluTheme.h"
+#include "FluColors.h"
+#include "NativeEventFilter.h"
#include "FluRegister.h"
#include "stdafx.h"
@@ -15,31 +19,35 @@ class FluApp : public QObject
Q_OBJECT
Q_PROPERTY_AUTO(QString,initialRoute);
Q_PROPERTY_AUTO(QJsonObject,routes);
-
+ QML_NAMED_ELEMENT(FluApp)
+ QML_SINGLETON
public:
-
static FluApp *getInstance();
-
explicit FluApp(QObject *parent = nullptr);
-
+ ~FluApp(){
+ if (nativeEvent != Q_NULLPTR) {
+ delete nativeEvent;
+ nativeEvent = Q_NULLPTR;
+ }
+ }
Q_INVOKABLE void run();
-
Q_INVOKABLE void navigate(const QString& route,const QJsonObject& argument = {},FluRegister* fluRegister = nullptr);
-
Q_INVOKABLE void init(QQuickWindow *window);
-
Q_INVOKABLE QJsonArray awesomelist(const QString& keyword = "");
-
Q_INVOKABLE void clipText(const QString& text);
-
Q_INVOKABLE QString uuid();
-
Q_INVOKABLE void closeApp();
+ Q_INVOKABLE void setFluApp(FluApp* val);
+ Q_INVOKABLE void setFluTheme(FluTheme* val);
+ Q_INVOKABLE void setFluColors(FluColors* val);
public:
QMap wnds;
+ static FluApp* fluApp;
+ static FluTheme* fluTheme;
+ static FluColors* flutColors;
private:
- static FluApp* m_instance;
+ NativeEventFilter *nativeEvent = Q_NULLPTR;
QWindow *appWindow;
};
diff --git a/src/FluColors.cpp b/src/FluColors.cpp
index 46e7536d..feaeb78c 100644
--- a/src/FluColors.cpp
+++ b/src/FluColors.cpp
@@ -1,15 +1,5 @@
#include "FluColors.h"
-FluColors* FluColors::m_instance = nullptr;
-
-FluColors *FluColors::getInstance()
-{
- if(FluColors::m_instance == nullptr){
- FluColors::m_instance = new FluColors;
- }
- return FluColors::m_instance;
-}
-
FluColors::FluColors(QObject *parent)
: QObject{parent}
{
diff --git a/src/FluColors.h b/src/FluColors.h
index c494d035..0186b36b 100644
--- a/src/FluColors.h
+++ b/src/FluColors.h
@@ -2,6 +2,7 @@
#define FLUCOLORS_H
#include
+#include
#include "FluColorSet.h"
#include "stdafx.h"
@@ -41,13 +42,10 @@ class FluColors : public QObject
Q_PROPERTY_AUTO(FluColorSet*,Blue);
Q_PROPERTY_AUTO(FluColorSet*,Teal);
Q_PROPERTY_AUTO(FluColorSet*,Green);
-
+ QML_NAMED_ELEMENT(FluColors)
+ QML_SINGLETON
public:
explicit FluColors(QObject *parent = nullptr);
- static FluColors *getInstance();
-private:
- static FluColors* m_instance;
-
};
#endif // FLUCOLORS_H
diff --git a/src/FluRegister.cpp b/src/FluRegister.cpp
index 4cc8c6da..e698f13e 100644
--- a/src/FluRegister.cpp
+++ b/src/FluRegister.cpp
@@ -12,7 +12,7 @@ FluRegister::FluRegister(QObject *parent)
}
void FluRegister::launch(const QJsonObject& argument){
- FluApp::getInstance()->navigate(path(),argument,this);
+ FluApp::fluApp->navigate(path(),argument,this);
}
void FluRegister::onResult(const QJsonObject& data){
diff --git a/src/FluTheme.cpp b/src/FluTheme.cpp
index 553a003c..fdd1ca15 100644
--- a/src/FluTheme.cpp
+++ b/src/FluTheme.cpp
@@ -1,27 +1,17 @@
#include "FluTheme.h"
-#include "FluColors.h"
#include "Def.h"
#include
+#include "FluApp.h"
#include
-FluTheme* FluTheme::m_instance = nullptr;
-
-FluTheme *FluTheme::getInstance()
-{
- if(FluTheme::m_instance == nullptr){
- FluTheme::m_instance = new FluTheme;
- }
- return FluTheme::m_instance;
-}
-
FluTheme::FluTheme(QObject *parent)
: QObject{parent}
{
connect(this,&FluTheme::darkModeChanged,this,[=]{
Q_EMIT darkChanged();
});
- primaryColor(FluColors::getInstance()->Blue());
+ primaryColor(FluApp::flutColors->Blue());
textSize(13);
nativeText(false);
frameless(true);
diff --git a/src/FluTheme.h b/src/FluTheme.h
index e839c0b8..d4efa364 100644
--- a/src/FluTheme.h
+++ b/src/FluTheme.h
@@ -2,6 +2,7 @@
#define FLUTHEME_H
#include
+#include
#include "FluColorSet.h"
#include "stdafx.h"
@@ -14,13 +15,13 @@ class FluTheme : public QObject
Q_PROPERTY_AUTO(int,darkMode);
Q_PROPERTY_AUTO(bool,nativeText);
Q_PROPERTY_AUTO(int,textSize);
+ QML_NAMED_ELEMENT(FluTheme)
+ QML_SINGLETON
public:
explicit FluTheme(QObject *parent = nullptr);
- static FluTheme *getInstance();
bool dark();
Q_SIGNAL void darkChanged();
private:
- static FluTheme* m_instance;
bool _dark;
bool eventFilter(QObject *obj, QEvent *event);
bool systemDark();
diff --git a/src/Fluent.cpp b/src/Fluent.cpp
deleted file mode 100644
index 39933cd8..00000000
--- a/src/Fluent.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-#include "Fluent.h"
-
-#include
-#include
-#include
-#include
-#include "FluColors.h"
-#include "NativeEventFilter.h"
-#include "FluTheme.h"
-#include "WindowHelper.h"
-#include "FluApp.h"
-#include "Def.h"
-
-Fluent* Fluent::m_instance = nullptr;
-
-Fluent *Fluent::getInstance()
-{
- if(Fluent::m_instance == nullptr){
- Fluent::m_instance = new Fluent;
- }
- return Fluent::m_instance;
-}
-
-QString Fluent::version() const
-{
- return QStringLiteral(VERSION_IN);
-}
-
-void Fluent::registerTypes(const char *uri){
- Q_INIT_RESOURCE(res);
- int major = 1;
- int minor = 0;
-
- qmlRegisterType(uri,major,minor,"WindowHelper");
- qmlRegisterType(uri,major,minor,"FluColorSet");
-
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluBreadcrumbBar.qml"),uri,major,minor,"FluBreadcrumbBar");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluRatingControl.qml"),uri,major,minor,"FluRatingControl");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluStatusView.qml"),uri,major,minor,"FluStatusView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPagination.qml"),uri,major,minor,"FluPagination");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluToggleButton.qml"),uri,major,minor,"FluToggleButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTableView.qml"),uri,major,minor,"FluTableView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPivotItem.qml"),uri,major,minor,"FluPivotItem");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPivot.qml"),uri,major,minor,"FluPivot");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluFlipView.qml"),uri,major,minor,"FluFlipView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItemExpander.qml"),uri,major,minor,"FluPaneItemExpander");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTabView.qml"),uri,major,minor,"FluTabView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluArea.qml"),uri,major,minor,"FluArea");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluBadge.qml"),uri,major,minor,"FluBadge");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluMediaPlayer.qml"),uri,major,minor,"FluMediaPlayer");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluContentPage.qml"),uri,major,minor,"FluContentPage");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluScrollablePage.qml"),uri,major,minor,"FluScrollablePage");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItemHeader.qml"),uri,major,minor,"FluPaneItemHeader");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItem.qml"),uri,major,minor,"FluPaneItem");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPaneItemSeparator.qml"),uri,major,minor,"FluPaneItemSeparator");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluNavigationView.qml"),uri,major,minor,"FluNavigationView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCalendarPicker.qml"),uri,major,minor,"FluCalendarPicker");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCalendarView.qml"),uri,major,minor,"FluCalendarView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDatePicker.qml"),uri,major,minor,"FluDatePicker");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTimePicker.qml"),uri,major,minor,"FluTimePicker");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluColorView.qml"),uri,major,minor,"FluColorView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluColorPicker.qml"),uri,major,minor,"FluColorPicker");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCarousel.qml"),uri,major,minor,"FluCarousel");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluAutoSuggestBox.qml"),uri,major,minor,"FluAutoSuggestBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluExpander.qml"),uri,major,minor,"FluExpander");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTreeView.qml"),uri,major,minor,"FluTreeView");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluContentDialog.qml"),uri,major,minor,"FluContentDialog");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluMenuItem.qml"),uri,major,minor,"FluMenuItem");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluMenu.qml"),uri,major,minor,"FluMenu");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluScrollBar.qml"),uri,major,minor,"FluScrollBar");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTextButton.qml"),uri,major,minor,"FluTextButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluMultilineTextBox.qml"),uri,major,minor,"FluMultilineTextBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTooltip.qml"),uri,major,minor,"FluTooltip");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDivider.qml"),uri,major,minor,"FluDivider");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluIcon.qml"),uri,major,minor,"FluIcon");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluObject.qml"),uri,major,minor,"FluObject");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluInfoBar.qml"),uri,major,minor,"FluInfoBar");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluWindow.qml"),uri,major,minor,"FluWindow");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluRectangle.qml"),uri,major,minor,"FluRectangle");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluAppBar.qml"),uri,major,minor,"FluAppBar");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluButton.qml"),uri,major,minor,"FluButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluCheckBox.qml"),uri,major,minor,"FluCheckBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluComboBox.qml"),uri,major,minor,"FluComboBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluDropDownButton.qml"),uri,major,minor,"FluDropDownButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluFilledButton.qml"),uri,major,minor,"FluFilledButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluIconButton.qml"),uri,major,minor,"FluIconButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluProgressBar.qml"),uri,major,minor,"FluProgressBar");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluProgressRing.qml"),uri,major,minor,"FluProgressRing");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluRadioButton.qml"),uri,major,minor,"FluRadioButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluSlider.qml"),uri,major,minor,"FluSlider");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluTextBox.qml"),uri,major,minor,"FluTextBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluPasswordBox.qml"),uri,major,minor,"FluPasswordBox");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluText.qml"),uri,major,minor,"FluText");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluFilledButton.qml"),uri,major,minor,"FluFilledButton");
- qmlRegisterType(QUrl("qrc:/com.zhuzichu/controls/FluToggleSwitch.qml"),uri,major,minor,"FluToggleSwitch");
-
- qmlRegisterUncreatableMetaObject(Fluent_Awesome::staticMetaObject, uri,major,minor,"FluentIcons", "Access to enums & flags only");
- qmlRegisterUncreatableMetaObject(Fluent_DarkMode::staticMetaObject, uri,major,minor,"FluDarkMode", "Access to enums & flags only");
-
-}
-
-void Fluent::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- nativeEvent = new NativeEventFilter();
- qApp->installNativeEventFilter(nativeEvent);
- Q_UNUSED(engine)
- Q_UNUSED(uri)
-#ifdef Q_OS_WIN
- QFont font;
- font.setFamily("Microsoft YaHei");
- QGuiApplication::setFont(font);
- // QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
-#endif
- QFontDatabase::addApplicationFont(":/com.zhuzichu/res/font/Segoe_Fluent_Icons.ttf");
- FluApp* app = FluApp::getInstance();
- engine->rootContext()->setContextProperty("FluApp",app);
- FluColors* colors = FluColors::getInstance();
- engine->rootContext()->setContextProperty("FluColors",colors);
- FluTheme* theme = FluTheme::getInstance();
- engine->rootContext()->setContextProperty("FluTheme",theme);
-}
diff --git a/src/Fluent.h b/src/Fluent.h
deleted file mode 100644
index a1540e5b..00000000
--- a/src/Fluent.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef FLUENT_H
-#define FLUENT_H
-
-#include
-#include
-#include "NativeEventFilter.h"
-
-class Fluent: public QObject
-{
- Q_OBJECT
-public:
- Q_INVOKABLE QString version() const;
- ~Fluent(){
- if (nativeEvent != Q_NULLPTR) {
- delete nativeEvent;
- nativeEvent = Q_NULLPTR;
- }
- }
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
- static Fluent *getInstance();
-private:
- static Fluent* m_instance;
- NativeEventFilter *nativeEvent = Q_NULLPTR;
-};
-
-#endif // FLUENT_H
diff --git a/src/FluentUI.cpp b/src/FluentUI.cpp
deleted file mode 100644
index a4bae0fc..00000000
--- a/src/FluentUI.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "FluentUI.h"
-#include "Fluent.h"
-
-void FluentUI::registerTypes(const char *uri){
- Fluent::getInstance()->registerTypes(uri);
-}
-
-void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){
- Fluent::getInstance()->initializeEngine(engine,uri);
-}
-
-void FluentUI::initialize(QQmlEngine *engine){
- Fluent::getInstance()->registerTypes(URI_STR);
- Fluent::getInstance()->initializeEngine(engine,URI_STR);
-}
diff --git a/src/FluentUI.h b/src/FluentUI.h
deleted file mode 100644
index bb74f12e..00000000
--- a/src/FluentUI.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef FLUENTUI_H
-#define FLUENTUI_H
-
-#include
-
-class Q_DECL_EXPORT FluentUI
-{
-
-public:
- static void registerTypes(const char *uri) ;
- static void initializeEngine(QQmlEngine *engine, const char *uri);
- static void initialize(QQmlEngine *engine);
-};
-
-#endif // FLUENTUI_H
diff --git a/src/FluentUI.pro b/src/FluentUI.pro
deleted file mode 100644
index a35c7811..00000000
--- a/src/FluentUI.pro
+++ /dev/null
@@ -1,51 +0,0 @@
-QT += qml quick svg
-CONFIG += plugin c++17
-TEMPLATE = lib
-TARGET = FluentUI
-TARGET = $$qtLibraryTarget($$TARGET)
-uri = FluentUI
-
-CONFIG += sharedlib # staticlib or sharedlib
-
-RESOURCES += \
- res.qrc
-
-HEADERS += \
- Def.h \
- FluApp.h \
- FluColorSet.h \
- FluColors.h \
- FluRegister.h \
- FluTheme.h \
- Fluent.h \
- FluentUI.h \
- NativeEventFilter.h \
- WindowHelper.h \
- qml_plugin.h \
- stdafx.h
-
-SOURCES += \
- Def.cpp \
- FluApp.cpp \
- FluColorSet.cpp \
- FluColors.cpp \
- FluRegister.cpp \
- FluTheme.cpp \
- Fluent.cpp \
- FluentUI.cpp \
- NativeEventFilter.cpp \
- WindowHelper.cpp \
- qml_plugin.cpp \
-
-win32 {
- LIBS += -ldwmapi -luser32
-}
-
-DEFINES += VERSION_IN=\\\"1.0.0\\\"
-DEFINES += URI_STR=\\\"$$uri\\\"
-
-contains(QMAKE_HOST.os,Windows) {
- include(./build_windows.pri)
-}else{
- include(./build_macos.pri)
-}
diff --git a/src/NativeEventFilter.cpp b/src/NativeEventFilter.cpp
index 119f28cf..6966cbf7 100644
--- a/src/NativeEventFilter.cpp
+++ b/src/NativeEventFilter.cpp
@@ -11,11 +11,11 @@
bool NativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
{
#ifdef Q_OS_WIN
- if (eventType == "windows_generic_MSG" && FluTheme::getInstance()->frameless()) {
+ if (eventType == "windows_generic_MSG" && FluApp::fluTheme->frameless()) {
MSG* msg = static_cast(message);
if (msg == Q_NULLPTR)
return false;
- if(!FluApp::getInstance()->wnds.contains((WId)msg->hwnd)){
+ if(!FluApp::fluApp->wnds.contains((WId)msg->hwnd)){
return false;
}
switch(msg->message) {
@@ -27,7 +27,7 @@ bool NativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *mes
return true;
}
case WM_NCHITTEST: {
- auto view = FluApp::getInstance()->wnds[(WId)msg->hwnd];
+ auto view = FluApp::fluApp->wnds[(WId)msg->hwnd];
bool isResize = !(view->maximumWidth()==view->minimumWidth()&&view->maximumHeight()==view->minimumHeight());
const LONG borderWidth = 8;
RECT winrect;
diff --git a/src/WindowHelper.cpp b/src/WindowHelper.cpp
index 1ff5d4c3..1fd1b64f 100644
--- a/src/WindowHelper.cpp
+++ b/src/WindowHelper.cpp
@@ -30,7 +30,7 @@ void WindowHelper::initWindow(QQuickWindow* window){
void WindowHelper::firstUpdate(){
if(isFisrt){
#ifdef Q_OS_WIN
- if(FluTheme::getInstance()->frameless()){
+ if(FluApp::fluTheme->frameless()){
HWND wnd = (HWND)window->winId();
SetWindowLongPtr(wnd, GWL_STYLE, static_cast(Style::aero_borderless));
const MARGINS shadow_on = { 1, 1, 1, 1 };
@@ -54,7 +54,7 @@ QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){
void WindowHelper::destoryWindow(){
if(this->window){
- FluApp::getInstance()->wnds.remove(this->window->winId());
+ FluApp::fluApp->wnds.remove(this->window->winId());
this->window->deleteLater();
}
}
diff --git a/src/WindowHelper.h b/src/WindowHelper.h
index bc565345..0b2a3f15 100644
--- a/src/WindowHelper.h
+++ b/src/WindowHelper.h
@@ -3,6 +3,7 @@
#include
#include
+#include
#include
#include
#include
@@ -10,14 +11,13 @@
class WindowHelper : public QObject
{
Q_OBJECT
-
+ QML_NAMED_ELEMENT(WindowHelper)
public:
explicit WindowHelper(QObject *parent = nullptr);
Q_INVOKABLE void initWindow(QQuickWindow* window);
Q_INVOKABLE void destoryWindow();
Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path);
-
Q_INVOKABLE void firstUpdate();
private:
diff --git a/src/build-preset/qmldir b/src/build-preset/qmldir
deleted file mode 100644
index b5ca1f0c..00000000
--- a/src/build-preset/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module FluentUI
-plugin FluentUI
-classname FluentUIQmlPlugin
-typeinfo plugin.qmltypes
\ No newline at end of file
diff --git a/src/build_macos.cmake b/src/build_macos.cmake
deleted file mode 100644
index 254942a1..00000000
--- a/src/build_macos.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-set(OUTP ${CMAKE_BINARY_DIR}/bin/FluentUI/)
-
-add_definitions(-DMACOS)
-
-set(CMAKE_INSTALL_PREFIX ${OUTP})
-set(CMAKE_INSTALL_DESTDIR ${OUTP})
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-set(QMAKE_MOC_OPTIONS -Muri=${uri})
-
-add_custom_command(
- TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND chmod -R 777 ${CMAKE_CURRENT_SOURCE_DIR}/macos_install.sh
-)
-
-add_custom_command(
- TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/macos_install.sh PRESET ${CMAKE_CURRENT_SOURCE_DIR}/ ${OUTP}
-)
-
-
-
-if(${TARGET_TYPE} STREQUAL "SHARED")
-
- set(INST_QMLPATH ${QT_INSTALL_QML}/FluentUI)
- add_custom_command(
- TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/macos_install.sh INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/ ${OUTP} ${INST_QMLPATH}
- )
-
-endif()
diff --git a/src/build_macos.pri b/src/build_macos.pri
deleted file mode 100644
index dc26c30e..00000000
--- a/src/build_macos.pri
+++ /dev/null
@@ -1,17 +0,0 @@
-OUTP = $$OUT_PWD/../bin/FluentUI/
-
-DESTDIR += $$OUTP
-
-QMAKE_MOC_OPTIONS += -Muri=$$uri
-QMAKE_PRE_LINK += chmod -R 777 $$PWD/macos_install.sh;
-QMAKE_PRE_LINK += $$PWD/macos_install.sh PRESET $$PWD/ $$OUTP;
-
-CONFIG(sharedlib){
- INST_QMLPATH = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
- QMAKE_POST_LINK += $$PWD/macos_install.sh INSTALL $$PWD/ $$OUTP $$INST_QMLPATH;
-
- exists($$PWD/../../dev.pri){
- include($$PWD/../../dev.pri)
- }
-}
diff --git a/src/build_windows.cmake b/src/build_windows.cmake
deleted file mode 100644
index 875c9166..00000000
--- a/src/build_windows.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-set(OUTP "${CMAKE_BINARY_DIR}/bin/FluentUI")
-set(BUILDBIN_PATH "${OUTP}")
-set(QTQMLFLUENT_PATH "${QT_INSTALL_QML}/FluentUI")
-set(PRESET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-preset")
-set(SOLIBFILE_PATH "${CMAKE_BINARY_DIR}/libFluentUI.so")
-set(ANDROID NO)
-if (ANDROID)
- set(ANDROID YES)
- execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTP})
-else()
- set(CMAKE_INSTALL_PREFIX "${OUTP}")
-endif()
-set(SHAREDSCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/win_install.bat SHARED ${CMAKE_CURRENT_SOURCE_DIR} ${PRESET_PATH} ${BUILDBIN_PATH} ${QTQMLFLUENT_PATH} ${ANDROID} ${SOLIBFILE_PATH})
-set(STATICSCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/win_install.bat STATIC ${CMAKE_CURRENT_SOURCE_DIR} ${PRESET_PATH} ${BUILDBIN_PATH} ${QTQMLFLUENT_PATH} ${ANDROID} ${SOLIBFILE_PATH})
-string(REPLACE "/" "\\" SHAREDSCRIPT "${SHAREDSCRIPT}")
-string(REPLACE "/" "\\" STATICSCRIPT "${STATICSCRIPT}")
-if (${TARGET_TYPE} STREQUAL "SHARED")
- add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND ${SHAREDSCRIPT}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
-else()
- add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND ${STATICSCRIPT}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
-endif()
diff --git a/src/build_windows.pri b/src/build_windows.pri
deleted file mode 100644
index 41f02028..00000000
--- a/src/build_windows.pri
+++ /dev/null
@@ -1,20 +0,0 @@
-OUTP = $$OUT_PWD/../bin/FluentUI
-BUILDBIN_PATH = $$replace(OUTP, src/../bin, bin)
-QTQMLFLUENT_PATH = $$[QT_INSTALL_QML]/FluentUI
-PRESET_PATH = $$PWD/build-preset
-SOLIBFILE_PATH = $$OUT_PWD/libFluentUI.so
-ANDROID = NO
-android{
- ANDROID=YES
- QMAKE_PRE_LINK *= md $$replace(OUTP, /, \\)
-}else{
- DESTDIR += $$OUTP
-}
-SHAREDSCRIPT = "$$PWD\win_install.bat" SHARED "$$PWD" "$$PRESET_PATH" "$$BUILDBIN_PATH" "$$QTQMLFLUENT_PATH" $$ANDROID "$$SOLIBFILE_PATH"
-STATICSCRIPT = "$$PWD\win_install.bat" STATIC "$$PWD" "$$PRESET_PATH" "$$BUILDBIN_PATH" "$$QTQMLFLUENT_PATH" $$ANDROID "$$SOLIBFILE_PATH"
-CONFIG(sharedlib){
- QMAKE_POST_LINK *= $$replace(SHAREDSCRIPT, /, \\)
-}
-else{
- QMAKE_POST_LINK *= $$replace(STATICSCRIPT, /, \\)
-}
diff --git a/src/colorpicker/ColorPicker.qml b/src/imports/FluentUI/Controls/ColorPicker/ColorPicker.qml
similarity index 99%
rename from src/colorpicker/ColorPicker.qml
rename to src/imports/FluentUI/Controls/ColorPicker/ColorPicker.qml
index 96dc336d..5c0e82d7 100644
--- a/src/colorpicker/ColorPicker.qml
+++ b/src/imports/FluentUI/Controls/ColorPicker/ColorPicker.qml
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
-import "content"
+import "Content"
Rectangle {
id: colorPicker
diff --git a/src/colorpicker/content/Checkerboard.qml b/src/imports/FluentUI/Controls/ColorPicker/Content/Checkerboard.qml
similarity index 100%
rename from src/colorpicker/content/Checkerboard.qml
rename to src/imports/FluentUI/Controls/ColorPicker/Content/Checkerboard.qml
diff --git a/src/colorpicker/content/ColorSlider.qml b/src/imports/FluentUI/Controls/ColorPicker/Content/ColorSlider.qml
similarity index 100%
rename from src/colorpicker/content/ColorSlider.qml
rename to src/imports/FluentUI/Controls/ColorPicker/Content/ColorSlider.qml
diff --git a/src/colorpicker/content/NumberBox.qml b/src/imports/FluentUI/Controls/ColorPicker/Content/NumberBox.qml
similarity index 100%
rename from src/colorpicker/content/NumberBox.qml
rename to src/imports/FluentUI/Controls/ColorPicker/Content/NumberBox.qml
diff --git a/src/colorpicker/content/PanelBorder.qml b/src/imports/FluentUI/Controls/ColorPicker/Content/PanelBorder.qml
similarity index 100%
rename from src/colorpicker/content/PanelBorder.qml
rename to src/imports/FluentUI/Controls/ColorPicker/Content/PanelBorder.qml
diff --git a/src/colorpicker/content/SBPicker.qml b/src/imports/FluentUI/Controls/ColorPicker/Content/SBPicker.qml
similarity index 100%
rename from src/colorpicker/content/SBPicker.qml
rename to src/imports/FluentUI/Controls/ColorPicker/Content/SBPicker.qml
diff --git a/src/controls/FluAppBar.qml b/src/imports/FluentUI/Controls/FluAppBar.qml
similarity index 100%
rename from src/controls/FluAppBar.qml
rename to src/imports/FluentUI/Controls/FluAppBar.qml
diff --git a/src/controls/FluArea.qml b/src/imports/FluentUI/Controls/FluArea.qml
similarity index 100%
rename from src/controls/FluArea.qml
rename to src/imports/FluentUI/Controls/FluArea.qml
diff --git a/src/controls/FluAutoSuggestBox.qml b/src/imports/FluentUI/Controls/FluAutoSuggestBox.qml
similarity index 100%
rename from src/controls/FluAutoSuggestBox.qml
rename to src/imports/FluentUI/Controls/FluAutoSuggestBox.qml
diff --git a/src/controls/FluBadge.qml b/src/imports/FluentUI/Controls/FluBadge.qml
similarity index 97%
rename from src/controls/FluBadge.qml
rename to src/imports/FluentUI/Controls/FluBadge.qml
index e37a8c6f..ded998b0 100644
--- a/src/controls/FluBadge.qml
+++ b/src/imports/FluentUI/Controls/FluBadge.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
Rectangle{
diff --git a/src/controls/FluBreadcrumbBar.qml b/src/imports/FluentUI/Controls/FluBreadcrumbBar.qml
similarity index 100%
rename from src/controls/FluBreadcrumbBar.qml
rename to src/imports/FluentUI/Controls/FluBreadcrumbBar.qml
diff --git a/src/controls/FluButton.qml b/src/imports/FluentUI/Controls/FluButton.qml
similarity index 100%
rename from src/controls/FluButton.qml
rename to src/imports/FluentUI/Controls/FluButton.qml
diff --git a/src/controls/FluCalendarPicker.qml b/src/imports/FluentUI/Controls/FluCalendarPicker.qml
similarity index 100%
rename from src/controls/FluCalendarPicker.qml
rename to src/imports/FluentUI/Controls/FluCalendarPicker.qml
diff --git a/src/controls/FluCalendarView.qml b/src/imports/FluentUI/Controls/FluCalendarView.qml
similarity index 100%
rename from src/controls/FluCalendarView.qml
rename to src/imports/FluentUI/Controls/FluCalendarView.qml
diff --git a/src/controls/FluCarousel.qml b/src/imports/FluentUI/Controls/FluCarousel.qml
similarity index 100%
rename from src/controls/FluCarousel.qml
rename to src/imports/FluentUI/Controls/FluCarousel.qml
diff --git a/src/controls/FluCheckBox.qml b/src/imports/FluentUI/Controls/FluCheckBox.qml
similarity index 100%
rename from src/controls/FluCheckBox.qml
rename to src/imports/FluentUI/Controls/FluCheckBox.qml
diff --git a/src/controls/FluColorPicker.qml b/src/imports/FluentUI/Controls/FluColorPicker.qml
similarity index 100%
rename from src/controls/FluColorPicker.qml
rename to src/imports/FluentUI/Controls/FluColorPicker.qml
diff --git a/src/controls/FluColorView.qml b/src/imports/FluentUI/Controls/FluColorView.qml
similarity index 86%
rename from src/controls/FluColorView.qml
rename to src/imports/FluentUI/Controls/FluColorView.qml
index 2bf8bf0d..97546f82 100644
--- a/src/controls/FluColorView.qml
+++ b/src/imports/FluentUI/Controls/FluColorView.qml
@@ -1,5 +1,7 @@
import QtQuick
-import "../colorpicker"
+import QtQuick.Controls
+import FluentUI
+import "ColorPicker"
Item {
diff --git a/src/controls/FluComboBox.qml b/src/imports/FluentUI/Controls/FluComboBox.qml
similarity index 65%
rename from src/controls/FluComboBox.qml
rename to src/imports/FluentUI/Controls/FluComboBox.qml
index 3dd03fb7..151097f7 100644
--- a/src/controls/FluComboBox.qml
+++ b/src/imports/FluentUI/Controls/FluComboBox.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
Item {
diff --git a/src/controls/FluContentDialog.qml b/src/imports/FluentUI/Controls/FluContentDialog.qml
similarity index 99%
rename from src/controls/FluContentDialog.qml
rename to src/imports/FluentUI/Controls/FluContentDialog.qml
index 7b5c2a75..0f8955a0 100644
--- a/src/controls/FluContentDialog.qml
+++ b/src/imports/FluentUI/Controls/FluContentDialog.qml
@@ -2,6 +2,7 @@
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Window
+import FluentUI
Popup {
id: popup
diff --git a/src/controls/FluContentPage.qml b/src/imports/FluentUI/Controls/FluContentPage.qml
similarity index 100%
rename from src/controls/FluContentPage.qml
rename to src/imports/FluentUI/Controls/FluContentPage.qml
diff --git a/src/controls/FluDatePicker.qml b/src/imports/FluentUI/Controls/FluDatePicker.qml
similarity index 100%
rename from src/controls/FluDatePicker.qml
rename to src/imports/FluentUI/Controls/FluDatePicker.qml
diff --git a/src/controls/FluDivider.qml b/src/imports/FluentUI/Controls/FluDivider.qml
similarity index 100%
rename from src/controls/FluDivider.qml
rename to src/imports/FluentUI/Controls/FluDivider.qml
diff --git a/src/controls/FluDropDownButton.qml b/src/imports/FluentUI/Controls/FluDropDownButton.qml
similarity index 100%
rename from src/controls/FluDropDownButton.qml
rename to src/imports/FluentUI/Controls/FluDropDownButton.qml
diff --git a/src/controls/FluExpander.qml b/src/imports/FluentUI/Controls/FluExpander.qml
similarity index 100%
rename from src/controls/FluExpander.qml
rename to src/imports/FluentUI/Controls/FluExpander.qml
diff --git a/src/controls/FluFilledButton.qml b/src/imports/FluentUI/Controls/FluFilledButton.qml
similarity index 100%
rename from src/controls/FluFilledButton.qml
rename to src/imports/FluentUI/Controls/FluFilledButton.qml
diff --git a/src/controls/FluFlipView.qml b/src/imports/FluentUI/Controls/FluFlipView.qml
similarity index 100%
rename from src/controls/FluFlipView.qml
rename to src/imports/FluentUI/Controls/FluFlipView.qml
diff --git a/src/controls/FluFocusRectangle.qml b/src/imports/FluentUI/Controls/FluFocusRectangle.qml
similarity index 94%
rename from src/controls/FluFocusRectangle.qml
rename to src/imports/FluentUI/Controls/FluFocusRectangle.qml
index 7a3507d7..a565504c 100644
--- a/src/controls/FluFocusRectangle.qml
+++ b/src/imports/FluentUI/Controls/FluFocusRectangle.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
Item {
diff --git a/src/controls/FluIcon.qml b/src/imports/FluentUI/Controls/FluIcon.qml
similarity index 90%
rename from src/controls/FluIcon.qml
rename to src/imports/FluentUI/Controls/FluIcon.qml
index 110c0757..24ecfead 100644
--- a/src/controls/FluIcon.qml
+++ b/src/imports/FluentUI/Controls/FluIcon.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
Text {
diff --git a/src/controls/FluIconButton.qml b/src/imports/FluentUI/Controls/FluIconButton.qml
similarity index 100%
rename from src/controls/FluIconButton.qml
rename to src/imports/FluentUI/Controls/FluIconButton.qml
diff --git a/src/controls/FluInfoBar.qml b/src/imports/FluentUI/Controls/FluInfoBar.qml
similarity index 99%
rename from src/controls/FluInfoBar.qml
rename to src/imports/FluentUI/Controls/FluInfoBar.qml
index e1020cfb..eb2fa41f 100644
--- a/src/controls/FluInfoBar.qml
+++ b/src/imports/FluentUI/Controls/FluInfoBar.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
FluObject {
diff --git a/src/controls/FluItem.qml b/src/imports/FluentUI/Controls/FluItem.qml
similarity index 100%
rename from src/controls/FluItem.qml
rename to src/imports/FluentUI/Controls/FluItem.qml
diff --git a/src/controls/FluMediaPlayer.qml b/src/imports/FluentUI/Controls/FluMediaPlayer.qml
similarity index 100%
rename from src/controls/FluMediaPlayer.qml
rename to src/imports/FluentUI/Controls/FluMediaPlayer.qml
diff --git a/src/controls/FluMenu.qml b/src/imports/FluentUI/Controls/FluMenu.qml
similarity index 98%
rename from src/controls/FluMenu.qml
rename to src/imports/FluentUI/Controls/FluMenu.qml
index 1bc459e4..fe4598ae 100644
--- a/src/controls/FluMenu.qml
+++ b/src/imports/FluentUI/Controls/FluMenu.qml
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
+import FluentUI
Menu {
diff --git a/src/controls/FluMenuItem.qml b/src/imports/FluentUI/Controls/FluMenuItem.qml
similarity index 98%
rename from src/controls/FluMenuItem.qml
rename to src/imports/FluentUI/Controls/FluMenuItem.qml
index 7ea3d304..894008e0 100644
--- a/src/controls/FluMenuItem.qml
+++ b/src/imports/FluentUI/Controls/FluMenuItem.qml
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
+import FluentUI
Item {
@@ -16,7 +17,6 @@ Item {
}
height: 32
-
Rectangle{
anchors.centerIn: parent
width: control.width-40
diff --git a/src/controls/FluMultilineTextBox.qml b/src/imports/FluentUI/Controls/FluMultilineTextBox.qml
similarity index 100%
rename from src/controls/FluMultilineTextBox.qml
rename to src/imports/FluentUI/Controls/FluMultilineTextBox.qml
diff --git a/src/controls/FluNavigationView.qml b/src/imports/FluentUI/Controls/FluNavigationView.qml
similarity index 100%
rename from src/controls/FluNavigationView.qml
rename to src/imports/FluentUI/Controls/FluNavigationView.qml
diff --git a/src/controls/FluObject.qml b/src/imports/FluentUI/Controls/FluObject.qml
similarity index 71%
rename from src/controls/FluObject.qml
rename to src/imports/FluentUI/Controls/FluObject.qml
index b78c19be..2e1b5ee3 100644
--- a/src/controls/FluObject.qml
+++ b/src/imports/FluentUI/Controls/FluObject.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
QtObject {
id:flu_object;
diff --git a/src/controls/FluPagination.qml b/src/imports/FluentUI/Controls/FluPagination.qml
similarity index 100%
rename from src/controls/FluPagination.qml
rename to src/imports/FluentUI/Controls/FluPagination.qml
diff --git a/src/controls/FluPaneItem.qml b/src/imports/FluentUI/Controls/FluPaneItem.qml
similarity index 94%
rename from src/controls/FluPaneItem.qml
rename to src/imports/FluentUI/Controls/FluPaneItem.qml
index 93e5e928..d932ae6e 100644
--- a/src/controls/FluPaneItem.qml
+++ b/src/imports/FluentUI/Controls/FluPaneItem.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
QtObject {
diff --git a/src/controls/FluPaneItemEmpty.qml b/src/imports/FluentUI/Controls/FluPaneItemEmpty.qml
similarity index 75%
rename from src/controls/FluPaneItemEmpty.qml
rename to src/imports/FluentUI/Controls/FluPaneItemEmpty.qml
index 6e4c6bfd..c0a4b8cf 100644
--- a/src/controls/FluPaneItemEmpty.qml
+++ b/src/imports/FluentUI/Controls/FluPaneItemEmpty.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
QtObject {
readonly property string key : FluApp.uuid()
diff --git a/src/controls/FluPaneItemExpander.qml b/src/imports/FluentUI/Controls/FluPaneItemExpander.qml
similarity index 91%
rename from src/controls/FluPaneItemExpander.qml
rename to src/imports/FluentUI/Controls/FluPaneItemExpander.qml
index abdc8d69..d354d0bc 100644
--- a/src/controls/FluPaneItemExpander.qml
+++ b/src/imports/FluentUI/Controls/FluPaneItemExpander.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
FluObject {
diff --git a/src/controls/FluPaneItemHeader.qml b/src/imports/FluentUI/Controls/FluPaneItemHeader.qml
similarity index 79%
rename from src/controls/FluPaneItemHeader.qml
rename to src/imports/FluentUI/Controls/FluPaneItemHeader.qml
index c83ee61d..c00d6e7e 100644
--- a/src/controls/FluPaneItemHeader.qml
+++ b/src/imports/FluentUI/Controls/FluPaneItemHeader.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
QtObject {
readonly property string key : FluApp.uuid()
diff --git a/src/controls/FluPaneItemSeparator.qml b/src/imports/FluentUI/Controls/FluPaneItemSeparator.qml
similarity index 75%
rename from src/controls/FluPaneItemSeparator.qml
rename to src/imports/FluentUI/Controls/FluPaneItemSeparator.qml
index 6e4c6bfd..c0a4b8cf 100644
--- a/src/controls/FluPaneItemSeparator.qml
+++ b/src/imports/FluentUI/Controls/FluPaneItemSeparator.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
QtObject {
readonly property string key : FluApp.uuid()
diff --git a/src/controls/FluPasswordBox.qml b/src/imports/FluentUI/Controls/FluPasswordBox.qml
similarity index 100%
rename from src/controls/FluPasswordBox.qml
rename to src/imports/FluentUI/Controls/FluPasswordBox.qml
diff --git a/src/controls/FluPivot.qml b/src/imports/FluentUI/Controls/FluPivot.qml
similarity index 100%
rename from src/controls/FluPivot.qml
rename to src/imports/FluentUI/Controls/FluPivot.qml
diff --git a/src/controls/FluPivotItem.qml b/src/imports/FluentUI/Controls/FluPivotItem.qml
similarity index 84%
rename from src/controls/FluPivotItem.qml
rename to src/imports/FluentUI/Controls/FluPivotItem.qml
index 28ffb905..27444ba9 100644
--- a/src/controls/FluPivotItem.qml
+++ b/src/imports/FluentUI/Controls/FluPivotItem.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
QtObject {
diff --git a/src/controls/FluProgressBar.qml b/src/imports/FluentUI/Controls/FluProgressBar.qml
similarity index 98%
rename from src/controls/FluProgressBar.qml
rename to src/imports/FluentUI/Controls/FluProgressBar.qml
index f09fe5f9..7a9685cc 100644
--- a/src/controls/FluProgressBar.qml
+++ b/src/imports/FluentUI/Controls/FluProgressBar.qml
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
+import FluentUI
FluRectangle {
diff --git a/src/controls/FluProgressRing.qml b/src/imports/FluentUI/Controls/FluProgressRing.qml
similarity index 99%
rename from src/controls/FluProgressRing.qml
rename to src/imports/FluentUI/Controls/FluProgressRing.qml
index deab2127..28b92e45 100644
--- a/src/controls/FluProgressRing.qml
+++ b/src/imports/FluentUI/Controls/FluProgressRing.qml
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
+import FluentUI
Rectangle {
diff --git a/src/controls/FluRadioButton.qml b/src/imports/FluentUI/Controls/FluRadioButton.qml
similarity index 100%
rename from src/controls/FluRadioButton.qml
rename to src/imports/FluentUI/Controls/FluRadioButton.qml
diff --git a/src/controls/FluRatingControl.qml b/src/imports/FluentUI/Controls/FluRatingControl.qml
similarity index 100%
rename from src/controls/FluRatingControl.qml
rename to src/imports/FluentUI/Controls/FluRatingControl.qml
diff --git a/src/controls/FluRectangle.qml b/src/imports/FluentUI/Controls/FluRectangle.qml
similarity index 99%
rename from src/controls/FluRectangle.qml
rename to src/imports/FluentUI/Controls/FluRectangle.qml
index f5a96098..b2c1e700 100644
--- a/src/controls/FluRectangle.qml
+++ b/src/imports/FluentUI/Controls/FluRectangle.qml
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
+import FluentUI
Item{
diff --git a/src/controls/FluScrollBar.qml b/src/imports/FluentUI/Controls/FluScrollBar.qml
similarity index 100%
rename from src/controls/FluScrollBar.qml
rename to src/imports/FluentUI/Controls/FluScrollBar.qml
diff --git a/src/controls/FluScrollablePage.qml b/src/imports/FluentUI/Controls/FluScrollablePage.qml
similarity index 100%
rename from src/controls/FluScrollablePage.qml
rename to src/imports/FluentUI/Controls/FluScrollablePage.qml
diff --git a/src/controls/FluShadow.qml b/src/imports/FluentUI/Controls/FluShadow.qml
similarity index 97%
rename from src/controls/FluShadow.qml
rename to src/imports/FluentUI/Controls/FluShadow.qml
index 9e89023f..62d6a8e8 100644
--- a/src/controls/FluShadow.qml
+++ b/src/imports/FluentUI/Controls/FluShadow.qml
@@ -1,4 +1,6 @@
import QtQuick
+import QtQuick.Controls
+import FluentUI
Item {
diff --git a/src/imports/FluentUI/Controls/FluSingleton.qml b/src/imports/FluentUI/Controls/FluSingleton.qml
new file mode 100644
index 00000000..28e0b8ad
--- /dev/null
+++ b/src/imports/FluentUI/Controls/FluSingleton.qml
@@ -0,0 +1,15 @@
+import QtQuick
+import QtQuick.Controls
+import FluentUI
+
+QtObject {
+
+ id:control
+
+ Component.onCompleted: {
+ FluApp.setFluApp(FluApp)
+ FluApp.setFluColors(FluColors)
+ FluApp.setFluTheme(FluTheme)
+ }
+
+}
diff --git a/src/controls/FluSlider.qml b/src/imports/FluentUI/Controls/FluSlider.qml
similarity index 99%
rename from src/controls/FluSlider.qml
rename to src/imports/FluentUI/Controls/FluSlider.qml
index 1df29f3c..1e4a152e 100644
--- a/src/controls/FluSlider.qml
+++ b/src/imports/FluentUI/Controls/FluSlider.qml
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
+import FluentUI
Item{
diff --git a/src/controls/FluStatusView.qml b/src/imports/FluentUI/Controls/FluStatusView.qml
similarity index 100%
rename from src/controls/FluStatusView.qml
rename to src/imports/FluentUI/Controls/FluStatusView.qml
diff --git a/src/controls/FluTabView.qml b/src/imports/FluentUI/Controls/FluTabView.qml
similarity index 100%
rename from src/controls/FluTabView.qml
rename to src/imports/FluentUI/Controls/FluTabView.qml
diff --git a/src/controls/FluTableView.qml b/src/imports/FluentUI/Controls/FluTableView.qml
similarity index 100%
rename from src/controls/FluTableView.qml
rename to src/imports/FluentUI/Controls/FluTableView.qml
diff --git a/src/controls/FluText.qml b/src/imports/FluentUI/Controls/FluText.qml
similarity index 98%
rename from src/controls/FluText.qml
rename to src/imports/FluentUI/Controls/FluText.qml
index a6a8bbf4..7cb2a28e 100644
--- a/src/controls/FluText.qml
+++ b/src/imports/FluentUI/Controls/FluText.qml
@@ -1,4 +1,5 @@
import QtQuick
+import QtQuick.Controls
import FluentUI
Text {
diff --git a/src/controls/FluTextBox.qml b/src/imports/FluentUI/Controls/FluTextBox.qml
similarity index 100%
rename from src/controls/FluTextBox.qml
rename to src/imports/FluentUI/Controls/FluTextBox.qml
diff --git a/src/controls/FluTextBoxBackground.qml b/src/imports/FluentUI/Controls/FluTextBoxBackground.qml
similarity index 97%
rename from src/controls/FluTextBoxBackground.qml
rename to src/imports/FluentUI/Controls/FluTextBoxBackground.qml
index 6260fc6c..24b08765 100644
--- a/src/controls/FluTextBoxBackground.qml
+++ b/src/imports/FluentUI/Controls/FluTextBoxBackground.qml
@@ -1,5 +1,7 @@
import QtQuick
+import QtQuick.Controls
import Qt5Compat.GraphicalEffects
+import FluentUI
Rectangle{
diff --git a/src/controls/FluTextBoxMenu.qml b/src/imports/FluentUI/Controls/FluTextBoxMenu.qml
similarity index 100%
rename from src/controls/FluTextBoxMenu.qml
rename to src/imports/FluentUI/Controls/FluTextBoxMenu.qml
diff --git a/src/controls/FluTextButton.qml b/src/imports/FluentUI/Controls/FluTextButton.qml
similarity index 100%
rename from src/controls/FluTextButton.qml
rename to src/imports/FluentUI/Controls/FluTextButton.qml
diff --git a/src/controls/FluTimePicker.qml b/src/imports/FluentUI/Controls/FluTimePicker.qml
similarity index 100%
rename from src/controls/FluTimePicker.qml
rename to src/imports/FluentUI/Controls/FluTimePicker.qml
diff --git a/src/controls/FluToggleButton.qml b/src/imports/FluentUI/Controls/FluToggleButton.qml
similarity index 100%
rename from src/controls/FluToggleButton.qml
rename to src/imports/FluentUI/Controls/FluToggleButton.qml
diff --git a/src/controls/FluToggleSwitch.qml b/src/imports/FluentUI/Controls/FluToggleSwitch.qml
similarity index 100%
rename from src/controls/FluToggleSwitch.qml
rename to src/imports/FluentUI/Controls/FluToggleSwitch.qml
diff --git a/src/controls/FluTooltip.qml b/src/imports/FluentUI/Controls/FluTooltip.qml
similarity index 100%
rename from src/controls/FluTooltip.qml
rename to src/imports/FluentUI/Controls/FluTooltip.qml
diff --git a/src/controls/FluTreeView.qml b/src/imports/FluentUI/Controls/FluTreeView.qml
similarity index 100%
rename from src/controls/FluTreeView.qml
rename to src/imports/FluentUI/Controls/FluTreeView.qml
diff --git a/src/controls/FluWindow.qml b/src/imports/FluentUI/Controls/FluWindow.qml
similarity index 100%
rename from src/controls/FluWindow.qml
rename to src/imports/FluentUI/Controls/FluWindow.qml
diff --git a/src/controls/FluWindowResize.qml b/src/imports/FluentUI/Controls/FluWindowResize.qml
similarity index 99%
rename from src/controls/FluWindowResize.qml
rename to src/imports/FluentUI/Controls/FluWindowResize.qml
index ab435623..9df5831e 100644
--- a/src/controls/FluWindowResize.qml
+++ b/src/imports/FluentUI/Controls/FluWindowResize.qml
@@ -1,5 +1,7 @@
import QtQuick
+import QtQuick.Controls
import QtQuick.Window
+import FluentUI
MouseArea {
diff --git a/src/res/font/Segoe_Fluent_Icons.ttf b/src/imports/FluentUI/Font/Segoe_Fluent_Icons.ttf
similarity index 100%
rename from src/res/font/Segoe_Fluent_Icons.ttf
rename to src/imports/FluentUI/Font/Segoe_Fluent_Icons.ttf
diff --git a/src/imports/FluentUI/qmldir b/src/imports/FluentUI/qmldir
new file mode 100644
index 00000000..791ae3e9
--- /dev/null
+++ b/src/imports/FluentUI/qmldir
@@ -0,0 +1,68 @@
+module FluentUI
+FluAppBar 1.0 FluAppBar.qml
+FluArea 1.0 FluArea.qml
+FluAutoSuggestBox 1.0 FluAutoSuggestBox.qml
+FluBadge 1.0 FluBadge.qml
+FluBreadcrumbBar 1.0 FluBreadcrumbBar.qml
+FluButton 1.0 FluButton.qml
+FluCalendarPicker 1.0 FluCalendarPicker.qml
+FluCalendarView 1.0 FluCalendarView.qml
+FluCarousel 1.0 FluCarousel.qml
+FluCheckBox 1.0 FluCheckBox.qml
+FluColorPicker 1.0 FluColorPicker.qml
+FluColorView 1.0 FluColorView.qml
+FluComboBox 1.0 FluComboBox.qml
+FluContentDialog 1.0 FluContentDialog.qml
+FluContentPage 1.0 FluContentPage.qml
+FluDatePicker 1.0 FluDatePicker.qml
+FluDivider 1.0 FluDivider.qml
+FluDropDownButton 1.0 FluDropDownButton.qml
+FluExpander 1.0 FluExpander.qml
+FluFilledButton 1.0 FluFilledButton.qml
+FluFlipView 1.0 FluFlipView.qml
+FluFocusRectangle 1.0 FluFocusRectangle.qml
+FluIcon 1.0 FluIcon.qml
+FluIconButton 1.0 FluIconButton.qml
+FluInfoBar 1.0 FluInfoBar.qml
+FluItem 1.0 FluItem.qml
+FluMediaPlayer 1.0 FluMediaPlayer.qml
+FluMenu 1.0 FluMenu.qml
+FluMenuItem 1.0 FluMenuItem.qml
+FluMultilineTextBox 1.0 FluMultilineTextBox.qml
+FluNavigationView 1.0 FluNavigationView.qml
+FluObject 1.0 FluObject.qml
+FluPagination 1.0 FluPagination.qml
+FluPaneItem 1.0 FluPaneItem.qml
+FluPaneItemEmpty 1.0 FluPaneItemEmpty.qml
+FluPaneItemExpander 1.0 FluPaneItemExpander.qml
+FluPaneItemHeader 1.0 FluPaneItemHeader.qml
+FluPaneItemSeparator 1.0 FluPaneItemSeparator.qml
+FluPasswordBox 1.0 FluPasswordBox.qml
+FluPivot 1.0 FluPivot.qml
+FluPivotItem 1.0 FluPivotItem.qml
+FluProgressBar 1.0 FluProgressBar.qml
+FluProgressRing 1.0 FluProgressRing.qml
+FluRadioButton 1.0 FluRadioButton.qml
+FluRatingControl 1.0 FluRatingControl.qml
+FluRectangle 1.0 FluRectangle.qml
+FluScrollablePage 1.0 FluScrollablePage.qml
+FluScrollBar 1.0 FluScrollBar.qml
+FluShadow 1.0 FluShadow.qml
+FluSlider 1.0 FluSlider.qml
+FluStatusView 1.0 FluStatusView.qml
+FluTableView 1.0 FluTableView.qml
+FluTabView 1.0 FluTabView.qml
+FluText 1.0 FluText.qml
+FluTextBox 1.0 FluTextBox.qml
+FluTextBoxBackground 1.0 FluTextBoxBackground.qml
+FluTextBoxMenu 1.0 FluTextBoxMenu.qml
+FluTextButton 1.0 FluTextButton.qml
+FluTimePicker 1.0 FluTimePicker.qml
+FluToggleButton 1.0 FluToggleButton.qml
+FluToggleSwitch 1.0 FluToggleSwitch.qml
+FluTooltip 1.0 FluTooltip.qml
+FluTreeView 1.0 FluTreeView.qml
+FluWindow 1.0 FluWindow.qml
+FluWindowResize 1.0 FluWindowResize.qml
+FluSingleton 1.0 FluSingleton.qml
+plugin fluentuiplugin
diff --git a/src/macos_install.sh b/src/macos_install.sh
deleted file mode 100755
index ba246112..00000000
--- a/src/macos_install.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-RUN_TYPE=$1
-PRESET_PATH=$2
-BUILDER_BIN_PATH=$3
-QT_QML_FLUENT_PATH=$4
-
-echo ${RUN_TYPE}
-if [ ${RUN_TYPE} = "PRESET" ]; then
-cp -r ${PRESET_PATH}/FluentUI.h ${BUILDER_BIN_PATH}
-cp -r ${PRESET_PATH}/build-preset/* ${BUILDER_BIN_PATH}
-else
-rm -rf ${QT_QML_FLUENT_PATH=}
-mkdir -pv ${QT_QML_FLUENT_PATH=}
-cp -r ${BUILDER_BIN_PATH}/* ${QT_QML_FLUENT_PATH=}
-fi
diff --git a/src/qml_plugin.cpp b/src/qml_plugin.cpp
deleted file mode 100644
index 31a6ca8f..00000000
--- a/src/qml_plugin.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "qml_plugin.h"
-
-void FluentUIQmlPlugin::registerTypes(const char *uri)
-{
- FluentUI::registerTypes(uri);
-}
-
-void FluentUIQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- FluentUI::initializeEngine(engine,uri);
-}
-
diff --git a/src/qml_plugin.h b/src/qml_plugin.h
deleted file mode 100644
index 6cf5719c..00000000
--- a/src/qml_plugin.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#include
-#include
-
-class FluentUIQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- void registerTypes(const char *uri) override;
- void initializeEngine(QQmlEngine *engine, const char *uri) override;
-};
diff --git a/src/res.qrc b/src/res.qrc
deleted file mode 100644
index 004cb30b..00000000
--- a/src/res.qrc
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
- controls/FluButton.qml
- controls/FluFilledButton.qml
- controls/FluText.qml
- controls/FluToggleSwitch.qml
- controls/FluIconButton.qml
- controls/FluCheckBox.qml
- controls/FluRadioButton.qml
- controls/FluSlider.qml
- controls/FluProgressRing.qml
- controls/FluProgressBar.qml
- controls/FluComboBox.qml
- controls/FluDropDownButton.qml
- controls/FluTextBox.qml
- controls/FluTimePicker.qml
- controls/FluAppBar.qml
- controls/FluRectangle.qml
- controls/FluWindow.qml
- controls/FluInfoBar.qml
- controls/FluObject.qml
- controls/FluIcon.qml
- controls/FluDivider.qml
- controls/FluTooltip.qml
- controls/FluTextBoxBackground.qml
- controls/FluWindowResize.qml
- controls/FluScrollBar.qml
- controls/FluMenu.qml
- controls/FluMenuItem.qml
- controls/FluShadow.qml
- controls/FluTextButton.qml
- controls/FluContentDialog.qml
- controls/FluTreeView.qml
- controls/FluExpander.qml
- controls/FluAutoSuggestBox.qml
- controls/FluNavigationView.qml
- controls/FluPaneItem.qml
- controls/FluPaneItemHeader.qml
- controls/FluPaneItemSeparator.qml
- controls/FluScrollablePage.qml
- controls/FluContentPage.qml
- controls/FluArea.qml
- res/font/Segoe_Fluent_Icons.ttf
- controls/FluDatePicker.qml
- controls/FluCalendarView.qml
- controls/FluCalendarPicker.qml
- controls/FluFocusRectangle.qml
- controls/FluCarousel.qml
- controls/FluBadge.qml
- controls/FluColorView.qml
- controls/FluColorPicker.qml
- colorpicker/ColorPicker.qml
- colorpicker/content/Checkerboard.qml
- colorpicker/content/ColorSlider.qml
- colorpicker/content/NumberBox.qml
- colorpicker/content/PanelBorder.qml
- colorpicker/content/SBPicker.qml
- controls/FluMediaPlayer.qml
- controls/FluTabView.qml
- controls/FluItem.qml
- controls/FluPaneItemExpander.qml
- controls/FluTextBoxMenu.qml
- controls/FluMultilineTextBox.qml
- controls/FluFlipView.qml
- controls/FluPivot.qml
- controls/FluPivotItem.qml
- controls/FluTableView.qml
- controls/FluPagination.qml
- controls/FluToggleButton.qml
- controls/FluStatusView.qml
- controls/FluPaneItemEmpty.qml
- controls/FluRatingControl.qml
- controls/FluPasswordBox.qml
- controls/FluBreadcrumbBar.qml
-
-
diff --git a/src/styles/Theme.qml b/src/styles/Theme.qml
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/styles/Typography.qml b/src/styles/Typography.qml
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/win_install.bat b/src/win_install.bat
deleted file mode 100644
index d6c41337..00000000
--- a/src/win_install.bat
+++ /dev/null
@@ -1,29 +0,0 @@
-
-SET PWD_PATH=%2
-SET PRESET_PATH=%3
-SET BUILDER_BIN_PATH=%4
-SET QT_QML_FLUENT_PATH=%5
-SET ANDROID=%6
-SET LIBFILE_PATH=%7
-
-echo "--------win_install-------"
-echo %RUN_TYPE%
-echo %PWD_PATH%
-echo %PRESET_PATH%
-echo %BUILDER_BIN_PATH%
-echo %QT_QML_FLUENT_PATH%
-echo "--------------------------"
-
-copy /y %PWD_PATH%\FluentUI.h %BUILDER_BIN_PATH% & copy /y %PRESET_PATH%\* %BUILDER_BIN_PATH%\
-
-if %ANDROID% == YES copy /y %LIBFILE_PATH% %BUILDER_BIN_PATH%
-
-if %1 == SHARED (
- echo running install to qtqml folder
- del /s /q %PRESET_PATH%\plugins.qmltypes
- %QT_QML_FLUENT_PATH%\..\..\bin\qmlplugindump.exe -nonrelocatable FluentUI 1.0 > %PRESET_PATH%\plugins.qmltypes
- rmdir /s /q %QT_QML_FLUENT_PATH% & md %QT_QML_FLUENT_PATH%
- copy /y %BUILDER_BIN_PATH% %QT_QML_FLUENT_PATH%
- xcopy %PRESET_PATH% %QT_QML_FLUENT_PATH% /s/e/i/y
- cd %QT_QML_FLUENT_PATH%
-)
\ No newline at end of file