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
c208d174
Commit
c208d174
authored
Aug 15, 2017
by
Don Gagne
Committed by
GitHub
Aug 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5573 from DonLakeFlyer/CustomMapItems
QGCCorePlugin::customMapItems support
parents
2f015a77
f11971c6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
122 additions
and
50 deletions
+122
-50
qgroundcontrol.pro
qgroundcontrol.pro
+2
-2
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+6
-0
CustomMapItems.qml
src/FlightMap/MapItems/CustomMapItems.qml
+52
-0
qmldir
src/FlightMap/qmldir
+1
-0
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+39
-31
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+16
-12
QmlComponentInfo.cc
src/api/QmlComponentInfo.cc
+2
-2
QmlComponentInfo.h
src/api/QmlComponentInfo.h
+3
-3
No files found.
qgroundcontrol.pro
View file @
c208d174
...
@@ -390,12 +390,12 @@ FORMS += \
...
@@ -390,12 +390,12 @@ FORMS += \
HEADERS
+=
\
HEADERS
+=
\
src
/
api
/
QGCCorePlugin
.
h
\
src
/
api
/
QGCCorePlugin
.
h
\
src
/
api
/
QGCOptions
.
h
\
src
/
api
/
QGCOptions
.
h
\
src
/
api
/
Qml
Page
Info
.
h
\
src
/
api
/
Qml
Component
Info
.
h
\
SOURCES
+=
\
SOURCES
+=
\
src
/
api
/
QGCCorePlugin
.
cc
\
src
/
api
/
QGCCorePlugin
.
cc
\
src
/
api
/
QGCOptions
.
cc
\
src
/
api
/
QGCOptions
.
cc
\
src
/
api
/
Qml
Page
Info
.
cc
\
src
/
api
/
Qml
Component
Info
.
cc
\
#
#
#
Unit
Test
specific
configuration
goes
here
(
requires
full
debug
build
with
all
plugins
)
#
Unit
Test
specific
configuration
goes
here
(
requires
full
debug
build
with
all
plugins
)
...
...
qgroundcontrol.qrc
View file @
c208d174
...
@@ -145,6 +145,7 @@
...
@@ -145,6 +145,7 @@
<file alias="QGroundControl/FlightMap/CenterMapDropButton.qml">src/FlightMap/Widgets/CenterMapDropButton.qml</file>
<file alias="QGroundControl/FlightMap/CenterMapDropButton.qml">src/FlightMap/Widgets/CenterMapDropButton.qml</file>
<file alias="QGroundControl/FlightMap/CenterMapDropPanel.qml">src/FlightMap/Widgets/CenterMapDropPanel.qml</file>
<file alias="QGroundControl/FlightMap/CenterMapDropPanel.qml">src/FlightMap/Widgets/CenterMapDropPanel.qml</file>
<file alias="QGroundControl/FlightMap/CompassRing.qml">src/FlightMap/Widgets/CompassRing.qml</file>
<file alias="QGroundControl/FlightMap/CompassRing.qml">src/FlightMap/Widgets/CompassRing.qml</file>
<file alias="QGroundControl/FlightMap/CustomMapItems.qml">src/FlightMap/MapItems/CustomMapItems.qml</file>
<file alias="QGroundControl/FlightMap/MapFitFunctions.qml">src/FlightMap/Widgets/MapFitFunctions.qml</file>
<file alias="QGroundControl/FlightMap/MapFitFunctions.qml">src/FlightMap/Widgets/MapFitFunctions.qml</file>
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentSwipeView.qml">src/FlightMap/Widgets/InstrumentSwipeView.qml</file>
<file alias="QGroundControl/FlightMap/InstrumentSwipeView.qml">src/FlightMap/Widgets/InstrumentSwipeView.qml</file>
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
c208d174
...
@@ -226,6 +226,12 @@ FlightMap {
...
@@ -226,6 +226,12 @@ FlightMap {
}
}
}
}
// Allow custom builds to add map items
CustomMapItems
{
map
:
flightMap
largeMapView
:
_mainIsMap
}
GeoFenceMapVisuals
{
GeoFenceMapVisuals
{
map
:
flightMap
map
:
flightMap
myGeoFenceController
:
_geoFenceController
myGeoFenceController
:
_geoFenceController
...
...
src/FlightMap/MapItems/CustomMapItems.qml
0 → 100644
View file @
c208d174
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtLocation
5.3
import
QtPositioning
5.3
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
Vehicle
1.0
// Allow custom builds to add visual items associated with the Flight Plan to the map
Item
{
property
var
map
///< Map control to show items on
property
bool
largeMapView
///< true: map takes up entire view, false: map is in small window
Instantiator
{
model
:
QGroundControl
.
corePlugin
.
customMapItems
Item
{
property
var
_customObject
Component.onCompleted
:
{
var
controlUrl
=
object
.
url
if
(
controlUrl
!=
""
)
{
var
component
=
Qt
.
createComponent
(
controlUrl
);
if
(
component
.
status
==
Component
.
Ready
)
{
_customObject
=
_customComponent
.
createObject
(
map
,
{
"
vehicle
"
:
vehicle
});
if
(
_customObject
)
{
map
.
addMapItem
(
_customObject
)
}
}
else
{
console
.
log
(
"
Component creation failed
"
,
component
.
errorString
())
}
}
}
Component
.
onDestruction
:
{
if
(
_customObject
)
{
_customObject
.
destroy
()
}
}
}
}
}
src/FlightMap/qmldir
View file @
c208d174
...
@@ -19,6 +19,7 @@ QGCPitchIndicator 1.0 QGCPitchIndicator.qml
...
@@ -19,6 +19,7 @@ QGCPitchIndicator 1.0 QGCPitchIndicator.qml
# Map items
# Map items
CameraTriggerIndicator 1.0 CameraTriggerIndicator.qml
CameraTriggerIndicator 1.0 CameraTriggerIndicator.qml
CustomMapItems 1.0 CustomMapItems.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicatorDrag 1.0 MissionItemIndicatorDrag.qml
MissionItemIndicatorDrag 1.0 MissionItemIndicatorDrag.qml
MissionItemView 1.0 MissionItemView.qml
MissionItemView 1.0 MissionItemView.qml
...
...
src/api/QGCCorePlugin.cc
View file @
c208d174
...
@@ -10,10 +10,11 @@
...
@@ -10,10 +10,11 @@
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "QGCCorePlugin.h"
#include "QGCCorePlugin.h"
#include "QGCOptions.h"
#include "QGCOptions.h"
#include "Qml
Page
Info.h"
#include "Qml
Component
Info.h"
#include "FactMetaData.h"
#include "FactMetaData.h"
#include "SettingsManager.h"
#include "SettingsManager.h"
#include "AppMessages.h"
#include "AppMessages.h"
#include "QmlObjectListModel.h"
#include <QtQml>
#include <QtQml>
#include <QQmlEngine>
#include <QQmlEngine>
...
@@ -65,23 +66,25 @@ public:
...
@@ -65,23 +66,25 @@ public:
delete
defaultOptions
;
delete
defaultOptions
;
}
}
Qml
Page
Info
*
pGeneral
;
Qml
Component
Info
*
pGeneral
;
Qml
Page
Info
*
pCommLinks
;
Qml
Component
Info
*
pCommLinks
;
Qml
Page
Info
*
pOfflineMaps
;
Qml
Component
Info
*
pOfflineMaps
;
Qml
Page
Info
*
pMAVLink
;
Qml
Component
Info
*
pMAVLink
;
Qml
Page
Info
*
pConsole
;
Qml
Component
Info
*
pConsole
;
#if defined(QT_DEBUG)
#if defined(QT_DEBUG)
Qml
Page
Info
*
pMockLink
;
Qml
Component
Info
*
pMockLink
;
Qml
Page
Info
*
pDebug
;
Qml
Component
Info
*
pDebug
;
#endif
#endif
QVariantList
settingsList
;
QVariantList
settingsList
;
QGCOptions
*
defaultOptions
;
QGCOptions
*
defaultOptions
;
QmlPageInfo
*
valuesPageWidgetInfo
;
QmlComponentInfo
*
valuesPageWidgetInfo
;
QmlPageInfo
*
cameraPageWidgetInfo
;
QmlComponentInfo
*
cameraPageWidgetInfo
;
QmlPageInfo
*
healthPageWidgetInfo
;
QmlComponentInfo
*
healthPageWidgetInfo
;
QmlPageInfo
*
vibrationPageWidgetInfo
;
QmlComponentInfo
*
vibrationPageWidgetInfo
;
QVariantList
instrumentPageWidgetList
;
QVariantList
instrumentPageWidgetList
;
QmlObjectListModel
_emptyCustomMapItems
;
};
};
QGCCorePlugin
::~
QGCCorePlugin
()
QGCCorePlugin
::~
QGCCorePlugin
()
...
@@ -110,33 +113,33 @@ void QGCCorePlugin::setToolbox(QGCToolbox *toolbox)
...
@@ -110,33 +113,33 @@ void QGCCorePlugin::setToolbox(QGCToolbox *toolbox)
QVariantList
&
QGCCorePlugin
::
settingsPages
()
QVariantList
&
QGCCorePlugin
::
settingsPages
()
{
{
if
(
!
_p
->
pGeneral
)
{
if
(
!
_p
->
pGeneral
)
{
_p
->
pGeneral
=
new
Qml
Page
Info
(
tr
(
"General"
),
_p
->
pGeneral
=
new
Qml
Component
Info
(
tr
(
"General"
),
QUrl
::
fromUserInput
(
"qrc:/qml/GeneralSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/qml/GeneralSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/gear-white.svg"
));
QUrl
::
fromUserInput
(
"qrc:/res/gear-white.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pGeneral
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pGeneral
));
_p
->
pCommLinks
=
new
Qml
Page
Info
(
tr
(
"Comm Links"
),
_p
->
pCommLinks
=
new
Qml
Component
Info
(
tr
(
"Comm Links"
),
QUrl
::
fromUserInput
(
"qrc:/qml/LinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/qml/LinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pCommLinks
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pCommLinks
));
_p
->
pOfflineMaps
=
new
Qml
Page
Info
(
tr
(
"Offline Maps"
),
_p
->
pOfflineMaps
=
new
Qml
Component
Info
(
tr
(
"Offline Maps"
),
QUrl
::
fromUserInput
(
"qrc:/qml/OfflineMap.qml"
),
QUrl
::
fromUserInput
(
"qrc:/qml/OfflineMap.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pOfflineMaps
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pOfflineMaps
));
_p
->
pMAVLink
=
new
Qml
Page
Info
(
tr
(
"MAVLink"
),
_p
->
pMAVLink
=
new
Qml
Component
Info
(
tr
(
"MAVLink"
),
QUrl
::
fromUserInput
(
"qrc:/qml/MavlinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/qml/MavlinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pMAVLink
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pMAVLink
));
_p
->
pConsole
=
new
Qml
Page
Info
(
tr
(
"Console"
),
_p
->
pConsole
=
new
Qml
Component
Info
(
tr
(
"Console"
),
QUrl
::
fromUserInput
(
"qrc:/qml/QGroundControl/Controls/AppMessages.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/QGroundControl/Controls/AppMessages.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pConsole
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pConsole
));
#if defined(QT_DEBUG)
#if defined(QT_DEBUG)
//-- These are always present on Debug builds
//-- These are always present on Debug builds
_p
->
pMockLink
=
new
Qml
Page
Info
(
tr
(
"Mock Link"
),
_p
->
pMockLink
=
new
Qml
Component
Info
(
tr
(
"Mock Link"
),
QUrl
::
fromUserInput
(
"qrc:/qml/MockLink.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/MockLink.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pMockLink
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pMockLink
));
_p
->
pDebug
=
new
Qml
Page
Info
(
tr
(
"Debug"
),
_p
->
pDebug
=
new
Qml
Component
Info
(
tr
(
"Debug"
),
QUrl
::
fromUserInput
(
"qrc:/qml/DebugWindow.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/DebugWindow.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Page
Info
*
)
_p
->
pDebug
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
Qml
Component
Info
*
)
_p
->
pDebug
));
#endif
#endif
}
}
return
_p
->
settingsList
;
return
_p
->
settingsList
;
...
@@ -145,10 +148,10 @@ QVariantList &QGCCorePlugin::settingsPages()
...
@@ -145,10 +148,10 @@ QVariantList &QGCCorePlugin::settingsPages()
QVariantList
&
QGCCorePlugin
::
instrumentPages
(
void
)
QVariantList
&
QGCCorePlugin
::
instrumentPages
(
void
)
{
{
if
(
!
_p
->
valuesPageWidgetInfo
)
{
if
(
!
_p
->
valuesPageWidgetInfo
)
{
_p
->
valuesPageWidgetInfo
=
new
Qml
Page
Info
(
tr
(
"Values"
),
QUrl
::
fromUserInput
(
"qrc:/qml/ValuePageWidget.qml"
));
_p
->
valuesPageWidgetInfo
=
new
Qml
Component
Info
(
tr
(
"Values"
),
QUrl
::
fromUserInput
(
"qrc:/qml/ValuePageWidget.qml"
));
_p
->
cameraPageWidgetInfo
=
new
Qml
Page
Info
(
tr
(
"Camera"
),
QUrl
::
fromUserInput
(
"qrc:/qml/CameraPageWidget.qml"
));
_p
->
cameraPageWidgetInfo
=
new
Qml
Component
Info
(
tr
(
"Camera"
),
QUrl
::
fromUserInput
(
"qrc:/qml/CameraPageWidget.qml"
));
_p
->
healthPageWidgetInfo
=
new
Qml
Page
Info
(
tr
(
"Health"
),
QUrl
::
fromUserInput
(
"qrc:/qml/HealthPageWidget.qml"
));
_p
->
healthPageWidgetInfo
=
new
Qml
Component
Info
(
tr
(
"Health"
),
QUrl
::
fromUserInput
(
"qrc:/qml/HealthPageWidget.qml"
));
_p
->
vibrationPageWidgetInfo
=
new
Qml
Page
Info
(
tr
(
"Vibration"
),
QUrl
::
fromUserInput
(
"qrc:/qml/VibrationPageWidget.qml"
));
_p
->
vibrationPageWidgetInfo
=
new
Qml
Component
Info
(
tr
(
"Vibration"
),
QUrl
::
fromUserInput
(
"qrc:/qml/VibrationPageWidget.qml"
));
_p
->
instrumentPageWidgetList
.
append
(
QVariant
::
fromValue
(
_p
->
valuesPageWidgetInfo
));
_p
->
instrumentPageWidgetList
.
append
(
QVariant
::
fromValue
(
_p
->
valuesPageWidgetInfo
));
_p
->
instrumentPageWidgetList
.
append
(
QVariant
::
fromValue
(
_p
->
cameraPageWidgetInfo
));
_p
->
instrumentPageWidgetList
.
append
(
QVariant
::
fromValue
(
_p
->
cameraPageWidgetInfo
));
...
@@ -265,3 +268,8 @@ bool QGCCorePlugin::mavlinkMessage(Vehicle* vehicle, LinkInterface* link, mavlin
...
@@ -265,3 +268,8 @@ bool QGCCorePlugin::mavlinkMessage(Vehicle* vehicle, LinkInterface* link, mavlin
return
true
;
return
true
;
}
}
QmlObjectListModel
*
QGCCorePlugin
::
customMapItems
(
void
)
{
return
&
_p
->
_emptyCustomMapItems
;
}
src/api/QGCCorePlugin.h
View file @
c208d174
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "QGCToolbox.h"
#include "QGCToolbox.h"
#include "QGCPalette.h"
#include "QGCPalette.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include "QmlObjectListModel.h"
#include <QObject>
#include <QObject>
#include <QVariantList>
#include <QVariantList>
...
@@ -31,7 +32,7 @@ class QGeoPositionInfoSource;
...
@@ -31,7 +32,7 @@ class QGeoPositionInfoSource;
class
QQmlApplicationEngine
;
class
QQmlApplicationEngine
;
class
Vehicle
;
class
Vehicle
;
class
LinkInterface
;
class
LinkInterface
;
class
QmlObjectListModel
;
class
QGCCorePlugin
:
public
QGCTool
class
QGCCorePlugin
:
public
QGCTool
{
{
Q_OBJECT
Q_OBJECT
...
@@ -39,17 +40,16 @@ public:
...
@@ -39,17 +40,16 @@ public:
QGCCorePlugin
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
QGCCorePlugin
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
);
~
QGCCorePlugin
();
~
QGCCorePlugin
();
Q_PROPERTY
(
QVariantList
settingsPages
READ
settingsPages
NOTIFY
settingsPagesChanged
)
Q_PROPERTY
(
QVariantList
settingsPages
READ
settingsPages
NOTIFY
settingsPagesChanged
)
Q_PROPERTY
(
QVariantList
instrumentPages
READ
instrumentPages
NOTIFY
instrumentPagesChanged
)
Q_PROPERTY
(
QVariantList
instrumentPages
READ
instrumentPages
NOTIFY
instrumentPagesChanged
)
Q_PROPERTY
(
int
defaultSettings
READ
defaultSettings
CONSTANT
)
Q_PROPERTY
(
int
defaultSettings
READ
defaultSettings
CONSTANT
)
Q_PROPERTY
(
QGCOptions
*
options
READ
options
CONSTANT
)
Q_PROPERTY
(
QGCOptions
*
options
READ
options
CONSTANT
)
Q_PROPERTY
(
bool
showTouchAreas
READ
showTouchAreas
WRITE
setShowTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showTouchAreas
READ
showTouchAreas
WRITE
setShowTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
READ
showAdvancedUI
WRITE
setShowAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
READ
showAdvancedUI
WRITE
setShowAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
QString
showAdvancedUIMessage
READ
showAdvancedUIMessage
CONSTANT
)
Q_PROPERTY
(
QString
showAdvancedUIMessage
READ
showAdvancedUIMessage
CONSTANT
)
Q_PROPERTY
(
QString
brandImageIndoor
READ
brandImageIndoor
CONSTANT
)
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageOutdoor
CONSTANT
)
Q_PROPERTY
(
QString
brandImageIndoor
READ
brandImageIndoor
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
customMapItems
READ
customMapItems
CONSTANT
)
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageOutdoor
CONSTANT
)
/// The list of settings under the Settings Menu
/// The list of settings under the Settings Menu
/// @return A list of QGCSettings
/// @return A list of QGCSettings
...
@@ -102,6 +102,10 @@ public:
...
@@ -102,6 +102,10 @@ public:
/// @return true: Allow vehicle to continue processing, false: Vehicle should not process message
/// @return true: Allow vehicle to continue processing, false: Vehicle should not process message
virtual
bool
mavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
link
,
mavlink_message_t
message
);
virtual
bool
mavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
link
,
mavlink_message_t
message
);
/// Allows custom builds to add custom items to the FlightMap. Objects put into QmlObjectListModel
/// should derive from QmlComponentInfo and set the url property.
virtual
QmlObjectListModel
*
customMapItems
(
void
);
bool
showTouchAreas
(
void
)
const
{
return
_showTouchAreas
;
}
bool
showTouchAreas
(
void
)
const
{
return
_showTouchAreas
;
}
bool
showAdvancedUI
(
void
)
const
{
return
_showAdvancedUI
;
}
bool
showAdvancedUI
(
void
)
const
{
return
_showAdvancedUI
;
}
void
setShowTouchAreas
(
bool
show
);
void
setShowTouchAreas
(
bool
show
);
...
...
src/api/Qml
Page
Info.cc
→
src/api/Qml
Component
Info.cc
View file @
c208d174
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
*
*
****************************************************************************/
****************************************************************************/
#include "Qml
Page
Info.h"
#include "Qml
Component
Info.h"
Qml
PageInfo
::
QmlPage
Info
(
QString
title
,
QUrl
url
,
QUrl
icon
,
QObject
*
parent
)
Qml
ComponentInfo
::
QmlComponent
Info
(
QString
title
,
QUrl
url
,
QUrl
icon
,
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
,
_title
(
title
)
,
_title
(
title
)
,
_url
(
url
)
,
_url
(
url
)
...
...
src/api/Qml
Page
Info.h
→
src/api/Qml
Component
Info.h
View file @
c208d174
...
@@ -12,13 +12,13 @@
...
@@ -12,13 +12,13 @@
#include <QObject>
#include <QObject>
#include <QUrl>
#include <QUrl>
/// Represents a
/// Represents a
Qml component which can be loaded from a resource.
class
Qml
Page
Info
:
public
QObject
class
Qml
Component
Info
:
public
QObject
{
{
Q_OBJECT
Q_OBJECT
public:
public:
Qml
Page
Info
(
QString
title
,
QUrl
url
,
QUrl
icon
=
QUrl
(),
QObject
*
parent
=
NULL
);
Qml
Component
Info
(
QString
title
,
QUrl
url
,
QUrl
icon
=
QUrl
(),
QObject
*
parent
=
NULL
);
Q_PROPERTY
(
QString
title
READ
title
CONSTANT
)
///< Title for page
Q_PROPERTY
(
QString
title
READ
title
CONSTANT
)
///< Title for page
Q_PROPERTY
(
QUrl
url
READ
url
CONSTANT
)
///< Qml source code
Q_PROPERTY
(
QUrl
url
READ
url
CONSTANT
)
///< Qml source code
...
...
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