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
3acd1ab7
Commit
3acd1ab7
authored
10 years ago
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QDesktopServices no longer provides system paths, switched to QStandardPaths.
parent
187293ea
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
23 deletions
+23
-23
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+3
-3
HUD.cc
src/ui/HUD.cc
+3
-3
MAVLinkSettingsWidget.cc
src/ui/MAVLinkSettingsWidget.cc
+2
-2
MainWindow.cc
src/ui/MainWindow.cc
+1
-1
QGCDataPlot2D.cc
src/ui/QGCDataPlot2D.cc
+5
-5
QGCMAVLinkLogPlayer.cc
src/ui/QGCMAVLinkLogPlayer.cc
+2
-2
QGCStatusBar.cc
src/ui/QGCStatusBar.cc
+1
-1
QGCToolWidget.cc
src/ui/designer/QGCToolWidget.cc
+3
-3
LinechartWidget.cc
src/ui/linechart/LinechartWidget.cc
+3
-3
No files found.
src/comm/MAVLinkProtocol.cc
View file @
3acd1ab7
...
...
@@ -15,7 +15,7 @@
#include <QApplication>
#include <QMessageBox>
#include <QSettings>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include <QtEndian>
#include <QMetaType>
...
...
@@ -101,7 +101,7 @@ void MAVLinkProtocol::loadSettings()
}
else
if
(
m_logfile
==
NULL
)
{
m_logfile
=
new
QFile
(
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
HomeLocation
)
+
"/qgroundcontrol_packetlog.mavlink"
);
m_logfile
=
new
QFile
(
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
HomeLocation
)
+
"/qgroundcontrol_packetlog.mavlink"
);
}
// Enable logging
enableLogging
(
settings
.
value
(
"LOGGING_ENABLED"
,
m_loggingEnabled
).
toBool
());
...
...
@@ -205,7 +205,7 @@ QString MAVLinkProtocol::getLogfileName()
}
else
{
return
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
HomeLocation
)
+
"/qgroundcontrol_packetlog.mavlink"
;
return
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
HomeLocation
)
+
"/qgroundcontrol_packetlog.mavlink"
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ui/HUD.cc
View file @
3acd1ab7
...
...
@@ -32,7 +32,7 @@ This file is part of the QGROUNDCONTROL project
#include <QShowEvent>
#include <QContextMenuEvent>
#include <QMenu>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include <QFileDialog>
#include <QPaintEvent>
#include <QDebug>
...
...
@@ -1313,7 +1313,7 @@ void HUD::saveImage()
void
HUD
::
selectOfflineDirectory
()
{
QString
fileName
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Select image directory"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
));
QString
fileName
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Select image directory"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
));
if
(
fileName
!=
""
)
{
offlineDirectory
=
fileName
;
}
...
...
@@ -1392,7 +1392,7 @@ void HUD::saveImages(bool save)
QFileDialog
dialog
(
this
);
dialog
.
setFileMode
(
QFileDialog
::
DirectoryOnly
);
imageLogDirectory
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Select image log directory"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
));
imageLogDirectory
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Select image log directory"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
));
qDebug
()
<<
"Logging to:"
<<
imageLogDirectory
;
...
...
This diff is collapsed.
Click to expand it.
src/ui/MAVLinkSettingsWidget.cc
View file @
3acd1ab7
...
...
@@ -30,7 +30,7 @@ This file is part of the QGROUNDCONTROL project
#include <QFileInfo>
#include <QFileDialog>
#include <QMessageBox>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include "MAVLinkSettingsWidget.h"
#include "LinkManager.h"
...
...
@@ -154,7 +154,7 @@ void MAVLinkSettingsWidget::updateLogfileName(const QString& fileName)
void
MAVLinkSettingsWidget
::
chooseLogfileName
()
{
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify MAVLink log file name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"MAVLink Logfile (*.mavlink);;"
));
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify MAVLink log file name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"MAVLink Logfile (*.mavlink);;"
));
if
(
!
fileName
.
endsWith
(
".mavlink"
))
{
...
...
This diff is collapsed.
Click to expand it.
src/ui/MainWindow.cc
View file @
3acd1ab7
...
...
@@ -970,7 +970,7 @@ void MainWindow::createCustomWidget()
void
MainWindow
::
loadCustomWidget
()
{
QString
widgetFileExtension
(
".qgw"
);
QString
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify Widget File Name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
QString
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify Widget File Name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
if
(
fileName
!=
""
)
loadCustomWidget
(
fileName
);
}
void
MainWindow
::
loadCustomWidget
(
const
QString
&
fileName
,
int
view
)
...
...
This diff is collapsed.
Click to expand it.
src/ui/QGCDataPlot2D.cc
View file @
3acd1ab7
...
...
@@ -36,7 +36,7 @@ This file is part of the QGROUNDCONTROL project
#include <QHBoxLayout>
#include <QSvgGenerator>
#include <QPrinter>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include "QGCDataPlot2D.h"
#include "ui_QGCDataPlot2D.h"
#include "MG.h"
...
...
@@ -118,7 +118,7 @@ void QGCDataPlot2D::savePlot()
{
QString
fileName
=
"plot.svg"
;
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
"Export File Name"
,
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
this
,
"Export File Name"
,
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
"PDF Documents (*.pdf);;SVG Images (*.svg)"
);
if
(
fileName
.
isEmpty
())
return
;
...
...
@@ -138,7 +138,7 @@ void QGCDataPlot2D::savePlot()
// Abort if cancelled
if
(
msgBox
.
exec
()
==
QMessageBox
::
Cancel
)
return
;
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
"Export File Name"
,
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
this
,
"Export File Name"
,
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
"PDF Documents (*.pdf);;SVG Images (*.svg)"
);
if
(
fileName
.
isEmpty
())
return
;
//Abort if cancelled
...
...
@@ -694,7 +694,7 @@ void QGCDataPlot2D::saveCsvLog()
{
QString
fileName
=
"export.csv"
;
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
"Export CSV File Name"
,
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
this
,
"Export CSV File Name"
,
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
"CSV file (*.csv);;Text file (*.txt)"
);
if
(
fileName
.
isEmpty
())
return
;
//User cancelled
...
...
@@ -720,7 +720,7 @@ void QGCDataPlot2D::saveCsvLog()
// msgBox.setDefaultButton(QMessageBox::Ok);
// if(msgBox.exec() == QMessageBox::Cancel) break;
// fileName = QFileDialog::getSaveFileName(
// this, "Export CSV File Name", Q
DesktopServices::storageLocation(QDesktopService
s::DesktopLocation),
// this, "Export CSV File Name", Q
StandardPaths::writableLocation(QStandardPath
s::DesktopLocation),
// "CSV file (*.csv);;Text file (*.txt)");
// }
...
...
This diff is collapsed.
Click to expand it.
src/ui/QGCMAVLinkLogPlayer.cc
View file @
3acd1ab7
#include <QFileDialog>
#include <QMessageBox>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include <QtEndian>
#include "MainWindow.h"
...
...
@@ -22,7 +22,7 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(MAVLinkProtocol* mavlink, QWidget *pare
binaryBaudRate
(
defaultBinaryBaudRate
),
isPlaying
(
false
),
currPacketCount
(
0
),
lastLogDirectory
(
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
)),
lastLogDirectory
(
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
)),
ui
(
new
Ui
::
QGCMAVLinkLogPlayer
)
{
ui
->
setupUi
(
this
);
...
...
This diff is collapsed.
Click to expand it.
src/ui/QGCStatusBar.cc
View file @
3acd1ab7
...
...
@@ -33,7 +33,7 @@ QGCStatusBar::QGCStatusBar(QWidget *parent) :
toggleLoggingButton
(
NULL
),
player
(
NULL
),
changed
(
true
),
lastLogDirectory
(
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
))
lastLogDirectory
(
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
))
{
setObjectName
(
"QGC_STATUSBAR"
);
...
...
This diff is collapsed.
Click to expand it.
src/ui/designer/QGCToolWidget.cc
View file @
3acd1ab7
...
...
@@ -8,7 +8,7 @@
#include <QContextMenuEvent>
#include <QSettings>
#include <QFileDialog>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include "QGCParamSlider.h"
#include "QGCComboBox.h"
...
...
@@ -571,7 +571,7 @@ void QGCToolWidget::widgetRemoved()
void
QGCToolWidget
::
exportWidget
()
{
const
QString
widgetFileExtension
(
".qgw"
);
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify File Name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify File Name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
if
(
!
fileName
.
endsWith
(
widgetFileExtension
))
{
fileName
=
fileName
.
append
(
widgetFileExtension
);
...
...
@@ -583,7 +583,7 @@ void QGCToolWidget::exportWidget()
void
QGCToolWidget
::
importWidget
()
{
const
QString
widgetFileExtension
(
".qgw"
);
QString
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify File Name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
QString
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify File Name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
loadSettings
(
fileName
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ui/linechart/LinechartWidget.cc
View file @
3acd1ab7
...
...
@@ -43,7 +43,7 @@ This file is part of the PIXHAWK project
#include <QColor>
#include <QPalette>
#include <QFileDialog>
#include <Q
DesktopService
s>
#include <Q
StandardPath
s>
#include <QMessageBox>
#include "LinechartWidget.h"
...
...
@@ -454,7 +454,7 @@ void LinechartWidget::startLogging()
// Let user select the log file name
//QDate date(QDate::currentDate());
// QString("./pixhawk-log-" + date.toString("yyyy-MM-dd") + "-" + QString::number(logindex) + ".log")
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify log file name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"Logfile (*.log);;"
));
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify log file name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"Logfile (*.log);;"
));
while
(
!
(
fileName
.
endsWith
(
".log"
))
&&
!
abort
&&
fileName
!=
""
)
{
QMessageBox
msgBox
;
...
...
@@ -468,7 +468,7 @@ void LinechartWidget::startLogging()
abort
=
true
;
break
;
}
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify log file name"
),
Q
DesktopServices
::
storageLocation
(
QDesktopService
s
::
DesktopLocation
),
tr
(
"Logfile (*.log);;"
));
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Specify log file name"
),
Q
StandardPaths
::
writableLocation
(
QStandardPath
s
::
DesktopLocation
),
tr
(
"Logfile (*.log);;"
));
}
qDebug
()
<<
"SAVE FILE"
<<
fileName
;
...
...
This diff is collapsed.
Click to expand it.
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