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
f35b2631
Commit
f35b2631
authored
Jan 01, 2020
by
Gus Grubba
Committed by
Lorenz Meier
Jan 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make charting on mobile official
UI tweaks
parent
2b28400e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
25 deletions
+10
-25
QGCApplication.cc
src/QGCApplication.cc
+0
-4
QGCApplication.h
src/QGCApplication.h
+1
-8
MAVLinkChart.qml
src/QmlControls/MAVLinkChart.qml
+3
-7
MAVLinkMessageButton.qml
src/QmlControls/MAVLinkMessageButton.qml
+6
-6
No files found.
src/QGCApplication.cc
View file @
f35b2631
...
@@ -157,11 +157,7 @@ static QObject* shapeFileHelperSingletonFactory(QQmlEngine*, QJSEngine*)
...
@@ -157,11 +157,7 @@ static QObject* shapeFileHelperSingletonFactory(QQmlEngine*, QJSEngine*)
}
}
QGCApplication
::
QGCApplication
(
int
&
argc
,
char
*
argv
[],
bool
unitTesting
)
QGCApplication
::
QGCApplication
(
int
&
argc
,
char
*
argv
[],
bool
unitTesting
)
#if defined(__mobile__)
:
QGuiApplication
(
argc
,
argv
)
#else
:
QApplication
(
argc
,
argv
)
:
QApplication
(
argc
,
argv
)
#endif
,
_runningUnitTests
(
unitTesting
)
,
_runningUnitTests
(
unitTesting
)
{
{
_app
=
this
;
_app
=
this
;
...
...
src/QGCApplication.h
View file @
f35b2631
...
@@ -43,20 +43,13 @@ class QGCFileDownload;
...
@@ -43,20 +43,13 @@ class QGCFileDownload;
*
*
* Needs QApplication base to support QtCharts module. This way
* Needs QApplication base to support QtCharts module. This way
* we avoid application crashing on 5.12 when using the module.
* we avoid application crashing on 5.12 when using the module.
* We don't have QtWidgets on mobile, avoid using it.
*
*
* Note: `lastWindowClosed` will be sent by MessageBox popups and other
* Note: `lastWindowClosed` will be sent by MessageBox popups and other
* dialogs, that are spawned in QML, when they are closed
* dialogs, that are spawned in QML, when they are closed
**/
**/
class
QGCApplication
:
class
QGCApplication
:
public
QApplication
#if defined(__mobile__)
public
QGuiApplication
#else
public
QApplication
#endif
{
{
Q_OBJECT
Q_OBJECT
public:
public:
QGCApplication
(
int
&
argc
,
char
*
argv
[],
bool
unitTesting
);
QGCApplication
(
int
&
argc
,
char
*
argv
[],
bool
unitTesting
);
~
QGCApplication
();
~
QGCApplication
();
...
...
src/QmlControls/MAVLinkChart.qml
View file @
f35b2631
...
@@ -58,7 +58,7 @@ ChartView {
...
@@ -58,7 +58,7 @@ ChartView {
tickCount
:
5
tickCount
:
5
gridVisible
:
true
gridVisible
:
true
labelsFont.family
:
"
Fixed
"
labelsFont.family
:
"
Fixed
"
labelsFont.p
ixel
Size
:
ScreenTools
.
smallFontPointSize
labelsFont.p
oint
Size
:
ScreenTools
.
smallFontPointSize
}
}
ValueAxis
{
ValueAxis
{
...
@@ -68,7 +68,7 @@ ChartView {
...
@@ -68,7 +68,7 @@ ChartView {
visible
:
chartController
!==
null
visible
:
chartController
!==
null
lineVisible
:
false
lineVisible
:
false
labelsFont.family
:
"
Fixed
"
labelsFont.family
:
"
Fixed
"
labelsFont.p
ixel
Size
:
ScreenTools
.
smallFontPointSize
labelsFont.p
oint
Size
:
ScreenTools
.
smallFontPointSize
}
}
Row
{
Row
{
...
@@ -88,7 +88,6 @@ ChartView {
...
@@ -88,7 +88,6 @@ ChartView {
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Scale:
"
);
text
:
qsTr
(
"
Scale:
"
);
font.pixelSize
:
ScreenTools
.
smallFontPointSize
Layout.alignment
:
Qt
.
AlignVCenter
Layout.alignment
:
Qt
.
AlignVCenter
}
}
QGCComboBox
{
QGCComboBox
{
...
@@ -98,12 +97,10 @@ ChartView {
...
@@ -98,12 +97,10 @@ ChartView {
model
:
controller
.
timeScales
model
:
controller
.
timeScales
currentIndex
:
chartController
?
chartController
.
rangeXIndex
:
0
currentIndex
:
chartController
?
chartController
.
rangeXIndex
:
0
onActivated
:
{
if
(
chartController
)
chartController
.
rangeXIndex
=
index
;
}
onActivated
:
{
if
(
chartController
)
chartController
.
rangeXIndex
=
index
;
}
font
.
pixelSize
:
ScreenTools
.
smallFontPointSize
Layout
.
alignment
:
Qt
.
AlignVCenter
Layout
.
alignment
:
Qt
.
AlignVCenter
}
}
QGCLabel
{
QGCLabel
{
text
:
qsTr
(
"
Range:
"
);
text
:
qsTr
(
"
Range:
"
);
font.pixelSize
:
ScreenTools
.
smallFontPointSize
Layout.alignment
:
Qt
.
AlignVCenter
Layout.alignment
:
Qt
.
AlignVCenter
}
}
QGCComboBox
{
QGCComboBox
{
...
@@ -113,7 +110,6 @@ ChartView {
...
@@ -113,7 +110,6 @@ ChartView {
model
:
controller
.
rangeList
model
:
controller
.
rangeList
currentIndex
:
chartController
?
chartController
.
rangeYIndex
:
0
currentIndex
:
chartController
?
chartController
.
rangeYIndex
:
0
onActivated
:
{
if
(
chartController
)
chartController
.
rangeYIndex
=
index
;
}
onActivated
:
{
if
(
chartController
)
chartController
.
rangeYIndex
=
index
;
}
font
.
pixelSize
:
ScreenTools
.
smallFontPointSize
Layout
.
alignment
:
Qt
.
AlignVCenter
Layout
.
alignment
:
Qt
.
AlignVCenter
}
}
}
}
...
@@ -124,7 +120,7 @@ ChartView {
...
@@ -124,7 +120,7 @@ ChartView {
QGCLabel
{
QGCLabel
{
text
:
modelData
.
label
text
:
modelData
.
label
color
:
chartView
.
series
(
index
).
color
color
:
chartView
.
series
(
index
).
color
font.p
ixel
Size
:
ScreenTools
.
smallFontPointSize
font.p
oint
Size
:
ScreenTools
.
smallFontPointSize
}
}
}
}
}
}
...
...
src/QmlControls/MAVLinkMessageButton.qml
View file @
f35b2631
...
@@ -16,13 +16,12 @@ import QGroundControl.ScreenTools 1.0
...
@@ -16,13 +16,12 @@ import QGroundControl.ScreenTools 1.0
Button
{
Button
{
id
:
control
id
:
control
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
autoExclusive
:
true
autoExclusive
:
true
leftPadding
:
ScreenTools
.
defaultFontPixelWidth
leftPadding
:
ScreenTools
.
defaultFontPixelWidth
rightPadding
:
leftPadding
rightPadding
:
leftPadding
property
real
_compIDWidth
:
ScreenTools
.
defaultFontPixelWidth
*
2.5
property
real
_compIDWidth
:
ScreenTools
.
defaultFontPixelWidth
*
3
property
real
_hzWidth
:
ScreenTools
.
defaultFontPixelWidth
*
5
property
real
_hzWidth
:
ScreenTools
.
defaultFontPixelWidth
*
6
property
real
_nameWidth
:
nameLabel
.
contentWidth
property
real
_nameWidth
:
nameLabel
.
contentWidth
background
:
Rectangle
{
background
:
Rectangle
{
...
@@ -40,22 +39,23 @@ Button {
...
@@ -40,22 +39,23 @@ Button {
QGCLabel
{
QGCLabel
{
text
:
control
.
compID
text
:
control
.
compID
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
font.pointSize
:
ScreenTools
.
smallFontPointSize
verticalAlignment
:
Text
.
AlignVCenter
Layout.minimumHeight
:
ScreenTools
.
isMobile
?
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
:
(
ScreenTools
.
defaultFontPixelHeight
*
1.5
)
Layout.minimumWidth
:
_compIDWidth
Layout.minimumWidth
:
_compIDWidth
}
}
QGCLabel
{
QGCLabel
{
id
:
nameLabel
id
:
nameLabel
text
:
control
.
text
text
:
control
.
text
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
font.pointSize
:
ScreenTools
.
smallFontPointSize
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignVCenter
}
}
QGCLabel
{
QGCLabel
{
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
text
:
messageHz
.
toFixed
(
1
)
+
'
Hz
'
text
:
messageHz
.
toFixed
(
1
)
+
'
Hz
'
font.pointSize
:
ScreenTools
.
smallFontPointSize
horizontalAlignment
:
Text
.
AlignRight
horizontalAlignment
:
Text
.
AlignRight
Layout.minimumWidth
:
_hzWidth
Layout.minimumWidth
:
_hzWidth
Layout.alignment
:
Qt
.
AlignVCenter
}
}
}
}
...
...
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