docs: 添加涉密文件自检工具实施计划
This commit is contained in:
137
UmiOCR-data/qt_res/qml/TabPages/About/About.qml
Normal file
137
UmiOCR-data/qt_res/qml/TabPages/About/About.qml
Normal file
@@ -0,0 +1,137 @@
|
||||
// ===================================================
|
||||
// =============== 功能页:关于/检查更新 ===============
|
||||
// ===================================================
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import ".."
|
||||
import "../../Widgets"
|
||||
|
||||
TabPage {
|
||||
id: tabPage
|
||||
|
||||
Panel{
|
||||
anchors.fill: parent
|
||||
anchors.margins: size_.line
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
anchors.margins: size_.spacing
|
||||
anchors.leftMargin: size_.line * 2
|
||||
anchors.rightMargin: size_.line * 2
|
||||
contentWidth: width
|
||||
clip: true
|
||||
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: size_.spacing * 2
|
||||
spacing: size_.spacing
|
||||
clip: true
|
||||
|
||||
// ==================== 标题 ====================
|
||||
|
||||
Image {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: size_.line * 10
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "../../../images/Umi-OCR_logo_full.png"
|
||||
}
|
||||
Text_ {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: qsTr("开源、免费的离线OCR软件")
|
||||
}
|
||||
SplitLine {}
|
||||
|
||||
// ==================== 软件 / 项目信息 ====================
|
||||
|
||||
Text_ {text: qsTr("当前版本") + " • " + UmiAbout.version.string}
|
||||
UrlList {
|
||||
title: qsTr("项目链接")
|
||||
urlList: [
|
||||
{text:qsTr("官方网站"), url:UmiAbout.url.home},
|
||||
{text:qsTr("插件拓展"), url:UmiAbout.url.plugins},
|
||||
{text:qsTr("问题反馈"), url:UmiAbout.url.issue},
|
||||
]
|
||||
}
|
||||
UrlList {
|
||||
title: qsTr("发布地址")
|
||||
urlList: [
|
||||
{text:"Github", url:"https://github.com/hiroi-sora/Umi-OCR/releases/latest"},
|
||||
{text:"Source Forge", url:"https://sourceforge.net/projects/umi-ocr"},
|
||||
{text:"Lanzou (蓝奏云)", url:"https://hiroi-sora.lanzoul.com/s/umi-ocr"},
|
||||
]
|
||||
}
|
||||
UrlList {
|
||||
title: qsTr("许可协议")
|
||||
urlList: [
|
||||
{text:UmiAbout.license.type, url:UmiAbout.license.url},
|
||||
]
|
||||
}
|
||||
SplitLine {}
|
||||
|
||||
// ==================== 开发者 ====================
|
||||
|
||||
UrlList {
|
||||
title: qsTr("作者")
|
||||
urlList: (() => {
|
||||
let as = UmiAbout.authors, t = []
|
||||
for(const i in as)
|
||||
t.push({ text: as[i].name, url: as[i].url, })
|
||||
return t
|
||||
})()
|
||||
}
|
||||
Text_ {text: qsTr("译者")}
|
||||
Repeater {
|
||||
model: UmiAbout.localization
|
||||
|
||||
UrlList {
|
||||
anchors.leftMargin: size_.line * 2
|
||||
textSize: size_.smallText
|
||||
title: UmiAbout.localization[index].language
|
||||
urlList: (() => {
|
||||
let as = UmiAbout.localization[index].translators, t = []
|
||||
for(const i in as)
|
||||
t.push({ text: as[i].name, url: as[i].url, })
|
||||
return t
|
||||
})()
|
||||
}
|
||||
}
|
||||
SplitLine {}
|
||||
|
||||
// ==================== 系统 / Debug信息 ====================
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
Text_ {
|
||||
font.pixelSize: size_.smallText
|
||||
height: size_.smallLine + size_.spacing*2
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("运行环境信息(如需请求协助,请提供给开发者)")
|
||||
}
|
||||
Button_ {
|
||||
height: size_.smallLine + size_.spacing*2
|
||||
textSize: size_.smallText
|
||||
text_: qsTr("复制")
|
||||
textColor_: theme.yesColor
|
||||
onClicked: {
|
||||
const info = JSON.stringify(UmiAbout.app, null, 2)
|
||||
qmlapp.utilsConnector.copyText(info)
|
||||
}
|
||||
}
|
||||
}
|
||||
Text_ {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: size_.line * 2
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: size_.smallText
|
||||
text: JSON.stringify(UmiAbout.app, null, 2)
|
||||
}
|
||||
|
||||
Item {width: 1; height: size_.line}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
17
UmiOCR-data/qt_res/qml/TabPages/About/SplitLine.qml
Normal file
17
UmiOCR-data/qt_res/qml/TabPages/About/SplitLine.qml
Normal file
@@ -0,0 +1,17 @@
|
||||
// 分割线
|
||||
|
||||
import QtQuick 2.15
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: size_.line * 2
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 2
|
||||
color: theme.coverColor2
|
||||
}
|
||||
}
|
||||
35
UmiOCR-data/qt_res/qml/TabPages/About/UrlButton.qml
Normal file
35
UmiOCR-data/qt_res/qml/TabPages/About/UrlButton.qml
Normal file
@@ -0,0 +1,35 @@
|
||||
// 网页链接按钮
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import "../../Widgets"
|
||||
|
||||
Button_ {
|
||||
id: btn
|
||||
property string url: ""
|
||||
// toolTip: url
|
||||
height: size_.text + size_.spacing * 2
|
||||
bgHoverColor_: theme.coverColor1
|
||||
|
||||
contentItem: Text_ {
|
||||
text: btn.text_
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: theme.specialTextColor
|
||||
|
||||
// 手动绘制下划线,减少抖动现象。不使用 font.underline
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: -2
|
||||
height: 1
|
||||
color: theme.specialTextColor
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(url)
|
||||
}
|
||||
}
|
||||
45
UmiOCR-data/qt_res/qml/TabPages/About/UrlList.qml
Normal file
45
UmiOCR-data/qt_res/qml/TabPages/About/UrlList.qml
Normal file
@@ -0,0 +1,45 @@
|
||||
// 链接水平列表
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import ".."
|
||||
import "../../Widgets"
|
||||
|
||||
Item {
|
||||
id: uRoot
|
||||
property string title: ""
|
||||
property var urlList: [] // {"text", "url"}
|
||||
property int textSize: size_.text
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: flow.height
|
||||
|
||||
Text_ {
|
||||
id: lText
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
height: textSize + size_.spacing * 2
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: title + " • "
|
||||
font.pixelSize: textSize
|
||||
}
|
||||
|
||||
Flow {
|
||||
id: flow
|
||||
anchors.left: lText.right
|
||||
anchors.right: parent.right
|
||||
spacing: 0
|
||||
Repeater {
|
||||
model: urlList
|
||||
|
||||
UrlButton {
|
||||
height: textSize + size_.spacing * 2
|
||||
text_: urlList[index].text
|
||||
url: urlList[index].url
|
||||
textSize: uRoot.textSize
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user