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
8343b39a
Commit
8343b39a
authored
Dec 22, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow custom plugins to define the use of mobile file dialog regardless of the actual platform.
parent
a88e1c45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
QGCFileDialog.qml
src/QmlControls/QGCFileDialog.qml
+3
-3
QGCOptions.h
src/api/QGCOptions.h
+3
-0
No files found.
src/QmlControls/QGCFileDialog.qml
View file @
8343b39a
...
...
@@ -25,7 +25,7 @@ Item {
property
bool
_openForLoad
:
true
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
property
bool
_mobile
:
ScreenTools
.
isMobile
property
bool
_mobile
Dlg
:
QGroundControl
.
corePlugin
.
options
.
useMobileFileDialog
property
var
_rgExtensions
Component.onCompleted
:
{
...
...
@@ -39,7 +39,7 @@ Item {
function
openForLoad
()
{
_openForLoad
=
true
if
(
_mobile
&&
folder
.
length
!==
0
)
{
if
(
_mobile
Dlg
&&
folder
.
length
!==
0
)
{
qgcView
.
showDialog
(
mobileFileOpenDialog
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
else
{
fullFileDialog
.
open
()
...
...
@@ -48,7 +48,7 @@ Item {
function
openForSave
()
{
_openForLoad
=
false
if
(
_mobile
&&
folder
.
length
!==
0
)
{
if
(
_mobile
Dlg
&&
folder
.
length
!==
0
)
{
qgcView
.
showDialog
(
mobileFileSaveDialog
,
title
,
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
else
{
fullFileDialog
.
open
()
...
...
src/api/QGCOptions.h
View file @
8343b39a
...
...
@@ -44,6 +44,7 @@ public:
Q_PROPERTY
(
bool
multiVehicleEnabled
READ
multiVehicleEnabled
NOTIFY
multiVehicleEnabledChanged
)
Q_PROPERTY
(
bool
showOfflineMapExport
READ
showOfflineMapExport
NOTIFY
showOfflineMapExportChanged
)
Q_PROPERTY
(
bool
showOfflineMapImport
READ
showOfflineMapImport
NOTIFY
showOfflineMapImportChanged
)
Q_PROPERTY
(
bool
useMobileFileDialog
READ
useMobileFileDialog
CONSTANT
)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
...
...
@@ -80,9 +81,11 @@ public:
#if defined(__mobile__)
virtual
bool
showOfflineMapExport
()
const
{
return
false
;
}
virtual
bool
showOfflineMapImport
()
const
{
return
false
;
}
virtual
bool
useMobileFileDialog
()
const
{
return
true
;}
#else
virtual
bool
showOfflineMapExport
()
const
{
return
true
;
}
virtual
bool
showOfflineMapImport
()
const
{
return
true
;
}
virtual
bool
useMobileFileDialog
()
const
{
return
false
;}
#endif
/// If returned QString in non-empty it means that firmware upgrade will run in a mode which only
...
...
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