Skip to content

Commit

Permalink
问题修复
Browse files Browse the repository at this point in the history
修复在两台电脑系统时间不一致时,局域网文件传输功能不稳定的问题
修复多个功能模块内,文本编辑框不能上下移动的问题
  • Loading branch information
188080501 committed Jun 17, 2017
1 parent 0867997 commit 965265b
Show file tree
Hide file tree
Showing 30 changed files with 278 additions and 147 deletions.
63 changes: 47 additions & 16 deletions components/CalculateGroup/HashCalculate/qml/HashCalculate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,40 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForSource
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
selectionColor: "#2799f3"
contentWidth: textFieldForSource.paintedWidth
contentHeight: textFieldForSource.paintedHeight
clip: true

onTextChanged: {
if ( hashCalculate.changingFlag ) { return; }
TextEdit {
id: textFieldForSource
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"

hashCalculate.changingFlag = true;
onTextChanged: {
if ( hashCalculate.changingFlag ) { return; }

hashCalculateManage.setSource( textFieldForSource.text );
hashCalculate.changingFlag = true;

hashCalculate.changingFlag = false;
hashCalculateManage.setSource( textFieldForSource.text );

hashCalculate.changingFlag = false;
}
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForSource.focus

onClicked: {
textFieldForSource.focus = true;
}
}
}
Expand Down Expand Up @@ -133,16 +149,31 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForTarget
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
readOnly: true
selectionColor: "#2799f3"
contentWidth: textFieldForTarget.paintedWidth
contentHeight: textFieldForTarget.paintedHeight
clip: true

TextEdit {
id: textFieldForTarget
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForTarget.focus

onClicked: {
textFieldForTarget.focus = true;
}
}
}

Expand Down
64 changes: 52 additions & 12 deletions components/QtGroup/PropertyMaker/qml/PropertyMaker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ Item {
anchors.top: parent.top
anchors.topMargin: 20

onClicked: propertyMaker.make();
onClicked: {
if ( !propertyMaker.make() )
{
materialUI.showSnackbarMessage( "生成失败" );
return;
}

materialUI.showSnackbarMessage( "生成成功" );
}
}

MaterialButton {
Expand Down Expand Up @@ -118,18 +126,34 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForSource
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
text:
contentWidth: textFieldForSource.paintedWidth
contentHeight: textFieldForSource.paintedHeight
clip: true

TextEdit {
id: textFieldForSource
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"
text:
"Q_PROPERTY(QString name_ READ name WRITE setName RESET resetName NOTIFY nameChanged)
Q_PROPERTY(int age_ READ age WRITE setAge)"
selectionColor: "#2799f3"
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForSource.focus

onClicked: {
textFieldForSource.focus = true;
}
}
}

Expand Down Expand Up @@ -165,15 +189,31 @@ Q_PROPERTY(int age_ READ age WRITE setAge)"
color: "#ffffff"
}

TextEdit {
id: textFieldForTarget
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
selectionColor: "#2799f3"
contentWidth: textFieldForTarget.paintedWidth
contentHeight: textFieldForTarget.paintedHeight
clip: true

TextEdit {
id: textFieldForTarget
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForTarget.focus

onClicked: {
textFieldForTarget.focus = true;
}
}
}
}
27 changes: 22 additions & 5 deletions components/TextGroup/JsonFormat/qml/JsonFormat.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,32 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForSource
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
selectionColor: "#2799f3"
contentWidth: textFieldForSource.paintedWidth
contentHeight: textFieldForSource.paintedHeight
clip: true

TextEdit {
id: textFieldForSource
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"
text: "{}"
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForSource.focus

onClicked: {
textFieldForSource.focus = true;
}
}
}
}
72 changes: 52 additions & 20 deletions components/TextGroup/Utf16Transform/qml/Utf16Transform.qml
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,40 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForSource
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
selectionColor: "#2799f3"
contentWidth: textFieldForSource.paintedWidth
contentHeight: textFieldForSource.paintedHeight
clip: true

onTextChanged: {
if ( utf16Transform.changingFlag ) { return; }
TextEdit {
id: textFieldForSource
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"

utf16Transform.changingFlag = true;
onTextChanged: {
if ( utf16Transform.changingFlag ) { return; }

textFieldForTarget.text = utf16TransformManage.toUtf16( textFieldForSource.text );
utf16Transform.changingFlag = true;

utf16Transform.changingFlag = false;
textFieldForTarget.text = utf16TransformManage.toUtf16( textFieldForSource.text );

utf16Transform.changingFlag = false;
}
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForSource.focus

onClicked: {
textFieldForSource.focus = true;
}
}
}
Expand Down Expand Up @@ -143,24 +159,40 @@ Item {
color: "#ffffff"
}

TextEdit {
id: textFieldForTarget
Flickable {
x: 5
y: 5
width: parent.width - 10
height: parent.height - 10
wrapMode: TextInput.WrapAnywhere
selectByMouse: true
selectionColor: "#2799f3"
contentWidth: textFieldForTarget.paintedWidth
contentHeight: textFieldForTarget.paintedHeight
clip: true

onTextChanged: {
if ( utf16Transform.changingFlag ) { return; }
TextEdit {
id: textFieldForTarget
width: parent.width
height: parent.height
selectByMouse: true
selectionColor: "#2799f3"

utf16Transform.changingFlag = true;
onTextChanged: {
if ( utf16Transform.changingFlag ) { return; }

textFieldForSource.text = utf16TransformManage.fromUtf16( textFieldForTarget.text );
utf16Transform.changingFlag = true;

textFieldForSource.text = utf16TransformManage.fromUtf16( textFieldForTarget.text );

utf16Transform.changingFlag = false;
}
}
}

MouseArea {
anchors.fill: parent
visible: !textFieldForTarget.focus

utf16Transform.changingFlag = false;
onClicked: {
textFieldForTarget.focus = true;
}
}
}
Expand Down
Loading

0 comments on commit 965265b

Please sign in to comment.