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
3c723b7f
Commit
3c723b7f
authored
Mar 15, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing set methods
parent
f862388b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
23 deletions
+41
-23
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+35
-19
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+6
-4
No files found.
src/api/QGCCorePlugin.cc
View file @
3c723b7f
...
...
@@ -29,10 +29,10 @@ public:
,
pOfflineMaps
(
NULL
)
,
pMAVLink
(
NULL
)
,
pConsole
(
NULL
)
#if defined(QT_DEBUG)
#if defined(QT_DEBUG)
,
pMockLink
(
NULL
)
,
pDebug
(
NULL
)
#endif
#endif
,
defaultOptions
(
NULL
)
{
}
...
...
@@ -89,10 +89,10 @@ QGCCorePlugin::QGCCorePlugin(QGCApplication *app)
void
QGCCorePlugin
::
setToolbox
(
QGCToolbox
*
toolbox
)
{
QGCTool
::
setToolbox
(
toolbox
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
QGCCorePlugin
>
(
"QGroundControl.QGCCorePlugin"
,
1
,
0
,
"QGCCorePlugin"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCOptions
>
(
"QGroundControl.QGCOptions"
,
1
,
0
,
"QGCOptions"
,
"Reference only"
);
QGCTool
::
setToolbox
(
toolbox
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
QGCCorePlugin
>
(
"QGroundControl.QGCCorePlugin"
,
1
,
0
,
"QGCCorePlugin"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCOptions
>
(
"QGroundControl.QGCOptions"
,
1
,
0
,
"QGCOptions"
,
"Reference only"
);
}
QVariantList
&
QGCCorePlugin
::
settingsPages
()
...
...
@@ -101,33 +101,33 @@ QVariantList &QGCCorePlugin::settingsPages()
if
(
!
_p
->
pGeneral
)
{
//-- Default Settings
_p
->
pGeneral
=
new
QGCSettings
(
tr
(
"General"
),
QUrl
::
fromUserInput
(
"qrc:/qml/GeneralSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/gear-white.svg"
));
QUrl
::
fromUserInput
(
"qrc:/qml/GeneralSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/gear-white.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pGeneral
));
_p
->
pCommLinks
=
new
QGCSettings
(
tr
(
"Comm Links"
),
QUrl
::
fromUserInput
(
"qrc:/qml/LinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/qml/LinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pCommLinks
));
_p
->
pOfflineMaps
=
new
QGCSettings
(
tr
(
"Offline Maps"
),
QUrl
::
fromUserInput
(
"qrc:/qml/OfflineMap.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/qml/OfflineMap.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pOfflineMaps
));
_p
->
pMAVLink
=
new
QGCSettings
(
tr
(
"MAVLink"
),
QUrl
::
fromUserInput
(
"qrc:/qml/MavlinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
QUrl
::
fromUserInput
(
"qrc:/qml/MavlinkSettings.qml"
),
QUrl
::
fromUserInput
(
"qrc:/res/waves.svg"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pMAVLink
));
_p
->
pConsole
=
new
QGCSettings
(
tr
(
"Console"
),
QUrl
::
fromUserInput
(
"qrc:/qml/QGroundControl/Controls/AppMessages.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/QGroundControl/Controls/AppMessages.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pConsole
));
#if defined(QT_DEBUG)
#if defined(QT_DEBUG)
//-- These are always present on Debug builds
_p
->
pMockLink
=
new
QGCSettings
(
tr
(
"Mock Link"
),
QUrl
::
fromUserInput
(
"qrc:/qml/MockLink.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/MockLink.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pMockLink
));
_p
->
pDebug
=
new
QGCSettings
(
tr
(
"Debug"
),
QUrl
::
fromUserInput
(
"qrc:/qml/DebugWindow.qml"
));
QUrl
::
fromUserInput
(
"qrc:/qml/DebugWindow.qml"
));
_p
->
settingsList
.
append
(
QVariant
::
fromValue
((
QGCSettings
*
)
_p
->
pDebug
));
#endif
#endif
}
return
_p
->
settingsList
;
}
...
...
@@ -168,3 +168,19 @@ bool QGCCorePlugin::adjustSettingMetaData(FactMetaData& metaData)
return
true
;
// Show setting in ui
}
void
QGCCorePlugin
::
setShowTouchAreas
(
bool
show
)
{
if
(
show
!=
_showTouchAreas
)
{
_showTouchAreas
=
show
;
emit
showTouchAreasChanged
(
show
);
}
}
void
QGCCorePlugin
::
setShowAdvancedUI
(
bool
show
)
{
if
(
show
!=
_showAdvancedUI
)
{
_showAdvancedUI
=
show
;
emit
showAdvancedUIChanged
(
show
);
}
}
src/api/QGCCorePlugin.h
View file @
3c723b7f
...
...
@@ -37,8 +37,8 @@ public:
Q_PROPERTY
(
int
defaultSettings
READ
defaultSettings
CONSTANT
)
Q_PROPERTY
(
QGCOptions
*
options
READ
options
CONSTANT
)
Q_PROPERTY
(
bool
showTouchAreas
READ
showTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
READ
showAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
bool
showTouchAreas
READ
showTouchAreas
WRITE
setShowTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
READ
showAdvancedUI
WRITE
setShowAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
QString
brandImageIndoor
READ
brandImageIndoor
CONSTANT
)
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageIndoor
CONSTANT
)
...
...
@@ -71,8 +71,10 @@ public:
/// Return the resource file which contains the brand image for for Outdoor theme.
virtual
QString
brandImageOutdoor
(
void
)
const
{
return
QString
();
}
bool
showTouchAreas
(
void
)
{
return
_showTouchAreas
;
}
bool
showAdvancedUI
(
void
)
{
return
_showAdvancedUI
;
}
bool
showTouchAreas
(
void
)
const
{
return
_showTouchAreas
;
}
bool
showAdvancedUI
(
void
)
const
{
return
_showAdvancedUI
;
}
void
setShowTouchAreas
(
bool
show
);
void
setShowAdvancedUI
(
bool
show
);
// Override from QGCTool
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
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