forked from sanshao27/apktool
/
OutPut.qml
83 lines (76 loc) · 2.14 KB
/
OutPut.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import QtQuick 2.0
import QtQuick.Controls 1.4
Image {
id: root
property int fontSize: width/40 < 20?20:width/40
property color textColor: mc.colorValue("user/textColor")
property alias durationText: duration.text
property alias cmdText: command.text
property alias outputText: output.text
source: "qrc:/icons/bg.png"
MouseArea{
anchors.fill: parent
}
Text {
id: duration
x: 290
anchors.top: parent.top
anchors.topMargin: 8
anchors.horizontalCenter: parent.horizontalCenter
textFormat: Text.PlainText
wrapMode: Text.WordWrap
color: root.textColor
font.pixelSize: root.fontSize*2
}
Text {
id: command
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: duration.bottom
anchors.topMargin: 20
textFormat: Text.PlainText
wrapMode: Text.WordWrap
font.pixelSize: fontSize
color: root.textColor
}
TextArea {
id: output
anchors.bottom: button1.top
anchors.bottomMargin: 20
clip: true
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: command.bottom
anchors.topMargin: 20
activeFocusOnPress: false
readOnly: true
font.pixelSize: fontSize
backgroundVisible: false
textColor: root.textColor
}
MyButton {
id: button1
width: parent.width/3
height: parent.height/15
text: qsTr("Copy")
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
onClicked: {output.selectAll(); output.copy(); output.deselect();}
}
MyButton {
id: button2
width: parent.width/3
height: parent.height/15
text: qsTr("OK")
anchors.verticalCenter: button1.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 0
onClicked: root.destroy()
}
}