mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-10-30 15:57:37 +08:00
Compare commits
2 Commits
e4765ab706
...
ff89677687
Author | SHA1 | Date | |
---|---|---|---|
|
ff89677687 | ||
|
bd7876b23b |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -0,0 +1,3 @@
|
||||
[submodule "3rdparty/Qt5QMLPlugin"]
|
||||
path = 3rdparty/Qt5QMLPlugin
|
||||
url = https://github.com/mentalfl0w/Qt5QMLPlugin.git
|
1
3rdparty/Qt5QMLPlugin
vendored
Submodule
1
3rdparty/Qt5QMLPlugin
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c258660e71fb345d6c892719ce638c1f6632e623
|
@ -9,6 +9,7 @@ if (MSVC)
|
||||
endif ()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake/)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/3rdparty/Qt5QMLPlugin)
|
||||
|
||||
include(GetGitRevisionDescription)
|
||||
|
||||
|
@ -83,16 +83,13 @@ list(APPEND sources_files ${QRC_RESOURCES})
|
||||
if (WIN32)
|
||||
list(APPEND sources_files ${EXAMPLE_VERSION_RC_PATH})
|
||||
endif ()
|
||||
if (${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
qt_add_executable(${PROJECT_NAME}
|
||||
MANUAL_FINALIZATION
|
||||
${sources_files}
|
||||
)
|
||||
else ()
|
||||
add_executable(${PROJECT_NAME}
|
||||
${sources_files}
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (${QT_VERSION_MAJOR} LESS 6)
|
||||
include(Qt5QMLPlugin)
|
||||
endif()
|
||||
qt_add_executable(${PROJECT_NAME}
|
||||
${sources_files}
|
||||
)
|
||||
add_dependencies(${PROJECT_NAME} Script-UpdateTranslations)
|
||||
|
||||
#复制程序运行所需要的动态库
|
||||
@ -147,7 +144,6 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
fluentuiplugin
|
||||
)
|
||||
|
||||
#添加部署脚本
|
||||
if (CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if (APPLE)
|
||||
|
@ -23,4 +23,4 @@ SINGLETON(TranslateHelper)
|
||||
private:
|
||||
QQmlEngine *_engine = nullptr;
|
||||
QTranslator *_translator = nullptr;
|
||||
};
|
||||
};
|
||||
|
@ -19,18 +19,18 @@
|
||||
#include "src/helper/InitializrHelper.h"
|
||||
#include "src/helper/TranslateHelper.h"
|
||||
#include "src/helper/Network.h"
|
||||
|
||||
#ifdef FLUENTUI_BUILD_STATIC_LIB
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 2, 0))
|
||||
Q_IMPORT_QML_PLUGIN(FluentUIPlugin)
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
#define Q_IMPORT_QML_PLUGIN(PLUGIN) \
|
||||
Q_IMPORT_PLUGIN(PLUGIN)
|
||||
extern void qml_static_register_types_FluentUI();
|
||||
#endif
|
||||
#include <FluentUI.h>
|
||||
Q_IMPORT_QML_PLUGIN(FluentUIPlugin)
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include "app_dmp.h"
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const char *uri = "example";
|
||||
@ -78,17 +78,18 @@ int main(int argc, char *argv[])
|
||||
qmlRegisterType<NetworkParams>(uri,major,minor,"NetworkParams");
|
||||
qmlRegisterType<OpenGLItem>(uri,major,minor,"OpenGLItem");
|
||||
qmlRegisterUncreatableMetaObject(NetworkType::staticMetaObject, uri, major, minor, "NetworkType", "Access to enums & flags only");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
#ifdef FLUENTUI_BUILD_STATIC_LIB
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
qml_static_register_types_FluentUI();
|
||||
#endif
|
||||
#endif
|
||||
TranslateHelper::getInstance()->init(&engine);
|
||||
engine.rootContext()->setContextProperty("AppInfo",AppInfo::getInstance());
|
||||
engine.rootContext()->setContextProperty("SettingsHelper",SettingsHelper::getInstance());
|
||||
engine.rootContext()->setContextProperty("InitializrHelper",InitializrHelper::getInstance());
|
||||
engine.rootContext()->setContextProperty("TranslateHelper",TranslateHelper::getInstance());
|
||||
engine.rootContext()->setContextProperty("Network",Network::getInstance());
|
||||
#ifdef FLUENTUI_BUILD_STATIC_LIB
|
||||
FluentUI::getInstance()->registerTypes(&engine);
|
||||
#endif
|
||||
const QUrl url(QStringLiteral("qrc:/example/qml/App.qml"));
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||
&app, [url](QObject *obj, const QUrl &objUrl) {
|
||||
|
@ -1,128 +0,0 @@
|
||||
include(CMakeParseArguments)
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
|
||||
function(FindQmlPluginDump)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
execute_process(
|
||||
COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_BINS
|
||||
OUTPUT_VARIABLE QT_BIN_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endfunction()
|
||||
function(FindQtInstallQml)
|
||||
execute_process(
|
||||
COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_QML
|
||||
OUTPUT_VARIABLE PROC_RESULT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(QT_INSTALL_QML ${PROC_RESULT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
function(add_qmlplugin TARGET)
|
||||
set(options NO_AUTORCC NO_AUTOMOC)
|
||||
set(oneValueArgs URI VERSION BINARY_DIR QMLDIR LIBTYPE)
|
||||
set(multiValueArgs SOURCES QMLFILES QMLFILESALIAS)
|
||||
cmake_parse_arguments(QMLPLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
if(NOT QMLPLUGIN_URI OR NOT QMLPLUGIN_VERSION OR NOT QMLPLUGIN_QMLDIR OR NOT QMLPLUGIN_LIBTYPE)
|
||||
message(WARNING "TARGET,URI,VERSION,qmldir and LIBTYPE must be set, no files generated")
|
||||
return()
|
||||
endif()
|
||||
if(NOT QMLPLUGIN_BINARY_DIR)
|
||||
set(QMLPLUGIN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${QMLPLUGIN_URI})
|
||||
endif()
|
||||
add_library(${TARGET} ${QMLPLUGIN_LIBTYPE}
|
||||
${QMLPLUGIN_SOURCES}
|
||||
)
|
||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
if(QMLPLUGIN_NO_AUTORCC)
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC OFF)
|
||||
else()
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC ON)
|
||||
endif()
|
||||
if(QMLPLUGIN_NO_AUTOMOC)
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC OFF)
|
||||
else()
|
||||
set_target_properties(${TARGET} PROPERTIES AUTOMOC ON)
|
||||
endif()
|
||||
if (${QMLPLUGIN_LIBTYPE} MATCHES "SHARED")
|
||||
FindQmlPluginDump()
|
||||
FindQtInstallQml()
|
||||
if(QMLPLUGIN_BINARY_DIR)
|
||||
set(MAKE_QMLPLUGINDIR_COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGIN_BINARY_DIR})
|
||||
endif()
|
||||
set(COPY_QMLDIR_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR}/qmldir $<TARGET_FILE_DIR:${TARGET}>/${QMLPLUGIN_URI}/qmldir)
|
||||
set(INSTALL_QMLDIR_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR}/qmldir ${QMLPLUGIN_BINARY_DIR}/qmldir)
|
||||
set(COPY_QMLTYPES_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR}/plugins.qmltypes $<TARGET_FILE_DIR:${TARGET}>/${QMLPLUGIN_URI}/plugins.qmltypes)
|
||||
set(INSTALL_QMLTYPES_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR}/plugins.qmltypes ${QMLPLUGIN_BINARY_DIR}/plugins.qmltypes)
|
||||
set(COPY_LIBRARY_COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE_DIR:${TARGET}>/$<TARGET_FILE_NAME:${TARGET}> $<TARGET_FILE_DIR:${TARGET}>/${QMLPLUGIN_URI})
|
||||
set(INSTALL_LIBRARY_COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE_DIR:${TARGET}>/$<TARGET_FILE_NAME:${TARGET}> ${QMLPLUGIN_BINARY_DIR})
|
||||
if(QMLPLUGIN_QMLDIR)
|
||||
set(COPY_QMLFILES_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR} $<TARGET_FILE_DIR:${TARGET}>/${QMLPLUGIN_URI})
|
||||
else()
|
||||
set(COPY_QMLFILES_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${QMLPLUGIN_QMLFILES} $<TARGET_FILE_DIR:${TARGET}>/${QMLPLUGIN_URI})
|
||||
endif()
|
||||
set(INSTALL_QMLFILES_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/${QMLPLUGIN_QMLDIR} ${QMLPLUGIN_BINARY_DIR})
|
||||
if(QMLPLUGIN_BINARY_DIR)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${MAKE_QMLPLUGINDIR_COMMAND}
|
||||
COMMAND ${COPY_QMLDIR_COMMAND}
|
||||
COMMENT "Copying qmldir to binary directory"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_QMLDIR_COMMAND}
|
||||
COMMENT "Copying qmldir to binary directory"
|
||||
)
|
||||
endif()
|
||||
if(QMLPLUGIN_BINARY_DIR)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${MAKE_QMLPLUGINDIR_COMMAND}
|
||||
COMMAND ${COPY_QMLTYPES_COMMAND}
|
||||
COMMENT "Copying qmltypes to binary directory"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_QMLTYPES_COMMAND}
|
||||
COMMENT "Copying qmltypes to binary directory"
|
||||
)
|
||||
endif()
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_LIBRARY_COMMAND}
|
||||
COMMENT "Copying Lib to binary plugin directory"
|
||||
)
|
||||
if(QMLPLUGIN_QMLFILES)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${COPY_QMLFILES_COMMAND}
|
||||
COMMENT "Copying QML files to binary directory"
|
||||
)
|
||||
endif()
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${GENERATE_QMLTYPES_COMMAND}
|
||||
COMMENT "Generating plugin.qmltypes"
|
||||
)
|
||||
string(REPLACE "." "/" QMLPLUGIN_INSTALL_URI ${QMLPLUGIN_URI})
|
||||
add_custom_command(
|
||||
TARGET ${TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${INSTALL_QMLTYPES_COMMAND}
|
||||
COMMAND ${INSTALL_QMLDIR_COMMAND}
|
||||
COMMAND ${INSTALL_LIBRARY_COMMAND}
|
||||
COMMAND ${INSTALL_QMLFILES_COMMAND}
|
||||
COMMAND ${INSTALL_QMLTYPES_COMMAND}
|
||||
COMMENT "Install library and aditional files"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
@ -1,13 +1,8 @@
|
||||
#include <windows.h>
|
||||
|
||||
#define STR(x) #x
|
||||
#define VER_JOIN(a,b,c,d) STR(a.b.c.d)
|
||||
#define VER_JOIN_(x) VER_JOIN x
|
||||
#define VER_STR VER_JOIN_((FLUENTUI_VERSION))
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION FLUENTUI_VERSION
|
||||
PRODUCTVERSION FLUENTUI_VERSION
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION ${FLUENTUI_VERSION}
|
||||
PRODUCTVERSION ${FLUENTUI_VERSION}
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -24,12 +19,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "ZhuZiChu"
|
||||
VALUE "FileDescription", "https://github.com/zhuzichu520/FluentUI"
|
||||
VALUE "FileVersion", VER_STR
|
||||
VALUE "FileVersion", "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}"
|
||||
VALUE "InternalName", "${PROJECT_NAME}.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023 ZhuZiChu. All rights reserved."
|
||||
VALUE "OriginalFilename", "${PROJECT_NAME}.dll"
|
||||
VALUE "ProductName", "${PROJECT_NAME}"
|
||||
VALUE "ProductVersion", VER_STR
|
||||
VALUE "ProductVersion", "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -1,9 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if (FLUENTUI_BUILD_STATIC_LIB AND (QT_VERSION VERSION_GREATER_EQUAL "6.2"))
|
||||
project(fluentui VERSION 1.0)
|
||||
project(fluentui VERSION 1.7.5.0)
|
||||
else ()
|
||||
project(fluentuiplugin VERSION 1.0)
|
||||
project(fluentuiplugin VERSION 1.7.5.0)
|
||||
endif ()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.cmake/)
|
||||
@ -20,10 +20,12 @@ else ()
|
||||
endif ()
|
||||
|
||||
#设置版本号
|
||||
add_definitions(-DFLUENTUI_VERSION=1,7,5,0)
|
||||
set(FLUENTUI_VERSION "${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},${PROJECT_VERSION_TWEAK}")
|
||||
|
||||
if (FLUENTUI_BUILD_STATIC_LIB)
|
||||
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)
|
||||
if (FLUENTUI_BUILD_STATIC_LIB AND ${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
FLUENTUI_BUILD_STATIC_LIB)
|
||||
endif ()
|
||||
|
||||
#编译参数设置
|
||||
@ -83,41 +85,34 @@ if (WIN32)
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
||||
#删除fluentuiplugin.cpp与fluentuiplugin.h,这些只要Qt5使用,Qt6不需要
|
||||
list(REMOVE_ITEM sources_files fluentuiplugin.h fluentuiplugin.cpp)
|
||||
if (NOT FLUENTUI_BUILD_STATIC_LIB)
|
||||
list(REMOVE_ITEM sources_files FluentUI.h FluentUI.cpp)
|
||||
#遍历所有qml文件
|
||||
set(SINGLETON_QML "FluRouter.qml" "FluEventBus.qml")
|
||||
file(GLOB_RECURSE QML_PATHS *.qml)
|
||||
foreach (filepath ${QML_PATHS})
|
||||
if (${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||
list(APPEND qml_files ${filename})
|
||||
endif ()
|
||||
endforeach (filepath)
|
||||
|
||||
#遍历所有qml文件
|
||||
file(GLOB_RECURSE QML_PATHS *.qml qmldir)
|
||||
foreach (filepath ${QML_PATHS})
|
||||
if (${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||
if (${filename} MATCHES "qmldir")
|
||||
list(APPEND resource_files ${filename})
|
||||
else ()
|
||||
list(APPEND qml_files ${filename})
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach (filepath)
|
||||
|
||||
#遍历所有资源文件
|
||||
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.js *.qm)
|
||||
foreach (filepath ${RES_PATHS})
|
||||
if (${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||
list(APPEND resource_files ${filename})
|
||||
endif ()
|
||||
endforeach (filepath)
|
||||
|
||||
#修改资源文件导出路径
|
||||
foreach (filepath IN LISTS qml_files resource_files)
|
||||
string(REPLACE "Qt${QT_VERSION_MAJOR}/imports/FluentUI/" "" filename ${filepath})
|
||||
set_source_files_properties(${filepath} PROPERTIES QT_RESOURCE_ALIAS ${filename})
|
||||
endforeach ()
|
||||
endif ()
|
||||
#遍历所有资源文件
|
||||
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.js *.qm *.qmltypes)
|
||||
foreach (filepath ${RES_PATHS})
|
||||
if (${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})
|
||||
list(APPEND resource_files ${filename})
|
||||
endif ()
|
||||
endforeach (filepath)
|
||||
#修改资源文件导出路径和QML单例
|
||||
foreach (filepath IN LISTS qml_files resource_files)
|
||||
string(REPLACE "Qt${QT_VERSION_MAJOR}/imports/FluentUI/" "" filename ${filepath})
|
||||
set_source_files_properties(${filepath} PROPERTIES QT_RESOURCE_ALIAS ${filename})
|
||||
foreach(singleton_qml ${SINGLETON_QML})
|
||||
if (${filepath} MATCHES ${singleton_qml})
|
||||
set_source_files_properties(${filepath} PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach ()
|
||||
|
||||
if (FLUENTUI_BUILD_STATIC_LIB)
|
||||
set(LIB_TYPE "STATIC")
|
||||
@ -142,38 +137,27 @@ if (WIN32)
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (QT_VERSION VERSION_GREATER_EQUAL "6.2")
|
||||
#如果是Qt6.2版本以上,则使用qt_add_library,qt_add_qml_module函数添加资源文件
|
||||
if (FLUENTUI_BUILD_STATIC_LIB)
|
||||
set(FLUENTUI_QML_PLUGIN_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/FluentUI)
|
||||
endif ()
|
||||
qt_add_library(${PROJECT_NAME} ${LIB_TYPE})
|
||||
qt_add_qml_module(${PROJECT_NAME}
|
||||
PLUGIN_TARGET ${PLUGIN_TARGET_NAME}
|
||||
OUTPUT_DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY}
|
||||
VERSION 1.0
|
||||
URI "FluentUI"
|
||||
#修改qmltypes文件名称。默认fluentuiplugin.qmltypes,使用默认名称有时候import FluentUI 1.0会爆红,所以修改成plugins.qmltypes
|
||||
TYPEINFO "plugins.qmltypes"
|
||||
SOURCES ${sources_files} ${FLUENTUI_VERSION_RC_PATH}
|
||||
QML_FILES ${qml_files}
|
||||
RESOURCES ${resource_files}
|
||||
RESOURCE_PREFIX "/qt/qml"
|
||||
)
|
||||
else ()
|
||||
qt_add_resources(QRC_RESOURCES Qt5/imports/fluentui.qrc)
|
||||
#如果是Qt6.2版本以下,则使用add_qmlplugin函数添加资源文件,这是个自定义的函数,详情见.cmake/QmlPlugin.cmake
|
||||
include(QmlPlugin)
|
||||
add_qmlplugin(${PROJECT_NAME}
|
||||
URI "FluentUI"
|
||||
VERSION 1.0
|
||||
SOURCES ${sources_files} ${FLUENTUI_VERSION_RC_PATH} ${QRC_RESOURCES}
|
||||
QMLFILES ${qml_files}
|
||||
QMLDIR imports/FluentUI
|
||||
BINARY_DIR ${FLUENTUI_QML_PLUGIN_DIRECTORY}
|
||||
LIBTYPE ${LIB_TYPE}
|
||||
)
|
||||
if (${QT_VERSION_MAJOR} LESS 6)
|
||||
set(__qml_plugin_no_generate_typeinfo ON)
|
||||
set(__qml_plugin_no_public_sources ON)
|
||||
include(Qt5QMLPlugin)
|
||||
endif()
|
||||
if (FLUENTUI_BUILD_STATIC_LIB)
|
||||
set(FLUENTUI_QML_PLUGIN_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/FluentUI)
|
||||
endif ()
|
||||
qt_add_library(${PROJECT_NAME} ${LIB_TYPE})
|
||||
qt_add_qml_module(${PROJECT_NAME}
|
||||
PLUGIN_TARGET ${PLUGIN_TARGET_NAME}
|
||||
OUTPUT_DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY}
|
||||
VERSION 1.0
|
||||
URI "FluentUI"
|
||||
#修改qmltypes文件名称。默认fluentuiplugin.qmltypes,使用默认名称有时候import FluentUI 1.0会爆红,所以修改成plugins.qmltypes
|
||||
TYPEINFO "plugins.qmltypes"
|
||||
SOURCES ${sources_files} ${FLUENTUI_VERSION_RC_PATH}
|
||||
QML_FILES ${qml_files}
|
||||
RESOURCES ${resource_files}
|
||||
RESOURCE_PREFIX "/qt-project.org/imports/"
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
@ -201,7 +185,7 @@ if(APPLE)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${CARBON_LIBRARY})
|
||||
elseif(WIN32)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE user32)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC user32)
|
||||
elseif(UNIX)
|
||||
if(QT_VERSION_MAJOR STREQUAL "6")
|
||||
if(QT_VERSION VERSION_LESS "6.2.0")
|
||||
@ -216,15 +200,5 @@ elseif(UNIX)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE X11)
|
||||
endif()
|
||||
|
||||
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
|
||||
find_program(QML_PLUGIN_DUMP NAMES qmlplugindump)
|
||||
add_custom_target(Script-Generate-QmlTypes
|
||||
COMMAND ${QML_PLUGIN_DUMP} -nonrelocatable FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
||||
COMMENT "Generate qmltypes........."
|
||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
#安装
|
||||
install(DIRECTORY ${FLUENTUI_QML_PLUGIN_DIRECTORY} DESTINATION ${CMAKE_INSTALL_PREFIX}/imports)
|
||||
|
20
src/FluApp.h
20
src/FluApp.h
@ -16,25 +16,29 @@
|
||||
* @brief The FluApp class
|
||||
*/
|
||||
class FluApp : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY_AUTO(bool, useSystemAppBar)
|
||||
Q_PROPERTY_AUTO(QString, windowIcon)
|
||||
Q_PROPERTY_AUTO(QLocale, locale)
|
||||
Q_PROPERTY_AUTO_P(QObject*,launcher)
|
||||
Q_PROPERTY_AUTO(bool, useSystemAppBar)
|
||||
Q_PROPERTY_AUTO(QString, windowIcon)
|
||||
Q_PROPERTY_AUTO(QLocale, locale)
|
||||
Q_PROPERTY_AUTO_P(QObject*,launcher)
|
||||
QML_NAMED_ELEMENT(FluApp)
|
||||
QML_SINGLETON
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
explicit FluApp(QObject *parent = nullptr);
|
||||
|
||||
~FluApp() override;
|
||||
|
||||
public:
|
||||
SINGLETON(FluApp)
|
||||
|
||||
SINGLETON(FluApp)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
static FluApp *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
|
||||
#endif
|
||||
Q_INVOKABLE void init(QObject *launcher, QLocale locale = QLocale::system());
|
||||
|
||||
[[maybe_unused]] Q_INVOKABLE static QJsonArray iconData(const QString &keyword = "");
|
||||
|
@ -11,51 +11,55 @@
|
||||
* @brief The FluColors class
|
||||
*/
|
||||
class FluColors : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY_AUTO(QColor, Transparent);
|
||||
Q_PROPERTY_AUTO(QColor, Black);
|
||||
Q_PROPERTY_AUTO(QColor, White);
|
||||
Q_PROPERTY_AUTO(QColor, Grey10);
|
||||
Q_PROPERTY_AUTO(QColor, Grey20);
|
||||
Q_PROPERTY_AUTO(QColor, Grey30);
|
||||
Q_PROPERTY_AUTO(QColor, Grey40);
|
||||
Q_PROPERTY_AUTO(QColor, Grey50);
|
||||
Q_PROPERTY_AUTO(QColor, Grey60);
|
||||
Q_PROPERTY_AUTO(QColor, Grey70);
|
||||
Q_PROPERTY_AUTO(QColor, Grey80);
|
||||
Q_PROPERTY_AUTO(QColor, Grey90);
|
||||
Q_PROPERTY_AUTO(QColor, Grey100);
|
||||
Q_PROPERTY_AUTO(QColor, Grey110);
|
||||
Q_PROPERTY_AUTO(QColor, Grey120);
|
||||
Q_PROPERTY_AUTO(QColor, Grey130);
|
||||
Q_PROPERTY_AUTO(QColor, Grey140);
|
||||
Q_PROPERTY_AUTO(QColor, Grey150);
|
||||
Q_PROPERTY_AUTO(QColor, Grey160);
|
||||
Q_PROPERTY_AUTO(QColor, Grey170);
|
||||
Q_PROPERTY_AUTO(QColor, Grey180);
|
||||
Q_PROPERTY_AUTO(QColor, Grey190);
|
||||
Q_PROPERTY_AUTO(QColor, Grey200);
|
||||
Q_PROPERTY_AUTO(QColor, Grey210);
|
||||
Q_PROPERTY_AUTO(QColor, Grey220);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Yellow);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Orange);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Red);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Magenta);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Purple);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Blue);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Teal);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Green);
|
||||
Q_PROPERTY_AUTO(QColor, Transparent);
|
||||
Q_PROPERTY_AUTO(QColor, Black);
|
||||
Q_PROPERTY_AUTO(QColor, White);
|
||||
Q_PROPERTY_AUTO(QColor, Grey10);
|
||||
Q_PROPERTY_AUTO(QColor, Grey20);
|
||||
Q_PROPERTY_AUTO(QColor, Grey30);
|
||||
Q_PROPERTY_AUTO(QColor, Grey40);
|
||||
Q_PROPERTY_AUTO(QColor, Grey50);
|
||||
Q_PROPERTY_AUTO(QColor, Grey60);
|
||||
Q_PROPERTY_AUTO(QColor, Grey70);
|
||||
Q_PROPERTY_AUTO(QColor, Grey80);
|
||||
Q_PROPERTY_AUTO(QColor, Grey90);
|
||||
Q_PROPERTY_AUTO(QColor, Grey100);
|
||||
Q_PROPERTY_AUTO(QColor, Grey110);
|
||||
Q_PROPERTY_AUTO(QColor, Grey120);
|
||||
Q_PROPERTY_AUTO(QColor, Grey130);
|
||||
Q_PROPERTY_AUTO(QColor, Grey140);
|
||||
Q_PROPERTY_AUTO(QColor, Grey150);
|
||||
Q_PROPERTY_AUTO(QColor, Grey160);
|
||||
Q_PROPERTY_AUTO(QColor, Grey170);
|
||||
Q_PROPERTY_AUTO(QColor, Grey180);
|
||||
Q_PROPERTY_AUTO(QColor, Grey190);
|
||||
Q_PROPERTY_AUTO(QColor, Grey200);
|
||||
Q_PROPERTY_AUTO(QColor, Grey210);
|
||||
Q_PROPERTY_AUTO(QColor, Grey220);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Yellow);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Orange);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Red);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Magenta);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Purple);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Blue);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Teal);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, Green);
|
||||
QML_NAMED_ELEMENT(FluColors)
|
||||
QML_SINGLETON
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
explicit FluColors(QObject *parent = nullptr);
|
||||
|
||||
public:
|
||||
SINGLETON(FluColors)
|
||||
|
||||
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor &primaryColor);
|
||||
|
||||
SINGLETON(FluColors)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
#endif
|
||||
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor &primaryColor);
|
||||
};
|
||||
|
@ -10,24 +10,28 @@
|
||||
* @brief The FluTextStyle class
|
||||
*/
|
||||
class FluTextStyle : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_PROPERTY_AUTO(QString, family)
|
||||
Q_PROPERTY_AUTO(QFont, Caption);
|
||||
Q_PROPERTY_AUTO(QFont, Body);
|
||||
Q_PROPERTY_AUTO(QFont, BodyStrong);
|
||||
Q_PROPERTY_AUTO(QFont, Subtitle);
|
||||
Q_PROPERTY_AUTO(QFont, Title);
|
||||
Q_PROPERTY_AUTO(QFont, TitleLarge);
|
||||
Q_PROPERTY_AUTO(QFont, Display);
|
||||
Q_PROPERTY_AUTO(QString, family)
|
||||
Q_PROPERTY_AUTO(QFont, Caption);
|
||||
Q_PROPERTY_AUTO(QFont, Body);
|
||||
Q_PROPERTY_AUTO(QFont, BodyStrong);
|
||||
Q_PROPERTY_AUTO(QFont, Subtitle);
|
||||
Q_PROPERTY_AUTO(QFont, Title);
|
||||
Q_PROPERTY_AUTO(QFont, TitleLarge);
|
||||
Q_PROPERTY_AUTO(QFont, Display);
|
||||
QML_NAMED_ELEMENT(FluTextStyle)
|
||||
QML_SINGLETON
|
||||
|
||||
private:
|
||||
explicit FluTextStyle(QObject *parent = nullptr);
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
explicit FluTextStyle(QObject *parent = nullptr);
|
||||
SINGLETON(FluTextStyle)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
SINGLETON(FluTextStyle)
|
||||
|
||||
static FluTextStyle *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
#endif
|
||||
};
|
||||
|
@ -16,34 +16,40 @@
|
||||
* @brief The FluTheme class
|
||||
*/
|
||||
class FluTheme : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, accentColor);
|
||||
Q_PROPERTY_AUTO(QColor, primaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, backgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, dividerColor);
|
||||
Q_PROPERTY_AUTO(QColor, windowBackgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, windowActiveBackgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontPrimaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontSecondaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontTertiaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemNormalColor);
|
||||
Q_PROPERTY_AUTO(QColor, frameColor);
|
||||
Q_PROPERTY_AUTO(QColor, frameActiveColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemHoverColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemPressColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemCheckColor);
|
||||
Q_PROPERTY_AUTO(QString, desktopImagePath);
|
||||
Q_PROPERTY_AUTO(int, darkMode);
|
||||
Q_PROPERTY_AUTO(bool, nativeText);
|
||||
Q_PROPERTY_AUTO(bool, animationEnabled);
|
||||
Q_PROPERTY_AUTO(bool, blurBehindWindowEnabled);
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, accentColor);
|
||||
Q_PROPERTY_AUTO(QColor, primaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, backgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, dividerColor);
|
||||
Q_PROPERTY_AUTO(QColor, windowBackgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, windowActiveBackgroundColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontPrimaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontSecondaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, fontTertiaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemNormalColor);
|
||||
Q_PROPERTY_AUTO(QColor, frameColor);
|
||||
Q_PROPERTY_AUTO(QColor, frameActiveColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemHoverColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemPressColor);
|
||||
Q_PROPERTY_AUTO(QColor, itemCheckColor);
|
||||
Q_PROPERTY_AUTO(QString, desktopImagePath);
|
||||
Q_PROPERTY_AUTO(int, darkMode);
|
||||
Q_PROPERTY_AUTO(bool, nativeText);
|
||||
Q_PROPERTY_AUTO(bool, animationEnabled);
|
||||
Q_PROPERTY_AUTO(bool, blurBehindWindowEnabled);
|
||||
QML_NAMED_ELEMENT(FluTheme)
|
||||
QML_SINGLETON
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
explicit FluTheme(QObject *parent = nullptr);
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
private:
|
||||
#endif
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
void refreshColors();
|
||||
@ -55,11 +61,11 @@ protected:
|
||||
void checkUpdateDesktopImage();
|
||||
|
||||
public:
|
||||
SINGLETON(FluTheme)
|
||||
|
||||
Q_SIGNAL void darkChanged();
|
||||
|
||||
SINGLETON(FluTheme)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
static FluTheme *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
#endif
|
||||
Q_SIGNAL void darkChanged();
|
||||
|
||||
bool dark() const;
|
||||
|
||||
@ -67,4 +73,4 @@ private:
|
||||
bool _systemDark;
|
||||
QFileSystemWatcher _watcher;
|
||||
QMutex _mutex;
|
||||
};
|
||||
};
|
||||
|
@ -11,18 +11,22 @@
|
||||
* @brief The FluTools class
|
||||
*/
|
||||
class FluTools : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
QML_NAMED_ELEMENT(FluTools)
|
||||
QML_SINGLETON
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
explicit FluTools(QObject *parent = nullptr);
|
||||
|
||||
public:
|
||||
SINGLETON(FluTools)
|
||||
|
||||
SINGLETON(FluTools)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
static FluTools *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
|
||||
#endif
|
||||
Q_INVOKABLE int qtMajor();
|
||||
|
||||
Q_INVOKABLE int qtMinor();
|
||||
|
184
src/FluentUI.cpp
184
src/FluentUI.cpp
@ -1,184 +0,0 @@
|
||||
#include "FluentUI.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include "Def.h"
|
||||
#include "FluentIconDef.h"
|
||||
#include "FluApp.h"
|
||||
#include "FluColors.h"
|
||||
#include "FluTheme.h"
|
||||
#include "FluTools.h"
|
||||
#include "FluTextStyle.h"
|
||||
#include "FluWatermark.h"
|
||||
#include "FluCaptcha.h"
|
||||
#include "FluTreeModel.h"
|
||||
#include "FluRectangle.h"
|
||||
#include "FluQrCodeItem.h"
|
||||
#include "FluTableSortProxyModel.h"
|
||||
#include "FluFrameless.h"
|
||||
#include "FluTableModel.h"
|
||||
#include "FluHotkey.h"
|
||||
|
||||
void FluentUI::registerTypes(QQmlEngine *engine) {
|
||||
initializeEngine(engine, _uri);
|
||||
registerTypes(_uri);
|
||||
}
|
||||
|
||||
void FluentUI::registerTypes(const char *uri) const {
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
Q_INIT_RESOURCE(fluentui);
|
||||
int major = _major;
|
||||
int minor = _minor;
|
||||
//@uri FluentUI
|
||||
qmlRegisterType<FluQrCodeItem>(uri, major, minor, "FluQrCodeItem");
|
||||
qmlRegisterType<FluCaptcha>(uri, major, minor, "FluCaptcha");
|
||||
qmlRegisterType<FluWatermark>(uri, major, minor, "FluWatermark");
|
||||
qmlRegisterType<FluAccentColor>(uri, major, minor, "FluAccentColor");
|
||||
qmlRegisterType<FluTreeModel>(uri, major, minor, "FluTreeModel");
|
||||
qmlRegisterType<FluTableModel>(uri, major, minor, "FluTableModel");
|
||||
qmlRegisterType<FluRectangle>(uri, major, minor, "FluRectangle");
|
||||
qmlRegisterType<FluFrameless>(uri, major, minor, "FluFrameless");
|
||||
qmlRegisterType<FluHotkey>(uri, major, minor, "FluHotkey");
|
||||
qmlRegisterType<FluTableSortProxyModel>(uri, major, minor, "FluTableSortProxyModel");
|
||||
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAcrylic.qml"), uri, major, minor, "FluAcrylic");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAppBar.qml"), uri, major, minor, "FluAppBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluFrame.qml"), uri, major, minor, "FluFrame");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluAutoSuggestBox.qml"), uri, major, minor, "FluAutoSuggestBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluBadge.qml"), uri, major, minor, "FluBadge");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluBreadcrumbBar.qml"), uri, major, minor, "FluBreadcrumbBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluButton.qml"), uri, major, minor, "FluButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCalendarPicker.qml"), uri, major, minor, "FluCalendarPicker");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCarousel.qml"), uri, major, minor, "FluCarousel");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluChart.qml"), uri, major, minor, "FluChart");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCheckBox.qml"), uri, major, minor, "FluCheckBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluColorPicker.qml"), uri, major, minor, "FluColorPicker");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluComboBox.qml"), uri, major, minor, "FluComboBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluContentDialog.qml"), uri, major, minor, "FluContentDialog");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluContentPage.qml"), uri, major, minor, "FluContentPage");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluControl.qml"), uri, major, minor, "FluControl");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCopyableText.qml"), uri, major, minor, "FluCopyableText");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluDatePicker.qml"), uri, major, minor, "FluDatePicker");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluDivider.qml"), uri, major, minor, "FluDivider");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluDropDownButton.qml"), uri, major, minor, "FluDropDownButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluExpander.qml"), uri, major, minor, "FluExpander");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluFilledButton.qml"), uri, major, minor, "FluFilledButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluFlipView.qml"), uri, major, minor, "FluFlipView");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluFocusRectangle.qml"), uri, major, minor, "FluFocusRectangle");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluIcon.qml"), uri, major, minor, "FluIcon");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluIconButton.qml"), uri, major, minor, "FluIconButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluImage.qml"), uri, major, minor, "FluImage");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluImageButton.qml"), uri, major, minor, "FluImageButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluInfoBar.qml"), uri, major, minor, "FluInfoBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluItemDelegate.qml"), uri, major, minor, "FluItemDelegate");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenu.qml"), uri, major, minor, "FluMenu");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenuBar.qml"), uri, major, minor, "FluMenuBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenuBarItem.qml"), uri, major, minor, "FluMenuBarItem");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenuItem.qml"), uri, major, minor, "FluMenuItem");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenuSeparator.qml"), uri, major, minor, "FluMenuSeparator");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMultilineTextBox.qml"), uri, major, minor, "FluMultilineTextBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluNavigationView.qml"), uri, major, minor, "FluNavigationView");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluObject.qml"), uri, major, minor, "FluObject");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPage.qml"), uri, major, minor, "FluPage");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPagination.qml"), uri, major, minor, "FluPagination");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPaneItem.qml"), uri, major, minor, "FluPaneItem");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPaneItemEmpty.qml"), uri, major, minor, "FluPaneItemEmpty");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPaneItemExpander.qml"), uri, major, minor, "FluPaneItemExpander");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPaneItemHeader.qml"), uri, major, minor, "FluPaneItemHeader");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPaneItemSeparator.qml"), uri, major, minor, "FluPaneItemSeparator");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPasswordBox.qml"), uri, major, minor, "FluPasswordBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPivot.qml"), uri, major, minor, "FluPivot");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPivotItem.qml"), uri, major, minor, "FluPivotItem");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluPopup.qml"), uri, major, minor, "FluPopup");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluProgressBar.qml"), uri, major, minor, "FluProgressBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluProgressRing.qml"), uri, major, minor, "FluProgressRing");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluQRCode.qml"), uri, major, minor, "FluQRCode");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRadioButton.qml"), uri, major, minor, "FluRadioButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRadioButtons.qml"), uri, major, minor, "FluRadioButtons");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRatingControl.qml"), uri, major, minor, "FluRatingControl");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRemoteLoader.qml"), uri, major, minor, "FluRemoteLoader");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollBar.qml"), uri, major, minor, "FluScrollBar");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollIndicator.qml"), uri, major, minor, "FluScrollIndicator");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollablePage.qml"), uri, major, minor, "FluScrollablePage");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluShadow.qml"), uri, major, minor, "FluShadow");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSlider.qml"), uri, major, minor, "FluSlider");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSpinBox.qml"), uri, major, minor, "FluSpinBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluStatusLayout.qml"), uri, major, minor, "FluStatusLayout");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTabView.qml"), uri, major, minor, "FluTabView");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTableView.qml"), uri, major, minor, "FluTableView");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluText.qml"), uri, major, minor, "FluText");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBox.qml"), uri, major, minor, "FluTextBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBoxBackground.qml"), uri, major, minor, "FluTextBoxBackground");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBoxMenu.qml"), uri, major, minor, "FluTextBoxMenu");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextButton.qml"), uri, major, minor, "FluTextButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTimePicker.qml"), uri, major, minor, "FluTimePicker");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTimeline.qml"), uri, major, minor, "FluTimeline");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluToggleButton.qml"), uri, major, minor, "FluToggleButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluToggleSwitch.qml"), uri, major, minor, "FluToggleSwitch");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTooltip.qml"), uri, major, minor, "FluTooltip");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTour.qml"), uri, major, minor, "FluTour");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTreeView.qml"), uri, major, minor, "FluTreeView");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluWindow.qml"), uri, major, minor, "FluWindow");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluWindowDialog.qml"), uri, major, minor, "FluWindowDialog");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRangeSlider.qml"), uri, major, minor, "FluRangeSlider");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluStaggeredLayout.qml"), uri, major, minor, "FluStaggeredLayout");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluProgressButton.qml"), uri, major, minor, "FluProgressButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluLoadingButton.qml"), uri, major, minor, "FluLoadingButton");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluClip.qml"), uri, major, minor, "FluClip");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluLoader.qml"), uri, major, minor, "FluLoader");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluShortcutPicker.qml"), uri, major, minor, "FluShortcutPicker");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSplitLayout.qml"), uri, major, minor, "FluSplitLayout");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluWindowResultLauncher.qml"), uri, major, minor, "FluWindowResultLauncher");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluLauncher.qml"), uri, major, minor, "FluLauncher");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEvent.qml"), uri, major, minor, "FluEvent");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSheet.qml"), uri, major, minor, "FluSheet");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluGroupBox.qml"), uri, major, minor, "FluGroupBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluControlBackground.qml"), uri, major, minor, "FluControlBackground");
|
||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRouter.qml"), uri, major, minor, "FluRouter");
|
||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEventBus.qml"), uri, major, minor, "FluEventBus");
|
||||
|
||||
qmlRegisterUncreatableMetaObject(FluentIcons::staticMetaObject, uri, major, minor, "FluentIcons", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluThemeType::staticMetaObject, uri, major, minor, "FluThemeType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluPageType::staticMetaObject, uri, major, minor, "FluPageType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluWindowType::staticMetaObject, uri, major, minor, "FluWindowType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluTreeViewType::staticMetaObject, uri, major, minor, "FluTreeViewType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluStatusLayoutType::staticMetaObject, uri, major, minor, "FluStatusLayoutType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluContentDialogType::staticMetaObject, uri, major, minor, "FluContentDialogType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluTimePickerType::staticMetaObject, uri, major, minor, "FluTimePickerType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluCalendarViewType::staticMetaObject, uri, major, minor, "FluCalendarViewType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluTabViewType::staticMetaObject, uri, major, minor, "FluTabViewType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluNavigationViewType::staticMetaObject, uri, major, minor, "FluNavigationViewType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluTimelineType::staticMetaObject, uri, major, minor, "FluTimelineType", "Access to enums & flags only");
|
||||
qmlRegisterUncreatableMetaObject(FluSheetType::staticMetaObject, uri, major, minor, "FluSheetType", "Access to enums & flags only");
|
||||
|
||||
qmlRegisterSingletonType(uri, major, minor, "FluApp", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
||||
Q_UNUSED(engine)
|
||||
return scriptEngine->newQObject(FluApp::getInstance());
|
||||
});
|
||||
qmlRegisterSingletonType(uri, major, minor, "FluColors", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
||||
Q_UNUSED(engine)
|
||||
return scriptEngine->newQObject(FluColors::getInstance());
|
||||
});
|
||||
qmlRegisterSingletonType(uri, major, minor, "FluTheme", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
||||
Q_UNUSED(engine)
|
||||
return scriptEngine->newQObject(FluTheme::getInstance());
|
||||
});
|
||||
qmlRegisterSingletonType(uri, major, minor, "FluTools", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
||||
Q_UNUSED(engine)
|
||||
return scriptEngine->newQObject(FluTools::getInstance());
|
||||
});
|
||||
qmlRegisterSingletonType(uri, major, minor, "FluTextStyle", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
|
||||
Q_UNUSED(engine)
|
||||
return scriptEngine->newQObject(FluTextStyle::getInstance());
|
||||
});
|
||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluApp", FluApp::getInstance());
|
||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluColors", FluColors::getInstance());
|
||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTheme", FluTheme::getInstance());
|
||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTools", FluTools::getInstance());
|
||||
// qmlRegisterSingletonInstance(uri, major, minor, "FluTextStyle", FluTextStyle::getInstance());
|
||||
qmlRegisterModule(uri, major, minor);
|
||||
#endif
|
||||
}
|
||||
|
||||
void FluentUI::initializeEngine(QQmlEngine *engine, [[maybe_unused]] const char *uri) {
|
||||
Q_UNUSED(engine)
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
#include "singleton.h"
|
||||
|
||||
/**
|
||||
* @brief The FluentUI class
|
||||
*/
|
||||
class FluentUI : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SINGLETON(FluentUI)
|
||||
|
||||
Q_DECL_EXPORT void registerTypes(QQmlEngine *engine);
|
||||
|
||||
void registerTypes(const char *uri) const;
|
||||
|
||||
void initializeEngine(QQmlEngine *engine, [[maybe_unused]] const char *uri);
|
||||
|
||||
private:
|
||||
const int _major = 1;
|
||||
const int _minor = 0;
|
||||
const char *_uri = "FluentUI";
|
||||
};
|
@ -33,7 +33,7 @@ Item {
|
||||
}
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/qt/qml/FluentUI/Image/noise.png"
|
||||
source: "qrc:/qt-project.org/imports/FluentUI/Image/noise.png"
|
||||
fillMode: Image.Tile
|
||||
opacity: control.noiseOpacity
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ Text {
|
||||
opacity: iconSource>0
|
||||
FontLoader{
|
||||
id: font_loader
|
||||
source: "qrc:/qt/qml/FluentUI/Font/FluentIcons.ttf"
|
||||
source: "qrc:/qt-project.org/imports/FluentUI/Font/FluentIcons.ttf"
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
singleton FluRouter 1.0 FluRouter.qml
|
||||
singleton FluEventBus 1.0 FluEventBus.qml
|
@ -1,102 +0,0 @@
|
||||
module FluentUI
|
||||
classname FluentUIPlugin
|
||||
designersupported
|
||||
typeinfo plugins.qmltypes
|
||||
|
||||
FluAcrylic 1.0 Controls/FluAcrylic.qml
|
||||
FluAppBar 1.0 Controls/FluAppBar.qml
|
||||
FluAutoSuggestBox 1.0 Controls/FluAutoSuggestBox.qml
|
||||
FluBadge 1.0 Controls/FluBadge.qml
|
||||
FluBreadcrumbBar 1.0 Controls/FluBreadcrumbBar.qml
|
||||
FluButton 1.0 Controls/FluButton.qml
|
||||
FluCalendarPicker 1.0 Controls/FluCalendarPicker.qml
|
||||
FluCarousel 1.0 Controls/FluCarousel.qml
|
||||
FluChart 1.0 Controls/FluChart.qml
|
||||
FluCheckBox 1.0 Controls/FluCheckBox.qml
|
||||
FluClip 1.0 Controls/FluClip.qml
|
||||
FluColorPicker 1.0 Controls/FluColorPicker.qml
|
||||
FluComboBox 1.0 Controls/FluComboBox.qml
|
||||
FluContentDialog 1.0 Controls/FluContentDialog.qml
|
||||
FluContentPage 1.0 Controls/FluContentPage.qml
|
||||
FluControl 1.0 Controls/FluControl.qml
|
||||
FluControlBackground 1.0 Controls/FluControlBackground.qml
|
||||
FluCopyableText 1.0 Controls/FluCopyableText.qml
|
||||
FluDatePicker 1.0 Controls/FluDatePicker.qml
|
||||
FluDivider 1.0 Controls/FluDivider.qml
|
||||
FluDropDownButton 1.0 Controls/FluDropDownButton.qml
|
||||
FluEvent 1.0 Controls/FluEvent.qml
|
||||
FluEventBus 1.0 Controls/FluEventBus.qml
|
||||
FluExpander 1.0 Controls/FluExpander.qml
|
||||
FluFilledButton 1.0 Controls/FluFilledButton.qml
|
||||
FluFlipView 1.0 Controls/FluFlipView.qml
|
||||
FluFocusRectangle 1.0 Controls/FluFocusRectangle.qml
|
||||
FluFrame 1.0 Controls/FluFrame.qml
|
||||
FluGroupBox 1.0 Controls/FluGroupBox.qml
|
||||
FluIcon 1.0 Controls/FluIcon.qml
|
||||
FluIconButton 1.0 Controls/FluIconButton.qml
|
||||
FluImage 1.0 Controls/FluImage.qml
|
||||
FluImageButton 1.0 Controls/FluImageButton.qml
|
||||
FluInfoBar 1.0 Controls/FluInfoBar.qml
|
||||
FluItemDelegate 1.0 Controls/FluItemDelegate.qml
|
||||
FluLauncher 1.0 Controls/FluLauncher.qml
|
||||
FluLoader 1.0 Controls/FluLoader.qml
|
||||
FluLoadingButton 1.0 Controls/FluLoadingButton.qml
|
||||
FluMenu 1.0 Controls/FluMenu.qml
|
||||
FluMenuBar 1.0 Controls/FluMenuBar.qml
|
||||
FluMenuBarItem 1.0 Controls/FluMenuBarItem.qml
|
||||
FluMenuItem 1.0 Controls/FluMenuItem.qml
|
||||
FluMenuSeparator 1.0 Controls/FluMenuSeparator.qml
|
||||
FluMultilineTextBox 1.0 Controls/FluMultilineTextBox.qml
|
||||
FluNavigationView 1.0 Controls/FluNavigationView.qml
|
||||
FluObject 1.0 Controls/FluObject.qml
|
||||
FluPage 1.0 Controls/FluPage.qml
|
||||
FluPagination 1.0 Controls/FluPagination.qml
|
||||
FluPaneItem 1.0 Controls/FluPaneItem.qml
|
||||
FluPaneItemEmpty 1.0 Controls/FluPaneItemEmpty.qml
|
||||
FluPaneItemExpander 1.0 Controls/FluPaneItemExpander.qml
|
||||
FluPaneItemHeader 1.0 Controls/FluPaneItemHeader.qml
|
||||
FluPaneItemSeparator 1.0 Controls/FluPaneItemSeparator.qml
|
||||
FluPasswordBox 1.0 Controls/FluPasswordBox.qml
|
||||
FluPivot 1.0 Controls/FluPivot.qml
|
||||
FluPivotItem 1.0 Controls/FluPivotItem.qml
|
||||
FluPopup 1.0 Controls/FluPopup.qml
|
||||
FluProgressBar 1.0 Controls/FluProgressBar.qml
|
||||
FluProgressButton 1.0 Controls/FluProgressButton.qml
|
||||
FluProgressRing 1.0 Controls/FluProgressRing.qml
|
||||
FluQRCode 1.0 Controls/FluQRCode.qml
|
||||
FluRadioButton 1.0 Controls/FluRadioButton.qml
|
||||
FluRadioButtons 1.0 Controls/FluRadioButtons.qml
|
||||
FluRangeSlider 1.0 Controls/FluRangeSlider.qml
|
||||
FluRatingControl 1.0 Controls/FluRatingControl.qml
|
||||
FluRemoteLoader 1.0 Controls/FluRemoteLoader.qml
|
||||
FluRouter 1.0 Controls/FluRouter.qml
|
||||
FluScrollBar 1.0 Controls/FluScrollBar.qml
|
||||
FluScrollIndicator 1.0 Controls/FluScrollIndicator.qml
|
||||
FluScrollablePage 1.0 Controls/FluScrollablePage.qml
|
||||
FluShadow 1.0 Controls/FluShadow.qml
|
||||
FluSheet 1.0 Controls/FluSheet.qml
|
||||
FluShortcutPicker 1.0 Controls/FluShortcutPicker.qml
|
||||
FluSlider 1.0 Controls/FluSlider.qml
|
||||
FluSpinBox 1.0 Controls/FluSpinBox.qml
|
||||
FluSplitLayout 1.0 Controls/FluSplitLayout.qml
|
||||
FluStaggeredLayout 1.0 Controls/FluStaggeredLayout.qml
|
||||
FluStatusLayout 1.0 Controls/FluStatusLayout.qml
|
||||
FluTabView 1.0 Controls/FluTabView.qml
|
||||
FluTableView 1.0 Controls/FluTableView.qml
|
||||
FluText 1.0 Controls/FluText.qml
|
||||
FluTextBox 1.0 Controls/FluTextBox.qml
|
||||
FluTextBoxBackground 1.0 Controls/FluTextBoxBackground.qml
|
||||
FluTextBoxMenu 1.0 Controls/FluTextBoxMenu.qml
|
||||
FluTextButton 1.0 Controls/FluTextButton.qml
|
||||
FluTimePicker 1.0 Controls/FluTimePicker.qml
|
||||
FluTimeline 1.0 Controls/FluTimeline.qml
|
||||
FluToggleButton 1.0 Controls/FluToggleButton.qml
|
||||
FluToggleSwitch 1.0 Controls/FluToggleSwitch.qml
|
||||
FluTooltip 1.0 Controls/FluTooltip.qml
|
||||
FluTour 1.0 Controls/FluTour.qml
|
||||
FluTreeView 1.0 Controls/FluTreeView.qml
|
||||
FluWindow 1.0 Controls/FluWindow.qml
|
||||
FluWindowDialog 1.0 Controls/FluWindowDialog.qml
|
||||
FluWindowResultLauncher 1.0 Controls/FluWindowResultLauncher.qml
|
||||
|
||||
plugin fluentuiplugin
|
@ -1,114 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/qt/qml">
|
||||
<file>FluentUI/JS/Chart.js</file>
|
||||
<file>FluentUI/Image/noise.png</file>
|
||||
<file>FluentUI/Controls/FluAcrylic.qml</file>
|
||||
<file>FluentUI/Controls/FluAppBar.qml</file>
|
||||
<file>FluentUI/Controls/FluAutoSuggestBox.qml</file>
|
||||
<file>FluentUI/Controls/FluBadge.qml</file>
|
||||
<file>FluentUI/Controls/FluBreadcrumbBar.qml</file>
|
||||
<file>FluentUI/Controls/FluButton.qml</file>
|
||||
<file>FluentUI/Controls/FluCalendarPicker.qml</file>
|
||||
<file>FluentUI/Controls/FluCarousel.qml</file>
|
||||
<file>FluentUI/Controls/FluChart.qml</file>
|
||||
<file>FluentUI/Controls/FluCheckBox.qml</file>
|
||||
<file>FluentUI/Controls/FluColorPicker.qml</file>
|
||||
<file>FluentUI/Controls/FluComboBox.qml</file>
|
||||
<file>FluentUI/Controls/FluContentDialog.qml</file>
|
||||
<file>FluentUI/Controls/FluContentPage.qml</file>
|
||||
<file>FluentUI/Controls/FluControl.qml</file>
|
||||
<file>FluentUI/Controls/FluCopyableText.qml</file>
|
||||
<file>FluentUI/Controls/FluDatePicker.qml</file>
|
||||
<file>FluentUI/Controls/FluDivider.qml</file>
|
||||
<file>FluentUI/Controls/FluDropDownButton.qml</file>
|
||||
<file>FluentUI/Controls/FluExpander.qml</file>
|
||||
<file>FluentUI/Controls/FluFilledButton.qml</file>
|
||||
<file>FluentUI/Controls/FluFlipView.qml</file>
|
||||
<file>FluentUI/Controls/FluFocusRectangle.qml</file>
|
||||
<file>FluentUI/Controls/FluIcon.qml</file>
|
||||
<file>FluentUI/Controls/FluIconButton.qml</file>
|
||||
<file>FluentUI/Controls/FluImage.qml</file>
|
||||
<file>FluentUI/Controls/FluInfoBar.qml</file>
|
||||
<file>FluentUI/Controls/FluItemDelegate.qml</file>
|
||||
<file>FluentUI/Controls/FluMenu.qml</file>
|
||||
<file>FluentUI/Controls/FluMenuBar.qml</file>
|
||||
<file>FluentUI/Controls/FluMenuBarItem.qml</file>
|
||||
<file>FluentUI/Controls/FluMenuItem.qml</file>
|
||||
<file>FluentUI/Controls/FluMenuSeparator.qml</file>
|
||||
<file>FluentUI/Controls/FluMultilineTextBox.qml</file>
|
||||
<file>FluentUI/Controls/FluNavigationView.qml</file>
|
||||
<file>FluentUI/Controls/FluObject.qml</file>
|
||||
<file>FluentUI/Controls/FluPage.qml</file>
|
||||
<file>FluentUI/Controls/FluPagination.qml</file>
|
||||
<file>FluentUI/Controls/FluPaneItem.qml</file>
|
||||
<file>FluentUI/Controls/FluPaneItemEmpty.qml</file>
|
||||
<file>FluentUI/Controls/FluPaneItemExpander.qml</file>
|
||||
<file>FluentUI/Controls/FluPaneItemHeader.qml</file>
|
||||
<file>FluentUI/Controls/FluPaneItemSeparator.qml</file>
|
||||
<file>FluentUI/Controls/FluPasswordBox.qml</file>
|
||||
<file>FluentUI/Controls/FluPivot.qml</file>
|
||||
<file>FluentUI/Controls/FluPivotItem.qml</file>
|
||||
<file>FluentUI/Controls/FluPopup.qml</file>
|
||||
<file>FluentUI/Controls/FluProgressBar.qml</file>
|
||||
<file>FluentUI/Controls/FluProgressButton.qml</file>
|
||||
<file>FluentUI/Controls/FluProgressRing.qml</file>
|
||||
<file>FluentUI/Controls/FluQRCode.qml</file>
|
||||
<file>FluentUI/Controls/FluRadioButton.qml</file>
|
||||
<file>FluentUI/Controls/FluRadioButtons.qml</file>
|
||||
<file>FluentUI/Controls/FluRangeSlider.qml</file>
|
||||
<file>FluentUI/Controls/FluRatingControl.qml</file>
|
||||
<file>FluentUI/Controls/FluRemoteLoader.qml</file>
|
||||
<file>FluentUI/Controls/FluScrollablePage.qml</file>
|
||||
<file>FluentUI/Controls/FluScrollBar.qml</file>
|
||||
<file>FluentUI/Controls/FluScrollIndicator.qml</file>
|
||||
<file>FluentUI/Controls/FluShadow.qml</file>
|
||||
<file>FluentUI/Controls/FluSlider.qml</file>
|
||||
<file>FluentUI/Controls/FluSpinBox.qml</file>
|
||||
<file>FluentUI/Controls/FluStaggeredLayout.qml</file>
|
||||
<file>FluentUI/Controls/FluStatusLayout.qml</file>
|
||||
<file>FluentUI/Controls/FluTableView.qml</file>
|
||||
<file>FluentUI/Controls/FluTabView.qml</file>
|
||||
<file>FluentUI/Controls/FluText.qml</file>
|
||||
<file>FluentUI/Controls/FluTextBox.qml</file>
|
||||
<file>FluentUI/Controls/FluTextBoxBackground.qml</file>
|
||||
<file>FluentUI/Controls/FluTextBoxMenu.qml</file>
|
||||
<file>FluentUI/Controls/FluTextButton.qml</file>
|
||||
<file>FluentUI/Controls/FluTimeline.qml</file>
|
||||
<file>FluentUI/Controls/FluTimePicker.qml</file>
|
||||
<file>FluentUI/Controls/FluToggleButton.qml</file>
|
||||
<file>FluentUI/Controls/FluToggleSwitch.qml</file>
|
||||
<file>FluentUI/Controls/FluTooltip.qml</file>
|
||||
<file>FluentUI/Controls/FluTour.qml</file>
|
||||
<file>FluentUI/Controls/FluTreeView.qml</file>
|
||||
<file>FluentUI/Controls/FluWindow.qml</file>
|
||||
<file>FluentUI/Controls/FluLoadingButton.qml</file>
|
||||
<file>FluentUI/Controls/FluClip.qml</file>
|
||||
<file>FluentUI/Controls/FluLoader.qml</file>
|
||||
<file>FluentUI/Controls/FluShortcutPicker.qml</file>
|
||||
<file>FluentUI/Image/btn_close_hovered.png</file>
|
||||
<file>FluentUI/Image/btn_close_normal.png</file>
|
||||
<file>FluentUI/Image/btn_close_pushed.png</file>
|
||||
<file>FluentUI/Image/btn_max_hovered.png</file>
|
||||
<file>FluentUI/Image/btn_max_normal.png</file>
|
||||
<file>FluentUI/Image/btn_max_pushed.png</file>
|
||||
<file>FluentUI/Image/btn_min_hovered.png</file>
|
||||
<file>FluentUI/Image/btn_min_normal.png</file>
|
||||
<file>FluentUI/Image/btn_min_pushed.png</file>
|
||||
<file>FluentUI/Controls/FluImageButton.qml</file>
|
||||
<file>FluentUI/Controls/FluSplitLayout.qml</file>
|
||||
<file>FluentUI/Controls/FluWindowDialog.qml</file>
|
||||
<file>FluentUI/i18n/fluentui_en_US.qm</file>
|
||||
<file>FluentUI/i18n/fluentui_zh_CN.qm</file>
|
||||
<file>FluentUI/Controls/FluLauncher.qml</file>
|
||||
<file>FluentUI/Controls/FluRouter.qml</file>
|
||||
<file>FluentUI/Controls/FluWindowResultLauncher.qml</file>
|
||||
<file>FluentUI/Controls/qmldir</file>
|
||||
<file>FluentUI/Controls/FluEvent.qml</file>
|
||||
<file>FluentUI/Controls/FluEventBus.qml</file>
|
||||
<file>FluentUI/Controls/FluFrame.qml</file>
|
||||
<file>FluentUI/Controls/FluSheet.qml</file>
|
||||
<file>FluentUI/Controls/FluGroupBox.qml</file>
|
||||
<file>FluentUI/Controls/FluControlBackground.qml</file>
|
||||
<file>FluentUI/Font/FluentIcons.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -34,7 +34,7 @@ Item {
|
||||
}
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/qt/qml/FluentUI/Image/noise.png"
|
||||
source: "qrc:/qt-project.org/imports/FluentUI/Image/noise.png"
|
||||
fillMode: Image.Tile
|
||||
opacity: control.noiseOpacity
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ Text {
|
||||
opacity: iconSource>0
|
||||
FontLoader{
|
||||
id: font_loader
|
||||
source: "qrc:/qt/qml/FluentUI/Font/FluentIcons.ttf"
|
||||
source: "qrc:/qt-project.org/imports/FluentUI/Font/FluentIcons.ttf"
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
singleton FluRouter FluRouter.qml
|
||||
singleton FluEventBus FluEventBus.qml
|
@ -1,13 +0,0 @@
|
||||
#include "fluentuiplugin.h"
|
||||
|
||||
#include "FluentUI.h"
|
||||
|
||||
FluentUIPlugin::FluentUIPlugin() = default;
|
||||
|
||||
void FluentUIPlugin::registerTypes(const char *uri) {
|
||||
FluentUI::getInstance()->registerTypes(uri);
|
||||
}
|
||||
|
||||
void FluentUIPlugin::initializeEngine(QQmlEngine *engine, const char *uri) {
|
||||
FluentUI::getInstance()->initializeEngine(engine, uri);
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QQmlExtensionPlugin>
|
||||
|
||||
/**
|
||||
* @brief The FluentUIPlugin class
|
||||
*/
|
||||
class FluentUIPlugin : public QQmlExtensionPlugin {
|
||||
Q_OBJECT
|
||||
|
||||
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
|
||||
public:
|
||||
FluentUIPlugin();
|
||||
|
||||
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
|
||||
|
||||
void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE;
|
||||
};
|
Loading…
Reference in New Issue
Block a user