Compare commits

..

No commits in common. "6b9f7a1c9913714a147476d130eac34526b8030d" and "b4a1eaa8602fbdfd6b682ad310692fd6a61a9cee" have entirely different histories.

2 changed files with 56 additions and 36 deletions

View File

@ -266,18 +266,30 @@ Rectangle {
d.rowHoverIndex = row
}
onWidthChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onHeightChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onXChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onYChanged: {
updatePosition()
}
function updatePosition(){
if(editVisible){
updateEditPosition()
}
@ -298,11 +310,9 @@ Rectangle {
}
function updateTableItem(){
var columnModel = control.columnSource[column]
if(columnModel.x !== item_table_mouse.x || columnModel.y !== item_table_mouse.y){
columnModel.x = item_table_mouse.x
columnModel.y = item_table_mouse.y
d.tableItemLayout(column)
}
columnModel.x = item_table_mouse.x
columnModel.y = item_table_mouse.y
d.tableItemLayout(column)
}
Rectangle{
anchors.fill: parent
@ -342,7 +352,6 @@ Rectangle {
}
FluLoader{
id: item_table_loader
property var tableView: control
property var model: item_table_mouse._model
property var display: rowModel[columnModel.dataIndex]
property var rowModel : model.rowModel
@ -436,6 +445,10 @@ Rectangle {
}
}
onWidthChanged:{
table_view.forceLayout()
}
MouseArea{
id:layout_mouse_table
hoverEnabled: true
@ -466,9 +479,6 @@ Rectangle {
table_view.flick(0,1)
}
delegate: com_table_delegate
onWidthChanged: {
Qt.callLater(forceLayout)
}
}
}
@ -945,18 +955,18 @@ Rectangle {
target: d
function onTableItemLayout(column){
if(item_layout_frozen._index === column){
Qt.callLater(updateLayout)
updateLayout()
}
}
}
Connections{
target: table_view
function onContentXChanged(){
Qt.callLater(updateLayout)
updateLayout()
}
}
function updateLayout(){
width = Qt.binding(() => table_view.columnWidthProvider(_index))
width = table_view.columnWidthProvider(_index)
x = Qt.binding(function(){
var minX = 0
var maxX = table_view.width-width

View File

@ -266,18 +266,30 @@ Rectangle {
d.rowHoverIndex = row
}
onWidthChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onHeightChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onXChanged: {
updatePosition()
if(editVisible){
updateEditPosition()
}
if(isMainTable){
updateTableItem()
}
}
onYChanged: {
updatePosition()
}
function updatePosition(){
if(editVisible){
updateEditPosition()
}
@ -298,11 +310,9 @@ Rectangle {
}
function updateTableItem(){
var columnModel = control.columnSource[column]
if(columnModel.x !== item_table_mouse.x || columnModel.y !== item_table_mouse.y){
columnModel.x = item_table_mouse.x
columnModel.y = item_table_mouse.y
d.tableItemLayout(column)
}
columnModel.x = item_table_mouse.x
columnModel.y = item_table_mouse.y
d.tableItemLayout(column)
}
Rectangle{
anchors.fill: parent
@ -342,7 +352,6 @@ Rectangle {
}
FluLoader{
id: item_table_loader
property var tableView: control
property var model: item_table_mouse._model
property var display: rowModel[columnModel.dataIndex]
property var rowModel : model.rowModel
@ -436,6 +445,10 @@ Rectangle {
}
}
onWidthChanged:{
table_view.forceLayout()
}
MouseArea{
id:layout_mouse_table
hoverEnabled: true
@ -466,9 +479,6 @@ Rectangle {
table_view.flick(0,1)
}
delegate: com_table_delegate
onWidthChanged: {
Qt.callLater(forceLayout)
}
}
}
@ -945,18 +955,18 @@ Rectangle {
target: d
function onTableItemLayout(column){
if(item_layout_frozen._index === column){
Qt.callLater(updateLayout)
updateLayout()
}
}
}
Connections{
target: table_view
function onContentXChanged(){
Qt.callLater(updateLayout)
updateLayout()
}
}
function updateLayout(){
width = Qt.binding(() => table_view.columnWidthProvider(_index))
width = table_view.columnWidthProvider(_index)
x = Qt.binding(function(){
var minX = 0
var maxX = table_view.width-width