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
74e1e580
Commit
74e1e580
authored
Nov 24, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cross platform variadic issues
Plus change to use QGCFileDialog
parent
a6870045
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
MainWindow.cc
src/ui/MainWindow.cc
+7
-5
No files found.
src/ui/MainWindow.cc
View file @
74e1e580
...
...
@@ -39,6 +39,8 @@ This file is part of the QGROUNDCONTROL project
#include <QGCHilConfiguration.h>
#include <QGCHilFlightGearConfiguration.h>
#include <QQuickView>
#include <QDesktopWidget>
#include "QGC.h"
#include "MAVLinkSimulationLink.h"
#include "SerialLink.h"
...
...
@@ -69,8 +71,8 @@ This file is part of the QGROUNDCONTROL project
#include "terminalconsole.h"
#include "menuactionhelper.h"
#include "QGCUASFileViewMulti.h"
#include <QDesktopWidget>
#include "QGCCore.h"
#include "QGCFileDialog.h"
#ifdef QGC_OSG_ENABLED
#include "Q3DWidgetFactory.h"
...
...
@@ -137,7 +139,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen, enum MainWindow::CUSTOM_MODE
connect
(
menuActionHelper
,
SIGNAL
(
needToShowDockWidget
(
QString
,
bool
)),
SLOT
(
showDockWidget
(
QString
,
bool
)));
connect
(
mavlink
,
SIGNAL
(
protocolStatusMessage
(
const
QString
&
,
const
QString
&
)),
this
,
SLOT
(
showCriticalMessage
(
const
QString
&
,
const
QString
&
)));
connect
(
mavlink
,
&
MAVLinkProtocol
::
saveTempFlightDataLog
,
this
,
&
MainWindow
::
_saveTempFlightDataLog
);
connect
(
mavlink
,
SIGNAL
(
saveTempFlightDataLog
(
QString
)),
this
,
SLOT
(
_saveTempFlightDataLog
(
QString
))
);
loadSettings
();
...
...
@@ -839,7 +841,7 @@ void MainWindow::createCustomWidget()
void
MainWindow
::
loadCustomWidget
()
{
QString
widgetFileExtension
(
".qgw"
);
QString
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify Widget File Name"
),
QStandardPaths
::
writableLocation
(
QStandardPaths
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
QString
fileName
=
Q
GC
FileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify Widget File Name"
),
QStandardPaths
::
writableLocation
(
QStandardPaths
::
DesktopLocation
),
tr
(
"QGroundControl Widget (*%1);;"
).
arg
(
widgetFileExtension
));
if
(
fileName
!=
""
)
loadCustomWidget
(
fileName
);
}
void
MainWindow
::
loadCustomWidget
(
const
QString
&
fileName
,
int
view
)
...
...
@@ -1020,7 +1022,7 @@ void MainWindow::startVideoCapture()
QString
format
=
"bmp"
;
QString
initialPath
=
QDir
::
currentPath
()
+
tr
(
"/untitled."
)
+
format
;
QString
screenFileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save As"
),
QString
screenFileName
=
Q
GC
FileDialog
::
getSaveFileName
(
this
,
tr
(
"Save As"
),
initialPath
,
tr
(
"%1 Files (*.%2);;All Files (*)"
)
.
arg
(
format
.
toUpper
())
...
...
@@ -1825,7 +1827,7 @@ void MainWindow::_saveTempFlightDataLog(QString tempLogfile)
{
if
(
qgcApp
()
->
promptFlightDataSave
())
{
_hideSplashScreen
();
QString
saveFilename
=
QFileDialog
::
getSaveFileName
(
this
,
QString
saveFilename
=
Q
GC
FileDialog
::
getSaveFileName
(
this
,
tr
(
"Select file to save Flight Data Log"
),
qgcApp
()
->
mavlinkLogFilesLocation
(),
tr
(
"Flight Data Log (*.mavlink)"
));
...
...
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