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
d009c117
Commit
d009c117
authored
Jun 06, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3491 from DonLakeFlyer/PlanViewSmallScreen
Plan view small screen fixes
parents
9bef0830
c93ab24d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
82 additions
and
82 deletions
+82
-82
FactTextField.qml
src/FactSystem/FactControls/FactTextField.qml
+12
-10
FactMetaData.cc
src/FactSystem/FactMetaData.cc
+2
-2
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+2
-2
MavCmdInfoFixedWing.json
src/FirmwarePlugin/APM/MavCmdInfoFixedWing.json
+13
-13
MavCmdInfoMultiRotor.json
src/FirmwarePlugin/APM/MavCmdInfoMultiRotor.json
+3
-3
MavCmdInfoFixedWing.json
src/FirmwarePlugin/PX4/MavCmdInfoFixedWing.json
+13
-13
MavCmdInfoMultiRotor.json
src/FirmwarePlugin/PX4/MavCmdInfoMultiRotor.json
+1
-1
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+0
-1
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+21
-21
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+1
-1
MissionItemEditor.qml
src/QmlControls/MissionItemEditor.qml
+1
-1
QGCTextField.qml
src/QmlControls/QGCTextField.qml
+2
-3
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+11
-11
No files found.
src/FactSystem/FactControls/FactTextField.qml
View file @
d009c117
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCTextField
{
id
:
_textField
...
...
@@ -19,8 +19,10 @@ QGCTextField {
property
string
_validateString
// At this point all Facts are numeric
validator
:
DoubleValidator
{}
inputMethodHints
:
Qt
.
ImhFormattedNumbersOnly
validator
:
DoubleValidator
{}
inputMethodHints
:
ScreenTools
.
isiOS
?
Qt
.
ImhNone
:
// iOS numeric keyboard has not done button, we can't use eit
Qt
.
ImhFormattedNumbersOnly
// Forces use of virtual numeric keyboard
onEditingFinished
:
{
if
(
typeof
qgcView
!==
'
undefined
'
&&
qgcView
)
{
...
...
src/FactSystem/FactMetaData.cc
View file @
d009c117
...
...
@@ -23,8 +23,8 @@
// Built in translations for all Facts
const
FactMetaData
::
BuiltInTranslation_s
FactMetaData
::
_rgBuiltInTranslations
[]
=
{
{
"centi-degrees"
,
"deg
rees
"
,
FactMetaData
::
_centiDegreesToDegrees
,
FactMetaData
::
_degreesToCentiDegrees
},
{
"radians"
,
"deg
rees
"
,
FactMetaData
::
_radiansToDegrees
,
FactMetaData
::
_degreesToRadians
},
{
"centi-degrees"
,
"deg"
,
FactMetaData
::
_centiDegreesToDegrees
,
FactMetaData
::
_degreesToCentiDegrees
},
{
"radians"
,
"deg"
,
FactMetaData
::
_radiansToDegrees
,
FactMetaData
::
_degreesToRadians
},
{
"norm"
,
"%"
,
FactMetaData
::
_normToPercent
,
FactMetaData
::
_percentToNorm
},
};
...
...
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
d009c117
...
...
@@ -18,7 +18,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25.0
,
"decimalPlaces"
:
2
}
...
...
@@ -42,7 +42,7 @@
"category"
:
"VTOL"
,
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
...
...
src/FirmwarePlugin/APM/MavCmdInfoFixedWing.json
View file @
d009c117
...
...
@@ -11,13 +11,13 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
0
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -32,13 +32,13 @@
"category"
:
"Loiter"
,
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -58,13 +58,13 @@
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -79,19 +79,19 @@
"category"
:
"Loiter"
,
"param1"
:
{
"label"
:
"Seconds:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
1
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -106,7 +106,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Abort Alt:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25
,
"decimalPlaces"
:
0
},
...
...
@@ -118,7 +118,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0
,
"decimalPlaces"
:
1
}
...
...
@@ -145,7 +145,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25
,
"decimalPlaces"
:
0
}
...
...
@@ -159,7 +159,7 @@
"param1"
:
{
"label"
:
"Distance:"
,
"default"
:
25
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"decimalPlaces"
:
1
}
}
...
...
src/FirmwarePlugin/APM/MavCmdInfoMultiRotor.json
View file @
d009c117
...
...
@@ -12,7 +12,7 @@
"category"
:
"Basic"
,
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25.0
,
"decimalPlaces"
:
2
}
...
...
@@ -41,7 +41,7 @@
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
10.0
,
"decimalPlaces"
:
2
}
...
...
@@ -56,7 +56,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
0
}
...
...
src/FirmwarePlugin/PX4/MavCmdInfoFixedWing.json
View file @
d009c117
...
...
@@ -11,13 +11,13 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
0
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -32,13 +32,13 @@
"category"
:
"Loiter"
,
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -58,13 +58,13 @@
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -79,19 +79,19 @@
"category"
:
"Loiter"
,
"param1"
:
{
"label"
:
"Seconds:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
1
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
0
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
50
,
"decimalPlaces"
:
0
}
...
...
@@ -106,7 +106,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Abort Alt:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25
,
"decimalPlaces"
:
0
},
...
...
@@ -118,7 +118,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0
,
"decimalPlaces"
:
1
}
...
...
@@ -145,7 +145,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25
,
"decimalPlaces"
:
0
}
...
...
@@ -159,7 +159,7 @@
"param1"
:
{
"label"
:
"Distance:"
,
"default"
:
25
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"decimalPlaces"
:
1
}
}
...
...
src/FirmwarePlugin/PX4/MavCmdInfoMultiRotor.json
View file @
d009c117
...
...
@@ -35,7 +35,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
0
}
...
...
src/MissionEditor/MissionEditor.qml
View file @
d009c117
...
...
@@ -39,7 +39,6 @@ QGCView {
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelOpacity
:
0.8
readonly
property
int
_toolButtonCount
:
6
...
...
src/MissionManager/MavCmdInfoCommon.json
View file @
d009c117
...
...
@@ -32,7 +32,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
0
,
"decimalPlaces"
:
0
}
...
...
@@ -47,7 +47,7 @@
"category"
:
"Loiter"
,
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
10.0
,
"decimalPlaces"
:
2
}
...
...
@@ -67,7 +67,7 @@
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
10.0
,
"decimalPlaces"
:
2
}
...
...
@@ -82,13 +82,13 @@
"category"
:
"Loiter"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
0
},
"param3"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
10.0
,
"decimalPlaces"
:
2
}
...
...
@@ -111,7 +111,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Abort Alt:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
25.0
,
"decimalPlaces"
:
3
},
...
...
@@ -123,7 +123,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
...
...
@@ -169,7 +169,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
55
,
"decimalPlaces"
:
2
}
...
...
@@ -191,7 +191,7 @@
},
"param2"
:
{
"label"
:
"Radius:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
10.0
,
"decimalPlaces"
:
2
}
...
...
@@ -264,7 +264,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
0
,
"decimalPlaces"
:
0
}
...
...
@@ -301,7 +301,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
...
...
@@ -326,7 +326,7 @@
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Hold:"
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"default"
:
30
,
"decimalPlaces"
:
0
}
...
...
@@ -345,7 +345,7 @@
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
55
,
"decimalPlaces"
:
2
}
...
...
@@ -358,7 +358,7 @@
"category"
:
"Conditionals"
,
"param1"
:
{
"label"
:
"Distance:"
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"default"
:
0
,
"decimalPlaces"
:
2
}
...
...
@@ -488,7 +488,7 @@
"param3"
:
{
"label"
:
"Time:"
,
"default"
:
10
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"decimalPlaces"
:
0
}
},
...
...
@@ -533,7 +533,7 @@
"param4"
:
{
"label"
:
"Time:"
,
"default"
:
10
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"decimalPlaces"
:
0
}
},
...
...
@@ -734,7 +734,7 @@
"param1"
:
{
"label"
:
"Distance:"
,
"default"
:
25
,
"units"
:
"m
eters
"
,
"units"
:
"m"
,
"decimalPlaces"
:
2
}
},
...
...
@@ -818,25 +818,25 @@
"param1"
:
{
"label"
:
"Timeout:"
,
"default"
:
0
,
"units"
:
"sec
ond
s"
,
"units"
:
"secs"
,
"decimalPlaces"
:
0
},
"param2"
:
{
"label"
:
"Min Alt:"
,
"default"
:
25
,
"units"
:
"m
(AMSL)
"
,
"units"
:
"m"
,
"decimalPlaces"
:
2
},
"param3"
:
{
"label"
:
"Max Alt:"
,
"units"
:
"m
(AMSL)
"
,
"units"
:
"m"
,
"default"
:
100
,
"decimalPlaces"
:
2
},
"param4"
:
{
"label"
:
"H Limit:"
,
"default"
:
25
,
"units"
:
"m
(AMSL)
"
,
"units"
:
"m"
,
"decimalPlaces"
:
2
}
},
...
...
src/MissionManager/SimpleMissionItem.cc
View file @
d009c117
...
...
@@ -191,7 +191,7 @@ void SimpleMissionItem::_setupMetaData(void)
if
(
!
_altitudeMetaData
)
{
_altitudeMetaData
=
new
FactMetaData
(
FactMetaData
::
valueTypeDouble
);
_altitudeMetaData
->
setRawUnits
(
"m
eters
"
);
_altitudeMetaData
->
setRawUnits
(
"m"
);
_altitudeMetaData
->
setDecimalPlaces
(
2
);
_altitudeMetaData
->
setAppSettingsTranslators
();
...
...
src/QmlControls/MissionItemEditor.qml
View file @
d009c117
...
...
@@ -30,7 +30,7 @@ Rectangle {
property
bool
_currentItem
:
missionItem
.
isCurrentItem
property
color
_outerTextColor
:
_currentItem
?
"
black
"
:
qgcPal
.
text
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
1
6
)
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
1
2
)
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_radius
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
src/QmlControls/QGCTextField.qml
View file @
d009c117
...
...
@@ -20,15 +20,14 @@ TextField {
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
textColor
:
__qgcPal
.
textFieldText
height
:
ScreenTools
.
isMobile
?
Math
.
max
(
25
,
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
*
2
))
:
Math
.
max
(
25
,
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
*
1.2
))
height
:
Math
.
round
(
Math
.
max
(
25
,
ScreenTools
.
defaultFontPixelHeight
*
(
ScreenTools
.
isMobile
?
2.5
:
1.2
)
))
Label
{
QGC
Label
{
id
:
unitsLabelWidthGenerator
text
:
unitsLabel
width
:
contentWidth
+
parent
.
__contentHeight
*
0.666
visible
:
false
antialiasing
:
true
font.family
:
ScreenTools
.
normalFontFamily
}
style
:
TextFieldStyle
{
...
...
src/QmlControls/ScreenTools.qml
View file @
d009c117
...
...
@@ -84,20 +84,20 @@ Item {
//-- Init base size base on the platform
if
(
ScreenToolsController
.
isMobile
)
{
//-- Check iOS really tiny screens (iPhone 4s/5/5s)
if
(
ScreenToolsController
.
isiOS
&&
Screen
.
width
<
570
)
baseSize
=
9
;
//-- iPhone 6/6s)
else
if
(
ScreenToolsController
.
isiOS
&&
Screen
.
width
<
670
)
baseSize
=
10
;
// Larger iOS (6/6s Plus or iPad)
else
if
(
ScreenToolsController
.
isiOS
)
baseSize
=
13
;
// Small Android Devices
else
if
((
Screen
.
width
/
Screen
.
pixelDensity
)
<
120
)
if
(
ScreenToolsController
.
isiOS
)
{
if
(
ScreenToolsController
.
isiOS
&&
Screen
.
width
<
570
)
{
// For iPhone 4s size we don't fit with additional tweaks to fit screen,
// we will just drop point size to make things fit. Correct size not yet determined.
baseSize
=
12
;
// This will be lowered in a future pull
}
else
{
baseSize
=
12
;
}
}
else
if
((
Screen
.
width
/
Screen
.
pixelDensity
)
<
120
)
{
baseSize
=
11
;
// Other Android
else
}
else
{
baseSize
=
14
;
}
}
else
{
//-- Mac OS
if
(
ScreenToolsController
.
isMacOS
)
...
...
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