|
|
@ -23,36 +23,78 @@ Item { |
|
|
|
property alias pageComponent: pageLoader.sourceComponent |
|
|
|
property alias pageComponent: pageLoader.sourceComponent |
|
|
|
property alias pageName: pageNameLabel.text |
|
|
|
property alias pageName: pageNameLabel.text |
|
|
|
property alias pageDescription: pageDescriptionLabel.text |
|
|
|
property alias pageDescription: pageDescriptionLabel.text |
|
|
|
|
|
|
|
property alias headerComponent: headerLoader.sourceComponent |
|
|
|
property real availableWidth: width - pageLoader.x |
|
|
|
property real availableWidth: width - pageLoader.x |
|
|
|
property real availableHeight: height - pageLoader.y |
|
|
|
property real availableHeight: height - mainContent.y |
|
|
|
|
|
|
|
property bool poped: false |
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
|
|
|
|
|
|
|
QGCFlickable { |
|
|
|
signal popout() |
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
contentWidth: pageLoader.x + pageLoader.item.width |
|
|
|
Loader { |
|
|
|
contentHeight: pageLoader.y + pageLoader.item.height |
|
|
|
id: headerLoader |
|
|
|
clip: true |
|
|
|
anchors.topMargin: _margins |
|
|
|
|
|
|
|
anchors.top: parent.top |
|
|
|
|
|
|
|
anchors.left: parent.left |
|
|
|
|
|
|
|
anchors.rightMargin: _margins |
|
|
|
|
|
|
|
anchors.right: floatIcon.left |
|
|
|
|
|
|
|
visible: !ScreenTools.isShortScreen && headerLoader.sourceComponent !== null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
Column { |
|
|
|
id: headingColumn |
|
|
|
id: headingColumn |
|
|
|
width: parent.width |
|
|
|
anchors.topMargin: _margins |
|
|
|
|
|
|
|
anchors.top: parent.top |
|
|
|
|
|
|
|
anchors.left: parent.left |
|
|
|
|
|
|
|
anchors.rightMargin: _margins |
|
|
|
|
|
|
|
anchors.right: floatIcon.left |
|
|
|
spacing: _margins |
|
|
|
spacing: _margins |
|
|
|
|
|
|
|
visible: !ScreenTools.isShortScreen && headerLoader.sourceComponent === null |
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
id: pageNameLabel |
|
|
|
id: pageNameLabel |
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
font.pointSize: ScreenTools.largeFontPointSize |
|
|
|
visible: !ScreenTools.isShortScreen |
|
|
|
visible: !poped |
|
|
|
} |
|
|
|
} |
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
id: pageDescriptionLabel |
|
|
|
id: pageDescriptionLabel |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
wrapMode: Text.WordWrap |
|
|
|
wrapMode: Text.WordWrap |
|
|
|
visible: !ScreenTools.isShortScreen |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCFlickable { |
|
|
|
|
|
|
|
id: mainContent |
|
|
|
|
|
|
|
anchors.topMargin: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
anchors.top: headerLoader.sourceComponent === null ? (headingColumn.visible ? headingColumn.bottom : parent.top) : headerLoader.bottom |
|
|
|
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
|
|
|
anchors.left: parent.left |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
contentWidth: pageLoader.x + pageLoader.item.width |
|
|
|
|
|
|
|
contentHeight: pageLoader.y + pageLoader.item.height |
|
|
|
|
|
|
|
clip: true |
|
|
|
Loader { |
|
|
|
Loader { |
|
|
|
id: pageLoader |
|
|
|
id: pageLoader |
|
|
|
anchors.topMargin: _margins |
|
|
|
|
|
|
|
anchors.top: headingColumn.bottom |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
|
|
|
id: floatIcon |
|
|
|
|
|
|
|
anchors.verticalCenter: headerLoader.visible ? headerLoader.verticalCenter : headingColumn.verticalCenter |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
width: ScreenTools.defaultFontPixelHeight * 2 |
|
|
|
|
|
|
|
height: width |
|
|
|
|
|
|
|
sourceSize.width: width |
|
|
|
|
|
|
|
source: "/qmlimages/FloatingWindow.svg" |
|
|
|
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
|
|
|
color: qgcPal.text |
|
|
|
|
|
|
|
visible: !poped && !ScreenTools.isMobile |
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
popout() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|