2022-05-04 09:25:01 +00:00
|
|
|
import QtQuick 2.14
|
2023-05-04 10:01:59 +00:00
|
|
|
import QtQuick.Controls 2.13
|
2022-05-04 09:25:01 +00:00
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/brief Image icon and ulopad text hints for banner and logo
|
|
|
|
*/
|
2023-05-04 10:01:59 +00:00
|
|
|
Control {
|
2022-05-04 09:25:01 +00:00
|
|
|
id: root
|
|
|
|
|
2023-05-04 10:01:59 +00:00
|
|
|
/*!
|
|
|
|
\qmlproperty alias StatusImageSelector::uploadText.
|
|
|
|
This property holds the main image upload text value.
|
|
|
|
*/
|
|
|
|
property alias uploadText: uploadText.text
|
2022-05-04 09:25:01 +00:00
|
|
|
|
2023-05-04 10:01:59 +00:00
|
|
|
/*!
|
|
|
|
\qmlproperty alias StatusImageSelector::additionalText.
|
|
|
|
This property holds an additional text value.
|
|
|
|
*/
|
|
|
|
property alias additionalText: additionalText.text
|
2022-05-04 09:25:01 +00:00
|
|
|
|
2023-05-04 10:01:59 +00:00
|
|
|
/*!
|
|
|
|
\qmlproperty alias StatusImageSelector::showAdditionalInfo.
|
|
|
|
This property holds if the additional text is shown or not.
|
|
|
|
*/
|
|
|
|
property alias showAdditionalInfo: additionalText.visible
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\qmlproperty alias StatusImageSelector::additionalTextPixelSize.
|
|
|
|
This property holds the additional text font pixel size value.
|
|
|
|
*/
|
|
|
|
property alias additionalTextPixelSize: additionalText.font.pixelSize
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
readonly property int imageSelectorPadding: 75
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: ColumnLayout {
|
2022-05-04 09:25:01 +00:00
|
|
|
|
2022-05-04 13:40:45 +00:00
|
|
|
Image {
|
2022-05-04 09:25:01 +00:00
|
|
|
id: imageImg
|
|
|
|
source: Style.svg("images_icon")
|
|
|
|
width: 20
|
|
|
|
height: 18
|
2022-05-04 13:40:45 +00:00
|
|
|
sourceSize.width: width || undefined
|
|
|
|
sourceSize.height: height || undefined
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2022-05-04 09:25:01 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: uploadText
|
2023-05-04 10:01:59 +00:00
|
|
|
|
2022-05-04 09:25:01 +00:00
|
|
|
text: qsTr("Upload")
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.topMargin: 5
|
2023-05-04 10:01:59 +00:00
|
|
|
Layout.preferredWidth: root.width - 2 * d.imageSelectorPadding
|
|
|
|
font.pixelSize: Theme.primaryTextFontSize
|
2022-05-04 09:25:01 +00:00
|
|
|
color: Theme.palette.baseColor1
|
2023-05-04 10:01:59 +00:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
lineHeight: 1.2
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2022-05-04 09:25:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
2023-05-04 10:01:59 +00:00
|
|
|
id: additionalText
|
|
|
|
|
2022-05-04 09:25:01 +00:00
|
|
|
text: qsTr("Wide aspect ratio is optimal")
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
2023-05-04 10:01:59 +00:00
|
|
|
visible: false
|
2022-05-04 09:25:01 +00:00
|
|
|
Layout.topMargin: 5
|
2023-05-04 10:01:59 +00:00
|
|
|
font.pixelSize: Theme.primaryTextFontSize
|
2022-05-04 09:25:01 +00:00
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|