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
548faac1
Commit
548faac1
authored
Nov 09, 2016
by
Don Gagne
Committed by
GitHub
Nov 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4160 from DonLakeFlyer/QGCVersion
Add QGC version info to bottom of Settings/General
parents
750072dc
b7e930ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
22 deletions
+10
-22
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+4
-0
MainWindow.cc
src/ui/MainWindow.cc
+1
-22
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+5
-0
No files found.
src/QmlControls/QGroundControlQmlGlobal.h
View file @
548faac1
...
...
@@ -112,6 +112,8 @@ public:
Q_PROPERTY
(
QString
appSettingsDistanceUnitsString
READ
appSettingsDistanceUnitsString
CONSTANT
)
Q_PROPERTY
(
QString
appSettingsAreaUnitsString
READ
appSettingsAreaUnitsString
CONSTANT
)
Q_PROPERTY
(
QString
qgcVersion
READ
qgcVersion
CONSTANT
)
Q_INVOKABLE
void
saveGlobalSetting
(
const
QString
&
key
,
const
QString
&
value
);
Q_INVOKABLE
QString
loadGlobalSetting
(
const
QString
&
key
,
const
QString
&
defaultValue
);
Q_INVOKABLE
void
saveBoolGlobalSetting
(
const
QString
&
key
,
bool
value
);
...
...
@@ -211,6 +213,8 @@ public:
QString
missionFileExtension
(
void
)
const
{
return
QGCApplication
::
missionFileExtension
;
}
QString
telemetryFileExtension
(
void
)
const
{
return
QGCApplication
::
telemetryFileExtension
;
}
QString
qgcVersion
(
void
)
const
{
return
qgcApp
()
->
applicationVersion
();
}
// Overrides from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
src/ui/MainWindow.cc
View file @
548faac1
...
...
@@ -452,28 +452,7 @@ void MainWindow::storeSettings()
void
MainWindow
::
configureWindowName
()
{
QList
<
QHostAddress
>
hostAddresses
=
QNetworkInterface
::
allAddresses
();
QString
windowname
=
qApp
->
applicationName
()
+
" "
+
qApp
->
applicationVersion
();
// XXX we do have UDP MAVLink heartbeat broadcast now in SITL and will have it on the
// WIFI radio, so people should not be in need any more of knowing their IP.
// this can go once we are certain its not needed any more.
#if 0
bool prevAddr = false;
windowname.append(" (" + QHostInfo::localHostName() + ": ");
for (int i = 0; i < hostAddresses.size(); i++)
{
// Exclude loopback IPv4 and all IPv6 addresses
if (hostAddresses.at(i) != QHostAddress("127.0.0.1") && !hostAddresses.at(i).toString().contains(":"))
{
if(prevAddr) windowname.append("/");
windowname.append(hostAddresses.at(i).toString());
prevAddr = true;
}
}
windowname.append(")");
#endif
setWindowTitle
(
windowname
);
setWindowTitle
(
qApp
->
applicationName
()
+
" "
+
qApp
->
applicationVersion
());
}
/**
...
...
src/ui/preferences/GeneralSettings.qml
View file @
548faac1
...
...
@@ -575,6 +575,11 @@ QGCView {
}
}
}
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
qsTr
(
"
QGroundControl Version:
"
+
QGroundControl
.
qgcVersion
)
}
}
// settingsColumn
}
// QGCFlickable
}
// QGCViewPanel
...
...
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