mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 07:03:46 +08:00
update
This commit is contained in:
parent
9d5765eafe
commit
3f7555d4e6
@ -44,7 +44,6 @@ Item {
|
|||||||
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
||||||
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
||||||
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
||||||
"/fluentInitalizr":"qrc:/example/qml/window/FluentInitalizrWindow.qml",
|
|
||||||
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
||||||
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
||||||
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
||||||
|
@ -4,12 +4,18 @@ import QtQuick.Window
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "../global"
|
import "../global"
|
||||||
|
import "../window"
|
||||||
|
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
launchMode: FluPageType.SingleTask
|
launchMode: FluPageType.SingleTask
|
||||||
animDisabled: true
|
animDisabled: true
|
||||||
|
|
||||||
|
FluentInitalizrWindow{
|
||||||
|
id:fluent_initalizr
|
||||||
|
}
|
||||||
|
|
||||||
ListModel{
|
ListModel{
|
||||||
id: model_header
|
id: model_header
|
||||||
ListElement{
|
ListElement{
|
||||||
@ -27,11 +33,10 @@ FluScrollablePage{
|
|||||||
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
|
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
|
||||||
url: "https://github.com/zhuzichu520/FluentUI"
|
url: "https://github.com/zhuzichu520/FluentUI"
|
||||||
clicked: function(model){
|
clicked: function(model){
|
||||||
FluApp.navigate("/fluentInitalizr")
|
fluent_initalizr.showDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 320
|
Layout.preferredHeight: 320
|
||||||
@ -60,7 +65,6 @@ FluScrollablePage{
|
|||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
id:com_grallery
|
id:com_grallery
|
||||||
Item{
|
Item{
|
||||||
@ -287,3 +291,4 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,108 +5,109 @@ import FluentUI
|
|||||||
import Qt.labs.platform
|
import Qt.labs.platform
|
||||||
import "../component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindowDialog {
|
||||||
|
|
||||||
id:window
|
id:window
|
||||||
title:qsTr("FluentUI Initalizr")
|
title:qsTr("FluentUI Initalizr")
|
||||||
width: 600
|
width: 600
|
||||||
height: 400
|
height: 400
|
||||||
fixSize: true
|
|
||||||
modality: Qt.ApplicationModal
|
|
||||||
launchMode: FluWindowType.SingleTask
|
|
||||||
showStayTop: false
|
|
||||||
|
|
||||||
Connections{
|
contentDelegate:Component{
|
||||||
target: InitalizrHelper
|
Item{
|
||||||
function onError(message){
|
Connections{
|
||||||
showError(message)
|
target: InitalizrHelper
|
||||||
}
|
function onError(message){
|
||||||
function onSuccess(path){
|
showError(message)
|
||||||
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
|
||||||
window.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluText{
|
|
||||||
id:text_title
|
|
||||||
text:qsTr("FluentUI Initalizr")
|
|
||||||
font: FluTextStyle.Title
|
|
||||||
anchors{
|
|
||||||
left: parent.left
|
|
||||||
top: parent.top
|
|
||||||
leftMargin: 20
|
|
||||||
topMargin: 20
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Column{
|
|
||||||
spacing: 14
|
|
||||||
anchors{
|
|
||||||
left: parent.left
|
|
||||||
top: text_title.bottom
|
|
||||||
leftMargin: 20
|
|
||||||
topMargin: 20
|
|
||||||
}
|
|
||||||
FluTextBox{
|
|
||||||
id:text_box_name
|
|
||||||
width: 180
|
|
||||||
placeholderText: qsTr("Name")
|
|
||||||
focus: true
|
|
||||||
}
|
|
||||||
Row{
|
|
||||||
spacing: 8
|
|
||||||
FluTextBox{
|
|
||||||
id:text_box_path
|
|
||||||
width: 300
|
|
||||||
placeholderText: qsTr("Create In")
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
FluButton{
|
|
||||||
text:qsTr("Browse")
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
folder_dialog.open()
|
|
||||||
}
|
}
|
||||||
}
|
function onSuccess(path){
|
||||||
}
|
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
||||||
}
|
|
||||||
|
|
||||||
FolderDialog{
|
|
||||||
id:folder_dialog
|
|
||||||
onAccepted: {
|
|
||||||
text_box_path.text = FluTools.toLocalPath(currentFolder)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle{
|
|
||||||
id:layout_actions
|
|
||||||
width: parent.width
|
|
||||||
height: 60
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
color: FluTheme.backgroundColor
|
|
||||||
Row{
|
|
||||||
height: parent.height
|
|
||||||
spacing: 20
|
|
||||||
anchors{
|
|
||||||
right: parent.right
|
|
||||||
rightMargin: 20
|
|
||||||
}
|
|
||||||
FluButton{
|
|
||||||
text:qsTr("Cancel")
|
|
||||||
width: 120
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
window.close()
|
window.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluFilledButton{
|
|
||||||
text:qsTr("Create")
|
FluText{
|
||||||
width: 120
|
id:text_title
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
text:qsTr("FluentUI Initalizr")
|
||||||
onClicked: {
|
font: FluTextStyle.Title
|
||||||
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
leftMargin: 20
|
||||||
|
topMargin: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 14
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
top: text_title.bottom
|
||||||
|
leftMargin: 20
|
||||||
|
topMargin: 20
|
||||||
|
}
|
||||||
|
FluTextBox{
|
||||||
|
id:text_box_name
|
||||||
|
width: 180
|
||||||
|
placeholderText: qsTr("Name")
|
||||||
|
focus: true
|
||||||
|
}
|
||||||
|
Row{
|
||||||
|
spacing: 8
|
||||||
|
FluTextBox{
|
||||||
|
id:text_box_path
|
||||||
|
width: 300
|
||||||
|
placeholderText: qsTr("Create In")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:qsTr("Browse")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
folder_dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FolderDialog{
|
||||||
|
id:folder_dialog
|
||||||
|
onAccepted: {
|
||||||
|
text_box_path.text = FluTools.toLocalPath(currentFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id:layout_actions
|
||||||
|
width: parent.width
|
||||||
|
height: 60
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: FluTheme.backgroundColor
|
||||||
|
Row{
|
||||||
|
height: parent.height
|
||||||
|
spacing: 20
|
||||||
|
anchors{
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 20
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:qsTr("Cancel")
|
||||||
|
width: 120
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluFilledButton{
|
||||||
|
text:qsTr("Create")
|
||||||
|
width: 120
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@ Item {
|
|||||||
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
"/login":"qrc:/example/qml/window/LoginWindow.qml",
|
||||||
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
|
||||||
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
|
||||||
"/fluentInitalizr":"qrc:/example/qml/window/FluentInitalizrWindow.qml",
|
|
||||||
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
|
||||||
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
|
||||||
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
|
||||||
|
@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
|
|||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import FluentUI 1.0
|
import FluentUI 1.0
|
||||||
|
import "../window"
|
||||||
import "../global"
|
import "../global"
|
||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
@ -10,6 +11,10 @@ FluScrollablePage{
|
|||||||
launchMode: FluPageType.SingleTask
|
launchMode: FluPageType.SingleTask
|
||||||
animDisabled: true
|
animDisabled: true
|
||||||
|
|
||||||
|
FluentInitalizrWindow{
|
||||||
|
id:fluent_initalizr
|
||||||
|
}
|
||||||
|
|
||||||
ListModel{
|
ListModel{
|
||||||
id: model_header
|
id: model_header
|
||||||
ListElement{
|
ListElement{
|
||||||
@ -27,11 +32,10 @@ FluScrollablePage{
|
|||||||
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
|
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
|
||||||
url: "https://github.com/zhuzichu520/FluentUI"
|
url: "https://github.com/zhuzichu520/FluentUI"
|
||||||
clicked: function(model){
|
clicked: function(model){
|
||||||
FluApp.navigate("/fluentInitalizr")
|
fluent_initalizr.showDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 320
|
Layout.preferredHeight: 320
|
||||||
@ -60,7 +64,6 @@ FluScrollablePage{
|
|||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
id:com_grallery
|
id:com_grallery
|
||||||
Item{
|
Item{
|
||||||
|
@ -5,108 +5,109 @@ import FluentUI 1.0
|
|||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
import "../component"
|
import "../component"
|
||||||
|
|
||||||
FluWindow {
|
FluWindowDialog {
|
||||||
|
|
||||||
id:window
|
id:window
|
||||||
title:qsTr("FluentUI Initalizr")
|
title:qsTr("FluentUI Initalizr")
|
||||||
width: 600
|
width: 600
|
||||||
height: 400
|
height: 400
|
||||||
fixSize: true
|
|
||||||
modality: Qt.ApplicationModal
|
|
||||||
launchMode: FluWindowType.SingleTask
|
|
||||||
showStayTop: false
|
|
||||||
|
|
||||||
Connections{
|
contentDelegate:Component{
|
||||||
target: InitalizrHelper
|
Item{
|
||||||
function onError(message){
|
Connections{
|
||||||
showError(message)
|
target: InitalizrHelper
|
||||||
}
|
function onError(message){
|
||||||
function onSuccess(path){
|
showError(message)
|
||||||
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
|
||||||
window.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FluText{
|
|
||||||
id:text_title
|
|
||||||
text:qsTr("FluentUI Initalizr")
|
|
||||||
font: FluTextStyle.Title
|
|
||||||
anchors{
|
|
||||||
left: parent.left
|
|
||||||
top: parent.top
|
|
||||||
leftMargin: 20
|
|
||||||
topMargin: 20
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Column{
|
|
||||||
spacing: 14
|
|
||||||
anchors{
|
|
||||||
left: parent.left
|
|
||||||
top: text_title.bottom
|
|
||||||
leftMargin: 20
|
|
||||||
topMargin: 20
|
|
||||||
}
|
|
||||||
FluTextBox{
|
|
||||||
id:text_box_name
|
|
||||||
width: 180
|
|
||||||
placeholderText: qsTr("Name")
|
|
||||||
focus: true
|
|
||||||
}
|
|
||||||
Row{
|
|
||||||
spacing: 8
|
|
||||||
FluTextBox{
|
|
||||||
id:text_box_path
|
|
||||||
width: 300
|
|
||||||
placeholderText: qsTr("Create In")
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
FluButton{
|
|
||||||
text:qsTr("Browse")
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
folder_dialog.open()
|
|
||||||
}
|
}
|
||||||
}
|
function onSuccess(path){
|
||||||
}
|
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
||||||
}
|
|
||||||
|
|
||||||
FolderDialog{
|
|
||||||
id:folder_dialog
|
|
||||||
onAccepted: {
|
|
||||||
text_box_path.text = FluTools.toLocalPath(currentFolder)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle{
|
|
||||||
id:layout_actions
|
|
||||||
width: parent.width
|
|
||||||
height: 60
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
color: FluTheme.backgroundColor
|
|
||||||
Row{
|
|
||||||
height: parent.height
|
|
||||||
spacing: 20
|
|
||||||
anchors{
|
|
||||||
right: parent.right
|
|
||||||
rightMargin: 20
|
|
||||||
}
|
|
||||||
FluButton{
|
|
||||||
text:qsTr("Cancel")
|
|
||||||
width: 120
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: {
|
|
||||||
window.close()
|
window.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluFilledButton{
|
|
||||||
text:qsTr("Create")
|
FluText{
|
||||||
width: 120
|
id:text_title
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
text:qsTr("FluentUI Initalizr")
|
||||||
onClicked: {
|
font: FluTextStyle.Title
|
||||||
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
leftMargin: 20
|
||||||
|
topMargin: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Column{
|
||||||
|
spacing: 14
|
||||||
|
anchors{
|
||||||
|
left: parent.left
|
||||||
|
top: text_title.bottom
|
||||||
|
leftMargin: 20
|
||||||
|
topMargin: 20
|
||||||
|
}
|
||||||
|
FluTextBox{
|
||||||
|
id:text_box_name
|
||||||
|
width: 180
|
||||||
|
placeholderText: qsTr("Name")
|
||||||
|
focus: true
|
||||||
|
}
|
||||||
|
Row{
|
||||||
|
spacing: 8
|
||||||
|
FluTextBox{
|
||||||
|
id:text_box_path
|
||||||
|
width: 300
|
||||||
|
placeholderText: qsTr("Create In")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:qsTr("Browse")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
folder_dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FolderDialog{
|
||||||
|
id:folder_dialog
|
||||||
|
onAccepted: {
|
||||||
|
text_box_path.text = FluTools.toLocalPath(currentFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id:layout_actions
|
||||||
|
width: parent.width
|
||||||
|
height: 60
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
color: FluTheme.backgroundColor
|
||||||
|
Row{
|
||||||
|
height: parent.height
|
||||||
|
spacing: 20
|
||||||
|
anchors{
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 20
|
||||||
|
}
|
||||||
|
FluButton{
|
||||||
|
text:qsTr("Cancel")
|
||||||
|
width: 120
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FluFilledButton{
|
||||||
|
text:qsTr("Create")
|
||||||
|
width: 120
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: {
|
||||||
|
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,14 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
auto pos = _helper->window->position();
|
auto pos = _helper->window->position();
|
||||||
_helper->showSystemMenu(QPoint(pos.x(),pos.y()+_helper->getAppBarHeight()));
|
_helper->showSystemMenu(QPoint(pos.x(),pos.y()+_helper->getAppBarHeight()));
|
||||||
}
|
}
|
||||||
|
}else if(uMsg == WM_SYSCOMMAND){
|
||||||
|
if(wParam == SC_MINIMIZE){
|
||||||
|
if(_helper->window->transientParent()){
|
||||||
|
_helper->window->transientParent()->showMinimized();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,18 +7,21 @@ FluWindowLifecycle::FluWindowLifecycle(QObject *parent):QObject{parent}{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FluWindowLifecycle::onCompleted(QQuickWindow* window){
|
void FluWindowLifecycle::onCompleted(QQuickWindow* window){
|
||||||
this->_window = window;
|
_window = window;
|
||||||
FluApp::getInstance()->addWindow(this->_window);
|
if(_window && _window->transientParent() == nullptr){
|
||||||
|
FluApp::getInstance()->addWindow(_window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluWindowLifecycle::onDestoryOnClose(){
|
void FluWindowLifecycle::onDestoryOnClose(){
|
||||||
if(_window){
|
if(_window && _window->transientParent() == nullptr){
|
||||||
FluApp::getInstance()->removeWindow(this->_window);
|
FluApp::getInstance()->removeWindow(_window);
|
||||||
_window = nullptr;
|
_window = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluWindowLifecycle::onDestruction(){
|
void FluWindowLifecycle::onDestruction(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluWindowLifecycle::onVisible(bool visible){
|
void FluWindowLifecycle::onVisible(bool visible){
|
||||||
|
@ -68,6 +68,7 @@ void FluentUI::registerTypes(const char *uri){
|
|||||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluIcon.qml"),uri,major,minor,"FluIcon");
|
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/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/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/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/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/FluMenu.qml"),uri,major,minor,"FluMenu");
|
||||||
@ -118,6 +119,7 @@ void FluentUI::registerTypes(const char *uri){
|
|||||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTour.qml"),uri,major,minor,"FluTour");
|
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/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/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/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/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/FluProgressButton.qml"),uri,major,minor,"FluProgressButton");
|
||||||
|
@ -50,7 +50,11 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
property var minClickListener: function(){
|
property var minClickListener: function(){
|
||||||
d.win.showMinimized()
|
if(d.win.transientParent != null){
|
||||||
|
d.win.transientParent.showMinimized()
|
||||||
|
}else{
|
||||||
|
d.win.showMinimized()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
property var closeClickListener : function(){
|
property var closeClickListener : function(){
|
||||||
d.win.close()
|
d.win.close()
|
||||||
|
24
src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml
Normal file
24
src/Qt5/imports/FluentUI/Controls/FluWindowDialog.qml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Window 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
import FluentUI 1.0
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
id:control
|
||||||
|
property Component contentDelegate
|
||||||
|
autoVisible: false
|
||||||
|
autoCenter: false
|
||||||
|
autoDestory: false
|
||||||
|
fixSize: true
|
||||||
|
Loader{
|
||||||
|
anchors.fill: parent
|
||||||
|
sourceComponent: control.visible ? control.contentDelegate : undefined
|
||||||
|
}
|
||||||
|
function showDialog(){
|
||||||
|
var x = transientParent.x + (transientParent.width - width)/2
|
||||||
|
var y = transientParent.y + (transientParent.height - height)/2
|
||||||
|
setGeometry(x,y,width,height)
|
||||||
|
visible = true
|
||||||
|
}
|
||||||
|
}
|
@ -2313,6 +2313,87 @@ Module {
|
|||||||
Property { name: "targetRect"; type: "QRectF" }
|
Property { name: "targetRect"; type: "QRectF" }
|
||||||
Property { name: "target"; type: "QQuickItem"; isPointer: true }
|
Property { name: "target"; type: "QQuickItem"; isPointer: true }
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
prototype: "QQuickRectangle"
|
||||||
|
name: "FluentUI/FluAppBar 1.0"
|
||||||
|
exports: ["FluentUI/FluAppBar 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
isComposite: true
|
||||||
|
defaultProperty: "data"
|
||||||
|
Property { name: "title"; type: "string" }
|
||||||
|
Property { name: "darkText"; type: "string" }
|
||||||
|
Property { name: "lightText"; type: "string" }
|
||||||
|
Property { name: "minimizeText"; type: "string" }
|
||||||
|
Property { name: "restoreText"; type: "string" }
|
||||||
|
Property { name: "maximizeText"; type: "string" }
|
||||||
|
Property { name: "closeText"; type: "string" }
|
||||||
|
Property { name: "stayTopText"; type: "string" }
|
||||||
|
Property { name: "stayTopCancelText"; type: "string" }
|
||||||
|
Property { name: "textColor"; type: "QColor" }
|
||||||
|
Property { name: "minimizeNormalColor"; type: "QColor" }
|
||||||
|
Property { name: "minimizeHoverColor"; type: "QColor" }
|
||||||
|
Property { name: "minimizePressColor"; type: "QColor" }
|
||||||
|
Property { name: "maximizeNormalColor"; type: "QColor" }
|
||||||
|
Property { name: "maximizeHoverColor"; type: "QColor" }
|
||||||
|
Property { name: "maximizePressColor"; type: "QColor" }
|
||||||
|
Property { name: "closeNormalColor"; type: "QColor" }
|
||||||
|
Property { name: "closeHoverColor"; type: "QColor" }
|
||||||
|
Property { name: "closePressColor"; type: "QColor" }
|
||||||
|
Property { name: "showDark"; type: "bool" }
|
||||||
|
Property { name: "showClose"; type: "bool" }
|
||||||
|
Property { name: "showMinimize"; type: "bool" }
|
||||||
|
Property { name: "showMaximize"; type: "bool" }
|
||||||
|
Property { name: "showStayTop"; type: "bool" }
|
||||||
|
Property { name: "titleVisible"; type: "bool" }
|
||||||
|
Property { name: "icon"; type: "QUrl" }
|
||||||
|
Property { name: "iconSize"; type: "int" }
|
||||||
|
Property { name: "isMac"; type: "bool" }
|
||||||
|
Property { name: "borerlessColor"; type: "QColor" }
|
||||||
|
Property { name: "systemMoveEnable"; type: "bool" }
|
||||||
|
Property { name: "maxClickListener"; type: "QVariant" }
|
||||||
|
Property { name: "minClickListener"; type: "QVariant" }
|
||||||
|
Property { name: "closeClickListener"; type: "QVariant" }
|
||||||
|
Property { name: "stayTopClickListener"; type: "QVariant" }
|
||||||
|
Property { name: "darkClickListener"; type: "QVariant" }
|
||||||
|
Property { name: "systemMenuListener"; type: "QVariant" }
|
||||||
|
Property {
|
||||||
|
name: "buttonStayTop"
|
||||||
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
|
isReadonly: true
|
||||||
|
isPointer: true
|
||||||
|
}
|
||||||
|
Property {
|
||||||
|
name: "buttonMinimize"
|
||||||
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
|
isReadonly: true
|
||||||
|
isPointer: true
|
||||||
|
}
|
||||||
|
Property {
|
||||||
|
name: "buttonMaximize"
|
||||||
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
|
isReadonly: true
|
||||||
|
isPointer: true
|
||||||
|
}
|
||||||
|
Property {
|
||||||
|
name: "buttonClose"
|
||||||
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
|
isReadonly: true
|
||||||
|
isPointer: true
|
||||||
|
}
|
||||||
|
Property {
|
||||||
|
name: "buttonDark"
|
||||||
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
|
isReadonly: true
|
||||||
|
isPointer: true
|
||||||
|
}
|
||||||
|
Method { name: "_maximizeButtonHover"; type: "QVariant" }
|
||||||
|
Method { name: "_appBarHover"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "setHitTestVisible"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "id"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
prototype: "QQuickRectangle"
|
prototype: "QQuickRectangle"
|
||||||
name: "FluentUI/FluArea 1.0"
|
name: "FluentUI/FluArea 1.0"
|
||||||
@ -2415,6 +2496,8 @@ Module {
|
|||||||
Property { name: "hoverColor"; type: "QColor" }
|
Property { name: "hoverColor"; type: "QColor" }
|
||||||
Property { name: "normalColor"; type: "QColor" }
|
Property { name: "normalColor"; type: "QColor" }
|
||||||
Property { name: "text"; type: "string" }
|
Property { name: "text"; type: "string" }
|
||||||
|
Property { name: "from"; type: "QDateTime" }
|
||||||
|
Property { name: "to"; type: "QDateTime" }
|
||||||
Property { name: "current"; type: "QVariant" }
|
Property { name: "current"; type: "QVariant" }
|
||||||
Signal { name: "accepted" }
|
Signal { name: "accepted" }
|
||||||
}
|
}
|
||||||
@ -2756,6 +2839,17 @@ Module {
|
|||||||
Property { name: "errorItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "errorItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
prototype: "QQuickButton"
|
||||||
|
name: "FluentUI/FluImageButton 1.0"
|
||||||
|
exports: ["FluentUI/FluImageButton 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
isComposite: true
|
||||||
|
defaultProperty: "data"
|
||||||
|
Property { name: "normalImage"; type: "string" }
|
||||||
|
Property { name: "hoveredImage"; type: "string" }
|
||||||
|
Property { name: "pushedImage"; type: "string" }
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
prototype: "QObject"
|
prototype: "QObject"
|
||||||
name: "FluentUI/FluInfoBar 1.0"
|
name: "FluentUI/FluInfoBar 1.0"
|
||||||
@ -2908,15 +3002,15 @@ Module {
|
|||||||
defaultProperty: "data"
|
defaultProperty: "data"
|
||||||
Property { name: "logo"; type: "QUrl" }
|
Property { name: "logo"; type: "QUrl" }
|
||||||
Property { name: "title"; type: "string" }
|
Property { name: "title"; type: "string" }
|
||||||
Property { name: "items"; type: "FluObject_QMLTYPE_139"; isPointer: true }
|
Property { name: "items"; type: "FluObject_QMLTYPE_166"; isPointer: true }
|
||||||
Property { name: "footerItems"; type: "FluObject_QMLTYPE_139"; isPointer: true }
|
Property { name: "footerItems"; type: "FluObject_QMLTYPE_166"; isPointer: true }
|
||||||
Property { name: "displayMode"; type: "int" }
|
Property { name: "displayMode"; type: "int" }
|
||||||
Property { name: "autoSuggestBox"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "autoSuggestBox"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
|
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
Property { name: "topPadding"; type: "int" }
|
Property { name: "topPadding"; type: "int" }
|
||||||
Property { name: "pageMode"; type: "int" }
|
Property { name: "pageMode"; type: "int" }
|
||||||
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_35"; isPointer: true }
|
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_40"; isPointer: true }
|
||||||
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_35"; isPointer: true }
|
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_40"; isPointer: true }
|
||||||
Property { name: "navCompactWidth"; type: "int" }
|
Property { name: "navCompactWidth"; type: "int" }
|
||||||
Property { name: "navTopMargin"; type: "int" }
|
Property { name: "navTopMargin"; type: "int" }
|
||||||
Property { name: "cellHeight"; type: "int" }
|
Property { name: "cellHeight"; type: "int" }
|
||||||
@ -2924,13 +3018,13 @@ Module {
|
|||||||
Property { name: "hideNavAppBar"; type: "bool" }
|
Property { name: "hideNavAppBar"; type: "bool" }
|
||||||
Property {
|
Property {
|
||||||
name: "buttonMenu"
|
name: "buttonMenu"
|
||||||
type: "FluIconButton_QMLTYPE_17"
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
Property {
|
Property {
|
||||||
name: "buttonBack"
|
name: "buttonBack"
|
||||||
type: "FluIconButton_QMLTYPE_17"
|
type: "FluIconButton_QMLTYPE_18"
|
||||||
isReadonly: true
|
isReadonly: true
|
||||||
isPointer: true
|
isPointer: true
|
||||||
}
|
}
|
||||||
@ -3724,4 +3818,190 @@ Module {
|
|||||||
Method { name: "allExpand"; type: "QVariant" }
|
Method { name: "allExpand"; type: "QVariant" }
|
||||||
Method { name: "allCollapse"; type: "QVariant" }
|
Method { name: "allCollapse"; type: "QVariant" }
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
prototype: "QQuickWindowQmlImpl"
|
||||||
|
name: "FluentUI/FluWindow 1.0"
|
||||||
|
exports: ["FluentUI/FluWindow 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
isComposite: true
|
||||||
|
defaultProperty: "contentData"
|
||||||
|
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
||||||
|
Property { name: "windowIcon"; type: "string" }
|
||||||
|
Property { name: "launchMode"; type: "int" }
|
||||||
|
Property { name: "argument"; type: "QVariant" }
|
||||||
|
Property { name: "background"; type: "QVariant" }
|
||||||
|
Property { name: "fixSize"; type: "bool" }
|
||||||
|
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
|
Property { name: "fitsAppBarWindows"; type: "bool" }
|
||||||
|
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
||||||
|
Property { name: "backgroundColor"; type: "QColor" }
|
||||||
|
Property { name: "stayTop"; type: "bool" }
|
||||||
|
Property { name: "showDark"; type: "bool" }
|
||||||
|
Property { name: "showClose"; type: "bool" }
|
||||||
|
Property { name: "showMinimize"; type: "bool" }
|
||||||
|
Property { name: "showMaximize"; type: "bool" }
|
||||||
|
Property { name: "showStayTop"; type: "bool" }
|
||||||
|
Property { name: "autoMaximize"; type: "bool" }
|
||||||
|
Property { name: "autoVisible"; type: "bool" }
|
||||||
|
Property { name: "autoCenter"; type: "bool" }
|
||||||
|
Property { name: "autoDestory"; type: "bool" }
|
||||||
|
Property { name: "useSystemAppBar"; type: "bool" }
|
||||||
|
Property { name: "resizeBorderColor"; type: "QColor" }
|
||||||
|
Property { name: "resizeBorderWidth"; type: "int" }
|
||||||
|
Property { name: "closeListener"; type: "QVariant" }
|
||||||
|
Property { name: "_realHeight"; type: "int" }
|
||||||
|
Property { name: "_realWidth"; type: "int" }
|
||||||
|
Property { name: "_appBarHeight"; type: "int" }
|
||||||
|
Property { name: "_windowRegister"; type: "QVariant" }
|
||||||
|
Property { name: "_route"; type: "string" }
|
||||||
|
Signal { name: "showSystemMenu" }
|
||||||
|
Signal {
|
||||||
|
name: "initArgument"
|
||||||
|
Parameter { name: "argument"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Signal { name: "firstVisible" }
|
||||||
|
Method { name: "destoryOnClose"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "showLoading"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "cancel"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "hideLoading"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "showSuccess"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showInfo"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showWarning"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showError"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
||||||
|
Method { name: "fixWindowSize"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "registerForWindowResult"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "path"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "onResult"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "data"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "showMaximized"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
prototype: "QQuickWindowQmlImpl"
|
||||||
|
name: "FluentUI/FluWindowDialog 1.0"
|
||||||
|
exports: ["FluentUI/FluWindowDialog 1.0"]
|
||||||
|
exportMetaObjectRevisions: [0]
|
||||||
|
isComposite: true
|
||||||
|
defaultProperty: "contentData"
|
||||||
|
Property { name: "contentDelegate"; type: "QQmlComponent"; isPointer: true }
|
||||||
|
Method { name: "showDialog"; type: "QVariant" }
|
||||||
|
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
|
||||||
|
Property { name: "windowIcon"; type: "string" }
|
||||||
|
Property { name: "launchMode"; type: "int" }
|
||||||
|
Property { name: "argument"; type: "QVariant" }
|
||||||
|
Property { name: "background"; type: "QVariant" }
|
||||||
|
Property { name: "fixSize"; type: "bool" }
|
||||||
|
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
|
||||||
|
Property { name: "fitsAppBarWindows"; type: "bool" }
|
||||||
|
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
|
||||||
|
Property { name: "backgroundColor"; type: "QColor" }
|
||||||
|
Property { name: "stayTop"; type: "bool" }
|
||||||
|
Property { name: "showDark"; type: "bool" }
|
||||||
|
Property { name: "showClose"; type: "bool" }
|
||||||
|
Property { name: "showMinimize"; type: "bool" }
|
||||||
|
Property { name: "showMaximize"; type: "bool" }
|
||||||
|
Property { name: "showStayTop"; type: "bool" }
|
||||||
|
Property { name: "autoMaximize"; type: "bool" }
|
||||||
|
Property { name: "autoVisible"; type: "bool" }
|
||||||
|
Property { name: "autoCenter"; type: "bool" }
|
||||||
|
Property { name: "autoDestory"; type: "bool" }
|
||||||
|
Property { name: "useSystemAppBar"; type: "bool" }
|
||||||
|
Property { name: "resizeBorderColor"; type: "QColor" }
|
||||||
|
Property { name: "resizeBorderWidth"; type: "int" }
|
||||||
|
Property { name: "closeListener"; type: "QVariant" }
|
||||||
|
Property { name: "_realHeight"; type: "int" }
|
||||||
|
Property { name: "_realWidth"; type: "int" }
|
||||||
|
Property { name: "_appBarHeight"; type: "int" }
|
||||||
|
Property { name: "_windowRegister"; type: "QVariant" }
|
||||||
|
Property { name: "_route"; type: "string" }
|
||||||
|
Signal { name: "showSystemMenu" }
|
||||||
|
Signal {
|
||||||
|
name: "initArgument"
|
||||||
|
Parameter { name: "argument"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Signal { name: "firstVisible" }
|
||||||
|
Method { name: "destoryOnClose"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "showLoading"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "cancel"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "hideLoading"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "showSuccess"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showInfo"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showWarning"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "showError"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "text"; type: "QVariant" }
|
||||||
|
Parameter { name: "duration"; type: "QVariant" }
|
||||||
|
Parameter { name: "moremsg"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
|
||||||
|
Method { name: "fixWindowSize"; type: "QVariant" }
|
||||||
|
Method {
|
||||||
|
name: "registerForWindowResult"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "path"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method {
|
||||||
|
name: "onResult"
|
||||||
|
type: "QVariant"
|
||||||
|
Parameter { name: "data"; type: "QVariant" }
|
||||||
|
}
|
||||||
|
Method { name: "showMaximized"; type: "QVariant" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,5 +89,6 @@ FluTooltip 1.0 Controls/FluTooltip.qml
|
|||||||
FluTour 1.0 Controls/FluTour.qml
|
FluTour 1.0 Controls/FluTour.qml
|
||||||
FluTreeView 1.0 Controls/FluTreeView.qml
|
FluTreeView 1.0 Controls/FluTreeView.qml
|
||||||
FluWindow 1.0 Controls/FluWindow.qml
|
FluWindow 1.0 Controls/FluWindow.qml
|
||||||
|
FluWindowDialog 1.0 Controls/FluWindowDialog.qml
|
||||||
|
|
||||||
plugin fluentuiplugin
|
plugin fluentuiplugin
|
||||||
|
@ -100,5 +100,6 @@
|
|||||||
<file>FluentUI/Controls/FluSplitLayout.qml</file>
|
<file>FluentUI/Controls/FluSplitLayout.qml</file>
|
||||||
<file>FluentUI/i18n/fluentuiplugin_en_US.qm</file>
|
<file>FluentUI/i18n/fluentuiplugin_en_US.qm</file>
|
||||||
<file>FluentUI/i18n/fluentuiplugin_zh_CN.qm</file>
|
<file>FluentUI/i18n/fluentuiplugin_zh_CN.qm</file>
|
||||||
|
<file>FluentUI/Controls/FluWindowDialog.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -50,7 +50,11 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
property var minClickListener: function(){
|
property var minClickListener: function(){
|
||||||
d.win.showMinimized()
|
if(d.win.transientParent != null){
|
||||||
|
d.win.transientParent.showMinimized()
|
||||||
|
}else{
|
||||||
|
d.win.showMinimized()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
property var closeClickListener : function(){
|
property var closeClickListener : function(){
|
||||||
d.win.close()
|
d.win.close()
|
||||||
|
24
src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml
Normal file
24
src/Qt6/imports/FluentUI/Controls/FluWindowDialog.qml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import FluentUI
|
||||||
|
|
||||||
|
FluWindow {
|
||||||
|
id:control
|
||||||
|
property Component contentDelegate
|
||||||
|
autoVisible: false
|
||||||
|
autoCenter: false
|
||||||
|
autoDestory: false
|
||||||
|
fixSize: true
|
||||||
|
Loader{
|
||||||
|
anchors.fill: parent
|
||||||
|
sourceComponent: control.visible ? control.contentDelegate : undefined
|
||||||
|
}
|
||||||
|
function showDialog(){
|
||||||
|
var x = transientParent.x + (transientParent.width - width)/2
|
||||||
|
var y = transientParent.y + (transientParent.height - height)/2
|
||||||
|
setGeometry(x,y,width,height)
|
||||||
|
visible = true
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user