2023-08-24 15:50:37 +08:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Window
|
|
|
|
import FluentUI
|
2024-01-25 17:26:50 +08:00
|
|
|
import "../component"
|
2023-08-24 15:50:37 +08:00
|
|
|
|
|
|
|
FluContentPage{
|
|
|
|
|
2024-03-09 15:35:48 +08:00
|
|
|
title: qsTr("Watermark")
|
2023-08-24 15:50:37 +08:00
|
|
|
|
|
|
|
FluArea{
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin: 20
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
anchors{
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: 14
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
Layout.topMargin: 14
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "text:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluTextBox{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: text_box
|
|
|
|
text: "会磨刀的小猪"
|
2023-11-24 22:05:53 +08:00
|
|
|
Layout.preferredWidth: 240
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "textSize:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: slider_text_size
|
2023-08-24 15:50:37 +08:00
|
|
|
value: 20
|
|
|
|
from: 13
|
|
|
|
to:50
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "gapX:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
|
|
|
id:slider_gap_x
|
|
|
|
value: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "gapY:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: slider_gap_y
|
2023-08-24 15:50:37 +08:00
|
|
|
value: 100
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "offsetX:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
|
|
|
id:slider_offset_x
|
|
|
|
value: 50
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "offsetY:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: slider_offset_y
|
2023-08-24 15:50:37 +08:00
|
|
|
value: 50
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "rotate:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluSlider{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: slider_rotate
|
2023-08-24 15:50:37 +08:00
|
|
|
value: 22
|
|
|
|
from: 0
|
|
|
|
to:360
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout{
|
|
|
|
spacing: 10
|
|
|
|
FluText{
|
2024-03-09 15:35:48 +08:00
|
|
|
text: "textColor:"
|
2023-08-24 15:50:37 +08:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
}
|
|
|
|
FluColorPicker{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: color_picker
|
2024-03-06 00:34:43 +08:00
|
|
|
current: Qt.rgba(0,0,0,0.1)
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FluWatermark{
|
2024-03-09 15:35:48 +08:00
|
|
|
id: water_mark
|
2023-08-24 15:50:37 +08:00
|
|
|
anchors.fill: parent
|
|
|
|
text:text_box.text
|
2024-03-06 00:34:43 +08:00
|
|
|
textColor: color_picker.current
|
2023-08-24 15:50:37 +08:00
|
|
|
textSize: slider_text_size.value
|
|
|
|
rotate: slider_rotate.value
|
|
|
|
gap:Qt.point(slider_gap_x.value,slider_gap_y.value)
|
|
|
|
offset: Qt.point(slider_offset_x.value,slider_offset_y.value)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|