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
e926ce69
Commit
e926ce69
authored
Mar 15, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core plugin can set app wide brand image
parent
74766ba8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
21 deletions
+36
-21
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+11
-2
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+0
-11
MainToolBarIndicators.qml
src/ui/toolbar/MainToolBarIndicators.qml
+25
-8
No files found.
src/api/QGCCorePlugin.h
View file @
e926ce69
...
...
@@ -37,8 +37,11 @@ public:
Q_PROPERTY
(
int
defaultSettings
READ
defaultSettings
CONSTANT
)
Q_PROPERTY
(
QGCOptions
*
options
READ
options
CONSTANT
)
Q_PROPERTY
(
bool
showTouchAreas
MEMBER
_showTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
MEMBER
_showAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
bool
showTouchAreas
MEMBER
_showTouchAreas
NOTIFY
showTouchAreasChanged
)
Q_PROPERTY
(
bool
showAdvancedUI
MEMBER
_showAdvancedUI
NOTIFY
showAdvancedUIChanged
)
Q_PROPERTY
(
QString
brandImageIndoor
READ
brandImageIndoor
CONSTANT
)
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageIndoor
CONSTANT
)
/// The list of settings under the Settings Menu
/// @return A list of QGCSettings
...
...
@@ -62,6 +65,12 @@ public:
/// @return true: Setting should be visible in ui, false: Setting should not be shown in ui
virtual
bool
adjustSettingMetaData
(
FactMetaData
&
metaData
);
/// Return the resource file which contains the brand image for for Indoor theme.
virtual
QString
brandImageIndoor
(
void
)
const
{
return
QString
();
}
/// Return the resource file which contains the brand image for for Outdoor theme.
virtual
QString
brandImageOutdoor
(
void
)
const
{
return
QString
();
}
// Override from QGCTool
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
src/ui/toolbar/MainToolBar.qml
View file @
e926ce69
...
...
@@ -230,17 +230,6 @@ Rectangle {
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
Layout.fillWidth
:
true
visible
:
_activeVehicle
}
QGCLabel
{
id
:
waitForVehicle
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Waiting For Vehicle Connection
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
colorRed
visible
:
!
_activeVehicle
}
}
...
...
src/ui/toolbar/MainToolBarIndicators.qml
View file @
e926ce69
...
...
@@ -19,19 +19,31 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Palette
1.0
Item
{
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
var
_
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_communicationLost
:
_activeVehicle
?
_
activeVehicle
.
connectionLost
:
false
QGCPalette
{
id
:
qgcPal
}
QGCLabel
{
id
:
waitForVehicle
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Waiting For Vehicle Connection
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
font.family
:
ScreenTools
.
demiboldFontFamily
color
:
colorRed
visible
:
!
_activeVehicle
}
Row
{
id
:
indicatorRow
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
spacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
visible
:
!
communicationLost
visible
:
_activeVehicle
&&
!
_communicationLost
Repeater
{
model
:
activeVehicle
?
activeVehicle
.
toolBarIndicators
:
[]
model
:
_activeVehicle
?
_
activeVehicle
.
toolBarIndicators
:
[]
Loader
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -44,23 +56,28 @@ Item {
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
visible
:
x
>
indicatorRow
.
width
&&
!
communicationLost
visible
:
x
>
indicatorRow
.
width
&&
!
_
communicationLost
fillMode
:
Image
.
PreserveAspectFit
source
:
activeVehicle
?
activeVehicle
.
brandImage
:
""
source
:
_outdoorPalette
?
_brandImageOutdoor
:
_brandImageIndoor
property
bool
_outdoorPalette
:
qgcPal
.
globalTheme
===
QGCPalette
.
Light
property
bool
_corePluginBranding
:
QGroundControl
.
corePlugin
.
brandImageIndoor
.
length
!=
0
property
string
_brandImageIndoor
:
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageIndoor
:
(
_activeVehicle
?
_activeVehicle
.
brandImageIndoor
:
""
)
property
string
_brandImageOutdoor
:
_corePluginBranding
?
QGroundControl
.
corePlugin
.
brandImageOutdoor
:
(
_activeVehicle
?
_activeVehicle
.
brandImageOutdoor
:
""
)
}
Row
{
anchors.fill
:
parent
layoutDirection
:
Qt
.
RightToLeft
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
communicationLost
visible
:
_
communicationLost
QGCButton
{
id
:
disconnectButton
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
qsTr
(
"
Disconnect
"
)
primary
:
true
onClicked
:
activeVehicle
.
disconnectInactiveVehicle
()
onClicked
:
_
activeVehicle
.
disconnectInactiveVehicle
()
}
QGCLabel
{
...
...
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