Skip to content

Commit

Permalink
update Table descript
Browse files Browse the repository at this point in the history
  • Loading branch information
jared2020 committed Oct 29, 2020
1 parent d2cb10b commit 10c011f
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 29 deletions.
25 changes: 15 additions & 10 deletions examples/TaoQuickShow/Contents/General/Tables.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Item {
Item {
id: mainItem
width: 800
height: 600
height: 500
anchors{
centerIn: parent
verticalCenterOffset: -100
Expand Down Expand Up @@ -133,29 +133,34 @@ Item {
topMargin: 4
}
CusLabel {
text: qsTr("Table has these feature:") + trans.transString
text: qsTr("Table has these features:") + trans.transString
}
CusLabel {
text: qsTr(" 1. select by 'mouse click', 'Ctrl + click' for Multi-select, 'Shift + click' for Continue-select") + trans.transString
text: qsTr(" * Select row by 'mouse click', 'Ctrl + click' for Multi-select, 'Shift + click' for Continue-select") + trans.transString
}
CusLabel {
text: qsTr(" 2. mouse press and move can drag rect and select rows above rect") + trans.transString
text: qsTr(" * Draw rect select, mouse press and move can draw a rect, then these rows above rect will be selected") + trans.transString
}
CusLabel {
text: qsTr(" 3. Ctrl + A for select all, Esc for deselect all") + trans.transString
text: qsTr(" * Ctrl + A for select all, Esc for deselect all") + trans.transString
}
CusLabel {
text: qsTr(" 4. column width can be reset by drag header splite line") + trans.transString
text: qsTr(" * Check row by CheckBox in Column 0; Check/unchecked multi rows flow selected rows") + trans.transString
}
CusLabel {
text: qsTr(" 5. Table can be sort by click header, click again switch Ascending or descending") + trans.transString
text: qsTr(" * Check All rows by header of Column 0") + trans.transString
}
CusLabel {
text: qsTr(" * Edit Column 1 by double click, and update data to model after edit") + trans.transString
}
CusLabel {
text: qsTr(" * Fuzzy search") + trans.transString
}

CusLabel {
text: qsTr(" 6. Column 1 can be edit by double click, and update data to model after edit") + trans.transString
text: qsTr(" * Reset column width by drag header splite line") + trans.transString
}
CusLabel {
text: qsTr(" 7. fuzzy search") + trans.transString
text: qsTr(" * Sort by click header, click again can switch ascending or descending") + trans.transString
}
}
}
38 changes: 23 additions & 15 deletions examples/TaoQuickShow/Trans/language_zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,36 +546,44 @@
"value": "特殊功能的按钮,例如 向导按钮、查看源码按钮等等"
},
{
"key": "Table has these feature:",
"key": "Table has these features:",
"value": "表格具有以下特性:"
},
{
"key": " 1. select by 'mouse click', 'Ctrl + click' for Multi-select, 'Shift + click' for Continue-select",
"value": " 1、 鼠标点击选中,Ctrl + 鼠标点击 多选,Shift + 鼠标点击连续选中"
"key": " * Select row by 'mouse click', 'Ctrl + click' for Multi-select, 'Shift + click' for Continue-select",
"value": " * 鼠标点击选中,Ctrl + 鼠标点击 多选,Shift + 鼠标点击连续选中"
},
{
"key": " 2. mouse press and move can drag rect and select rows above rect",
"value": " 2、鼠标按下并移动,可以画框并框选"
"key": " * Draw rect select, mouse press and move can draw a rect, then these rows above rect will be selected",
"value": " * 框选,鼠标按下并拖动会画框,框内的行可以被选中"
},
{
"key": " 3. Ctrl + A for select all, Esc for deselect all",
"value": " 3、Ctrl + A 全选, Esc全反选"
"key": " * Ctrl + A for select all, Esc for deselect all",
"value": " * Ctrl + A 全选, Esc 反选"
},
{
"key": " 4. column width can be reset by drag header splite line",
"value": " 4、拖动表头的间隔线可以重新设置列宽"
"key": " * Check row by CheckBox in Column 0; Check/unchecked multi rows flow selected rows",
"value": " * 0列的勾选框可以勾选行;选中多行时,可以勾选/反勾选多行"
},
{
"key": " 5. Table can be sort by click header, click again switch Ascending or descending",
"value": " 5、表格可以点击表头进行排序,再次点击切换升序或降序"
"key": " * Check All rows by header of Column 0",
"value": " * 0列的表头可以勾选所有"
},
{
"key": " 6. Column 1 can be edit by double click, and update data to model after edit",
"value": " 6、第一列可以双击编辑,编辑完成后能够把数据更新到model"
"key": " * Edit Column 1 by double click, and update data to model after edit",
"value": " * 列1可以双击编辑,编辑完成后能够把数据更新到model"
},
{
"key": " 7. fuzzy search",
"value": " 7、模糊查找"
"key": " * Fuzzy search",
"value": " * 模糊查找"
},
{
"key": " * Sort by click header, click again can switch ascending or descending",
"value": " * 点击表头可以排序,再次点击切换升序或降序"
},
{
"key": " * Reset column width by drag header splite line",
"value": " * 拖动表头间隔,可以设置列宽"
}
]
}
Binary file modified preview/Table-en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/Table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CheckBox {
} else if (cusCheckBox.hovered) {
return colorHovered
} else {
return colorNormal
return colorPressed
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ Item {
id: checkAllBox
anchors.verticalCenter: parent.verticalCenter
x: 6
height: 24
height: 20
width: height
indicator.width: 20
indicator.height: 20
property bool notify: true
onCheckedChanged: {
if (notify) {
Expand Down
6 changes: 4 additions & 2 deletions src/TaoQuick/imports/TaoQuick/Qml/CusTable/CusTableRow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Rectangle {
property color textColor: CusConfig.textColor

signal checkedChanged(bool checked)
color: isSelected ? CusConfig.controlColor_pressed : ( isAlternate ? CusConfig.controlColor : Qt.darker(CusConfig.controlColor, 1.1) )
color: isSelected ? CusConfig.controlColor_pressed : ( isAlternate ? CusConfig.controlColor : Qt.lighter(CusConfig.controlColor, 1.1) )
Item {
id: checkBoxItem
width: widthList[0]
Expand All @@ -34,8 +34,10 @@ Rectangle {
id: checkBox
anchors.verticalCenter: parent.verticalCenter
x: 6
height: 24
height: 20
width: height
indicator.width: 20
indicator.height: 20
property bool notify: true
onCheckedChanged: {
if(notify) {
Expand Down

0 comments on commit 10c011f

Please sign in to comment.