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
1b2cdb0a
Commit
1b2cdb0a
authored
Aug 19, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
560bd1b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
AppSettings.cc
src/Settings/AppSettings.cc
+18
-6
AppSettings.h
src/Settings/AppSettings.h
+3
-0
No files found.
src/Settings/AppSettings.cc
View file @
1b2cdb0a
...
...
@@ -27,12 +27,13 @@ const char* AppSettings::kmlFileExtension = "kml";
const
char
*
AppSettings
::
shpFileExtension
=
"shp"
;
const
char
*
AppSettings
::
logFileExtension
=
"ulg"
;
const
char
*
AppSettings
::
parameterDirectory
=
"Parameters"
;
const
char
*
AppSettings
::
telemetryDirectory
=
"Telemetry"
;
const
char
*
AppSettings
::
missionDirectory
=
"Missions"
;
const
char
*
AppSettings
::
logDirectory
=
"Logs"
;
const
char
*
AppSettings
::
videoDirectory
=
"Video"
;
const
char
*
AppSettings
::
crashDirectory
=
"CrashLogs"
;
const
char
*
AppSettings
::
parameterDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Parameters"
);
const
char
*
AppSettings
::
telemetryDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Telemetry"
);
const
char
*
AppSettings
::
missionDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Missions"
);
const
char
*
AppSettings
::
logDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Logs"
);
const
char
*
AppSettings
::
videoDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Video"
);
const
char
*
AppSettings
::
photoDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"Photo"
);
const
char
*
AppSettings
::
crashDirectory
=
QT_TRANSLATE_NOOP
(
"AppSettings"
,
"CrashLogs"
);
DECLARE_SETTINGGROUP
(
App
,
""
)
{
...
...
@@ -160,6 +161,7 @@ void AppSettings::_checkSavePathDirectories(void)
savePathDir
.
mkdir
(
missionDirectory
);
savePathDir
.
mkdir
(
logDirectory
);
savePathDir
.
mkdir
(
videoDirectory
);
savePathDir
.
mkdir
(
photoDirectory
);
savePathDir
.
mkdir
(
crashDirectory
);
}
}
...
...
@@ -219,6 +221,16 @@ QString AppSettings::videoSavePath(void)
return
QString
();
}
QString
AppSettings
::
photoSavePath
(
void
)
{
QString
path
=
savePath
()
->
rawValue
().
toString
();
if
(
!
path
.
isEmpty
()
&&
QDir
(
path
).
exists
())
{
QDir
dir
(
path
);
return
dir
.
filePath
(
photoDirectory
);
}
return
QString
();
}
QString
AppSettings
::
crashSavePath
(
void
)
{
QString
path
=
savePath
()
->
rawValue
().
toString
();
...
...
src/Settings/AppSettings.h
View file @
1b2cdb0a
...
...
@@ -71,6 +71,7 @@ public:
Q_PROPERTY
(
QString
telemetrySavePath
READ
telemetrySavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
logSavePath
READ
logSavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
videoSavePath
READ
videoSavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
photoSavePath
READ
photoSavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
crashSavePath
READ
crashSavePath
NOTIFY
savePathsChanged
)
Q_PROPERTY
(
QString
planFileExtension
MEMBER
planFileExtension
CONSTANT
)
...
...
@@ -87,6 +88,7 @@ public:
QString
telemetrySavePath
();
QString
logSavePath
();
QString
videoSavePath
();
QString
photoSavePath
();
QString
crashSavePath
();
// Helper methods for working with firstRunPromptIds QVariant settings string list
...
...
@@ -112,6 +114,7 @@ public:
static
const
char
*
missionDirectory
;
static
const
char
*
logDirectory
;
static
const
char
*
videoDirectory
;
static
const
char
*
photoDirectory
;
static
const
char
*
crashDirectory
;
// Returns the current language setting bypassing the standard SettingsGroup path. This should only be used
...
...
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