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 {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
RowLayout
{
id
:
topLevelRowLayout
width
:
parent
.
width
QGCFlickable
{
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
{
Layout.fillWidth
:
true
Repeater
{
model
:
_root
.
rows
Repeater
{
id
:
labelRepeater
model
:
object
GridLayout
{
id
:
valueGrid
Layout.preferredWidth
:
_root
.
width
rows
:
_root
.
rows
.
count
*
2
rowSpacing
:
0
property
real
_index
:
index
Repeater
{
model
:
_root
.
rows
InstrumentValueLabel
{
Layout.row
:
labelRepeater
.
_index
*
2
Layout.column
:
index
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
}
}
}
Repeater
{
id
:
labelRepeater
model
:
object
model
:
_root
.
rows
Repeater
{
id
:
valueRepeater
model
:
object
property
real
_index
:
index
property
real
_index
:
index
InstrumentValueLabel
{
Layout.row
:
labelRepeater
.
_index
*
2
Layout.column
:
index
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
InstrumentValueValue
{
Layout.row
:
valueRepeater
.
_index
*
2
+
1
Layout.column
:
index
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
}
}
}
}
Repeater
{
model
:
_root
.
rows
Repeater
{
id
:
valueRepeater
model
:
object
property
real
_index
:
index
RowLayout
{
id
:
rowButtons
height
:
ScreenTools
.
minTouchPixels
/
2
Layout.fillWidth
:
true
spacing
:
1
visible
:
settingsUnlocked
QGCButton
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
text
:
qsTr
(
"
+
"
)
onClicked
:
appendRow
()
}
InstrumentValueValue
{
Layout.row
:
valueRepeater
.
_index
*
2
+
1
Layout.column
:
index
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
instrumentValueData
:
object
}
QGCButton
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
text
:
qsTr
(
"
-
"
)
enabled
:
_root
.
rows
.
count
>
1
onClicked
:
deleteLastRow
()
}
}
}
RowLayout
{
id
:
rowButtons
height
:
ScreenTools
.
minTouchPixels
/
2
Layout.fillWidth
:
true
spacing
:
1
visible
:
settingsUnlocked
ColumnLayout
{
id
:
columnButtons
Layout.fillHeight
:
true
Layout.bottomMargin
:
rowButtons
.
height
width
:
ScreenTools
.
minTouchPixels
/
2
spacing
:
1
visible
:
settingsUnlocked
QGCButton
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
Layout.fillHeight
:
true
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
text
:
qsTr
(
"
+
"
)
onClicked
:
append
Row
()
onClicked
:
append
Column
()
}
QGCButton
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
parent
.
height
Layout.fillHeight
:
true
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
text
:
qsTr
(
"
-
"
)
enabled
:
_root
.
rows
.
c
ount
>
1
onClicked
:
deleteLast
Row
()
enabled
:
_root
.
columnC
ount
>
1
onClicked
:
deleteLast
Column
()
}
}
}
ColumnLayout
{
Layout.fillHeight
:
true
Layout.bottomMargin
:
rowButtons
.
height
width
:
ScreenTools
.
minTouchPixels
/
2
spacing
:
1
visible
:
settingsUnlocked
QGCButton
{
Layout.fillHeight
:
true
Layout.preferredHeight
:
ScreenTools
.
minTouchPixels
Layout.preferredWidth
:
parent
.
width
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
})
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
border.color: "green"
border.width: 1
color: "transparent"
}*/
}
}
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