Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6547d68e
Commit
6547d68e
authored
Jul 19, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
74fb1dae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
88 deletions
+97
-88
VerticalFactValueGrid.qml
src/QmlControls/VerticalFactValueGrid.qml
+97
-88
No files found.
src/QmlControls/VerticalFactValueGrid.qml
View file @
6547d68e
...
@@ -32,128 +32,137 @@ T.VerticalFactValueGrid {
...
@@ -32,128 +32,137 @@ T.VerticalFactValueGrid {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
RowLayout
{
QGCFlickable
{
id
:
topLevelRowLayout
width
:
parent
.
width
width
:
parent
.
width
height
:
topLevelRowLayout
.
height
flickableDirection
:
QGCFlickable
.
HorizontalFlick
contentWidth
:
topLevelRowLayout
.
width
RowLayout
{
id
:
topLevelRowLayout
spacing
:
0
ColumnLayout
{
spacing
:
0
GridLayout
{
id
:
valueGrid
Layout.minimumWidth
:
_root
.
width
-
(
columnButtons
.
visible
?
columnButtons
.
width
+
columnSpacing
:
0
)
rows
:
_root
.
rows
.
count
*
2
rowSpacing
:
0
columnSpacing
:
5
ColumnLayout
{
Repeater
{
Layout.fillWidth
:
true
model
:
_root
.
rows
Repeater
{
id
:
labelRepeater
model
:
object
GridLayout
{
property
real
_index
:
index
id
:
valueGrid
Layout.preferredWidth
:
_root
.
width
rows
:
_root
.
rows
.
count
*
2
rowSpacing
:
0
Repeater
{
InstrumentValueLabel
{
model
:
_root
.
rows
Layout.row
:
labelRepeater
.
_index
*
2
Layout.column
:
index
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
}
}
}
Repeater
{
Repeater
{
id
:
labelRepeater
model
:
_root
.
rows
model
:
object
Repeater
{
id
:
valueRepeater
model
:
object
property
real
_index
:
index
property
real
_index
:
index
InstrumentValueLabel
{
InstrumentValueValue
{
Layout.row
:
labelRepeater
.
_index
*
2
Layout.row
:
valueRepeater
.
_index
*
2
+
1
Layout.column
:
index
Layout.column
:
index
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
instrumentValueData
:
object
}
}
}
}
}
}
}
Repeater
{
RowLayout
{
model
:
_root
.
rows
id
:
rowButtons
height
:
ScreenTools
.
minTouchPixels
/
2
Repeater
{
Layout.fillWidth
:
true
id
:
valueRepeater
spacing
:
1
model
:
object
visible
:
settingsUnlocked
property
real
_index
:
index
QGCButton
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
text
:
qsTr
(
"
+
"
)
onClicked
:
appendRow
()
}
InstrumentValueValue
{
QGCButton
{
Layout.row
:
valueRepeater
.
_index
*
2
+
1
Layout.fillWidth
:
true
Layout.column
:
index
Layout.preferredHeight
:
parent
.
height
Layout.fillWidth
:
true
text
:
qsTr
(
"
-
"
)
Layout.alignment
:
Qt
.
AlignHCenter
enabled
:
_root
.
rows
.
count
>
1
instrumentValueData
:
object
onClicked
:
deleteLastRow
()
}
}
}
}
}
}
}
RowLayout
{
ColumnLayout
{
id
:
rowButtons
id
:
columnButtons
height
:
ScreenTools
.
minTouchPixels
/
2
Layout.fillHeight
:
true
Layout.fillWidth
:
true
Layout.bottomMargin
:
rowButtons
.
height
spacing
:
1
width
:
ScreenTools
.
minTouchPixels
/
2
visible
:
settingsUnlocked
spacing
:
1
visible
:
settingsUnlocked
QGCButton
{
QGCButton
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.preferredHeight
:
parent
.
height
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
text
:
qsTr
(
"
+
"
)
text
:
qsTr
(
"
+
"
)
onClicked
:
append
Row
()
onClicked
:
append
Column
()
}
}
QGCButton
{
QGCButton
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.preferredHeight
:
parent
.
height
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
text
:
qsTr
(
"
-
"
)
text
:
qsTr
(
"
-
"
)
enabled
:
_root
.
rows
.
c
ount
>
1
enabled
:
_root
.
columnC
ount
>
1
onClicked
:
deleteLast
Row
()
onClicked
:
deleteLast
Column
()
}
}
}
}
}
}
ColumnLayout
{
QGCMouseArea
{
Layout.fillHeight
:
true
x
:
valueGrid
.
x
Layout.bottomMargin
:
rowButtons
.
height
y
:
valueGrid
.
y
width
:
ScreenTools
.
minTouchPixels
/
2
width
:
valueGrid
.
width
spacing
:
1
height
:
valueGrid
.
height
visible
:
settingsUnlocked
visible
:
settingsUnlocked
onClicked
:
{
QGCButton
{
var
item
=
valueGrid
.
childAt
(
mouse
.
x
,
mouse
.
y
)
Layout.fillHeight
:
true
//console.log(item, item ? item.instrumentValueData : "null", item && item.parent ? item.parent.instrumentValueData : "null")
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
if
(
item
&&
item
.
instrumentValueData
!==
undefined
)
{
Layout.preferredWidth
:
parent
.
width
mainWindow
.
showPopupDialogFromComponent
(
valueEditDialog
,
{
instrumentValueData
:
item
.
instrumentValueData
})
text
:
qsTr
(
"
+
"
)
}
onClicked
:
appendColumn
()
}
QGCButton
{
Layout.fillHeight
:
true
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
text
:
qsTr
(
"
-
"
)
enabled
:
_root
.
columnCount
>
1
onClicked
:
deleteLastColumn
()
}
}
}
QGCMouseArea
{
x
:
valueGrid
.
x
y
:
valueGrid
.
y
width
:
valueGrid
.
width
height
:
valueGrid
.
height
visible
:
settingsUnlocked
onClicked
:
{
var
item
=
valueGrid
.
childAt
(
mouse
.
x
,
mouse
.
y
)
//console.log(item, item ? item.instrumentValueData : "null", item && item.parent ? item.parent.instrumentValueData : "null")
if
(
item
&&
item
.
instrumentValueData
!==
undefined
)
{
mainWindow
.
showPopupDialogFromComponent
(
valueEditDialog
,
{
instrumentValueData
:
item
.
instrumentValueData
})
}
}
}
/*Rectangle {
/*Rectangle {
anchors.fill: parent
anchors.fill: parent
border.color: "green"
border.color: "green"
border.width: 1
border.width: 1
color: "transparent"
color: "transparent"
}*/
}*/
}
}
}
Component
{
Component
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment